MyBB Community Forums

Full Version: Tutorial: Adding Extra Function Buttons to the Editor.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7
Ok i'm lost here what i have to put here

So if i wanted to change this to have it post [hide] [/hide] When pressed how would i go about changing what in this line?
{type: 'button', name: 'php', sprite: 'php', insert: 'php', title: this.options.lang.title_php}

It seems the global.lang is what will need changing as well?

line 146 :- $l['editor_title_php'] = "Insert formatted PHP code";

Sorry but this is well over my head at the moment can't work out what to do at all.

(2008-08-12, 12:29 PM)Michael S. Wrote: [ -> ]The changes in the files functions.php and global.php are the same. For editor.js open the file and search for:
// Create our new text area
Above add:
this.createToolbar('mytoolbar', {
	container: 'bottom',
	items: [
		{type: 'button', name: 'flash', sprite: 'flash', insert: 'flash', title: this.options.lang.title_flash},
		{type: 'button', name: 'video', sprite: 'video', insert: 'video', title: this.options.lang.title_video},
		{type: 'button', name: 'quick', sprite: 'quick', insert: 'quick', title: this.options.lang.title_quick},
		{type: 'button', name: 'stream', sprite: 'stream', insert: 'stream', title: this.options.lang.title_stream}
After that open the file jscripts/editor_themes/*theme*/stylesheet.css and add at the end of the file:
.messageEditor .toolbar_button .toolbar_sprite_flash {
	background: url(images/flash.gif) no-repeat;
.messageEditor .toolbar_button .toolbar_sprite_video {
	background: url(images/video.gif) no-repeat;
.messageEditor .toolbar_button .toolbar_sprite_quick {
	background: url(images/quick.gif) no-repeat;
.messageEditor .toolbar_button .toolbar_sprite_stream {
	background: url(images/stream.gif) no-repeat;
The graphics for the buttons have to be in the folder jscripts/editor_themes/*theme*/images/.

Thanks, this is very usefull info...
can I add move hover text when I move mouse to image icon????????
how add a button similar to example button "picture"?
How do insert this code [marco=*][/marco]

I need a method PopUp
Dont Work for me Sad

v 1.4.8

I cant find:


Sorry, I try with the Michael S. Info.


(2008-08-12, 02:21 PM)Michael S. Wrote: [ -> ]Open the file editor.js again and search for:
subtract = 16;
Replace with:
subtract = 40;

Awesome Help Buddy.

Really Thanks Smile
i need add this mycode [marco=*][/marco] but for popup method
(2009-07-25, 02:37 AM)Walkman 5.0 Wrote: [ -> ]i need add this mycode [marco=*][/marco] but for popup method
I need ... SadSadSadSadHuh

please i need add the [marco=*] mycode
Pages: 1 2 3 4 5 6 7