Connections-Theme for cpg1.4.x and WordPress 1.5 - Page 3 Connections-Theme for cpg1.4.x and WordPress 1.5 - Page 3
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Connections-Theme for cpg1.4.x and WordPress 1.5

Started by Gizmo, August 09, 2006, 07:00:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

skidpics

awesome theme!  I am using the modpack version.

Question: How do I get the album descriptions to show under the thumbnail, rather to the side and make it only show a specified lenght?


Joachim Müller

Announcement threads for particular themes (and that's what this very thread here is) are meant to explain how to get the theme workring in the first place. You require a modification of the theme, which should be discussed in a separate thread. Start a thread of your own, posting a link to your gallery and attaching your zipped theme. Of course an explnanation what you're trying to accomplish should be posted in that thread as well.
You have been told very often already how this forum is organized - you better start respecting board rules if you want continued support! >:(

Gizmo

Hello All,

I've upgraded Connections with many of the features that I've added to the other ported Wordpress themes I've done. Since few people read the "readme.txt" files in downloads, I've copied the contents here but it's long. Please read through this carefully before asking questions. Take special note of my removing the thumbnail from the category lists. The CPG demo site has quite an expansive category and album layout and I wanted to see how this looked on the demo site so this is also my test.

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'] = 5; //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 = 3"
$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 400px wide. This function is now compute_img_size_max($width, $height) and you can change the view size by editing $max = 400;. If you have intermediate images smaller than 400px wide then this function will increase the image size when viewing which could result in a distorted image. Since the default size in Coppermine is "400", this should not be a problem unless you've decreased it. 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>

I've tested this theme without issue on FireFox 3.0.1 (Mac & PC), Safari 3.1.2 and IE 7.0.5.X (PC). Sorry I do not have IE 6.X on my PC and will not test this browser version. As always let me know here if you encounter any problems but if you have questions about editing or changing this theme please post a new thread.

Enjoy and make all the changes you need to suit your gallery but please leave the credits in the template.html to support my work as well as the theme author.

Cheers,

Billy
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision