Hi guys,
I am using 2 diffrent themes in my website and for one category i would like to override the number of albums listed.
In my main page by configuration are listed only 2 because otherwise is making the index page very long and doesn't look nice.
But i use the second theme for a category and there i would like to be listed more albums then 2.
I am a BIG noobie with php, by using Coppermine is the first time i came across with php so i dont really know what i am doing.
Looking in diffrent themes i found in one of them i think oranje .. not sure, at the top of theme.php saying:
$CONFIG['thumbcols'] = 3; //overrides the number of columns for thumbnails set in the admin configuration
I tried to find a way of changing the numbers of rows for alblist but no success. :(
I am not even sure if works the same for the alblist, so any answer will be a big help.
Thank you
P.S. i hope my questions is in the right place :)
Try using
$CONFIG['albums_per_page']
Thanks alot Nibbler :)
In case someone else need this code.. change include/init.inc.php and /themes/your-second-theme.php
In the file init.inc.php search for // Load theme file and after the code:
// Load theme file
if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir('themes/' . $USER['theme'])) {
$CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`', '____________');
} else {
unset($USER['theme']);
}
add
if (isset($_GET['cat']) && !empty($_GET['cat'])) {
if ((int)$_GET['cat'] == 2) {
$CONFIG['theme'] = 'your-second-theme';
}
}
2 is the category i needed to change
And thanks to this topic i managed to change the themes http://forum.coppermine-gallery.net/index.php/topic,15002.0.html (http://forum.coppermine-gallery.net/index.php/topic,15002.0.html)
And in my second theme.php i added at the top of the page, before the first //HTML theme for..
$CONFIG['albums_per_page']= 5; //overrides the number of albums listed in the admin configuration
Thank you again Nibbler!!