album specific themes & album thumbnails question album specific themes & album thumbnails question
 

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

album specific themes & album thumbnails question

Started by zebraplayer, October 11, 2004, 12:22:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zebraplayer

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.

kegobeer

QuoteCan different albums within the same gallery utilize different themes?

No.

QuoteCan a particular album be made to use a specific thumbnail?

Covered in the documentation that comes with Coppermine.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

zebraplayer

never mind the album thumbnail question. I figured it out.

I still need am answer to the album or category theme, however.

zebraplayer

okay. Thanks. We posted at the same time, I guess.

Joachim Müller

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

zebraplayer

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

Casper

The thread you are talking about is here

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