2014-07-08, 11:55 AM
This tutorial not more supported.
Plz use plugin: http://community.mybb.com/thread-158367.html or http://community.mybb.com/thread-157946.html
Ps2. If need modification in final version of mybb 1.8 to this work, i will update this tutorial, don´t worry.
Ps3. Plz, not request to me or send PM asking how to add buttons in the editor. I'll just ignore it.
With Smilies box and without Quick Edit:
1 - Create quickadveditor.php in notepad++
2 - upload quickadveditor.php to root/inc/plugins and activate.
With Smilies box and with Quick Edit:
1 - Create quickadveditor.php in notepad++
2 - upload quickadveditor.php to root/inc/plugins and activate.
Without Smilies box and with Quick Edit:
1 - Create quickadveditor.php in notepad++
2 - upload quickadveditor.php to root/inc/plugins and activate.
Without Smilies box and Without Quick Edit:
1 - Create quickadveditor.php in notepad++
2 - upload quickadveditor.php to root/inc/plugins and activate.
Plz use plugin: http://community.mybb.com/thread-158367.html or http://community.mybb.com/thread-157946.html
Ps. This only work with latest version of mybb 1.8 Beta 3 of Github
https://github.com/mybb/mybb/archive/feature.zip
https://github.com/mybb/mybb/archive/feature.zip
Ps2. If need modification in final version of mybb 1.8 to this work, i will update this tutorial, don´t worry.
Ps3. Plz, not request to me or send PM asking how to add buttons in the editor. I'll just ignore it.
With Smilies box and without Quick Edit:
1 - Create quickadveditor.php in notepad++
<?php
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
// Plugin info
function quickadveditor_info ()
{
return array(
"name" => "Quick Advanced Editor",
"description" => "Advanced editor in quick reply",
"website" => "",
"author" => "martec",
"authorsite" => "",
"version" => "1.2",
"guid" => "",
"compatibility" => "17*,18*"
);
}
function quickadveditor_activate()
{
include_once MYBB_ROOT.'inc/adminfunctions_templates.php';
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('</textarea>') . '#i',
'</textarea>{$codebuttons}'
);
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('<span class="smalltext">{$lang->message_note}<br />') . '#i',
'<span class="smalltext">{$lang->message_note}<br />{$smilieinserter}'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('plugins: "bbcode",') . '#i',
'plugins: "bbcode",
height: 270,'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('});
</script>') . '#i',
'});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== \'undefined\')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
if(MyBBEditor) {
MyBBEditor.updateOriginal();
$(\'form[id*="quick_reply_form"]\').bind(\'reset\', function() {
MyBBEditor.val(\'\').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>'
);
}
function quickadveditor_deactivate()
{
include_once MYBB_ROOT."inc/adminfunctions_templates.php";
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('</textarea>{$codebuttons}') . '#i',
'</textarea>'
);
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('<span class="smalltext">{$lang->message_note}<br />{$smilieinserter}') . '#i',
'<span class="smalltext">{$lang->message_note}<br />'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('plugins: "bbcode",
height: 270,') . '#i',
'plugins: "bbcode",'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== \'undefined\')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
if(MyBBEditor) {
MyBBEditor.updateOriginal();
$(\'form[id*="quick_reply_form"]\').bind(\'reset\', function() {
MyBBEditor.val(\'\').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>') . '#i',
'});
</script>'
);
}
$plugins->add_hook("showthread_start", "codebuttons");
function codebuttons () {
global $smilieinserter, $codebuttons;
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();
}
?>
2 - upload quickadveditor.php to root/inc/plugins and activate.
With Smilies box and with Quick Edit:
1 - Create quickadveditor.php in notepad++
<?php
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
// Plugin info
function quickadveditor_info ()
{
return array(
"name" => "Quick Advanced Editor",
"description" => "Advanced editor in quick reply",
"website" => "",
"author" => "martec",
"authorsite" => "",
"version" => "1.2",
"guid" => "",
"compatibility" => "17*,18*"
);
}
function quickadveditor_activate()
{
include_once MYBB_ROOT.'inc/adminfunctions_templates.php';
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('</textarea>') . '#i',
'</textarea>{$codebuttons}'
);
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('<span class="smalltext">{$lang->message_note}<br />') . '#i',
'<span class="smalltext">{$lang->message_note}<br />{$smilieinserter}'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('plugins: "bbcode",') . '#i',
'plugins: "bbcode",
height: 270,'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('});
</script>') . '#i',
'});
($.fn.on || $.fn.live).call($(document), \'focus\', \'textarea[name*="value"]\', function () {
$(this).sceditor(opt_editor);
{$sourcemode}
});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== \'undefined\')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
if(MyBBEditor) {
MyBBEditor.updateOriginal();
$(\'form[id*="quick_reply_form"]\').bind(\'reset\', function() {
MyBBEditor.val(\'\').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>'
);
}
function quickadveditor_deactivate()
{
include_once MYBB_ROOT."inc/adminfunctions_templates.php";
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('</textarea>{$codebuttons}') . '#i',
'</textarea>'
);
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('<span class="smalltext">{$lang->message_note}<br />{$smilieinserter}') . '#i',
'<span class="smalltext">{$lang->message_note}<br />'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('plugins: "bbcode",
height: 270,') . '#i',
'plugins: "bbcode",'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('});
($.fn.on || $.fn.live).call($(document), \'focus\', \'textarea[name*="value"]\', function () {
$(this).sceditor(opt_editor);
{$sourcemode}
});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== \'undefined\')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
if(MyBBEditor) {
MyBBEditor.updateOriginal();
$(\'form[id*="quick_reply_form"]\').bind(\'reset\', function() {
MyBBEditor.val(\'\').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>') . '#i',
'});
</script>'
);
}
$plugins->add_hook("showthread_start", "codebuttons");
function codebuttons () {
global $smilieinserter, $codebuttons;
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();
}
?>
2 - upload quickadveditor.php to root/inc/plugins and activate.
Without Smilies box and with Quick Edit:
1 - Create quickadveditor.php in notepad++
<?php
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
// Plugin info
function quickadveditor_info ()
{
return array(
"name" => "Quick Advanced Editor",
"description" => "Advanced editor in quick reply",
"website" => "",
"author" => "martec",
"authorsite" => "",
"version" => "1.2",
"guid" => "",
"compatibility" => "17*,18*"
);
}
function quickadveditor_activate()
{
include_once MYBB_ROOT.'inc/adminfunctions_templates.php';
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('</textarea>') . '#i',
'</textarea>{$codebuttons}'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('plugins: "bbcode",') . '#i',
'plugins: "bbcode",
height: 270,'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('});
</script>') . '#i',
'});
($.fn.on || $.fn.live).call($(document), \'focus\', \'textarea[name*="value"]\', function () {
$(this).sceditor(opt_editor);
{$sourcemode}
});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== \'undefined\')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
if(MyBBEditor) {
MyBBEditor.updateOriginal();
$(\'form[id*="quick_reply_form"]\').bind(\'reset\', function() {
MyBBEditor.val(\'\').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>'
);
}
function quickadveditor_deactivate()
{
include_once MYBB_ROOT."inc/adminfunctions_templates.php";
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('</textarea>{$codebuttons}') . '#i',
'</textarea>'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('plugins: "bbcode",
height: 270,') . '#i',
'plugins: "bbcode",'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('});
($.fn.on || $.fn.live).call($(document), \'focus\', \'textarea[name*="value"]\', function () {
$(this).sceditor(opt_editor);
{$sourcemode}
});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== \'undefined\')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
if(MyBBEditor) {
MyBBEditor.updateOriginal();
$(\'form[id*="quick_reply_form"]\').bind(\'reset\', function() {
MyBBEditor.val(\'\').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>') . '#i',
'});
</script>'
);
}
$plugins->add_hook("showthread_start", "codebuttons");
function codebuttons () {
global $codebuttons;
$codebuttons = build_mycode_inserter();
}
?>
2 - upload quickadveditor.php to root/inc/plugins and activate.
Without Smilies box and Without Quick Edit:
1 - Create quickadveditor.php in notepad++
<?php
// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
// Plugin info
function quickadveditor_info ()
{
return array(
"name" => "Quick Advanced Editor",
"description" => "Advanced editor in quick reply",
"website" => "",
"author" => "martec",
"authorsite" => "",
"version" => "1.2",
"guid" => "",
"compatibility" => "17*,18*"
);
}
function quickadveditor_activate()
{
include_once MYBB_ROOT.'inc/adminfunctions_templates.php';
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('</textarea>') . '#i',
'</textarea>{$codebuttons}'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('plugins: "bbcode",') . '#i',
'plugins: "bbcode",
height: 270,'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('});
</script>') . '#i',
'});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== \'undefined\')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
if(MyBBEditor) {
MyBBEditor.updateOriginal();
$(\'form[id*="quick_reply_form"]\').bind(\'reset\', function() {
MyBBEditor.val(\'\').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>'
);
}
function quickadveditor_deactivate()
{
include_once MYBB_ROOT."inc/adminfunctions_templates.php";
find_replace_templatesets(
'showthread_quickreply',
'#' . preg_quote('</textarea>{$codebuttons}') . '#i',
'</textarea>'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('plugins: "bbcode",
height: 270,') . '#i',
'plugins: "bbcode",'
);
find_replace_templatesets(
'codebuttons',
'#' . preg_quote('});
/**********************************
* Thread compatibility functions *
**********************************/
if(typeof Thread !== \'undefined\')
{
var quickReplyFunc = Thread.quickReply;
Thread.quickReply = function(e) {
if(MyBBEditor) {
MyBBEditor.updateOriginal();
$(\'form[id*="quick_reply_form"]\').bind(\'reset\', function() {
MyBBEditor.val(\'\').emoticons(true);
});
}
return quickReplyFunc.call(this, e);
};
};
</script>') . '#i',
'});
</script>'
);
}
$plugins->add_hook("showthread_start", "codebuttons");
function codebuttons () {
global $codebuttons;
$codebuttons = build_mycode_inserter();
}
?>
2 - upload quickadveditor.php to root/inc/plugins and activate.