RSGallery2 Support Forums
Welcome, Guest. Please login or register.

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : July 25, 2008, 05:29:47 AM
+  RSGallery2 Support Forums
|-+  RSgallery2 support forums
| |-+  Display and Templates (Moderators: Jonah, Tomislav Ribicic, Daniel Tulp, Ronald Smit)
| | |-+  "plg_rsg2_display_j15_0.3" conflicts with "sparkline" template (lightbox error)
Advanced search
  « previous next »
Pages 1
Author
Topic: "plg_rsg2_display_j15_0.3" conflicts with "sparkline" template (lightbox error)  (Read 1857 times)
« on: April 26, 2008, 01:47:23 AM »
jfz Offline
Newbie
*
Posts: 3

View Profile Email

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
Logged
 
Reply #1
« on: April 29, 2008, 09:18:11 AM »
jfz Offline
Newbie
*
Posts: 3

View Profile Email

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?
Logged
 
Reply #2
« on: April 29, 2008, 03:03:22 PM »
Jonah Offline
Administrator
Hero Member
*****
Posts: 1398

View Profile

Or better yet, get them to play together nicely.  the microMacro template would work then as well.
Logged

Due to time constraints, I have taken a step back from RSGallery2.  In the event of an emergency, you will need to PM me.
 
Reply #3
« on: April 30, 2008, 11:57:00 AM »
jfz Offline
Newbie
*
Posts: 3

View Profile Email

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.

Logged
 
Print  Pages 1
« previous next »
Jump to: