|
Title: "plg_rsg2_display_j15_0.3" conflicts with "sparkline" template (lightbox error) Post by: jfz on April 26, 2008, 01:47:23 AM PHP Version: 5.2.5
Web Server: Apache/2.2.6 (Win32) PHP/5.2.5 Web Server to PHP interface: apache2handler Joomla! Version: Joomla! 1.5.3 Production/Stable CLEAN INSTALL User Agent: Firefox-2.0.0.14 / IE6 / IE7 / OPERA 9.25 rs: com_rsgallery2_legacy_1.14.3 display: plg_rsg2_display_j15_0.3 sparkline: rsg2_template_sparkline._svn_rev_681 ===================================================== sparkline works excellent until you try to render it with display plugin. page is rendered properly, than if you click on thumbnail, lightbox tries to load but crashes - no transparent overlay, no image, no caption, just loading gif for a second and than white rectangle. and following error message in the console repeatedly... it seems like there is some conflict in js properties: (firefox error console:) -------------------------------------------------------------------------------------------------------------------------- error: effect.options has no properties source: http://localhost/154/components/com_rsgallery2/templates/sparkline/js/effects.js line: 546 error: effect.element has no properties source: http://localhost/154/components/com_rsgallery2/templates/sparkline/js/effects.js line: 689 ---------------------------------------------------------------------------------------------------------------------------- since i'm really not a javascript-guru i was not able to trace what's up. it occures on both of joomla default templates ("rhuk_milkyway" and "beez") and it's browser independent Title: Re: "plg_rsg2_display_j15_0.3" conflicts with "sparkline" template (lightbox err Post by: jfz on April 29, 2008, 09:18:11 AM this is conflict of sparkline's lightbox scripts and joomla's mootools.js
problem is that mootools.js is loading unnecessaryly in the frontend - automaticaly with <jdoc:include type="head" /> does anyone know how to prevent loading mootools.js in frontend while keep loading it in the backend where it's necesary? Title: Re: "plg_rsg2_display_j15_0.3" conflicts with "sparkline" template (lightbox err Post by: Jonah on April 29, 2008, 03:03:22 PM Or better yet, get them to play together nicely. the microMacro template would work then as well.
Title: Re: "plg_rsg2_display_j15_0.3" conflicts with "sparkline" template (lightbox err Post by: jfz on April 30, 2008, 11:57:00 AM this is what i've found on joomla support forum. it removes first script in head. it's quite unbelievable that this is official way to remove mootools. there is no safe way to remove it before it loads.
Code: <?php $headerstuff = $this->getHeadData(); // mootols are usually found as the very first entry reset($headerstuff['scripts']); $moo = key($headerstuff['scripts']); // kick it unset($headerstuff['scripts'][$moo]); // restore $this->setHeadData($headerstuff); ?> and if you run it twice, you remove even caption.js - quite funny. however, it works. Title: Re: "plg_rsg2_display_j15_0.3" conflicts with "sparkline" template (lightbox error) Post by: bertm on September 18, 2008, 07:30:56 AM Actually, here is a modification that will take out MooTools only for com_rsgallery2
replace this code in your J1.5 template (near the top) Code: <?php JHTML::_('behavior.mootools'); ?> with this code. Code: <?php JHTML::_('behavior.mootools'); if ($option == 'com_rsgallery2') { $headerstuff = $this->getHeadData(); $key = JURI::base( true ) . '/media/system/js/mootools.js'; unset( $headerstuff['scripts'][$key] ); $this->setHeadData( $headerstuff ); } ?> tested and works great with regard to the lightbox browsing, but I cannot seem to get the mouseover popup to work. Any thoughts on that from anyone? Actually I want to convert it into a dreamweaver style onMouseOver=rotateImage setup, which would pop the thumbnail up in a specified window. If I can solve the mouseover problem I will start hacking at this change. Any thoughts out there? Title: Re: "plg_rsg2_display_j15_0.3" conflicts with "sparkline" template (lightbox error) Post by: bertm on October 05, 2008, 07:22:31 AM PHP gurus out there - any advice on how to get this to code to run in the RSG template? Getting a fatal error on $this->. I want to include this in the RSG template so that I can run the rsg2_display bot on pages other than 'com_rsgallery2' and have it work.
|