Customizing sub-albums

the_menace

Joined: 2004-02-16
Posts: 39
Posted: Fri, 2004-03-12 20:08

We decided that were going to do sub-albums for our gallery and separate albums into categories. I have one problem though.

I want the sub-albums layout to look like the gallery home page.
For example. I want this sub-album http://sac-life.com/gallery/Club-Life to look the same way the main-albums are displayed like this http://www.sac-life.com/gallery/ (horizontally). How can I accomplish such thing? Thanks a lot.

- Menace

 
henkbos

Joined: 2003-07-17
Posts: 36
Posted: Tue, 2004-08-10 12:02

Bump

Have the same question.

 
cheema

Joined: 2004-08-11
Posts: 1
Posted: Wed, 2004-08-11 06:21

Too many users confuse the "sub-albums" as single images.

See my gallery page at:

http://cheema.com/gallery/

and then sample album with sub-albums:

http://cheema.com/gallery/baby/

I would like to visually indicate to the users that these pictures for sub-albums have more to them then just one picture. Sorta like what I can do for the albums on the main page.

 
Lynx

Joined: 2004-08-12
Posts: 3
Posted: Thu, 2004-08-12 05:22

I have searched extensively for a way to do this. I am in the process of setting up Gallery to display 7000+ photos which will be divided into sub-albums (and albums will contain either sub-albums OR photos, but not both). In my opinion, it's too confusing to see an album with sub-albums displayed like photos except for with a different border. There needs to be a better way to distinguish this difference, and it would be ideal if the sub-albums could be displayed exactly in the same manner as the the main Gallery page.

From what I could find on the forums, this topic was discussed once before:

Nested Albums Description Position

However, this solution doesn't work with Gallery 1.4 since it seems the 2 column mod isn't supported anymore. Just to check, I downloaded the files from the above thread and after updating a changed variable name (changing isAlbumName to getAlbumName), the two column mod is, unfortunately, displayed in the same way as any other normal album with images.

Can anyone please help us with this? Thanks in advance for your time.

 
Lynx

Joined: 2004-08-12
Posts: 3
Posted: Thu, 2004-08-12 13:37

The thread I linked to above talked about using a 2 column mod. Is that really necessary for this kind of application (hence the new thread)? The HTML already exists to create the front page of Gallery in the two column table format, so couldn't that be applied to a list of sub-albums just the same?

