Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

base-gallery.inc.php

Go to the documentation of this file.
00001 <?
00010 abstract class BaseGallery extends MyManager
00011 {
00017     function __construct($objectType, $count = 30, $table = null)
00018     {
00019         parent::__construct($objectType, $table, $count);
00020     }
00021 
00025     public function initSlideshow()
00026     {
00027         $this->needsJs("lib/js/lightbox.js");
00028         $this->needsJs("lib/js/scriptaculous.js");
00029         $this->needsCss("lib/css/lightbox.css");
00030     }
00031 
00037     public function drawSlideshow($rs)
00038     { 
00039         //show it if we got it.
00040         if (count($rs))
00041         {
00042             echo "<div class=\"slideshow\">";
00043             
00044             //draw our first one
00045             $image = $rs[0];
00046             echo " <a href=\"" . $image->url('web') . "\" rel=\"lightbox[album]\" title=\"" . htmlentities($image->caption) . "\">$text</a>";
00047             
00048             //draw our other ones
00049             foreach ($rs AS $image)
00050                 if ($image->id != $this->photo_id)
00051                     echo "<a href=\"" . $image->url('web') . "\" rel=\"lightbox[album]\"" . htmlentities($image->caption) . "\"></a>";
00052         
00053             echo "</div>";
00054         }
00055     }
00056 }
00057 ?>

Generated on Fri Oct 27 12:26:40 2006 for BaseJumper by doxygen 1.3.9.1