Project / Support Center
Welcome, Guest. Please login or register. July 04, 2022, 01:35: PM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Open Source Topics  |  Coppermine Photo Gallery  |  Topic: Adding lightbox to cpmfetch 0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: Adding lightbox to cpmfetch  (Read 10837 times)
admin
Guest
« Reply #1 on: January 13, 2009, 02:48: PM »

You can also replace the "linktemplate" line with this to show the Album Name in the light box window also:

"linktemplate"=>'http://yourdomainnme.com/gallery/albums/{{pFilepath}}normal_{{pFilename}}" title="{{aTitle}}" rel="lightbox"');
Report to moderator   Logged
admin
Guest
« on: January 11, 2009, 03:17: PM »

first download lightbox
next upload lightbox to the same directory as the page displaying the cpmfetch images

next add these links to your page in the <head> area

<link rel="stylesheet" href="lightbox_assets/css/lightbox.css" type="text/css" media="screen" />
<script src="lightbox_assets/js/prototype.js" type="text/javascript"></script>
<script src="lightbox_assets/js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="lightbox_assets/js/lightbox.js" type="text/javascript"></script>

Change Bold to what ever your lighbox directory is called

Add this <body onload="initLightbox()"> as the body tag or at least this if you already have others there initLightbox()

Next add this to where you want cpmfetch to show - I this case we are showing random images with the Album Title below each image

<?php
  include_once "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  $options = array(
  "subtitle" => "<center>{{aTitle}}</center",
  "linktemplate"=>'http://yourdomainname.com/gallery/albums/{{pFilepath}}{{pFilename}}"rel="lightbox"');
  $objCpm->cpm_viewRandomMediaFrom("cat=partners:album=tours",1, 6, $options);
  $objCpm->cpm_close();
?>

Bold = directory for your coppermine gallery

That's all it takes.

Have fun



Report to moderator   Logged
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  Open Source Topics  |  Coppermine Photo Gallery  |  Topic: Adding lightbox to cpmfetch « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!