MyBB Community Forums

Full Version: Edit code buttons and Attachment post insert
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
According to the code, the button that allows for image attachment to be inserted into the text appears only when the editor is "equipped" with buttons that invokes bbcodes. But to my opinion that make no sense. When a forum is explicitly configured with an empty editor, this still means that people can enter bbcode, so it makes also sense to still allow text insertion of attachments.

BTW: I came into this topic, since I found out that the "insert into Post"-Button did not appear at all with the SCeditor (Wysiswyg).

In order to get it right with this editor, changes were made in identical code sections in editpost.php, newreply.php and newthread.php:
	if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || $mybb->user['showcodebuttons'] != 0))
// new
	if($mybb->settings['bbcodeinserter'] != 0 && $forum['allowmycode'] != 0 && (!$mybb->user['uid'] || 1))
What exactly is your question?
This is not a question. This simply may help people in solving an SCeditor problem, and - as stated - expressed my thoughts about the if-statement quoted.