Yes it works with the quick post
(2024-02-13, 11:29 AM)PARADOX987 Wrote: [ -> ]Yes it works with the quick post
well okay, then i messed something up with my theming.... because on my board, it doesnt
to be more precise, i want the editor enabled in PM quick reply
(2024-02-13, 11:29 AM)PARADOX987 Wrote: [ -> ]Yes it works with the quick post
This cannot work in PM´s without various changes in the plugin.
(2024-02-13, 11:46 AM)Schnapsnase Wrote: [ -> ] (2024-02-13, 11:29 AM)PARADOX987 Wrote: [ -> ]Yes it works with the quick post
This cannot work in PM´s without various changes in the plugin.
hrm, well i had hope, that this would'nt be that hard
i had a quick'n'dirty try to implement this myself but i have lots of more important stuff to do on my b oard so i dropped the idea in hope someone already did it
so.... yeah okay then
btw, nice nickname
(2024-02-13, 12:06 PM)ZnapShot Wrote: [ -> ]willing to raise a beer for a solution
just quickly and untested
<?php
if (!defined('IN_MYBB')) {
die('Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.');
}
$plugins->add_hook('showthread_start', 'quickeditor_codes');
$plugins->add_hook('private_start', 'quickeditor_codes');
const c_quickeditor_reset_js = <<<'EOF'
<script type="text/javascript">
$(function() {
$('#quick_reply_form').on('reset', function() {
MyBBEditor.val('');
});
});
</script>
EOF;
function quickeditor_info()
{
return array(
'name' => 'Quick Editor',
'description' => 'Enable the full editor in the quick reply form when viewing threads.',
'website' => 'https://storiespedia.com',
'author' => 'PARADOX (with help from Laird)',
'authorsite' => 'https://community.mybb.com/user-134311.html',
'version' => '1.0.2',
'codename' => 'quickeditor',
'compatibility' => '18*'
);
}
function quickeditor_activate()
{
require_once MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets('showthread_quickreply', '(' . preg_quote('</textarea>') . ')', '</textarea>{$codebuttons}'.c_quickeditor_reset_js);
find_replace_templatesets('showthread_quickreply', '(' . preg_quote('{$option_signature}') . ')', '{$smilieinserter}{$option_signature}');
find_replace_templatesets('showthread_quickreply', '(' . preg_quote('<textarea style="') . ')', '<textarea style="height: 280px; ');
find_replace_templatesets('private_quickreply', '(' . preg_quote('</textarea>') . ')', '</textarea>{$codebuttons}'.c_quickeditor_reset_js);
find_replace_templatesets('private_quickreply', '(' . preg_quote('{$lang->message_note}<br /><br />') . ')', '{$lang->message_note}<br /><br />{$smilieinserter}');
find_replace_templatesets('private_quickreply', '(' . preg_quote('<textarea style="') . ')', '<textarea style="height: 280px; ');
}
function quickeditor_deactivate()
{
require_once MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets('showthread_quickreply', '(' . preg_quote('{$codebuttons}'.c_quickeditor_reset_js) . ')', '', 0);
find_replace_templatesets('showthread_quickreply', '(' . preg_quote('{$smilieinserter}') . ')', '', 0);
find_replace_templatesets('showthread_quickreply', '(' . preg_quote('height: 280px; ') . ')', '', 0);
find_replace_templatesets('private_quickreply', '(' . preg_quote('{$codebuttons}'.c_quickeditor_reset_js) . ')', '', 0);
find_replace_templatesets('private_quickreply', '(' . preg_quote('{$smilieinserter}') . ')', '', 0);
find_replace_templatesets('private_quickreply', '(' . preg_quote('height: 280px; ') . ')', '', 0);
}
function quickeditor_codes()
{
global $codebuttons, $smilieinserter;
$codebuttons = build_mycode_inserter();
$smilieinserter = build_clickable_smilies();
}
(2024-02-13, 12:38 PM)Schnapsnase Wrote: [ -> ] (2024-02-13, 12:06 PM)ZnapShot Wrote: [ -> ]willing to raise a beer for a solution
just quickly and untested
nice try
didn't work
edit: Really nice try.... works xD was too dumb to reinitialise templates.... thanks man, next beer is on me
(2024-02-13, 12:50 PM)ZnapShot Wrote: [ -> ]nice try didn't work
Okay
I can't test it at the moment.
I'll revise it again in the evening.
You have deactivated/activated?