Skip to content

Commit

Permalink
solve template cache issue
Browse files Browse the repository at this point in the history
  • Loading branch information
martec committed Sep 29, 2014
1 parent 16a96ba commit 22c9800
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions inc/plugins/quickadveditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function quickadveditor_info ()
"website" => "",
"author" => "martec",
"authorsite" => "",
"version" => "5.0.2",
"version" => "5.1.0",
"guid" => "",
"compatibility" => "18*"
);
Expand Down Expand Up @@ -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);
});
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 22c9800

Please sign in to comment.