[dev] new ansel galleries view

Duck duck at obala.net
Fri Sep 17 04:32:58 PDT 2004


I prefere to see galleries in the way images are displayed. So I created a 
"image list" view, which uses "imgesperrow" references to spit images in 
rows.

Duck
-------------- next part --------------
A non-text attachment was scrubbed...
Name: listImages.patch
Type: text/x-diff
Size: 1099 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20040917/dca9b962/listImages.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: images_footer.inc
Type: application/x-php
Size: 154 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20040917/dca9b962/images_footer.bin
-------------- next part --------------
<?

$division = $gallery_count%$imagesperrow;

if ( $division == 0 ) {
   echo '<tr valign="top">';
}
 
?>

  <td class="linedRow" align="center">
    <?php 

       if ( $gallery->getDefaultImage() ) {
         echo Horde::link($viewurl, sprintf(_("View %s"), $gallery->get('name')));
         echo Horde::img(Ansel::getImageUrl($gallery->getDefaultImage(), 'thumb'), '', '', '') . '</a>';
       } else {
         echo '&nbsp;';
       } 

       echo '<br />' . Horde::link($viewurl, sprintf(_("View %s"), $gallery->get('name'))) . $gallery->get('name') . '</a>';
       echo '<br />' . _("Date Created") . ': ' . date('d.m.y', $gallery->data["date-created"]);
       echo '<br />' . _("Gallery Owner") . ': ' . $gallery->data["owner"];
       echo '<br />' . _("images") . ': ' . $gallery->data["num-images"];
       
       if ( Auth::isAdmin() ) {
          echo '<br />';
          echo Horde::link(Horde::applicationUrl(Util::addParameter($galleryurl, 'actionID', 'delete')), _("Delete Gallery"), '', '', 'return window.confirm(\'' . addslashes(_("Are you sure you want to delete this gallery? All images in it will be deleted.")) . '\');') . _("Delete") .'</a>';
       }
       
     ?>
    </td>

<?

if ( $division == ($imagesperrow-1) ) {
   echo '</tr>';
}

++$gallery_count;



-------------- next part --------------
<table width="100%" border="0" cellpadding="4" cellspacing="0">
-------------- next part --------------
A non-text attachment was scrubbed...
Name: prefsImages.patch
Type: text/x-diff
Size: 459 bytes
Desc: not available
Url : http://lists.horde.org/archives/dev/attachments/20040917/dca9b962/prefsImages.bin


More information about the dev mailing list