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: 3. my gallery is at: I have two problems: Problem One: Problem Two: Thanks for any help you may provide. |
|

Posts: 271
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.
Posts: 3236
Ack, most of us do this for free and don't have much money!
Posts: 22
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 EDIT2. 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 -->