onli wrote:I thought that whole "react to jquery in the core" was inserted by Garvin to all plugins?
No. The core sets $serendipity['capabilities']['jquery'] = true; as global context, before it includes the template/jquery.js in the serendipity_plugin_api_frontend_header().
It only executes, if current template/plugin does not have its own jquery.js file. The execution can be disabled, if a template's config.inc.php or a plugin sets $serendipity['capabilities']['jquery'] = false.
So now, in the case of bayes, depending on which jquery includement you want to have priority, you will need to do this in the *_bayes.php file in the 'backend_header' or 'backend_configure' hook like this
Code: Select all
if (!$serendipity['capabilities']['jquery']) {
include and echo the cdn call...
}
(purging the code blah posted) or, if wanting to have this smartified and serve both Smarty worlds, by $jquery_needed = 'false/true'; in bayes and {if $jquery_needed == 'true'} in the tpl file. This still needs to be checked by some different situation runs, like Blah and me already pointed out, having different results.