coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Peter R on February 25, 2009, 10:03:16 PM

Title: [Solved]: Mixed viewing, 3 and 4 columns
Post by: Peter R on February 25, 2009, 10:03:16 PM
Hello

I think I want something that can not be easily done.
I the admin, I have set columns to four, so all albums show four columns. I have a best three section, that shows the three best top rated images. For getting this done, I changed:
case 'toprated':
                        display_thumbnails('toprated', $cat, 1, $CONFIG['thumbcols'], max(1, $matches[2]), false);

into:
case 'toprated':
                        display_thumbnails('toprated', $cat, 1, 3, max(1, $matches[2]), false);

This works great, but on the screen it shows three images on the left, and not in the middle. This is because the table row is still divided in four, and not in three. To get the three images in the middle, I have to get rid of the fourth <TD></TD>.

I managed to get three pictures in stead of four, but now I am stuck in solving this problem. Is there an easy way, or can somebody tell me where this is done?

Thanks
Title: Re: Mixed viewing, 3 and 4 columns
Post by: Nibbler on February 25, 2009, 10:08:22 PM
Copy theme_display_thumbnails from the sample theme to your theme.php and change


$thumbcols = $CONFIG['thumbcols'];
$cell_width = ceil(100 / $CONFIG['thumbcols']) . '%';


to


$thumbcols = ($aid == 'toprated') ? 3 : $CONFIG['thumbcols'];
$cell_width = ceil(100 / $thumbcols) . '%';


See if that works.
Title: Re: Mixed viewing, 3 and 4 columns
Post by: Peter R on February 26, 2009, 11:34:20 PM
Yes, that did the trick.
Ik looks really good.

Thanks a lot!