forum.coppermine-gallery.net

Support => Older/other versions => cpg1.3.x Support => Topic started by: pytheas on September 17, 2004, 10:48:49 pm

Title: Different number of columns on thumbnail page in different albums
Post by: pytheas on September 17, 2004, 10:48:49 pm
I use the current default of 4 columns on my thumnail page which is fine up to now.  I have added an album of panoramic photos and therefore only want to display 1 column but only in that one album.

I have looked through all the posts here and cannot find anything.  Ditto with the FAQ and User Docs.

If I have missed a post that answers my questions could you point me in the right direction.

Help would be appreciated.

Stu
Title: Re: Different number of columns on thumbnail page in different albums
Post by: Joachim Müller on September 17, 2004, 11:11:03 pm
[not tested]: edit thumbnails.php, find
Code: [Select]
display_thumbnails($album, (isset($cat) ? $cat : 0), $page, $CONFIG['thumbcols'], $CONFIG['thumbrows'], true);and replace with
Quote
if ($album == '999') {
    display_thumbnails($album, (isset($cat) ? $cat : 0), $page, 1, $CONFIG['thumbrows'], true);
} else {
    display_thumbnails($album, (isset($cat) ? $cat : 0), $page, $CONFIG['thumbcols'], $CONFIG['thumbrows'], true);
}
(replacing '999' with the actual album ID that is supposed to have only one column).
However,, you will run into issues with meta albums not displaying 1 column only for thumbs from this album.

Joachim
Title: Re: Different number of columns on thumbnail page in different albums
Post by: pytheas on September 17, 2004, 11:23:58 pm
many thanks for the extremely prompt reply, i had a feeling it would be something in code just didn't have a clue where  :)

btw when you say i may have issues with meta albums, do you mean albums like last uploaded and most poular?

Any further info would be appreciated.

Coppermine is the best piece of software I have installed on my site.

Stu
Title: Re: Different number of columns on thumbnail page in different albums
Post by: Joachim Müller on September 17, 2004, 11:44:45 pm
btw when you say i may have issues with meta albums, do you mean albums like last uploaded and most poular?
yes
Title: Re: Different number of columns on thumbnail page in different albums
Post by: pytheas on September 18, 2004, 02:41:40 am
GauGau

I have added and uploaded the new code.  I can see what it is trying to do but for some reason it displays 1 row and 3 columns.  When I use the original file I get 2 rows and 4 colums. I am stumped.  I have tried changing the numbers in your code mod but it doesn't work as I expect it to :(
Title: Re: Different number of columns on thumbnail page in different albums
Post by: Nibbler on September 18, 2004, 02:55:39 am
Replace that block with

Code: [Select]
if ($album == '999') $CONFIG['thumbcols'] = 1;
display_thumbnails($album, (isset($cat) ? $cat : 0), $page, $CONFIG['thumbcols'], $CONFIG['thumbrows'], true);

Replace the 999 as before
Title: Re: Different number of columns on thumbnail page in different albums
Post by: pytheas on September 18, 2004, 03:05:43 am
Works perfectly.  Thanks guys.  Problem solved in a very short period of time.  Post can be marked as solved  ;D
Title: Re: Different number of columns on thumbnail page in different albums
Post by: cdrake on March 16, 2005, 03:52:58 am
How would you configure rows.
Title: Re: Different number of columns on thumbnail page in different albums
Post by: cdrake on March 16, 2005, 03:53:55 am
nvm. I think I see how.