cellarius
Well-known member
Exploring xenForo to find out whether I could do what I need with it, one of the first things I tried to find out was whether I could add additional buttons to the editor. Taking some inspiration from ragtek and this thread, I found the buttons to be hardcoded and found no way different addon coders could add buttons each. If there is, I'll don a tinfoil hat and blame my inexperience with xF so far 
What does it do?
This simple (but quite powerfull) button manager gets around this problem by taking the button configuration for the two xF editor toolbars into two templates. This solution offers the following advantages:
The configuration templates are CelEditorButtons1 and CelEditorButtons2. The buttons are listed comma seperated and each in a new line in the templates for better overview. See the attached screenshots for an example.


Explanation: Bold and italic buttons have changed position, strikethrough has been removed, and a custom button ("celphotopopup") has been added. The alignment buttons have been wrapped by a condition, as has the image bbcode. They are hidden for the current users usergroup.
Installation
Upload the library directory into your xF root directory. Install the included .xml file as an addon. Done.

What does it do?
This simple (but quite powerfull) button manager gets around this problem by taking the button configuration for the two xF editor toolbars into two templates. This solution offers the following advantages:
- existing buttons can easily be added, removed, or moved about (yes, I am aware that removing buttons will not prevent people from simply typing bbcode; it can still be useful if you trigger non-bbcode actions by button)
- custom buttons can easily be added; addon developers could simply point to this addon
- the full flexibility of xenForos template conditionals can be used on each single buttons or button groups, making it easy to show buttons to certain usergroups only for example (see Shadabs how-to)
- Since the templates overwrite the xF button configuration, new buttons will have to be added manually to the templates
The configuration templates are CelEditorButtons1 and CelEditorButtons2. The buttons are listed comma seperated and each in a new line in the templates for better overview. See the attached screenshots for an example.


Explanation: Bold and italic buttons have changed position, strikethrough has been removed, and a custom button ("celphotopopup") has been added. The alignment buttons have been wrapped by a condition, as has the image bbcode. They are hidden for the current users usergroup.
Installation
Upload the library directory into your xF root directory. Install the included .xml file as an addon. Done.