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
help please i need this tutorial
Try in english like most of the forum then...
One small problem, my new toolbar pushes my text area down


EDIT
I just removed some of the items my board members would never be using (numbered list) and put the new function buttons on the same line, looks a lot cleaner this way anyways :]
ok I do not understand, I need to do this tutorial but I do not understand what he says because in Iraqi

http://www.mybbhelp.ir/thread-299.html
One its aribic not Iraqi. I'm farely sure thats not even a langauge. Second post it in the International section you may get some help :/
o.o thanks xd
(2008-08-12, 12:29 PM)Michael S. Wrote: [ -> ]After that open the file jscripts/editor_themes/*theme*/stylesheet.css and add at the end of the file:
.messageEditor .toolbar_button .toolbar_sprite_stream {
background: url(images/stream.gif) no-repeat;
}[/code]
The graphics for the buttons have to be in the folder jscripts/editor_themes/*theme*/images/.

You can also just add this to global.css - it's easier, because editor stylesheets can be overwritten with update (if you use global.css you should put images in /images instead).
BTW I think that first post should be updated with this information for 1.4 series.

(2009-05-14, 10:32 PM)matrixsc Wrote: [ -> ]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?
editor.js:-
{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";

I have better way to do this (you don't need to edit core files):

(2008-05-10, 05:33 PM)pozmu Wrote: [ -> ]Ok, I found that you don't need to edit other files besides editor.js...

In codebuttons template find
{$editor_language}

Add after:

editor_language["title_xxx"] = 'Test';

Where title_xxx is previously defined title for button.

(2009-08-20, 02:15 AM)Upem Wrote: [ -> ]One small problem, my new toolbar pushes my text area down

You can probably edit css to get rid of this problem... (add margin/padding)
Martin mentioned the line of codes to be edited but I looked into my "editor.js" and saw these:

// Set the width/height of the area
		subtract = 40;
		if(MyBB.browser == 'ie') subtract += 5;
		subtract2 = 7;
		if(MyBB.browser == 'ie') subtract2 += 6;
		areaContainer.style.height = parseInt(Element.getDimensions(this.editor).height)-this.toolbarHeight-subtract+"px";
		areaContainer.style.width = parseInt(Element.getDimensions(this.editor).width)-subtract2+"px";

So, where to edit? I still have the text box misaligned.
HELP needed please.



(2007-06-30, 01:33 PM)Martin M. Wrote: [ -> ]You need to change this line aswell:
areaContainer.style.height = parseInt(editor.style.height)-parseInt(toolBar.style.height)-parseInt(toolbar2.style.height)-subtract+"px";
If your new toolbar is named toolbar3 you can change it to this:
areaContainer.style.height = parseInt(editor.style.height)-parseInt(toolBar.style.height)-parseInt(toolbar2.style.height)-parseInt(toolbar3.style.height)-subtract+"px";
Change toolbar3 to whatever the name of your toolbar is.

I think Ozidave forgot about that Smile
i need a english or spanish tutorial of this method
Pages: 1 2 3 4 5 6 7