Member
Member
viking   2009-01-12, 03:48
#1

Hi

I'm using the default theme and would like to make a different banner for every album under the gallery name. for example i have an album named Nature, and i have designed a nice banner to put it under the gallery title. For every Album, a different banner Is this possible to be made?

Thanks in advance

Member
Member
sbillard   2009-01-12, 04:06
#2

The script album.php runs when an album page is loaded. The variable $_zp_current_album is set to the album object for the album being displayed. So, what you need to do is decide how to associate your banner with the album. Perhaps you can store the banner image name in the custom data field of the album.

Then modify the album.php script to display the appropriate banner based on the album which is being shown.

Member
Member
viking   2009-01-12, 04:25
#3

hmm im not that much into php. I can understand a little. Could i make a folder example named nature, and when the nature album loads the banner loads from the nature folder. Could you help me do that please? Thanks

Administrator
Administrator
acrylian   2009-01-12, 11:37
#4

I would suggest you put your banners into a folder named "banner" within your theme. I would not use the custom data field. I would just use the album name. Meaning: If you have album "nature" name your banner for example "nature.jpg". Then call the image directly via the album name on album.php: `[img]

Member
Member
viking   2009-01-12, 19:21
#5

Hi acrylian.

It keeps showing this error: [b]Parse error: syntax error, unexpected '>'[/b]

Administrator
Administrator
acrylian   2009-01-12, 19:32
#6

I forgot to close the php statement. You should generally never directly copy code posted here without checking....
`[img]

Member
Member
viking   2009-01-13, 23:36
#7

Hi acrylian,

Thanks for the code. The problem now is that the image is loading on all the albums, not only nature. I tried different things by trial and error but didnt work. Hope you can help me out.

Thanks.

Member
Member
sbillard   2009-01-14, 00:49
#8

You have to include code that decides which page to display the image. Refer back to my original response.

Member
Member
viking   2009-01-14, 22:43
#9

cant get it to work :

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.