[MOD?]Different nr of albums on frontpage & 1st layer ca [MOD?]Different nr of albums on frontpage & 1st layer ca
 

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

Main Menu

[MOD?]Different nr of albums on frontpage & 1st layer ca

Started by Widi, February 17, 2004, 09:11:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Widi

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:

Casper

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.
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

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'.

//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 :?:

Casper

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?
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

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.