Advanced search  

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]

Pages: [1]   Go Down

Author Topic: [Solved]: Mixed viewing, 3 and 4 columns  (Read 2072 times)

0 Members and 1 Guest are viewing this topic.

Peter R

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 26
[Solved]: Mixed viewing, 3 and 4 columns
« 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
« Last Edit: February 26, 2009, 11:35:41 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Mixed viewing, 3 and 4 columns
« Reply #1 on: February 25, 2009, 10:08:22 pm »

Copy theme_display_thumbnails from the sample theme to your theme.php and change

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

to

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

See if that works.
Logged

Peter R

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 26
Re: Mixed viewing, 3 and 4 columns
« Reply #2 on: February 26, 2009, 11:34:20 pm »

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

Thanks a lot!
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 15 queries.