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: Different number of columns on thumbnail page in different albums  (Read 6072 times)

0 Members and 1 Guest are viewing this topic.

pytheas

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
  • Random Australia image using cfimageget
    • Journey of Discovery
Different number of columns on thumbnail page in different albums
« 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
« Last Edit: September 18, 2004, 03:12:47 am by Nibbler »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Different number of columns on thumbnail page in different albums
« Reply #1 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
Logged

pytheas

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
  • Random Australia image using cfimageget
    • Journey of Discovery
Re: Different number of columns on thumbnail page in different albums
« Reply #2 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Different number of columns on thumbnail page in different albums
« Reply #3 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
Logged

pytheas

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
  • Random Australia image using cfimageget
    • Journey of Discovery
Re: Different number of columns on thumbnail page in different albums
« Reply #4 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 :(
Logged

Nibbler

  • Guest
Re: Different number of columns on thumbnail page in different albums
« Reply #5 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
Logged

pytheas

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 11
  • Random Australia image using cfimageget
    • Journey of Discovery
Re: Different number of columns on thumbnail page in different albums
« Reply #6 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
Logged

cdrake

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 67
Re: Different number of columns on thumbnail page in different albums
« Reply #7 on: March 16, 2005, 03:52:58 am »

How would you configure rows.

cdrake

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 67
Re: Different number of columns on thumbnail page in different albums
« Reply #8 on: March 16, 2005, 03:53:55 am »

nvm. I think I see how.
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.