Links in header

bobjones

Joined: 2002-09-24
Posts: 1
Posted: Tue, 2002-09-24 14:16

I would like to add to couple of navigation links to the header of the gallery, a home link etc.

Which php file do I need to modify to do this?

Thanks

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2002-09-24 16:02

Hi!

No need to edit the .php pages at all, in your gallery folder you'll find a directory named html_wrap. Copy and rename the gallery.header.default to gallery.header and edit to your hearts content.

You CAN place php markup here aswell, but standard html should to the trick. :smile:

 
grillboy
grillboy's picture

Joined: 2002-09-24
Posts: 1
Posted: Tue, 2002-09-24 16:48

Ok, but won't that just change the header in all of the galleries, or am I confused?
I want to add a banner and links only to all the pages in a specific gallery.
How do I do that?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2002-09-24 17:32

You're right. That's a global change. I don't know if there is a way to do what your asking, maybe some of the php-guru's here know if its possible to stick a piece of php in the header files, detect which album it's "inside" and to something depending on the album name?

h0bbel

 
sbchasin
sbchasin's picture

Joined: 2002-10-16
Posts: 2
Posted: Thu, 2002-10-17 00:36
Quote:
I would like to add to couple of navigation links to the header of the gallery, a home link etc.

Which php file do I need to modify to do this?

I am looking for this information as well. I noticed it wasn't answered yet. I do not need the links to be global either.

Thanks

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Thu, 2002-10-17 04:56

You don't really need any php, unless you want to use includes to keep things easy.

As mentioned by h0bbel, the files you need to modify are in the html_wrap folder.

Don't be overwhelmed by Gallery - looking at what is in each of the folders can make a huge difference to the kinds of questions you'll need to ask here and will give you a better overall understanding of how things fit together.

As to the modifications you are asking about - you will need to add a bit of html or php code to several header and footer files to have your links show up on more than just the main page. If you know how to use php includes then it won't take much time at all, just make up your header and insert it using this code:

<?php include('MY_HEADER.html');?>

If you look thru the html_wrap files, you'll see there are header and footer default files called album, photo, slideshow, search, etc. Upon opening these files with a text editor (editpad, editplus, crimson, to name a few), you'll see that there are some tips in the commented section at the top of some of these default files. Hopefully you should be able to see where to insert either the php include (shown above) OR cut and paste the layout that you've worked out for your header, whatever works for you.

The same goes for the footer - if you wish to add a counter, copyright info or something else at the bottom of the page. Design the layout, and then add it to the footer files.

IMPORTANT: When you save these files, save them WITHOUT the ".default" ending. Upload them to the html_wrap folder on your server. Gallery uses the files with the .default ending until you upload your personalized version. By not saving over the default files you will always have a backup to return to if need be.

I hope this helps.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Thu, 2002-10-17 21:50

Hi!

I'll see if I can manage to find some time to make a small "Howto wrap yourself around The Gallery" explanation file, with examples of how to do this using simple php includes.

Hopefully I'll be able to do this sometime this weekend, and post a link here on Monday (hopefully..:smile: )

For the moment though, if any of you have questions regarding this, take a look at
<!-- BBCode Start --><A HREF="http://h0bbel.p0ggel.org/gallery2/" TARGET="_blank">my gallery test site</A><!-- BBCode End --> where I've used a header, left navbar and a footer file to wrap my site around the gallery. It's not complete, as I haven't had the time to do anything with this lately (and because I'm feed up with my own layout... :smile: ), but at least it's a "semi-working wrap-around".

Feel free to mail me personally if you have any questions about this.

h0bbel

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Thu, 2002-10-17 23:29

Hi h0bbel

Looks like we're trying to do the same thing, except you got yours online (mine is still on my hard drive, other projects took precedence, sorry to say)!

I've been slowly compiling a Gallery Beginner FAQ of all the really basic things that people find confusing, mainly because I could see the need for it.

I can't wait to see your "Gallery Wrap" file!

