I do this as a free service, I am a student however and all donations are welcome. You can click on the Paypalicon to make a donation:
I will add instructions for pulling data when editing a file.
This article was done for vB 3.5 and later, I now bring you the article for vB 4.0 in regards to the editor in modifications.
Working Versions: Currently 4.1.10
Testing Versions: NONE
This tutorial will provide you the proper method for including the WYSIWYG editor in your modifications. I have tested this and it works so following this tutorial will provide a working editor. You are welcome to tweak it to your liking so that you get different output's or vice versa.
Lets begin.
Step 1. Make sure you have already added the row to your database table. The new row to add is:
PHP Code:
`message` varchar(255)
You can alter that to be messagearea, message, description, etc and it will work just the same.
Step 2. Open your template containing your form.
Step 3. Install the provided plugin xml file.
Step 3. Add the following lines of code.
Now add this in place of your opening form tag (Remember to change your action to your correct file):
Step 5. Save and close your file, upload and test. Make sure you saved your template as well.
This is a short article/tutorial and I hope many find it useful. Even though I did not come up with the code or discover the code, I am happy to help others out as I was helped out.
Thanks, I'll update the article to reflect your suggestion.
I should ask what that does since I have never seen that code before. I'm sure others will question as well.
It just caches the editor templates, in an easier way
From /includes/class_bootstrap.php:
PHP Code:
// if we are in a message editing page then get the editor templates $show['editor_css'] = false; if (defined('GET_EDIT_TEMPLATES')) { $_get_edit_templates = explode(',', GET_EDIT_TEMPLATES); if (GET_EDIT_TEMPLATES === true OR in_array($_REQUEST['do'], $_get_edit_templates)) { $cache = array_merge($cache, array( // message stuff 3.5 'editor_toolbar_on', 'editor_smilie', // message area for wysiwyg / non wysiwyg 'editor_clientscript', 'editor_toolbar_off', 'editor_smilie_category', 'editor_smilie_row', 'editor_toolbar_fontname', 'editor_toolbar_fontsize', 'editor_toolbar_colors', // javascript menu builders 'editor_jsoptions_font', 'editor_jsoptions_size', // smiliebox templates 'editor_smiliebox', // needed for thread preview 'bbcode_code', 'bbcode_html', 'bbcode_php', 'bbcode_quote', // misc often used 'newpost_threadmanage', 'newpost_disablesmiliesoption', 'newpost_preview', 'newpost_quote', 'posticonbit', 'posticons', 'newpost_usernamecode', 'newpost_errormessage', 'forumrules' ));
$show['editor_css'] = true; } }
+ If you don't do it this way, this mod won't work (if it gets ported to vB4).
It just caches the editor templates, in an easier way
From /includes/class_bootstrap.php:
PHP Code:
// if we are in a message editing page then get the editor templates
$show['editor_css'] = false;
if (defined('GET_EDIT_TEMPLATES'))
{
$_get_edit_templates = explode(',', GET_EDIT_TEMPLATES);
if (GET_EDIT_TEMPLATES === true OR in_array($_REQUEST['do'], $_get_edit_templates))
{
$cache = array_merge($cache, array(
// message stuff 3.5
'editor_toolbar_on',
'editor_smilie',
// message area for wysiwyg / non wysiwyg
'editor_clientscript',
'editor_toolbar_off',
'editor_smilie_category',
'editor_smilie_row',
'editor_toolbar_fontname',
'editor_toolbar_fontsize',
'editor_toolbar_colors',
// javascript menu builders
'editor_jsoptions_font',
'editor_jsoptions_size',
// smiliebox templates
'editor_smiliebox',
// needed for thread preview
'bbcode_code',
'bbcode_html',
'bbcode_php',
'bbcode_quote',
// misc often used
'newpost_threadmanage',
'newpost_disablesmiliesoption',
'newpost_preview',
'newpost_quote',
'posticonbit',
'posticons',
'newpost_usernamecode',
'newpost_errormessage',
'forumrules'
));
$show['editor_css'] = true;
}
}
+ If you don't do it this way, this mod won't work (if it gets ported to vB4).
Ah great info, thank you for clarifying, I have included it in the article as well. I plan to go change my ported mods to include that as well.
I've followed the instruction, editors works as it must works, but in all pages there is that dammit yellow triangle at browser's status bar with error:
vB_XHTML_Ready has not been definied
URI: http://www.microhellas.com/main/clie...tor.js?v=400b5
Maria, can you show me the page that you get the yellow triangle? I don't get the triangle so I'm a bit concerned right now, oh yeah, what browser you viewing the page in?
Maria, can you show me the page that you get the yellow triangle? I don't get the triangle so I'm a bit concerned right now, oh yeah, what browser you viewing the page in?