MyBB Community Forums

Full Version: BBCode buttons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a way (hopefully something simple) to add bbcode buttons to the post editor?
example: Youtube,marquee,etc
yes, I want to add bbcode buttons to the post editor, pls help me!
there is a big reqeust for this at the moment, since alot of people dont know how to do it.

P.S i want this too Toungue
As above Smile I added the tags I want, just need to know how to add some buttons.
take a peep HERE, it's not so hard, but you must work very carefully,otherwise MSIE will throw errors almost immediately :ß

basically it works like this:
- edit the editor theme, change the toolbar.gif graphics file to your needs (=insert new icons).. or you could,if you want, make an additional toolbar2.gif, maybe that's even better

- edit the .css file for the editor theme, create additional css sprites in there for the new buttons you want to have.. a css sprite just displays a little piece of the huge toolbar.gif picture, and it's your task to tell which part of the image this is (with the background-position: -xyzPX in the .css file)...

- edit the global_lang.php file and assign a description for the buttons

- edit the editor.js to insert the buttons there.. you can also re-arrange all buttons if you like

- edit the functions.js (add the "to be transmitted" values) to ensure, that the descriptions from the global_lang.php are infact outputted to the final php page file where they appear as a value for the buttons/their mouseover/alt title...

-----
lots of things to do, nothing really complicated, UNLESS you want to create buttons which work like the URL or IMAGE function (javascript popup with several parameters), for these you need to create additioanl functions in the js files.
Thanks mate! I'll give this a try when I have some time.