Ok,
I have gallery imbeded in postnuke if that makes any difference.
Is it possible to show a header text for just a certain album?
The reason I ask, is I have several albums and I would like to have a text
appear on each album in the header, but each album has to have a different text.
Is this at all possible?
Regards,
Posts: 238
Yes, it is. But how easy or hard that would be depends on what the text would be. Would it be something like the album name? Or a long description that could be different for each album?
If it is the first one, just read through album.header.default, it shows how to get the variable that contains the album title.
If it is the latter, one idea would be to
1) Create a subdirectory in html_wrap called albums.
2) In that directory you could store your custom headers, each in a file that has the same name as the album (e.g. album01, album02, vacation_2002, whatever).
3) In album.header (make sure you make a copy of album.header.default and modify the copy), just do a php include:
I haven't tried this, but it sounds fairly easy.
Posts: 114
Ok thanks,
It's the later I needed. I'll try that!
Tahnks again
Posts: 3473
Well I have to pitch my (sorry) more elegant version of this: album summary
Posts: 238
Joan,
I believe your album summary is for having album info on the page above the photo thumbnails, not in the header, right? I think npereira wanted to have custom headers.
But even for headers it would be more elegant, as you put it, to use your mod and then call one of the fields in the album.header. I was just brainstorming a quick way of doing it.
~Eva
Posts: 3473
Hmm, interesting idea, someone using a technical term correctly. It never crossed my mind that when he used header he mean "header"!
Oh well, he has two solutions, so he can pick and chose.
Posts: 238
npereira -
FYI, if you want to use joan's mod, you should make an additional field called "header" instead of "summary", then print that in the album.header file...
Posts: 3474
Because it's not entirely unrelated:
See this topic
-Beckett (
)
Posts: 3473
That link doesn't work
Posts: 3474
Yes it does. For me at least. It's topic 1888, if that helps.
Posts: 114
Ok, I'll try both joan 's and ppmnt.
But I'm not to sure what files need modifying apart from classes/Album.php. What other file do I need to modify?
In the classes/Album.php, is this what I need to put in:
$this->fields["header"]="";
and putting in this in album.header:
$name= $gallery->album->fields["header"] ;
<?php include $header; ?>
In view_album.php add this:
After:
if ($gallery->user->canChangeTextOfAlbum($gallery->album)) {
add this:
+ $adminCommands .= '<a href="#" onClick="'.popup("edit_field.php?set_albumName=" .
+ $gallery->session->albumName.
+ "&field=header").
+ '">[edit header]</a>&';
and add this just before <!-- image grid table --> :
+<?php
+if ($page == 1)
+{
+ print "<center>".$gallery->album->fields["header"]."</center>";
+}
+?>
Anything else I'm missing?
Posts: 114
This works like a charm!
It should be added to the next release of Gallery! Now you don't need to edit the album.header if you want specific headers in your different albums.
Thanks all for your help!
Posts: 3473
Funny you should say that. I've just pictched it for inclusion into 1.3.4.
We'll see what the rest of the team say
Posts: 114
This is an easy addon. I don't see why they would reject it.
This software is getting SOOOOO GOOD ! I'm telling all my friends, family members, and Webmaster buddies that have somekind of album photo on the web to install it.
The Support of this is so good! I'm learning new things everyday! Thanks again Joan!