Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: album specific themes & album thumbnails question  (Read 3755 times)

0 Members and 1 Guest are viewing this topic.

zebraplayer

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
album specific themes & album thumbnails question
« 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.
« Last Edit: October 11, 2004, 12:38:41 am by zebraplayer »
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: almub specific themes & album thumbnails question
« Reply #1 on: October 11, 2004, 12:33:07 am »

Quote
Can different albums within the same gallery utilize different themes?

No.

Quote
Can a particular album be made to use a specific thumbnail?

Covered in the documentation that comes with Coppermine.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: almub specific themes & album thumbnails question
« Reply #2 on: October 11, 2004, 12:38:18 am »

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

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

zebraplayer

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: album specific themes & album thumbnails question
« Reply #3 on: October 11, 2004, 12:39:29 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: album specific themes & album thumbnails question
« Reply #4 on: October 11, 2004, 05:50:02 am »

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
Logged

zebraplayer

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 44
Re: album specific themes & album thumbnails question
« Reply #5 on: October 14, 2004, 04:39:06 pm »

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

Code: [Select]
// 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

Code: [Select]
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:

Code: [Select]
if ($_GET["cat"] == 'your category NUMBER goes here' )

To this

Code: [Select]
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.
« Last Edit: October 14, 2004, 04:44:25 pm by zebraplayer »
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: album specific themes & album thumbnails question
« Reply #6 on: October 15, 2004, 08:15:40 pm »

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;

Code: [Select]
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.
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
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 19 queries.