Lightbox Feature with Mootools

17 years 1 month ago #32309 by pointri
Lightbox Feature with Mootools was created by pointri
Hi Nant (and anyone else that's interested),

I've been playing around with the gallery plugin for a while now, and I noticed that its lightbox feature uses an installation of both prototype and what I guess is the effects set from script.aculo.us. This is fine until you have two Javascript engines (like JQuery, Xajax or Mootools) running with equivalent helper functions, like addEvent(), removeEvents(), etc., and conflicts emerge, depending on what order those scripts are included on a profile page, for example.

With Joomla! working around Mootools in 1.5, would you consider a lightbox alternative that uses Mootools for a future version instead? I only ask that specifically because I have a mod of the gallery plugin using Slimbox that uses a lighter script call to generate an identical effect. It only required a couple changes to the plugin's output code. Anyone interested?

Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com Construction Lounge: Online resource and networking portal for the construction and remodeling industries.

Please Log in to join the conversation.

17 years 1 month ago #32312 by nant

Please Log in to join the conversation.

17 years 1 month ago #32345 by pointri
Replied by pointri on topic Re:Lightbox Feature with Mootools
Sent it over to you. You can probably ignore the mods to the Profile Gallery's PHP file. Slimbox uses the same HTML syntax as the Script.aculo.ous Lightbox.

Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com Construction Lounge: Online resource and networking portal for the construction and remodeling industries.

Please Log in to join the conversation.

17 years 4 weeks ago #34519 by Graphixx
Replied by Graphixx on topic Re:Lightbox Feature with Mootools
Anything happened here yet?
would be interested to try it out, since i have a problem with the plug in and my template:unsure:

Please Log in to join the conversation.

17 years 3 weeks ago #34706 by pointri
Replied by pointri on topic Re:Lightbox Feature with Mootools
Here are the JavaScript files. You should be able to just replace the plugin's js directory with this one, then get into cb.profilegallery.php and change the script includes at around line 1000:

[code:1]// Hack - Include Mootools and Slimbox to simulate the lightbox effect.
// In Joomla! 1.5, Mootools would be called from /includes/js/mootools.js with a check to see if it already been called.
$mainframe->addCustomHeadTag("<link rel=\"stylesheet\" href=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/css/slimbox.css\" type=\"text/css\" media=\"screen\" />"«»);
$htmltext2 .= "<script type=\"text/javascript\" src=\"templates/scripts/mootools.js\"></script>";
$htmltext2 .= "<script type=\"text/javascript\" src=\"components/com_comprofiler/plugin/user/plug_cbprofilegallery/js/slimbox.js\"></script>";
$htmltext2 .= "<script type=\"text/javascript\" language=\"JavaScript\">\n";
$htmltext2 .= "var pg_imagestring = \"" . _pg_LBImageString . "\";\n";
$htmltext2 .= "var pg_ofstring = \"" . _pg_LBOfString . "\";\n";
$htmltext2 .= "</script>\n";
break;[/code:1]

Attachment gallery.zip not found



Post edited by: pointri, at: 2007/03/30 21:07

Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com Construction Lounge: Online resource and networking portal for the construction and remodeling industries.
Attachments:

Please Log in to join the conversation.

16 years 10 months ago #39819 by murx
Replied by murx on topic Re:Lightbox Feature with Mootools
hy pointri / nant / everyone!

it would be a good idea to be able to switch between the lightbox popup srciptengines in your gallery. like it is possible in the simple image pro gallery mambot. www.joomlaworks.gr

i found out that the current version of Nant's CB Gallery 1.0 RC2 plugin is in conflict with the current version of jce utilities 1.2 part of jce 1.1.5 or better said with the scripts to genarate the lightbox popup --> only the jce feature works correctly if enabled! jce utilities disabled gallery popup works correct.(as far as i know the problem is the mootools / lightbox conflict.

is there a way to have both engines working correct on one page without conflicts?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.417 seconds

Facebook Twitter LinkedIn