I'm new at this, so could someone please tell me where this code for the main Gallery album is at? I'm guessing it would need to be modified slightly to accommodate sub-albums, and I think (correct me if I'm wrong) it could be implemented in this way:

Delete the code after <!-- image grid table --> in view_album.php.  Replace it with

if (there are sub-albums in an album)
    then use the same layout as the main Gallery page
else
    use the normal layout for images

This should be easy to decide since Gallery already knows how many sub-albums and images an album has. Within this If/Else statement the code would call one of two files. One file would be subalbum_table.php which would be the modified main Gallery page code, and the other would be image_table.php which would display photos.

Any suggestions or hints in the right direction would be greatly appreciated. Thanks!

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2004-08-29 03:17

This mod allows albums that only contain sub-albums to look like the main (albums.php) page. If the album contains an image it defaults to the default behavior.
I tested it a bit but I am sure there is a bug or 2: I welcome feedback and I will try to address them.

Open view_albums.php and find <!-- image grid table --> above that put

<!-- start of table check -->
<?php
// check to see if subalbum has images and if not then do the 2 column mod
if (!$numPhotos) {
	include('album_2column_table.inc'); }
else {
echo "<!-- else include the regular table and the close is below the table -->\n"; 
?>

further down find

<?php if ($displayCommentLegend) { //display legend for comments ?>
<span class="error">*</span><span class="fineprint"> <?php echo _("Comments available for this item.") ?></span>
<br>

and above that put:

<?php
} // end the include of regular table if album contains a photo
?>

Then save this as album_2column_table.inc in your gallery directory

<!-- start of 2 column mod of the original table -->
<table width="<?php echo $fullWidth ?>" border="0" cellspacing="0" cellpadding="3">
<?php
$numPhotos = $gallery->album->numPhotos(1);
$displayCommentLegend = 0;  // this determines if we display "* Item contains a comment" at end of page
if ($numPhotos) {
	$rowCount = 0;

	// Find the correct starting point, accounting for hidden photos
	$rowStart = 0;
	$cnt = 0;
	$form_pos=0; // counts number of images that have votes below, ie withou albums;
	$rowStart = $start;

	while ($rowCount < $rows) {
		/* Do the inline_albumthumb header row */
		$visibleItemIndex = $rowStart;
		$i = $visibleItemIndex<=$numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
		$j = 1;
		$printTableRow = false;
		if ($j <= $cols && $i <= $numPhotos) {
			$printTableRow = true;
			echo('<tr>');
		}
		while ($j <= $cols && $i <= $numPhotos) {
			$colspan = $cols+1;
			echo("<td colspan=\"$colspan\">");
			includeHtmlWrap("inline_albumthumb.header");
			echo("</td>");
			$j++; 
			$visibleItemIndex++;
			$i = $visibleItemIndex <= $numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
		}
		if ($printTableRow) {
			echo('</tr>');
		}

		/* Do the picture row */
		$visibleItemIndex = $rowStart;
		$i = $visibleItemIndex <= $numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
		$j = 1;
		if ($printTableRow) {
			echo('<tr>');
		}
		while ($j <= $cols && $i <= $numPhotos) {
			echo("<td align=\"center\" valign=\"middle\">");

			//-- put some parameters for the wrap files in the global object ---
			$gallery->html_wrap['borderColor'] = $bordercolor;
			$gallery->html_wrap['borderWidth'] = $borderwidth;
			$gallery->html_wrap['pixelImage'] = getImagePath('pixel_trans.gif');
			if ($gallery->album->isAlbum($i)) {
				$scaleTo = 0; //$gallery->album->fields["thumb_size"];
				$myAlbum = $gallery->album->getNestedAlbum($i);
				list($iWidth, $iHeight) = $myAlbum->getHighlightDimensions($scaleTo);
			} else {
				unset($myAlbum);
				$scaleTo=0;  // thumbs already the right 
					    //	size for this album
				list($iWidth, $iHeight) = $gallery->album->getThumbDimensions($i, $scaleTo);
			}
			if ($iWidth == 0) {
			    $iWidth = $gallery->album->fields["thumb_size"];
			}
			if ($iHeight == 0) {
			    $iHeight = 100;
			}
			$gallery->html_wrap['imageWidth'] = $iWidth;
			$gallery->html_wrap['imageHeight'] = $iHeight;

			$id = $gallery->album->getPhotoId($i);
			if (isset($myAlbum)) {
				// We already loaded this album - don't do it again, for performance reasons.

				$gallery->html_wrap['imageTag'] = $myAlbum->getHighlightTag($scaleTo,'',_("Highlight for Album:"). " ". gallery_htmlentities(removeTags($myAlbum->fields['title'])));
				$gallery->html_wrap['imageHref'] = makeAlbumUrl($gallery->album->getAlbumName($i));
				$gallery->html_wrap['frame'] = $gallery->album->fields['album_frame'];
			       	/*begin backwards compatibility */
			       	$gallery->html_wrap['thumbWidth'] = 
					$gallery->html_wrap['imageWidth'];
			       	$gallery->html_wrap['thumbHeight'] = 
					$gallery->html_wrap['imageHeight'];
			       	$gallery->html_wrap['thumbTag'] = 
					$gallery->html_wrap['imageTag'];
			       	$gallery->html_wrap['thumbHref'] = 
					$gallery->html_wrap['imageHref'];
			       	/*end backwards compatibility*/
      
				includeHtmlWrap('inline_albumthumb.frame');

			} 
			echo("</td>");
			echo("<td>");
			?>
<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>
              <td class="mod_title_left"></td>
              <td nowrap class="title">
                <?php
				$buf = "";
				$buf = $buf."<center><b>". sprintf(_("Album: %s"), '<a href="'. makeAlbumUrl($gallery->album->getAlbumName($i)) .'">'. $myAlbum->fields['title'] .'</a>'). '</b></center>';
				echo $buf;
				?>
			  </td>
              <td class="mod_title_right"></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <td class="mod_titleunder_hl">
		<?php
		
		echo ("");
		echo makeFormIntro("view_album.php",
	       	array("name" => "vote_form", "method" => "POST"));
		if (!$gallery->session->offline &&
			   (($gallery->user->canDeleteFromAlbum($gallery->album)) ||  
			   ($gallery->user->canWriteToAlbum($gallery->album)) || 
			   ($gallery->user->canChangeTextOfAlbum($gallery->album)) ||
			   (($gallery->album->getItemOwnerModify() || $gallery->album->getItemOwnerDelete()) &&
			   ($gallery->album->isItemOwner($gallery->user->getUid(), $i) || 
			   (isset($myAlbum) && $gallery->user->isOwnerOfAlbum($myAlbum))))))
			{
				$showAdminForm = 1;
			} else { 
				$showAdminForm = 0;
			}
			if ($showAdminForm) {
				if ($gallery->album->isMovieByIndex($i)) {
					$label = _("Movie");
				} elseif ($gallery->album->isAlbum($i)) {
					$label = _("Album");
				} else {
					$label = _("Photo");
				}

			       	if (canVote()) {
				       	echo '</td></tr>';
					echo "\n" . '<tr><td align="center">';
				}
				echo("\n\t<select style=\"font-size:10px\" class=\"adminform\" name=\"s$i\" ".
					"onChange='imageEditChoice(document.vote_form.s$i)'>");
				echo("\n\t\t<option value=''>& ". sprintf(_("Edit %s"), $label) . " &</option>");
			}
			if ($gallery->user->canChangeTextOfAlbum($gallery->album) && $showAdminForm) {
				if (isset($myAlbum)) {
					if ($gallery->user->canChangeTextOfAlbum($myAlbum)) {	
						showChoice(_("Edit Title"),
							"edit_field.php", 
							array("set_albumName" => $myAlbum->fields["name"],
								"field" => "title")) . 
						showChoice(_("Edit Description"),
							"edit_field.php",
							array("set_albumName" => $myAlbum->fields["name"],
								"field" => "description"));
					}
					if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($myAlbum)) {
						showChoice(_("Rename Album"),
							"rename_album.php",
							array("set_albumName" => $myAlbum->fields["name"],
							      "index" => $i));
					}
				} else {
					showChoice(_("Edit Text"), "edit_caption.php", array("index" => $i));
				}
			}
			if ($gallery->user->canWriteToAlbum($gallery->album) && $showAdminForm) {
				if (!$gallery->album->isMovieByIndex($i)) {
					 /* Show Highlight Album/Photo only when this i a photo, or Album has a highlight */
					$nestedAlbum=$gallery->album->getNestedAlbum($i);
					if (!$gallery->album->isAlbum($i) || $nestedAlbum->hasHighlight()) {
						showChoice(sprintf(_("Highlight %s"),$label), 'do_command.php', array('cmd' => 'highlight', 'index' => $i));
					}
				}
				if ($gallery->album->isAlbum($i)) {
					showChoice(_("Reset Counter"), "do_command.php",
						array("cmd" => "reset-album-clicks",
						      "set_albumName" => $gallery->album->getAlbumName($i),
							"return" => urlencode(makeGalleryUrl("view_album.php"))));
				}
				showChoice(sprintf(_("Move %s"),$label), "move_photo.php", array("index" => $i, 'reorder' => 0));
				showChoice(sprintf(_("Reorder %s"),$label), "move_photo.php", array("index" => $i, 'reorder' => 1));
			}
			if ($gallery->user->isAdmin() || ((isset($myAlbum) && $gallery->user->isOwnerOfAlbum($myAlbum)) || 
				$gallery->album->isItemOwner($gallery->user->getUid(), $i)) && 
				$showAdminForm) {
				if ($gallery->album->isHidden($i)) {
 					showChoice(sprintf(_("Show %s"), $label), "do_command.php", array("cmd" => "show", "index" => $i));
				} else {
					showChoice(sprintf(_("Hide %s"), $label), "do_command.php", array("cmd" => "hide", "index" => $i));
				}
			}
			if ($gallery->user->canDeleteFromAlbum($gallery->album) && $showAdminForm) {
				if($gallery->album->isAlbum($i)) {
					if($gallery->user->canDeleteAlbum($myAlbum)) {
						showChoice(sprintf(_("Delete %s"),$label), "delete_photo.php",
							array("id" => $myAlbum->fields["name"],
							      "albumDelete" => 1));
					}
				} else {
					showChoice(sprintf(_("Delete %s"), $label), "delete_photo.php",
						   array("id" => $id));
				}
			}
			if($gallery->album->isAlbum($i)) {
			    if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($myAlbum) && $showAdminForm) {
				showChoice(_("Permissions"), "album_permissions.php",
					   array("set_albumName" => $myAlbum->fields["name"]));

				/* Watermarking support is enabled and user is allowed to watermark images/albums */
				if (strlen($gallery->app->watermarkDir) && $myAlbum->numPhotos(1)) {
					showChoice(_("Watermark Album"), "watermark_album.php", array("set_albumName" => $myAlbum->fields["name"]));
				}
                                if ($gallery->user->canViewComments($myAlbum) &&
                                    ($myAlbum->lastCommentDate("no") != -1))
                                {
                                        showChoice(_("View Comments"), "view_comments.php", array("set_albumName" => $myAlbum->fields["name"]),"url");
                                }
			    }
			}
                       if ($gallery->user->isAdmin() && !$gallery->album->isAlbum($i)) {
                               showChoice(_("Change Owner"), "photo_owner.php", array("id" => $id));
                       }
		       if ($showAdminForm) {
			       echo "</select>\n";
				   }
		echo ("");
		?>
		</td>
      </tr>
    </table>
	<?php
			// Caption itself
			echo "\n". '<div class="mod2caption" style="width:90%">';
			$id = $gallery->album->getPhotoId($i);
			if ($gallery->album->isHidden($i) && !$gallery->session->offline) {
				echo "(" . _("hidden") .")<br>";
			}
			if (isset($myAlbum)) {
				$myDescription = $myAlbum->fields['description'];
				$buf = "";
				$buf = $buf."";
				if ($myDescription != _("No description") &&
					$myDescription != "No description" && 
					$myDescription != "") {
					$buf = $buf."<br><b>Description:</b> ".$myDescription."";
				}
				echo $buf;
				if (strcmp($gallery->app->showOwners, "no")) {
					$owner = $myAlbum->getOwner();
					echo "\n<div class=\"desc\">";
					echo _("Owner:") . ' '. showOwner($owner);
					echo '</div>';
					}
				echo '<div class="fineprint" style="margin-top:3px">';
				echo _("Changed: ") ." ". $myAlbum->getLastModificationDate();
 				echo "\n<br>";
				$visItems=array_sum($myAlbum->numVisibleItems($gallery->user));
				echo _("Contains: ") ." ". pluralize_n2(ngettext("1 item", "%d items", $visItems), $visItems) . '. ';
				// If comments indication for either albums or both
				switch ($gallery->app->comments_indication) {
				case "albums":
				case "both":
					$lastCommentDate = $myAlbum->lastCommentDate(
						$gallery->app->comments_indication_verbose);
					if ($lastCommentDate > 0) {
						print lastCommentString($lastCommentDate, $displayCommentLegend);
					}
				}
				echo '</div>';

				if (!(strcmp($gallery->album->fields["display_clicks"] , "yes")) &&  !$gallery->session->offline && ($myAlbum->getClicks() > 0)) {
					echo '<div class="viewcounter" style="margin-top:3px">';
					echo _("Viewed:") . " ". pluralize_n2(ngettext("1 time", "%d times", $myAlbum->getClicks()), $myAlbum->getClicks());
					echo ".</div>";
				}
				echo '<!-- is this close span needed -->';  // i don't think this is required close span if you have it set to both??????
			} 
			else {
				echo '<center>';
				echo nl2br($gallery->album->getCaption($i));
				echo $gallery->album->getCaptionName($i) . ' ';
				// indicate with * if we have a comment for a given photo
				if ($gallery->user->canViewComments($gallery->album) 
					&& $gallery->app->comments_enabled == 'yes') {
					// If comments indication for either photos or both
					switch ($gallery->app->comments_indication) {
					case "photos":
					case "both":
						$lastCommentDate = $gallery->album->itemLastCommentDate($i);
						print lastCommentString($lastCommentDate, $displayCommentLegend);
					}
				}
				echo "</center>";
				if (!(strcmp($gallery->album->fields["display_clicks"] , "yes")) && !$gallery->session->offline && ($gallery->album->getItemClicks($i) > 0)) {
					echo '<div class="viewcounter" style="margin-top:3px">';
					echo _("Viewed:") ." ". pluralize_n2(ngettext("1 time", "%d times", $gallery->album->getItemClicks($i)), $gallery->album->getItemClicks($i));
					echo ".</div>\n";
				}
			}
		       	echo "</div>\n";
		       	if (canVote()) {
				print '<table><tr><td align="center">';
			       	addPolling($gallery->album->getVotingIdByIndex($i),
					       	$form_pos, false);
			       	$form_pos++;
		       	}
		       if (canVote()) {
			       print '</td></tr></table>';
		       }

			echo('</td>');
			$j++; 
			$visibleItemIndex++;
			$i = $visibleItemIndex<=$numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
		}
		if ($printTableRow) {
			echo('</tr>');
		}

		/* Now do the inline_albumthumb footer row */
		$visibleItemIndex = $rowStart;
		$i = $visibleItemIndex <= $numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
		$j = 1;
		if ($printTableRow) {
			echo('<tr>');
		}
		while ($j <= $cols && $i <= $numPhotos) {
			echo("<td>");
			includeHtmlWrap("inline_albumthumb.footer");
			echo("</td>");
			$j++;
			$visibleItemIndex++;
			$i = $visibleItemIndex<=$numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
		}
		if ($printTableRow) {
			echo('</tr>');
		}
		$rowCount++;
		$rowStart = $visibleItemIndex;
	}
} else {
?>

	<td colspan="<?php echo $rows ?>" align="center" class="headbox">
<?php if ($gallery->user->canAddToAlbum($gallery->album) && !$gallery->session->offline) { ?>
	<span class="head"><?php echo _("Hey! Add some photos.") ?></span>
<?php } else { ?>
	<span class="head"><?php echo _("This album is empty.") ?></span>
<?php } ?>
	</td>
	</tr>
<?php
}
?>

