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

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : December 02, 2008, 06:43:52 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 4807 times)
« on: April 25, 2008, 08:47:23 pm »
jfz Offline
Newbie
*
Posts: 3



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, 04:18:11 am »
jfz Offline
Newbie
*
Posts: 3



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, 10:03:22 am »
Jonah Offline
Administrator
Hero Member
*****
Posts: 1413



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, 06:57:00 am »
jfz Offline
Newbie
*
Posts: 3



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
 
Reply #4
« on: September 18, 2008, 02:30:56 am »
bertm Offline
Newbie
*
Posts: 20



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::basetrue ) . '/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?


Logged
 
Reply #5
« on: October 05, 2008, 02:22:31 am »
bertm Offline
Newbie
*
Posts: 20



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. 
Logged
 
Print  Pages 1
« previous next »
Jump to: