2 columns / 6 albums per page

rioguia

Joined: 2003-12-20
Posts: 22
Posted: Wed, 2005-03-16 18:41

1. i am attempting get a custom layout that places 6 albums in two columns of three on each gallery page (version 1.44) on Apache 2.x, Fedora Core 2, as part of a CMSimple layout.

2. i am using the html head and footer wrap. Additionally I am suing the modifications suggested by Floridave and others to achieve a two column layout at this thread:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=21189&postdays=0&postorder=asc&start=30&sid=04a019d123c31561b78007ec84cc4a4f

3. my gallery is at:
http://www.lubuto.org/gallery/

I have two problems:

Problem One:
I can't seem to get the album name in column 2 to display correctly. For example, the album named "National Library Week" intrudes into the column 1 space.

Problem Two:
The top of Column 2 appears to be approximately 24 px lower than Column 1.

Thanks for any help you may provide.

 
khsjr1970

Joined: 2004-04-24
Posts: 271
Posted: Wed, 2005-03-16 21:37

you can use HTML tags in your fields, ie, <BR> is a line break that will fix your situation with the description running over. <CENTER> tags work too.

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Thu, 2005-03-17 01:49
Quote:
Additionally I am suing the modifications

Ack, most of us do this for free and don't have much money! :)

 
rioguia

Joined: 2003-12-20
Posts: 22
Posted: Thu, 2005-03-17 02:46

Thanks for the responses.

fryfrog: I couldn't make the tags work in the fields.

khsjr1970 -- Sorry: I fell in with the wrong crowd as a youngster and went to law school.

my solution based on floridave's kind album.php contribution download at the above mentioned thread includes:

1. changing the valign on the album <td> cell from valign="middle" to valign="top".

<!-- album table begin -->
<table width="100%" border="0" cellpadding=0 cellspacing=7>
<tr valign="top">
<?php
$start = ($gallery->session->albumListPage - 1) * $perPage + 1;
$end = min($start + $perPage - 1, $numAlbums);
for ($i = $start; $i <= $end; $i++) {
        $gallery->album = $albumDB->getAlbum($gallery->user, $i);
        $isRoot = $gallery->album->isRoot(); // Only display album if it is a root album
        if($isRoot) {
                if (strcmp($gallery->app->showOwners, "no")) {
                        $owner = $gallery->album->getOwner();
                }
                $tmpAlbumName = $gallery->album->fields["name"];
                $albumURL = makeAlbumUrl($tmpAlbumName);
?>
                                                                                                                             
  <!-- Begin Album Column Block -->
  <!-- Begin Image Cell -->
                                                                                                                             
  <td align="center" valign="top">  /////HERE IS MY FIRST EDIT

 

2. later, in the file relating to the text cell, I added an horizontal rule <htr width=100%>

           
 <!-- Begin Text Cell -->
  <td align="<?php echo $left ?>" valign="top" class="albumdesc"> <hr width="100%"> ///SECOND EDIT HERE
    <table cellpadding="0" cellspacing="0" width="100%" border="0" align="center" class="mod_title">
      <tr valign="middle">
        <td class="leftspacer"></td>
        <td>
          <table cellspacing="0" cellpadding="0" border="0" class="mod_title_bg">
            <tr>

3. finally, still editing the file as it relates to the text cell, i commented out the visits / click counts code

                                                                                                             
  <br>
  <span class="fineprint">

/////THIRD EDIT
<!--   <?php
        echo sprintf(_("Last changed on %s."), $gallery->album->getLastModificationDate() );
        $visibleItems=array_sum($gallery->album->numVisibleItems($gallery->user));
        echo " "; // Need a space between these two text blocks
        echo pluralize_n2(ngettext("This album contains 1 item", "This album contains %d items", $visibleItems), $visibleItems);
        if (!($gallery->album->fields["display_clicks"] == "no") && !$gallery->session->offline)  {
?> -->  
////THIRD EDIT ENDS
   <br><br><?php
        $clickCount=$gallery->album->getClicks();

///FOURTH EDIT 
/*      echo sprintf(_("This album has been viewed %s since %s."),
                pluralize_n2(ngettext("1 time", "%d times", $clickCount), $clickCount, _("0 times")),
                $gallery->album->getClicksDate()); */
////FOURTH EDIT ENDS.

}
$albumName=$gallery->album->fields["name"];
if ($gallery->user->canWriteToAlbum($gallery->album) &&
   (!($gallery->album->fields["display_clicks"] == "no"))) {
        echo " ".popup_link("[" . _("reset counter") ."]", doCommand("reset-album-clicks", array("set_albumName" => $albumName), "albums.php"), 1);
}
if($gallery->app->comments_enabled == 'yes') {
        // if comments_indication are "albums" or "both"
        switch ($gallery->app->comments_indication) {
        case "albums":
        case "both":
                $lastCommentDate = $gallery->album->lastCommentDate($gallery->app->comments_indication_verbose);
                print lastCommentString($lastCommentDate, $displayCommentLegend);
        } // end switch
}
?>
                                                                                                                             
  </span>
  </td>
  <?php if (round($i/2,0) <= ($i/2)) { ?>
        </tr><tr valign="top">
        <?php } ?>
  <!-- End Text Cell -->