Had to laugh when you said you were fed up with your own layout - I know that feeling SO well! :smile:

Regards,

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Mon, 2002-10-21 18:24

Sorry (but not suprisingly...) but I'm a bit behind schedule here. :smile: I promise to get this description of mine finished soon, but work actually caught up with me this weekend.

I'll do my best to squeeze in some time to finish it in the next couple of days. Sorry for the delay. :smile:

rgrdsm
h0bbel

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sat, 2002-10-26 23:54

Hi all!

I finally got some spare time on my hands, and I've started the Gallery Wraparound guide I mentioned before.

A preliminary version (NOT COMPLETE! :smile: ) is now posted <!-- BBCode Start --><A HREF="http://h0bbel.p0ggel.org/guides/wrap.txt" TARGET="_blank">here</A><!-- BBCode End -->. Please gimme some feedback if you find this usefull, or even a complete waste of time... :smile:

I should be able to add the rest of what I planned during the next couple of days.

rgdrs,
h0bbel

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Sun, 2002-10-27 18:47

Hi h0bbel

The gallery.header.default has a line in it that states:

----------

// NOTE: This header gets inserted below the <body> tag.

----------

Yet in your gallery wraparound setup, you are using this file to set the head tags up. How can that work if the file is being inserted below the body tag? I looked at your test site, and because of how this works you are getting two sets of head tags and body tags, making for very invalid code that will be difficult, if not impossible, to validate.

As well, you mention that the inline files are only used when Gallery is embedded in a Nuke or PostNuke environment, but I believe this statement is incorrect.

For example, the inline_gallerythumb.frame.default file is what makes the "book" around the album thumbs (I got this info from the first few commented out lines in the file).

Sorry to burst the bubble - what you are doing looks good and while it may work in theory (and on some browsers), I think in the long run it will cause more problems due to the invalid coding your hack creates.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2002-10-27 19:03

Hi!

Thanks! All feedback is good feedback, and I clearly messed up a bit. :smile: I'll just have to fix this in my guide, and my test site. :smile:

Weird that my test works at all. :smile: I'll fix this as soon as possible, and if you find anything else that should be fixed, gimme notice! :smile:

Thanks again for reading through it!

h0bbel

 
[Syntax]

Joined: 2002-10-26
Posts: 20
Posted: Sun, 2002-11-03 21:58

Your having the same problem I am.. Ive posted a few times, and everyones been clueless, or just hasnt gave a damn.. either way... I edited my wrapper.header and footer files, to include my own header and footer code... this created 2 sets of openinging html and body tags, and 2 sets of closing html and body tags...

so then I changed the part of the header and footer that contains "nuke"
and set that to my own variable.. I set the variable to match in the init.php
and all worked well.. cept now gallery thinks its running inside a php manager, like nuke or postnuke, and the user manager, preferences, stylesheets all became non-functional..
so obviously bypassing that part of the script was not the right answer..

if you figure out how to include your site header and footers, without getting duplicate tags.. I would greatly appreciate knowing how.. Ive piddled off and on for over 2 weeks now..

 
Gaile

Joined: 2002-07-20
Posts: 1301
Posted: Mon, 2002-11-04 19:08
Quote:
...everyones been clueless, or just hasnt gave a damn..

Ummm...that's really not the problem. :???: The problem is there is only so many hours in a day and sometimes a question that isn't easily answered or is considered lower in priority gets left til later. Or maybe the person with the right answer just hasn't stumbled on your post yet.

Quote:
Ive piddled off and on for over 2 weeks now

All I can say is keep piddling - you may just end up answering the question before any of the rest of us do! Then you can give US the solution! :wink:

There's always room for one more question answerer! :grin:

 
plastikman

Joined: 2002-09-17
Posts: 39
Posted: Wed, 2002-11-06 04:52

you can always edit the wrapper.header just put them where you need them below all the php stuff *all the way at the bottom of the file* and you can use regualr html if you like as well such as i have my whole navigation bar at the top of every page after i edited that file...hope this helps!