diff --git a/inc/plugins/quickadveditor.php b/inc/plugins/quickadveditor.php index 737b70e..6547b54 100644 --- a/inc/plugins/quickadveditor.php +++ b/inc/plugins/quickadveditor.php @@ -19,7 +19,7 @@ function quickadveditor_info () "website" => "", "author" => "martec", "authorsite" => "", - "version" => "5.0.2", + "version" => "5.1.0", "guid" => "", "compatibility" => "18*" ); @@ -187,7 +187,9 @@ function quickadveditor_activate() $(\".jGrowl-notification:last-child\").remove(); } },200); - \$(\'#quickedit_\'+pid).sceditor(\'instance\').sourceMode(true); + if(\'{\$sourcemode}\' != \'\') { + \$(\'#quickedit_\'+pid).sceditor(\'instance\').sourceMode(true); + } },400); }); } @@ -335,6 +337,25 @@ function quickadveditor_deactivate() ); } +$plugins->add_hook('global_start', 'advedt_cache_codebutquick'); +function advedt_cache_codebutquick() +{ + global $templatelist, $mybb; + + if (isset($templatelist)) { + $templatelist .= ','; + } + + if (THIS_SCRIPT == 'showthread.php') { + if($mybb->settings['quickadveditor_smile'] != 0) { + $templatelist .= 'codebutquick,smilieinsert,smilieinsert_smilie,smilieinsert_getmore'; + } + else { + $templatelist .= 'codebutquick'; + } + } +} + function mycode_inserter_quick_lite($smilies = true) { global $db, $mybb, $theme, $templates, $lang, $smiliecache, $cache;