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: Giving every album a custom header  (Read 3681 times)

0 Members and 1 Guest are viewing this topic.

HappyMini

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Giving every album a custom header
« on: April 27, 2011, 02:21:17 pm »

Hi there,

I'm trying to customize Coppermine to fit my own website. My old website uses a concept that every album has an own header. Every header includes an own backgroundimage and the album title.

First, the album title was simple I thought. Maybe I could add a token like {Album title}. But sadly, there are no tokens available, only the {Gallery} token and no tokens for things inside the gallery.

Second, how do I manage to give every Coppermine album an own header. I know you can add a custom header for all the albums, but how do you add one for each album separately?

Thank you in advance!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Giving every album a custom header
« Reply #1 on: April 27, 2011, 02:51:04 pm »

Please post a link to your gallery and describe where exactly that 'header' should be displayed.
Logged

HappyMini

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Giving every album a custom header
« Reply #2 on: April 27, 2011, 07:00:37 pm »

Well, my Coppermine installation is not online yet. But my template.html looks like this:

- Site header (every page the same)
- Album header div (every album another background and text)
- Site menu etc.
- {Gallery}
- Some copyright notice etc.

The album 'header' is just a div, given another background on every page with the following
Code: [Select]
<div id="header_album2" style="background-image: url(img.jpg);">The Album Title</div>
The other solution I thought about, is to keep my original pages and include just 1 Coppermine album at once. Maybe that's easier? So on 1 page you can view only 1 album. Maybe there's a special code for that trick?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Giving every album a custom header
« Reply #3 on: April 27, 2011, 11:04:49 pm »

Maybe I could add a token like {Album title}
You can replace that token with the help of the pageheader function. Just copy it to your theme's theme.php file and edit it to your needs.
Logged

HappyMini

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Giving every album a custom header
« Reply #4 on: April 28, 2011, 06:00:36 pm »

Okay, thanks. I'm gonna try that one.
Logged

HappyMini

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Giving every album a custom header
« Reply #5 on: April 28, 2011, 09:48:35 pm »

I'm stuck again: I want to print the album name in my header. But what's the right code to do such a thing?

Was thinking about something like this:

Code: [Select]
pageheader($album_name)
But that obvious didn't work.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Giving every album a custom header
« Reply #6 on: April 29, 2011, 09:24:11 am »

Please attach your theme's template.html and theme.php file to your next reply.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.