</table>
<!-- END of 2 column mod of the original table -->

See the behavior

Edit Nov 6: I edited the code to only check if the album does not have a image. This fixes a permissions and hidden albums issue.
Dave

 
mmm

Joined: 2004-08-29
Posts: 2
Posted: Sun, 2004-08-29 15:53

I tried it, and it is almost perfect.
One thing that I don't like is, that sub-albums are shown next to each other:
http://www.nosbibulis.com/gallery/view_album.php?set_albumName=Travelbum

and not above each other.....

greets

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2004-08-29 16:20

mmm,
Go into the album and change the properties to one column and you will have them like you wish. Presently you have the properties set to 3 columns.

Dave

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Sun, 2004-08-29 18:51

What exactly is wrong with using one of the image backgrounds for sub-albums?

For pictures, I have the single pixel frame around them. For sub-albums, I use the "shadow" thing. You could also use the "poleroid" and "poleroids" or one of the other ones that looks like a book... or even make your own.

 
starli

Joined: 2004-08-14
Posts: 8
Posted: Mon, 2004-08-30 17:45

Another solution instead drawing a new frame would be to make a watermark-image, so you 'd have to upload the highlighted image a second time, watermark it with big letters like "Sub-Album" across the picture (and maybe an extra frame), remake the thumbnail, highlight the pic and hide it...

 
starli

