MyBB Community Forums

Full Version: Change the PHP Code button in the text editor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Hopefully this is a quick and easy one, but with little back-end code experience, it's not something I can figure out alone!

When using the PHP Code button, this happens, right?


TEST


With the nature of this forum, this button will never be used. Ever. So I wish to change the "PHP Code:" header in the actual pasted output to something custom, like "Information:" or "Summary:".

I would also like to see if I can change the text in the dropdown box, as shown in the screenshot, to match my choice of the above. I don't care about the icon although if anyone knows where I can change that to, great!

If possible I would like to remove that button for certain usergroups altogether.

Luckily I managed to rearrange the buttons myself, but I've looked through the files for the editor and I cannot seem to figure out how to do this.

Thank you!
[Image: 2wn4dxh.png]

EDIT: I have found out how to change the text by the insert box; that's in bbcodes_sceditor.js in /jscripts at around line 276: change "<label for="php">' + editor._('THIS-TEXT-HERE') + ':</label>" to change it.