Jump to content

JS in footer


Big Spender

Recommended Posts

In gui.class.php, near line 146, there is code that will get the filenames of any javascript file in the skin folder. This array is returned in the order the operating system gave them (GLOB_NOSORT) -- an ordering which may or may not be under your control. A hook lets you do anything you want to the array.

 

Then, the (stock) skin template code will include the file /js/common.html, which when delivered to the browser, the browser will ask for /js/plugins.php and /js/common.js. PHP will sort the filename array of plugin files found in the plugins directory alphabetically.

 

So, depending where your javascript files are located, you can modify the gui class code or the plugins.php code.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...