Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


Mootools / Slightbox enabled gallery
Date: 2008/05/14 01:31 By: teryaki Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 18
graphgraph
Are you tired of fighting with your web 2.0 template and CBGallery? I know I sure was. Here for your enjoyment is some code that will enable your cbgallery to be mootools / Slightbox enabled.

How to install...

1. Download the smoothgallery mambot here.http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1727/Itemid,35/If
you already have it installed, proceed to step 2.

2. Modify lines 24-31 of cb.profolegallery.php to look like this

Code:

 if ($this->addCSS && strpos$mainframe->getHead(), '/templates/' $cur_template '/css/smoothgallery.css' ) === false ) {             $head =     '<link href="'.$mosConfig_live_site .'/mambots/content/smoothgallery/css/jd.gallery.css" rel="stylesheet" type="text/css" />' "\n"                     .'<link href="'.$mosConfig_live_site.'/mambots/content/smoothgallery/css/slightbox.css" rel="stylesheet" type="text/css" />' "\n";         }                          if ($this->addCustomCSS) {             $head .=     '<link href="'.$mosConfig_live_site '/templates/' $cur_template '/css/smoothgallery.css" rel="stylesheet" type="text/css" />' "\n";         }                  // add javascript to head if it's not already added settings specify to add it         if ($this->addJS && strpos$mainframe->getHead(), '/mambots/content/smoothgallery/scripts/jd.gallery.js"></script>' ) === false)             $head     .= '<script type="text/javascript" src="'.$mosConfig_live_site .'/mambots/content/smoothgallery/scripts/mootools.js"></script>' "\n"                      .'<script type="text/javascript" src="'.$mosConfig_live_site .'/mambots/content/smoothgallery/scripts/jd.gallery.js"></script>' "\n"                     .'<script type="text/javascript" src="'.$mosConfig_live_site .'/mambots/content/smoothgallery/scripts/slightbox.js"></script>' "\n";



Copy the smoothgallery.css file from the smoothgallery mambot folder to your templates css folder.

BANG! No moar fighting with Jquery, it isn't even loaded and your slightbox gallery works perfectly with your web 2.0 / mootools enabled template. woohoo!!
Click here to see the profile of this user The administrator has disabled public write access.


      Topics Author Date
    thread link
Mootools / Slightbox enabled gallery
teryaki 2008/05/14 01:31
    thread link
thread linkthread link Re:Mootools / Slightbox enabled gallery
claudeesti 2008/05/14 16:02
    thread link
thread linkthread link Re:Mootools / Slightbox enabled gallery
claudeesti 2008/05/16 21:19
    thread link
thread linkthread linkthread link Re:Mootools / Slightbox enabled gallery
Seurot 2008/05/19 17:35

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC2)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC3, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers at this time.

CB Login