Joined: 2004-08-14
Posts: 8
Posted: Wed, 2004-09-01 16:58

To see what I meant:

http://www.alpengallery.at.tf/view_album.php?set_albumName=Norditalien

If anyone is interested in this frame or the watermark-image, let me know. (For an unknown reason yet the border is displayed wrong on my IE, but without problems on my Mozilla...)

 
raventures
raventures's picture

Joined: 2003-09-19
Posts: 30
Posted: Sat, 2004-09-04 22:32

I am trying to get the simple effect that fryfrog suggests, that is to have the sprial notebook frame used for every album or sub-album. However the notebook only appears on the main page. And regardless of what I set in the CONFIG.PHP for the other levels:

$gallery->app->default["album_frame"] = "notebook";
$gallery->app->default["thumb_frame"] = "notebook";
$gallery->app->default["image_frame"] = "notebook";

...all I ever see is the drop-shadowed effect for all sub-albums, and the single line border for images. Can there be something wrong with my setup/configuration? FWIW I do not see any CSS applied when running the Configuration Wizard - just plain text.

I tried the "two-colum" code discussed in this thread. It ran, but made no change in the appearances. :(

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2004-09-04 22:54

you have to change existing sub-albums for the frame you wish: FAQ Gallery:c.34 Note the word default. config.php changes will work for future (new) albums.

Do you have a url that I can check the 2 column mod? Did you have only subalbums and no images in the sub-album to get the 2 column effect?

Dave

 
mystavash

Joined: 2004-09-12
Posts: 69
Posted: Sun, 2004-09-12 03:01

First, thanks to all the people who help out on this board. A good program is one thing, but good support is what really makes the difference.

I have been testing out various modifications for my site which uses the latest free version of Gallery (1.4.4 I think) and Nuke (7.4). I plugged this code in to make it so that the subalbums looked like the main page, and found that while it worked nicely with the standalone, I get the following error when using it with nuke:

Warning: main(album_2column_table.inc): failed to open stream: No such file or directory in /home/mystavas/public_html/nuke/modules/gallery/view_album.php on line 676

Warning: main(): Failed opening 'album_2column_table.inc' for inclusion (include_path='') in /home/mystavas/public_html/nuke/modules/gallery/view_album.php on line 676

Here is my site for reference (test site anyway):
http://www.mystavash.net/nuke/modules.php?op=modload&name=gallery&file=index&include=albums.php

Thanks again.

Anisa.FAQ Gallery:c.35

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2004-09-12 04:21

mystavash,
I am no *nuke expert so I asked one JadeDragon
and she suggested to use the full url for the include or the root path.
so try

<?php 
// check to see if subalbum only has albums then display a side by side 
$myAlbum = new Album(); 
$myAlbum->load($albumName); 
$numPhotos = $myAlbum->numPhotos(1); 
if ($numPhotos == $numAlbums) { 
   include('http://YOURWEBSITE.COM/gallery/album_2column_table.inc'); } 
else { 
// else include the regular table and the close is below the table 
?>

or:
include(/home/YOURSITE/public_html/gallery/album_2column_table.inc'); }

Nuke adds some extra stuff that I have yet to learn.
Nice to see some of my customizations if practice.

Dave

 
mystavash

Joined: 2004-09-12
Posts: 69
Posted: Sun, 2004-09-12 07:34

:D

I don't know much about php, but it's always a little bit of a thrill to see something work!

When I tried putting in the http address, I got this error:

Warning: main(): stream does not support seeking in /home/mystavas/public_html/nuke/modules/gallery/view_album.php on line 676

So I tried the other suggestion, and it works beautifully now, nuke and standalone. Thank you (and Jade Dragon:) ) for your help!

Anisa.

 
TuBaG

Joined: 2004-09-01
Posts: 5
Posted: Mon, 2004-09-20 15:23

Dave,
I implemented your sub-album mod to look like the main gallery page and it worked great. One hitch I found is if I am hiding a sub-album it defaults back to the orginal setting with description below the thumbnail. Thoughts?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2004-09-20 23:42

TuBaG,
I can't reproduce your issue, if you go to http://langleycom.com/g1/album10 it is a album that only has sub-albums. http://langleycom.com/g1/album12 is a hidden sub-album of http://langleycom.com/g1/album10 .

Am I missing somthing? If you can tell me how to reproduce I will try.

This is on my 1.4.5 test gallery but the code has not changed that much, that I can see, that would stop the mod from working.

Dave

 
sunnyjpop

Joined: 2004-09-23
Posts: 5
Posted: Thu, 2004-09-23 04:08

Quick question, I now have my sub-albums looking like the gallery page, but I want to change the maximum displayable sub-albums to more then the 10 given. Is there anyway I can change this for the sub-albums page?

Also, like the gallery page, I would like the language selection to be available at the top?

Any ideas? It would be very much appreciated.

sj

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2004-09-23 04:35

sunnyjpop,
For changing rows:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=67334#67334
as for the language selection :
not tested---->
in view_albums.php find:

includeLayout('navtablemiddle.inc');
includeLayout('navigator.inc');
includeLayout('navtableend.inc');

and add:includeLayout('ml_pulldown.inc');
If that does not work start another thread to keep this on topic.

Dave

 
sunnyjpop

Joined: 2004-09-23
Posts: 5
Posted: Thu, 2004-09-23 04:46

Got it! Works perfectly (probably shouldn't be BUT) i had just figured it out when I saw your post (about the language bar.) The rows work super.

Thanks!
sj

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2004-11-07 07:09
TuBaG wrote:
Dave,
I implemented your sub-album mod to look like the main gallery page and it worked great. One hitch I found is if I am hiding a sub-album it defaults back to the orginal setting with description below the thumbnail. Thoughts?

I got a PM from a user and I can't recall his/her name....They had a similar issue if the sub-album(s) had permissions set to have one or more sub-album only viewable if the user is logged in.
I was able to reproduce that issue and have changed the code to check if the album has an image. If it has a image then use the regular display, of not then use the 2 column mod.

I have updated the code here
This is the change:
Open view_albums.php and find <!-- image grid table --> above that put

<!-- start of table check -->
<?php
// check to see if subalbum has images and if not then do the 2 column mod
if (!$numPhotos) {
	include('album_2column_table.inc'); }
else {
echo "<!-- else include the regular table and the close is below the table -->\n"; 
?>
 
rsramirez

Joined: 2003-11-03
Posts: 16
Posted: Tue, 2004-11-09 22:44

Dave,

Great mod. I was actually working on rel'ing up the old 2col mod up to the newest release when I found your mod.

I actually worked on combining my mod with yours with great success.

I've allowed for the nested subalbum view on the right hand side, and made the text/admin portion of the albums look like how they look at the top most gallery. I also allowed the mod to be turned on and off from the configuration wizard (probably not really necessary since if the mod is installed, it would probably be used anyway), but I just do that as a standard for all my mods.

You can see it in action here. http://www.instrumentofchoice.net/gallerydev/

You can view the subalbum listing working within a subalbum by viewing the Travel album.

You can view screenshots of the admin screen and config wizard in the Gallery Mods > 2 Column Mod album.

Included below are the code changes I made. I've excluded the config wizard changes for now.

Anyone, please test and feedback (bugs, comments, etc.) would be greatly appreciated. In the mean time, I'm working on rel'ing up my other older mods seen at http://www.instrumentofchoice.net/gallery including a "VIEW ALL" link, a cleaner text based navigation (removing the images from the breadcrums and page 1, 2, 3 etc..), and applying a pbase-based CSS.

New version of album_2column_table.inc

<!-- start of 2 column mod of the original table -->
<table width="<?php echo $fullWidth ?>" border="0" cellspacing="0" cellpadding="3">
<?php
$numPhotos = $gallery->album->numPhotos(1);
$displayCommentLegend = 0;  // this determines if we display "* Item contains a comment" at end of page
if ($numPhotos) {
   $rowCount = 0;

   // Find the correct starting point, accounting for hidden photos
   $rowStart = 0;
   $cnt = 0;
   $form_pos=0; // counts number of images that have votes below, ie withou albums;
   $rowStart = $start;

   while ($rowCount < $rows) {
      /* Do the inline_albumthumb header row */
      $visibleItemIndex = $rowStart;
      $i = $visibleItemIndex<=$numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
      $j = 1;
      $printTableRow = false;
      if ($j <= $cols && $i <= $numPhotos) {
         $printTableRow = true;
         echo('<tr>');
      }
      while ($j <= $cols && $i <= $numPhotos) {
         $colspan = $cols+1;
         echo("<td colspan=\"$colspan\">");
         includeHtmlWrap("inline_albumthumb.header");
         echo("</td>");
         $j++;
         $visibleItemIndex++;
         $i = $visibleItemIndex <= $numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
      }
      if ($printTableRow) {
         echo('</tr>');
      }

      /* Do the picture row */
      $visibleItemIndex = $rowStart;
      $i = $visibleItemIndex <= $numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
      $j = 1;
      if ($printTableRow) {
         echo('<tr>');
      }
      while ($j <= $cols && $i <= $numPhotos) {
         echo("<td align=\"center\" valign=\"middle\">");

         //-- put some parameters for the wrap files in the global object ---
         $gallery->html_wrap['borderColor'] = $bordercolor;
         $gallery->html_wrap['borderWidth'] = $borderwidth;
         $gallery->html_wrap['pixelImage'] = getImagePath('pixel_trans.gif');
         if ($gallery->album->isAlbum($i)) {
            $scaleTo = 0; //$gallery->album->fields["thumb_size"];
            $myAlbum = $gallery->album->getNestedAlbum($i);
            list($iWidth, $iHeight) = $myAlbum->getHighlightDimensions($scaleTo);
         } else {
            unset($myAlbum);
            $scaleTo=0;  // thumbs already the right
                   //   size for this album
            list($iWidth, $iHeight) = $gallery->album->getThumbDimensions($i, $scaleTo);
         }
         if ($iWidth == 0) {
             $iWidth = $gallery->album->fields["thumb_size"];
         }
         if ($iHeight == 0) {
             $iHeight = 100;
         }
         $gallery->html_wrap['imageWidth'] = $iWidth;
         $gallery->html_wrap['imageHeight'] = $iHeight;

         $id = $gallery->album->getPhotoId($i);
         if (isset($myAlbum)) {
            // We already loaded this album - don't do it again, for performance reasons.

            $gallery->html_wrap['imageTag'] = $myAlbum->getHighlightTag($scaleTo,'',_("Highlight for Album:"). " ". gallery_htmlentities(removeTags($myAlbum->fields['title'])));
            $gallery->html_wrap['imageHref'] = makeAlbumUrl($gallery->album->getAlbumName($i));
            $gallery->html_wrap['frame'] = $gallery->album->fields['album_frame'];
                   /*begin backwards compatibility */
                   $gallery->html_wrap['thumbWidth'] =
               $gallery->html_wrap['imageWidth'];
                   $gallery->html_wrap['thumbHeight'] =

               $gallery->html_wrap['imageHeight'];
                   $gallery->html_wrap['thumbTag'] =
               $gallery->html_wrap['imageTag'];
                   $gallery->html_wrap['thumbHref'] =
               $gallery->html_wrap['imageHref'];
                   /*end backwards compatibility*/
     
            includeHtmlWrap('inline_albumthumb.frame');

         }
         echo("</td>");
         echo("<td valign=\"top\">");
         ?>
<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>
              <td class="mod_title_left"></td>
              <td nowrap class="title">
                <?php
            $tmpAlbumName = $gallery->album->getAlbumName($i);
            $buf = "";
            $buf = editField($myAlbum , "title", makeAlbumUrl($tmpAlbumName));
            echo $buf;
            ?>
           </td>
              <td class="mod_title_right"></td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <td class="mod_titleunder_hl">
      <?php
      
      echo ("");
      echo makeFormIntro("view_album.php",
             array("name" => "vote_form", "method" => "POST"));
      if (!$gallery->session->offline &&
            (($gallery->user->canDeleteFromAlbum($gallery->album)) || 
            ($gallery->user->canWriteToAlbum($gallery->album)) ||
            ($gallery->user->canChangeTextOfAlbum($gallery->album)) ||
            (($gallery->album->getItemOwnerModify() || $gallery->album->getItemOwnerDelete()) &&
            ($gallery->album->isItemOwner($gallery->user->getUid(), $i) ||
            (isset($myAlbum) && $gallery->user->isOwnerOfAlbum($myAlbum))))))
         {
            $showAdminForm = 1;
         } else {
            $showAdminForm = 0;
         }
         if ($showAdminForm) {
            if ($gallery->album->isMovieByIndex($i)) {
               $label = _("Movie");
            } elseif ($gallery->album->isAlbum($i)) {
               $label = _("Album");
            } else {
               $label = _("Photo");
            }

                   if (canVote()) {
                      echo '</td></tr>';
               echo "\n" . '<tr><td align="center">';
            }
	    include(dirname(__FILE__) . '/layout/adminAlbumCommands_2col.inc');
         }

      echo ("");
      ?>
      </td>
      </tr>
    </table>
   <?php
         // Caption itself
         echo "\n". '<div class="mod2caption" style="width:90%">';
         $id = $gallery->album->getPhotoId($i);
         if ($gallery->album->isHidden($i) && !$gallery->session->offline) {
            echo "(" . _("hidden") .")<br>";
         }
         if (isset($myAlbum)) {
	 	$description=editField($myAlbum, "description") ;
	 	if ($description != "") {
			$buf = "";
			$buf = $buf."\n<div class=\"desc\">";
			$buf = $buf."\n\t$description";
			$buf = $buf."\n</div>";
			echo $buf;
  	 	}



            if (strcmp($gallery->app->showOwners, "no")) {
               $owner = $myAlbum->getOwner();
               echo "\n<div class=\"desc\">";
               echo _("Owner:") . ' '. showOwner($owner);
               echo '</div>';
               }
               
               
	if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($myAlbum)) {
		echo _("url:") . '<a href="'. makeAlbumUrl($gallery->album->getAlbumName($i)) . '">';
		if (!$gallery->session->offline) {
			echo breakString(urldecode(makeAlbumUrl($gallery->album->getAlbumName($i))), 60, '&', 5);
		} else {
			echo $gallery->album->getAlbumName($i);
		}
		echo '</a>';

		if (ereg("album[[:digit:]]+$", makeAlbumUrl($gallery->album->getAlbumName($i)))) {
			if (!$gallery->session->offline) {
				echo '<br><span class="error">' .
				_("Hey!") .
				sprintf(_("%s so that the URL is not so generic!"),
					popup_link(_("Rename this album"), "rename_album.php?set_albumName={$tmpAlbumName}&index=$i"));
				echo '</span>';
			}
		}

	}               
               
    ?>           
  <br>
  <span class="fineprint">
   <?php
	echo sprintf(_("Last changed on %s."), $myAlbum->getLastModificationDate() );
	$visItems=array_sum($myAlbum->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", $visItems), $visItems);
	if (!($myAlbum->fields["display_clicks"] == "no") && !$gallery->session->offline) {
?>
   <br><br><?php
	$clickCount=$myAlbum->getClicks();
	echo sprintf(_("This album has been viewed %s since %s."),
		pluralize_n2(ngettext("1 time", "%d times", $clickCount), $clickCount, _("0 times")),
		$myAlbum->getClicksDate());
}
$tmpAlbumName=$myAlbum->fields["name"];
if ($gallery->user->canWriteToAlbum($myAlbum) &&
   (!($myAlbum->fields["display_clicks"] == "no"))) {
	echo " ".popup_link("[" . _("reset counter") ."]", doCommand("reset-album-clicks", array("set_albumName" => $tmpAlbumName), "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 = $myAlbum->lastCommentDate($gallery->app->comments_indication_verbose);
		print lastCommentString($lastCommentDate, $displayCommentLegend);
	} // end switch
}
?>

  </span><?php		               
               
              


         }

         echo('</td>');
         
         
         if (!strcmp($gallery->app->showAlbumTree, "yes")) { ?>
	   <td align=left valign=top class="albumdesc">
	    <?php echo printChildren($tmpAlbumName); ?>
	   </td>
<?php } 
         
         
         $j++;
         $visibleItemIndex++;
         $i = $visibleItemIndex<=$numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
      }
      if ($printTableRow) {
         echo('</tr>');
      }

      /* Now do the inline_albumthumb footer row */
      $visibleItemIndex = $rowStart;
      $i = $visibleItemIndex <= $numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
      $j = 1;
      if ($printTableRow) {
         echo('<tr>');
      }
      while ($j <= $cols && $i <= $numPhotos) {
         echo("<td>");
         includeHtmlWrap("inline_albumthumb.footer");
         echo("</td>");
         $j++;
         $visibleItemIndex++;
         $i = $visibleItemIndex<=$numVisibleItems ? $visibleItems[$visibleItemIndex] : $numPhotos+1;
      }
      if ($printTableRow) {
         echo('</tr>');
      }
      $rowCount++;
      $rowStart = $visibleItemIndex;
   }
} else {
?>

   <td colspan="<?php echo $rows ?>" align="center" class="headbox">
<?php if ($gallery->user->canAddToAlbum($gallery->album) && !$gallery->session->offline) { ?>
   <span class="head"><?php echo _("Hey! Add some photos.") ?></span>
<?php } else { ?>
   <span class="head"><?php echo _("This album is empty.") ?></span>
<?php } ?>
   </td>
   </tr>
<?php
}
?>

</table>
<!-- END of 2 column mod of the original table -->

New file adminAlbumCommands_2col.inc placed in the layout folder

<!-- Begin adminAlbumCommands_2col -->
<div class="admin"><?php

/* User is allowed to delete the album */
if ($gallery->user->canDeleteAlbum($gallery->album)) {
	echo "\n\t". popup_link("[". _("delete album") ."]", "delete_photo.php?id={$tmpAlbumName}&albumDelete=1");
}

/* User is allowed to change the album */
if ($gallery->user->canWriteToAlbum($gallery->album)) {
	echo "\n\t". popup_link("[". _("move album") ."]", "move_photo.php?set_albumName={$parentAlbumName}&index=$i&reorder=0");
	echo "\n\t". popup_link("[". _("reorder album") ."]", "move_photo.php?set_albumName={$parentAlbumName}&index=$i&reorder=1");
	echo "\n\t". popup_link("[". _("rename album") ."]", "rename_album.php?set_albumName={$tmpAlbumName}&index=$i");
}

/* User ist allowed to change album captions */
/* Should this be into the above group ? */
if ($gallery->user->canChangeTextOfAlbum($gallery->album) && !$gallery->session->offline) {
	echo "\n\t". '<a href="'. makeGalleryUrl("captionator.php", array("set_albumName" => $tmpAlbumName)) . '">' . 
		'['. _("edit captions") . ']</a>';
}

/* User is Admin or Owner */
if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($gallery->album)) {

	/* User is allowed to change Album Permissions */
	echo "\n\t". popup_link("[" . _("permissions") ."]", "album_permissions.php?set_albumName={$tmpAlbumName}");
	echo "\n\t". popup_link("[" . _("properties") ."]", "edit_appearance.php?set_albumName={$tmpAlbumName}", 0, true, 500, 600);

	/* User is allowed to view ALL comments */
	if ($gallery->user->canViewComments($gallery->album)
		&& ($gallery->app->comments_enabled == 'yes')
		&& ($gallery->album->lastCommentDate("no") != -1)) {
	    	echo "\n\t". '<a href="'. makeGalleryUrl("view_comments.php", array("set_albumName" => $tmpAlbumName)) . '">' .
			'[' . _("view&amp;comments") . ']</a>';
	}

	/* Watermarking support is enabled and user is allowed to watermark images/albums */
	if (!empty($gallery->app->watermarkDir) && $gallery->album->numPhotos(1)) {
		echo "\n\t". popup_link("[" . _("watermark&amp;album") . "]", "watermark_album.php?set_albumName={$tmpAlbumName}");
	}
}

/* User is allowed to change the album */

if ($gallery->user->canWriteToAlbum($gallery->album)) {
	echo "\n\t". popup_link("[". _("highlight album") ."]", "do_command.php?cmd=highlight&set_albumName={$parentAlbumName}&index=$i");
	echo "\n\t". popup_link("[". _("reset counter") ."]", "do_command.php?cmd=reset-album-clicks&set_albumName={$tmpAlbumName}&return=".urlencode(makeGalleryUrl("view_album.php")));
}
if ($gallery->user->isAdmin() || $gallery->user->isOwnerOfAlbum($gallery->album)) {
	if ($gallery->album->isHidden($i)) {
		echo "\n\t". popup_link("[". _("show album") ."]", "do_command.php?cmd=show&set_albumName={$parentAlbumName}&index=$i");
	} else {
		echo "\n\t". popup_link("[". _("hide album") ."]", "do_command.php?cmd=hide&set_albumName={$parentAlbumName}&index=$i");
	}
}
?>

</div>
<!-- End adminAlbumCommands_2col -->
 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2004-11-12 05:12

rsramirez,
great work! I implemented it on my test site and then found these issues when trying to validate the html:
<table cellpadding="0" cellspacing="0" width="100%" border="0" align="center" class="mod_title">
I added above
<td align="left" valign="top" class="albumdesc">

a little further down

         $buf = $buf."\n</div>"; 
         echo $buf; 
         } 

I added below:
echo "</div>";
I don't know if those are from my customizations or not.... but just letting you know what I did.

It still will not validate all but even the original code does not validate well with the forms in tables.

Dave

 
photodude

Joined: 2004-11-25
Posts: 4
Posted: Mon, 2004-11-29 02:07

Hi there,

Well I tried the mod and it seemd to work great... however when I made some mistakes in my gallery and I had to reorder some albums, that didn't work anymore, nor could I set a highlight album for the main page anymore, it would by default now choose the top album for that.

I changed back to my old files and now it all works great again... but I would still like to use this feature here but only if I can get it to be able to both set the highlight album for the main page AND be able to reorder albums. This is because I want to set the highlighted album to be the most recent pictures per catagory (letter in this case) and on the other hand I do need to be able to keep all albums in alphabetical order or date order (depending on the level).

Anybody with great knowledge who can help me out on this one? Otherwise it wors fine as far as I have found out...

Your help is much appreciated!

If you want to see the work in progress... www.concertvisions.com/index.php

Greetz,
Ed

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2004-11-29 05:41

photodude,
try this attached file and rename it adminAlbumCommands_2col.inc and place it in the layout folder.

Dave

 
JRSFORUMS

Joined: 2004-12-15
Posts: 104
Posted: Fri, 2004-12-24 16:15

Dave, I would like to change the "<!-- start of table check -->" to check for albums to decide whether to use 2-col or regular, but do not know what to substitute for "if (!$numPhotos"....or if this is possible.

(1 hour or so later....What I would like to do is test for albums, if no albums do the regular...if albums present, even if phots are also, do the 2-col)

I want to do this as I want to have images for the main albums which will not be contained in any of the subalbums. I would create a hidden image in the first level down to use for the main album.

If I do this as currently set up, the subalbums will not use 2-col (actually the 'rsramirez' is 1 to x columns). To do what I want, I would have to create a hidden subalbum and a hidden photo..not a big deal, just an add'l step....either way I will need to ensure that I don't mix "apples & oranges".

Thanks

 
JRSFORUMS

Joined: 2004-12-15
Posts: 104
Posted: Sat, 2005-01-08 14:03

As I mentioned in the above post, the rsramirez mod, which I am using, is not just 2-col, but actually is x-col by y-rows based on the settings of row/col set for images which is set in either the default in config. wizard "layout" or in "admin options-properties".

The problem is that the row/col selected holds for both sub-albums and images, unless you manually adjust for each.

Is it possible modify the subalbum code to fix it (set it) for a specific row/col whenever there are only sub-albums (therefore using the 2-col code/layout) and revert to the image "layout" for the images.

For example, I like the "album" look for my subalbums, but not 2(or more)-col, but the same 1-col by 8-row layout as my main album page. The images I want set at 4-col by 2-rows. I can do this by adjusting each time I create albums/load images, but having it "hard coded" would make life simpler. Examples at my in-progress site: http://john.schwaller.org/gallery

Nevermind...

I added default row/col as follows to the code:

Quote:
// check to see if subalbum has images and if not then do the 2 column mod
if (!$numPhotos) {
$rows = 8;
$cols = 1;
include('album_2column_table.inc'); }

Thanks....JOHN

 
rhondaweasley

Joined: 2005-07-21
Posts: 4
Posted: Thu, 2005-07-21 13:44

Thanks so much for this, it's exactly what I was looking for. It works great.

 
buglerroller

Joined: 2005-07-25
Posts: 28
Posted: Sun, 2005-08-14 01:22

Menace, just sent you an email....

-Q

 
christopher_m

Joined: 2005-05-25
Posts: 16
Posted: Fri, 2005-09-02 20:40

great code!

Thanks you very much.

This code sould also be placed in the documentation.

Christopher

 
rhondaweasley

Joined: 2005-07-21
Posts: 4
Posted: Thu, 2005-10-06 12:58

Okay I just upgraded my gallery ( www.weasleynetwork.org/gallery ) to 1.5 and I put the changes required for this modification back in exactly as I did before. But now I can't edit the albums on the albums-only pages the use the album_2column_table.inc format. Instead of displaying the 1.5 (album actions) drop down menu options. The album-only pages that use the album_2column_table.inc format display the old (edit album) drop down menu option and they don't work. Is there any way to fix the code so it displays the right (working) drop down menu in 1.5? I like the way it displays, but I still need to be able to re-order albums and change the highlight and stuff like that.

 
cherie
cherie's picture

Joined: 2002-10-27
Posts: 15
Posted: Tue, 2005-11-15 20:58

I'm just now moving my gallery from v1.4.4 to v1.5.1 and was looking for an updated 2 column mod such as this. I finally got it working and wanted to note here for everyone else who's looking to do this on v1.5.x.

For starters, I used rsramirez's code from this thread. I tried to use floridave's but the Admin Album Commands integrated into the code made it more difficult to modify. I did however add in the changes to rsramirez's code that floridave recommended further down.

In addition, for v1.5.x, do NOT use the separate adminAlbumCommands_2col.inc include file given in this thread; instead use adminAlbumCommands.inc that is already included with gallery (and called from gallery.php). This include file is not specific to the number of columns in use so it'll work no matter how many columns you have. In the rsramirez code simply search for the line include(dirname(__FILE__) . '/layout/adminAlbumCommands_2col.inc');
and replace it with
include(dirname(__FILE__) . '/layout/adminAlbumCommands.inc');

Any other changes I made were simply cosmetic and didn't impact the working code in any way.

Hope this helps save y'all some time...
~Cherie

 
rhondaweasley

Joined: 2005-07-21
Posts: 4
Posted: Wed, 2005-11-16 17:50

Thanks Cherie, works great. Except now I can't re-set the highlight image unless I temporarily put a picture in the album, but that's something I can work around.

Rhonda Weasley
Weasley Network Gallery

 
kfv

Joined: 2007-11-10
Posts: 1
Posted: Tue, 2007-12-18 02:49

If any needs it - I have got it to work with Gallery 1.5.6. I followed the above and made some additional changes to get it to work. The attached zip file contains the original view_album.php (view_album_org.php) and a version with the modification I did (view_album.php). Furthermore it contains the album_2column_table.inc with my modifications, which includes an additional modification that allows re-setting the highlight image without having to temporarily put a picture in the album.

This is my 2007 Christmas/Season's Greetings Gift to you all.

BR,
Karsten

 
Sebastian23

Joined: 2008-07-25
Posts: 2
Posted: Fri, 2008-07-25 19:58

thx a lot for you mod. it works great. there are just 2 problems

1) the albums are listed like on the main page. but still on two pages. i like to have all albums on one page. is this possible?

2) as far as i know its not possible to upload an image in the subfolder to show a higlight on the main page. is it possible to hide "no higlights"

thx

 
Sebastian23

Joined: 2008-07-25
Posts: 2
Posted: Fri, 2008-07-25 20:11

ok 2) i could solve by set 1 album as highlight and later hide it.