Disable caption (caption.js) and mootools (mootools-more.js)

Everything to do with Joomla! 2.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
sim085
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 194
Joined: Mon Oct 04, 2010 4:11 pm

Disable caption (caption.js) and mootools (mootools-more.js)

Post by sim085 » Thu Feb 23, 2012 4:27 pm

Hello, my page is including the above script files. I found several way on the net how to remove them; however they are all hacks. Is there a way how to disable this from Joomla Backend? Or the only way is through hacking the template?
Last edited by sim085 on Tue Feb 28, 2012 12:33 am, edited 1 time in total.

sim085
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 194
Joined: Mon Oct 04, 2010 4:11 pm

Re: Disable caption (caption.js) and mootools (mootools-more

Post by sim085 » Fri Feb 24, 2012 2:29 pm

What I did is a hack, placing unset($this->_scripts['/media/system/js/caption.js']); under <jdoc:include type="head" />. This removes the unwanted script. However I noticed that Joomla still injects caption code inside script block on the page.

Code: Select all

window.addEvent('load', function() {
new JCaption('img.caption');
});

This is giving me a javascript error on the page. Is there a way how to stop Joomla form entering these scripts (such as caption.js and mootools-core.js)? Maybe disable a plugin??

legers
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Feb 27, 2012 2:03 am

Re: Disable caption (caption.js) and mootools (mootools-more

Post by legers » Mon Feb 27, 2012 2:10 am

I found several way on the net how to remove them; however they are all hacks.Image

sim085
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 194
Joined: Mon Oct 04, 2010 4:11 pm

Re: Disable caption (caption.js) and mootools (mootools-more

Post by sim085 » Tue Feb 28, 2012 12:32 am

legers wrote:I found several way on the net how to remove them; however they are all hacks.Image
Thanks for your reply. I found this thread; http://forum.joomla.org/viewtopic.php?t=691239

Over there they say it is a bug that is going to be fixed in the next release. I hope this is done.

Biomehaniker
Joomla! Intern
Joomla! Intern
Posts: 74
Joined: Tue Jul 11, 2006 8:17 pm

Re: Disable caption (caption.js) and mootools (mootools-more

Post by Biomehaniker » Tue Apr 19, 2016 6:47 pm

I know the thread is old, but it comes up on google on the first page, so i would like to leave here a solution.

You need to remove the:

Code: Select all

JHtml::_('behavior.caption');
section as mentioned here for example.


Locked

Return to “Templates for Joomla! 2.5”