Disable the javascript library autoload

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
antonumia
Posts: 77
Joined: Mon 14. Feb 2005, 16:10
Contact:

Disable the javascript library autoload

Post by antonumia »

Hi,

I want to load my javascript elsewhere in my template using yepnope.
I tried emptying the array in conf.inc.php but that doesn't work.

how do i disable loading all libraries in my template?

thanks,

anton
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: Disable the javascript library autoload

Post by Oliver Georgi »

There are some frontend functionalities needing javascript related stuff. But you can overwrite the related call whenever you like.

Check the related frontend functions in include/in_front/js.inc.php. There is a var $block['jslib'] which can be filled using frontend_init. Then create your own js.mylib.inc.php inside include/in_front/lib — maybe take js.mootools-1.1.inc.php as sample what has to be defined for lightbox effects or plugin functionalities.

It is easy.


But really. Why conditional loader if you know what you need. The cms has some kind of conditional loader with much more flexibility. Check the template replacers which can be used anytime and anywhere:
<!-- CSS: … --> and <!-- JS: … -->
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
antonumia
Posts: 77
Joined: Mon 14. Feb 2005, 16:10
Contact:

Re: Disable the javascript library autoload

Post by antonumia »

Thanks Oliver.
Oliver Georgi wrote:But really. Why conditional loader if you know what you need. The cms has some kind of conditional loader with much more flexibility. Check the template replacers which can be used anytime and anywhere:
<!-- CSS: … --> and <!-- JS: … -->
I'm using conditional loaders because I have js dependencies and therefore need to guarantee load order.
Post Reply