JavaScript Conflict - phpWCMS Slimbox & Glide.js
Posted: Sun 9. Sep 2007, 08:00
I was originally going to post this at MooTools, but then thought that this community might be more apt to solving the problem that I am experiencing. Before I begin with the real tough question, let me start off simply. Is there a way to initiate the lightbox feature for images that are not being handled by the phpWCMS content parts like (images, image <div>, etc.) In this site, http://www.spotlightla.com/index?cocktailhour, if you click on any of the games on the right and then click at the main header graphic, you'll notice that the lightbox(slimbox) feature works nicely. However, the header contains several images that you can scroll through. phpWCMS doesn't support the feature in this way, though I have always found it useful for keeping things neat on the site.
The way this was done was setting the stats graphic on the left hand column to have the lightbox feature. Though this image doesn't need it, it was the only way I can get the system to generate one of its random relative gallery numbers. Here is an example of what I mean. Here is the link for the stats:
There you notice the rel="lightbox[0Kdjv]" tag. According to the lightbox website, these items inside the [] are for grouping images into the same presentation of image. I tried to just create another one called rel="lightbox[games]" but this wouldn't initiate the slimbox feature and it just directly linked to the first image. Putting the same rel [0Kdjv] let those images in the header work as well.
Is it possible to have these lightbox and slimbox features intiate with our own mark up? Consequently the feature also has the tendency to crash with a seperate instance of the script installed in the orthodox manner (in a folder like lightbox).
To solve this problem, will probably lend itself well to my real dilemma. I wanted to emulate the css javascript trickery displayed in Panic's Coda website http://www.panic.com/coda. I tracked this script and found somebody who leaked its magic in http://www.missingmethod.com/2007/05/13 ... component/.
I got it almost working perfectly minus the fact that the script is disabled by the slimbox feature. It appears that since both use the prototype.js and the effects.js script, that some variable is getting trampled. At least that is my initial guess. Needless to say this would be a great feature to include for the CMS. Either way, I was hoping somebody might have some ideas on resolving this dilemma. Fingers crossed.
The way this was done was setting the stats graphic on the left hand column to have the lightbox feature. Though this image doesn't need it, it was the only way I can get the system to generate one of its random relative gallery numbers. Here is an example of what I mean. Here is the link for the stats:
Code: Select all
<td class="imagelisttd"><a href="content/images/2e7b9dd674ad3cf7ceebccd4c26e7474.gif" rel="lightbox[0Kdjv]" target="_blank"><img src="content/images/84db1f39070f513cfc35dfd660db407d.gif" width="231" height="199" border="0" class="imagelistimg" alt="table_dancerevolution.gif" /></a></td>
Is it possible to have these lightbox and slimbox features intiate with our own mark up? Consequently the feature also has the tendency to crash with a seperate instance of the script installed in the orthodox manner (in a folder like lightbox).
To solve this problem, will probably lend itself well to my real dilemma. I wanted to emulate the css javascript trickery displayed in Panic's Coda website http://www.panic.com/coda. I tracked this script and found somebody who leaked its magic in http://www.missingmethod.com/2007/05/13 ... component/.
I got it almost working perfectly minus the fact that the script is disabled by the slimbox feature. It appears that since both use the prototype.js and the effects.js script, that some variable is getting trampled. At least that is my initial guess. Needless to say this would be a great feature to include for the CMS. Either way, I was hoping somebody might have some ideas on resolving this dilemma. Fingers crossed.