Removing Mootools

5 years 8 months ago #27028 by iamrobert
Hi,

If you want to remove mootools from your frontend for Joomla 2.5!. You need to unset the mootools scripts in your template file at the top:
unset($doc->_scripts[$this->baseurl.'/media/system/js/mootools-core.js']);
    unset($doc->_scripts[$this->baseurl.'/media/system/js/mootools-more.js']);
    unset($doc->_scripts[$this->baseurl.'/media/system/js/core.js']);
    unset($doc->_scripts[$this->baseurl.'/media/system/js/caption.js']);
    unset($doc->_scripts[$this->baseurl.'/media/system/js/mootools.js']);
    unset($doc->_scripts[$this->baseurl.'/plugins/system/mtupgrade/mootools.js']);
	unset($doc->_scripts[$this->baseurl.'/media/system/js/tabs.js']);

http://internet-inspired.com/blog/css-and-html/one-web-template - has a cool template with this feature in place in the logic.php

Then you need to remove the scripts that FLEXIcontent calls at the top of your template file index.php:
// Remove call to Caption
	if (isset($this->_script['text/javascript']))
{
    $this->_script['text/javascript'] = preg_replace('%window\.addEvent\(\'load\',\s*function\(\)\s*{\s*new\s*JCaption\(\'img.caption\'\);\s*}\);\s*%', '', $this->_script['text/javascript']);
    if (empty($this->_script['text/javascript']))
        unset($this->_script['text/javascript']);
}
// Remove call to JTooltips
	if (isset($this->_script['text/javascript']))
{
    $this->_script['text/javascript'] = preg_replace('%window\.addEvent\(\'domready\',\s*function\(\)\s*{\s*\$\$\(\'.hasTip\'\).each\(function\(el\)\s*{\s*var\s*title\s*=\s*el.get\(\'title\'\);\s*if\s*\(title\)\s*{\s*var\s*parts\s*=\s*title.split\(\'::\',\s*2\);\s*el.store\(\'tip:title\',\s*parts\[0\]\);\s*el.store\(\'tip:text\',\s*parts\[1\]\);\s*}\s*}\);\s*var\s*JTooltips\s*=\s*new\s*Tips\(\$\$\(\'.hasTip\'\),\s*{\s*maxTitleChars:\s*50,\s*fixed:\s*false}\);\s*}\);\s*%', '', $this->_script['text/javascript']);
    if (empty($this->_script['text/javascript']))
        unset($this->_script['text/javascript']);
}
// Remove call to Tabs
	if (isset($this->_script['text/javascript']))
{
	$this->_script['text/javascript'] = preg_replace('%window\.addEvent\(\'domready\',\s*function\(\)\s*{\s*\$\$\(\'dl.tabs\'\).each\(function\(tabs\)\{\s*new\s*JTabs\(tabs\,\s*\{\}\)\;\s*\}\)\;\s*\}\)\;%', '', $this->_script['text/javascript']);
	if (empty($this->_script['text/javascript']))
        unset($this->_script['text/javascript']);
}

Hope this works

Please Log in or Create an account to join the conversation.

5 years 8 months ago #27074 by micker
flexicontent use mootools of joomla not a particular file ... test your site ... ;)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

5 years 8 months ago #27135 by iamrobert
Hi Micker,

Sorry - perhaps my topic should be: "removing mootools from Joomla + Flexicontent!"

I saw a post and others have this same issue:

http://www.flexicontent.org/forum/index.php?f=29&t=4877&rb_v=viewtopic

So - I thought I would post the solution I used.

Robert

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.