forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: zebraplayer on October 11, 2004, 12:22:30 am
-
I have only recently started playing with Coppermine. I have searched through the forums for this info, but I was not able to find it.
Can different albums within the same gallery utilize different themes?
Can a particular album be made to use a specific thumbnail?
I found a thread on adding thumbnails to .wmv files and that came in very handy, but nothing on the album thing.
Thanks in advance.
-
Can different albums within the same gallery utilize different themes?
No.
Can a particular album be made to use a specific thumbnail?
Covered in the documentation that comes with Coppermine.
-
never mind the album thumbnail question. I figured it out.
I still need am answer to the album or category theme, however.
-
okay. Thanks. We posted at the same time, I guess.
-
A while ago someone posted a hack how to have different themes for different albums/categories, please search the board (especially the mods/hacks section).
Allow days for answers, not hours before bumping >:(
Joachim
-
You know your stuff. I searched the Mods section and I think I found the thread I you're talking about.
It is a very long and confusing thread. At least for a newbie like me. So I'd like to put the gyst of it here.
Basically, if you want different albums/categories to use different themes than the one your whole galley is using, you' do this.
Open
includes/init.in.php
Find
// Load theme file
if (isset($USER['theme']) && !strstr($USER['theme'], '/') && is_dir('themes/' . $USER['theme'])) {
$CONFIG['theme'] = strtr($USER['theme'], '$/\\:*?"\'<>|`', '____________');
} else {
unset($USER['theme']);
}
After, add
if ($_GET["cat"] == 'your category NUMBER goes here' ) { $theme='theme name';
require "themes/theme_name/theme.php";
$THEME_DIR = "themes/theme_name/";
} else {
Obviously, you change the parts in single quotes on the first line and regular quotes on lines 2 and 3.
The thing works like a charm for me.
Furthermore. If you want to apply the theme to more than one category,
Change this:
if ($_GET["cat"] == 'your category NUMBER goes here' )
To this
if ($_GET["cat"] == ' your category NUMBER goes here' || $_GET["cat"] == 'your category NUMBER goes here' )
One last thing. Because I know there's people like me that will be asking, "What if I want to change a specific album only, and not a whole category?"
Well, then you would replace ["cat"] with ["album"]. Again, on the first line of the hack.
I hope I'm not telling people how to blow up their machines. Please keep in mind, before you implement this, that I AM NEW TO THIS.
I suspect you are too, or you wouldn't be reading this. So back up your current init.inc.php before you attempt to modify it.
-
The thread you are talking about is here (http://forum.coppermine-gallery.net/index.php?topic=3138.0)
You have missed a required bit of the change, which is to put a curly brace '}' after the next section of code, like this;
if (!file_exists("themes/{$CONFIG['theme']}/theme.php")) $CONFIG['theme'] = 'classic';
require "themes/{$CONFIG['theme']}/theme.php";
$THEME_DIR = "themes/{$CONFIG['theme']}/";
}
Without this you will get a parse error.