How Can I Edit the Appearance of the Header on the Page .../gallery/main.php?

Neil Girardi
Neil Girardi's picture

Joined: 2009-07-22
Posts: 64
Posted: Wed, 2009-07-22 17:25

Hi,

My name is Neil. I'm new to Gallery. I'm familiar with HTML, CSS, and PHP. I'm using the "Floatrix" theme. I've replaced the default Gallery header on the album pages with my own stylized header, which has a logo, a background image, and various CSS styles applied. I did this by editing a local copy of theme.tpl and a local copy of the theme.css.

I would like to be able to do the same thing for the "homepage". In other words, the page that ends in /gallery/main.php, which is first displayed after logging in, but BEFORE selecting which gallery to view. I found the following article on this site but was not able to get anywhere with it:

http://codex.gallery2.org/Gallery2:How_to_add_custom_stuff_on_main_root_page

First of all, from what I experienced, I think this method alters the home page of an ALBUM, not the Gallery homepage. Second of all, there is no <div id="gsHeader"> in album.tpl.

Can anyone point me in the right direction?

Here is my system info in case that's needed to answer the question:

Gallery version = 2.2.2 core 1.2.0.4
PHP version = 5.2.6 cgi-fcgi
Webserver = Apache/2.2.8 (Unix) FrontPage/5.0.2.2635
Database = mysql 5.0.75, lock.system=flock
Toolkits = ArchiveUpload, Exif, Getid3, LinkItemToolkit, Thumbnail, Gd, ImageMagick
Acceleration = none, none
Operating system = Linux vux7 2.6.22.10-NETSOL #1 SMP Mon Jul 14 16:26:14 EDT 2008 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11
Rows in GalleryAccessMap table = 6
Rows in GalleryAccessSubscriberMap table = 26
Rows in GalleryUser table = 4
Rows in GalleryItem table = 24
Rows in GalleryAlbumItem table = 4
Rows in GalleryCacheMap table = 0

Thanks!!!

-Neil Girardi

www.CenterfoldNextDoor.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-07-22 19:10
Quote:
2.2.2

First of all, upgrade gallery. That version is very old and unsupported.

Are you using a custom theme or are you using an unmodified version of Matrix? Wait, you said Floatrix, but your system info says Matrix. Please update your system info by running that task again, Site Admin > Maintenance and click Run Now for the System Information task.

That tutorial is probably really referring to Matrix. Floatrix or any other theme could really be different. I'm not exactly sure what you want to change, but you'll probably want to edit theme.tpl.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Neil Girardi
Neil Girardi's picture

Joined: 2009-07-22
Posts: 64
Posted: Wed, 2009-07-22 19:38

What I want to change is the appearance of the main.php page. MY gallery is at www.centerfoldnextdoor.com/gallery. When you log in you are directed to http://www.centerfoldnextdoor.com/gallery/main.php, which has the gallery headerbar and gallery logo. I've edited the theme.tpl of Floatrix such that when you select an album that is displayed using the floatrix theme you see MY custom headerbar with MY logo. I want to do the same for http://www.centerfoldnextdoor.com/gallery/main.php. However, I don't know what template file to edit in order to affect the look of that page. I can see the actual main.php file, but it just contains logic statements.

Can you tell me which .tpl file to edit in order to affect the look of the main page?

Thanks!

Neil Girardi

www.CenterfoldNextDoor.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-07-22 19:45

theme.tpl is the over all page, the main page.

photo.tpl has photo page elements

album.tpl has album page elements

Read these:
http://codex.gallery2.org/Gallery2:How_to_visually_embed_Gallery_in_your_own_website_by_editing_theme_templates
http://codex.gallery2.org/Gallery2:Editing_Templates

http://codex.gallery2.org/Gallery2:How_Tos#Website_Integration (See the Website Integration section)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Neil Girardi
Neil Girardi's picture

Joined: 2009-07-22
Posts: 64
Posted: Wed, 2009-07-22 20:42

Okay,

I was confused and now I realize what I was doing wrong...

Your feedback is what got me on the right track. :-)

In your last post, you pointed out that although I said I was using Floatrix, my system info indicated that I was using Matrix. Being new to Gallery, I didn't realize that one has to change the theme settings in multiple places. While I had set my photo albums to Floatrix, I had not set my "Default Theme" setting to Floatrix. As soon as I did that, my custom header popped up in the admin view. However, my "homepage" still did not display my custom header. After thinking about it for a moment, I realized that even though it contains no actual photos my "homepage" too is an album. (My "Root Album" is called "CenterfoldNextDoor.com Featured models." It doesn't have any photos of its own. Each model has her own album and they're all nested inside of "CenterfoldNextDoor.com Featured models.") So I changed the "Root Album" to Floatrix, too and now every page has my custom header. :-)

Do you know that I've spent days looking through the documentation on this site and rummaging through every line of code in every smarty file to try and figure this out? lol.

So I guess my next issue is that I have an old version of Gallery, yes? My hosting company is Network Solutions. I installed this version through a "one-click" installer on their open-source goodies page. Is it easy to install a newer version on a Linux server? I don't have access to the server since it's not my box...

I'll start looking for the docs on that.

Thanks again!!!

Neil Girardi

www.CenterfoldNextDoor.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-07-22 20:59
Quote:
I didn't realize that one has to change the theme settings in multiple places

You don't have to. You can, but you don't have to.

You can change the theme on an album by album basis, you can change settings globally, etc. It's actually a little to flexible and has created a lot of confusion. G3 should be much easier to use.

FAQ: How to upgrade Gallery2?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Neil Girardi
Neil Girardi's picture

Joined: 2009-07-22
Posts: 64
Posted: Wed, 2009-07-22 21:52

What version of Gallery should I be running? As a newcomer I'm not really comfortable using a beta version. I believe my server hardware is an i686. It's running Linux.

Thanks!

Neil Girardi

www.CenterfoldNextDoor.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-07-22 22:17

I was just commenting that G3 should be easier to use. If you don't want to use Beta software on a production site, don't, just wait. It's going to be completely different than G2 in terms of customizing, usage, integrating, etc. It's also not going to have all of the features G2 has.

For a stable, production site, I'd go with G2.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here