MyBB Community Forums

Full Version: New Functions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How i can add some new functions there?

[Image: 211uz5z.jpg]

example Spoiler or YouTube tag.
I don't know if there is an easier way, but for me it was a very long and tedious process adding the spoiler tag. It is a poorly designed editor as far as adding new functions to it, especially if you have many themes.

Let me see if I can show you how I did it.

Here is my image with the spoiler tag.
[Image: 1265551664.gif]

You need to rename or replace your existing one which is located in this case:
jscripts/editor_themes/Office_2007/images folder.

Here is a modified stylesheet.css file which resides in the same folder as the toolbar.gif which is: jscripts/editor_themes/Office_2007/

Next, you'll need to copy the attached editor.php file to your jscripts folder. If you wish to see what I have changed, simple open the file and search for "spoiler".

Lastly, you can if you want, add the text to the:
inc/languages/english/global.lang.php file:

$l['editor_title_spoiler'] = "Insert hidden content";
add it just after:
$l['editor_title_php'] = "Insert formatted PHP code";

In my case, I could not get the text on hover to be displayed via the language file, so I simply added it to the editor.js file instead like this:

{type: 'button', name: 'spoiler', sprite: 'spoiler', insert: 'spoiler', title: 'Insert hidden content with a spoiler tag'}

Hopefully this helps you.

Cheers!
Shedrock
WoW this is complicated. Thanks!
I'm from Russia

above people gave the example of the classical (base) 'spoiler',ie
[spoiler]text[/spoiler]


There is a line in the editor.js:
{type: 'button', name: 'spoiler', sprite: 'spoiler', insert: 'spoiler', title: 'Insert hidden content with a spoiler tag'}
what and where need write|edit that 'spoiler' was full, ie
[spoiler=title]text[/spoiler]
?
thx
Give me answer please