You would invent a "tag" for each of the 10 different banners. In Admin you would edit each of the albums and assign the tag of the banner you want displayed. Then on your album page you would include code to check that the tag of the album and display the appropriate banner. If you are careful to assign only the tag for the banner, then the code to test is fairly simple:
` switch (getTags() {
case "banner1":
$bannerimage = ;
break;
case "banner2":
$bannerimage =
break;
.....
}`
Hello, sbillard! Thanks lot for your help. This is the full working code:
`
`
Now I have another question, I can get the tags from album in image page? I need show the same banner in album page and image page. Assign tags for all images will take a lot of time.
Thanks again.
Hello - This post almost answers my question... I am new and I need to know where exactly to edit the code - if(getAlbumTitle() === "") { }. There are a lot of files, and I'm not sure which one does the trick.
Seems that there is no way to do this via the zenphoto administration area, so I assume (??) that it's done from my hosting control panel file manager?
Any assistance would be appreciated. Thank you.
Also, why can I not access the "Option", "Theme Options" tab? Shows nothing and says error on page down in the corner. ?? WEIRD
You would have to edit your theme file if you wish to have a specific banner. You of course need some html and css knowledge for that. It is not possible to do that via the admin options.
The theme files you would have to alter are index.php, album.php, image.php, search.php and archive.php (if you don't use the last one, you of course don't need to alter it).
The code for a banner should be right below the -section of these files. Where exactly depends on the theme design you want to use.
So I can alter the html code directly, right in those files you mentioned? Is it that easy? Right now I'm just using the defalt theme.
I basically want to add my logo banner jpg file to the top of each page.
Please clarify that for me so I don't go and do something stupid... ha ha. Thanks
[i]So I can alter the html code directly, right in those files you mentioned? Is it that easy? Right now I'm just using the defalt theme.[/i]
You would have to change the html code and probably the css files, too. I can't answer if that is easy for. You would need to have some knowledge about html and css of course.
I don't think we changed anything with that function: http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functiongetTags
Tags are stored as an array now, not a string of comma separated values. You can always refer to the function guide for things like getTags().
The hack really did not work even before this change if there were more than one tag set since it would return 'tag1,banner1,....