Hello Everyone,
I've updated this theme with some of the other features I've put in most of my themes such as truncated album descriptions, intermediate image resizing to fit the theme width but there is also one other feature that's been asked more many times in the forum and that's for a random image to be displayed. You can read about it further down in this post.
I've overwritten some of the configuration settings by using variables in the theme.php file and added a new variable for retrieving the album description. The reason for this is to prevent the standard settings in the Configuration tables set by you from "breaking" the theme. If you wish to change these settings, do so here or delete them altogether and use the Configuration Manager in Coppermine. These changes are:
// These parameters overide what the user inputs in the Configuration setup to prevent the theme from breaking.
$CONFIG['max_film_strip_items'] = 4; //overrides the number of thumbnails.
$CONFIG['thumbcols'] = 4; //overrides the number of columns for thumbnails.
$CONFIG['main_table_width'] = '100%'; //overrides the Width of the main table (pixels or %).
$CONFIG['picture_table_width'] = '100%'; //overrides the Width of the table for file display (pixels or %).
$CONFIG['album_list_cols'] = 2; // sets "Number of columns for the album list = 2"
$CONFIG['first_level'] = 0 ; //sets "Show first level album thumbnails in categories = no".
$album_desc = get_album_desc($_GET[album]);
This theme has the first level of album thumbnails turned off to make large galleries look move attractive. This will prevent the main page from being cluttered with thumbnails and easier to chose a particular category. There is also a new function for truncating the album descriptions when viewing on the index or category pages. When you view a single album, the full description is printed out at the top of the album. This makes the index and category pages much cleaner looking. I've also adapted it to truncate long image captions when viewing on a thumbnail page but prints the full caption when viewing the intermediate image.
To edit the number of characters in the truncated album description, find in 2 places in the theme.php file - '{ALB_DESC}' => myTruncate($album['album_desc'], 20, " "), and change the number (20) to any length your desire. You can also change the padding characters (...) to any other set of characters by editing function myTruncate($string, $limit, $break=".", $pad="...") in the theme.php file.
To edit the number of characters in the truncated image caption, find in 2 places in the theme.php file - '{CAPTION}' => myTruncate($caption, 120, " "), // changing the number changes the # of characters printed for the thumbnail caption. and change the number (120) to an length you desire. This number doesn't seem to be match the string length but it is consistant so change it and view the results.
I've also adapted the compute_img_size($width, $height, $max) function to manage the size of the intermediate image. As in some cases (example would be the Coppermine demo page), some galleries have intermediate images of different sizes. This function was changed and added to the theme.php to make view all intermediate images at 600px wide or less. This function is compute_img_size_max($width, $height) and you can change the viewing size by editing $max = 600;. If you have intermediate images smaller than 600px wide then this function will not correct the image size when viewing. This setting in the theme.php file does not affect the setting in your Coppermine configuration but only resizes the images in the browser. Here's a link to additional info in the manual -
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_picture_thumbnail.
Another edit I made was remove the thumbnail from the categories list. These category thumbnails are added to the gallery in the Category Manager with no way in the configuration to turn them off so I remove the {CAT_THUMB} from the $template_cat_list variable in the theme.php. Below is how you add it back in if you wish.
____________________________________________________________
Find in theme.php:
<td class="catrow" align="left"><table border="0"><tr><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
And replace with:
<td class="catrow" align="left"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
____________________________________________________________
A cool new feature available with this theme is a random photo. This is accomplished with a new function I developed called "function randomimage()" and it resizes all images to a maximum height of 150px. If you wish to change this, you'll find it in the theme.php file and it's commented to make it easy to understand. For non-logged in users, this function will only display images from public albums but for users logged in it will display images from private albums as well. Also, this hack works only if you have "normal" images meaning you haven't changed the way CPG imports images with the standard installation for intermediate images. Read more about it here -
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_picture_thumbnail.
I've tested this theme without issue on FireFox 3.0.1 (Mac & PC), Safari 3.1.2 and IE 6.0.x & 7.0.5.x (PC).
Please enjoy the theme and make all the changes you need to suit your gallery but please respect the footer notes in the template.html.
Cheers,
Billy
http://www.billygbullock.com