Advanced search  


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.

Pages: [1]   Go Down

Author Topic: nr. of albums shown on frontpage and in category  (Read 3860 times)

0 Members and 1 Guest are viewing this topic.


  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
nr. of albums shown on frontpage and in category
« on: February 20, 2004, 10:51:21 pm »


i got multiple categories with albums in it. I wanted to show the first layer of albums without clutting my frontpage. I wanted to show 4 albums per category in front and 12 when you enter the category.

So i modded the next line in index.php. (with 12 albums shown specified in the config)

line 398 in index.php is used by catlist:

$alb_per_page = ($CONFIG['albums_per_page'] );

and u need to change it to:

$alb_per_page = ($CONFIG['albums_per_page'] / X );

where X is the number you divide the number albums_per_page (as given in the admin -> config -> Album list view -> Number of albums to display) by. The result is but on your frontpage when u use 'catlist'. for an example

When u enter a category, level 1, it doesn't use this function (the one that start on line 389 from index.php), but the same as 'alblist' en that one starts on line 282. And isn't modified so entering a category will show the number of categories specified in config. (correct me if i'm wrong)

Maybe something for the future to make this a variable you can manipulate trough the admin --> config menu?!?!?!


  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
nr. of albums shown on frontpage and in category
« Reply #1 on: February 20, 2004, 11:04:26 pm »

This would be usefull for sites with lots of categories, so they can still show some thumbs on the front page, as you have done, but when going to the category, still having a good amount of albums per page.

I would like to see this so you had a box to choose number of thumbs for the front page, with the 'Show first level album thumbs' box, but can set different at the Album list view 'number of albums to display'.

I will have a look and see if I can use your mod and come up with this.

Note, it is page 398, not 389, at least in my index.php.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: [1]   Go Up

Page created in 0.024 seconds with 21 queries.