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
00040 if (count($rs))
00041 {
00042 echo "<div class=\"slideshow\">";
00043
00044
00045 $image = $rs[0];
00046 echo " <a href=\"" . $image->url('web') . "\" rel=\"lightbox[album]\" title=\"" . htmlentities($image->caption) . "\">$text</a>";
00047
00048
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 ?>