Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
You are here: HomeForum
Welcome, Guest

[Solved] conflict problems
(1 viewing) (1) Guest

TOPIC: [Solved] conflict problems

Re: conflict problems 10 years, 4 months ago #19715

  • SA Thuy
Dear Daniele Blengini,

Our templates already removed Mooltools, but Kunena still using mootools. So we commented the code as removing it in YT Plugin. Go to the file: /var/www/html/web/plugins/system/yt.php and comment the code:
			unset($doc->_scripts[JURI::root(true) . '/media/system/js/core.js']);
			unset($doc->_scripts[JURI::root(true) . '/media/system/js/modal.js']);
			unset($doc->_scripts[JURI::root(true).'/media/system/js/caption.js']);
			unset($doc->_scripts[JURI::root(true) . '/media/system/js/mootools.js']);
			unset($doc->_scripts[JURI::root(true).'/media/system/js/mootools-core.js']);
			unset($doc->_scripts[JURI::root(true).'/media/system/js/mootools-more.js']);
			
			unset($doc->_styleSheets[JUri::root(true) . '/media/system/css/modal.css']);
			
			if (isset($doc->_script) && isset($doc->_script['text/javascript']))
			{
				$doc->_script['text/javascript'] = preg_replace('%window\.addEvent\(\'load\',\s*function\(\)\s*{\s*new\s*JCaption\(\'img.caption\'\);\s*}\);\s*%', '', $doc->_script['text/javascript']);
				$doc->_script['text/javascript'] = preg_replace('%jQuery\(window\)\.on\(\'load\'\,\s*function\(\)\s*\{\s*new\s*JCaption\(\'img\.caption\'\);\s*\}\);%', '', $doc->_script['text/javascript']);
				$doc->_script['text/javascript'] = preg_replace('%window\.addEvent\(\'load\',function\(\)\{\s*\}\);%', '', $doc->_script['text/javascript']);
				    
				//remove SqueezeBox.initialize in behavior.php
				$doc->_script['text/javascript'] = preg_replace('%SqueezeBox\.initialize\(\{\}\);\s*SqueezeBox\.assign\(\$\(\'a.modal\'\)\.get\(\)\, {\s*parse\:\s\'rel\'\s*\}\);%', '', $doc->_script['text/javascript']);
				
				// Remove call to JTooltips
				$doc->_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*[\d]*,\s*\"fixed\":\s*false}\);\s*}\);%', '', $doc->_script['text/javascript']);
				$doc->_script['text/javascript'] = preg_replace('%jQuery\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*[\d]*,\s*\'fixed\':\s*false}\);\s*}\);%', '', $doc->_script['text/javascript']);
				$doc->_script['text/javascript'] = str_replace($doc->_script['text/javascript'],'',$doc->_script['text/javascript']);
			
				if (empty($doc->_script['text/javascript']))
					unset($doc->_script['text/javascript']);
			}


Thanks
The topic has been locked.

Re: conflict problems 10 years, 3 months ago #20091

thanks for the fix!
The topic has been locked.
Time to create page: 0.20 seconds

Notification

Please find your issue via Suggested Posts before submitting your question. We have solved the most of issues and maybe your issue was solved before.

Latest My Topics

No posts to display.

Love all our templates?

Join our membership clubs starting at $49 only for access to all of our templates

Join Now
Home Pricing
Your Cart is currently empty!
Product update
Coupon
add
Coupon code invalid! Please re-enter!
AJAX loader
SearchSupport
Magento Themes Magento Extensions Free Magento Extensions Prestashop Themes Prestashop Modules Magento 2 Themes