Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [MOD?]Different nr of albums on frontpage & 1st layer ca  (Read 2708 times)

0 Members and 1 Guest are viewing this topic.

Widi

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
    • http://www.widi.tk
[MOD?]Different nr of albums on frontpage & 1st layer ca
« on: February 17, 2004, 09:11:41 pm »

hi,

i wanted to know if anybody knew the solution to my problem? in the config file i entered 2 albums per page. But i wanted 4x so many shown albums when you enter a category so i changed this line in index.php:

line 398
Quote
$alb_per_page = $CONFIG['albums_per_page'];


to
Quote
$alb_per_page = ($CONFIG['albums_per_page'])*4;


Thinking that this might solve the problem. however it does the opposite of what i want. It know shows 8 albums per category on the mainpage and only 2 when you enter the the category.

Im still looking, but a can't find the right line? So if anyone does plz post it, or have any other solutions?

tnx  :wink:
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
[MOD?]Different nr of albums on frontpage & 1st layer ca
« Reply #1 on: February 17, 2004, 09:19:43 pm »

You do this by logging into the gallery as admin, then going into config.

Set it in the 'Album list view' with the 'number of albums to display'.  If you want 4, just put 4 there.

I suggest you revert to the original index.php, as what you have done is told it to display what you have set in config, times by 4.
Logged
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

Widi

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
    • http://www.widi.tk
[MOD?]Different nr of albums on frontpage & 1st layer ca
« Reply #2 on: February 17, 2004, 09:31:26 pm »

Don't think u read my post right. i'm trying to let it show 2 albums on the mainpage, the page that also shows al other category's. now when you click on the category name it takes you to the 1e layer of your album category and only shows that category. It is in this page that i want to show 8 albums on 1 page at the same time.

FIXED

yeah a bit stupid, but if the thing was doing the opposite of what i wanted i just had to reverse it, so don't multiple but divide.

line 389 in index.php is used by catlist:
Quote
   $alb_per_page = $CONFIG['albums_per_page'];


and u need to change it to:
Quote
   $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'.

http://www.widi.tk 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.

Maybe something for the future to make this a variable :?:
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
[MOD?]Different nr of albums on frontpage & 1st layer ca
« Reply #3 on: February 18, 2004, 08:29:55 am »

Ok,

I understand now what you wanted, and glad you sorted it.
Nice site.  Are you using the rss mod for the 4 random pics on your homepage?
Logged
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

Widi

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 32
    • http://www.widi.tk
[MOD?]Different nr of albums on frontpage & 1st layer ca
« Reply #4 on: February 18, 2004, 10:32:37 am »

No i'm just using the RAND() function from mysql on the pictures databas to display these random pictures. Disadvantage is that it doesn't dicriminate between any pictures. So it'll also take non-approved and private pictures.

Same with the album list.
Logged
Pages: [1]   Go Up
 

Page created in 0.07 seconds with 18 queries.