[Solved]: Mixed viewing, 3 and 4 columns [Solved]: Mixed viewing, 3 and 4 columns
 

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

[Solved]: Mixed viewing, 3 and 4 columns

Started by Peter R, February 25, 2009, 10:03:16 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Peter R

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

Nibbler

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.

Peter R

Yes, that did the trick.
Ik looks really good.

Thanks a lot!