Topic: Question about writing an extension
Hi developers, I have some difficulty understanding how to write an extension.
For example: I have a hook as followed
<hook id="ft_js_include" priority="4"><![CDATA[
$forum_loader->add_js($ext_info['url'].'/js/fancy_jquery_addons.min.js', array('type' => 'url', 'async' => false, 'weight' => 77));
]]></hook>
Can someone explain me what the priority and the array mean?
I am writing an extension which uses jQuery 1.7.1. When I included the link of the jQuery file directly into the code, my extension worked fine but it caused other extensions to stop. Found out the problem was because I had 2 jQuery files. One from my extension and one from jQuery Plugin extension. Now, all I want is to use the jQuery Plugin as the primary and exclude mine from the code so that there in only one jQuery file being active. But no matter what I did, I could not get my extension to work even though the jQuery was active (checked working fine in header tag)
Can anyone guide me through this? Much appreciate.