I'm currently working on a plugin that uses prototype.
I add it via 'SkinBeginHtmlHead()'.
But other "third-part" plugins do that as well..
Is there a way to detect if prototype is already called ?
First of all, jQuery is included in b2evolution, so use that rather than prototype. Otherwise there will be conflicts and errors at worst and wasted bandwidth at best.
First of all, jQuery is included in b2evolution, so use that rather than prototype. Otherwise there will be conflicts and errors at worst and wasted bandwidth at best.
When you're loading js libraries, use require_js: http://doc.b2evolution.net/v-2-4/evocore/_blogs---inc---_core---_template.funcs.php.html#functionrequire_js
That will only load the js if it hasn't already been loaded (provided the first plugin that tried to load it also used require_js).