Allow theme logo to be a link-back to parent website homepage

epchristi

Joined: 2006-01-04
Posts: 3
Posted: Wed, 2006-01-04 16:57

I am not sure if this is the right board to post this question. I am not a php programmer (yet). :) I found in the theme.tpl that I could change the header for gallery to better match my website. However, it would be nice if the logo was "clickable" and allowed the user to go back to the "home page" for the site. Is this possible with gallery2? Or, is there a way to provide a link back to the website in the footer?

I am using gallery 2.0.2 and a fresh install as of yesterday. Are there any php coders that can point me to good resources to learn the language? (I come from a perl background.)

Thanks for any suggestions.

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Wed, 2006-01-04 21:08

Just add a link in the theme.tpl around the image and link it to where you want it to go?

 
epchristi

Joined: 2006-01-04
Posts: 3
Posted: Thu, 2006-01-05 07:36

Yes.. that's what I would like to do. :) I just don't know how to do it.
I have the code in the theme.tpl file:

<div id="gsHeader">
<img src="{g->url href="themes/green/images/header_logo.jpg"}">
</div>

But, I didn't see how to turn that href into a "clickable link".. Sorry.. I am very new to this. (I am a perl and C programmer.) :)

 
fredrik

Joined: 2005-12-28
Posts: 9
Posted: Thu, 2006-01-05 09:03

I've been planning to do this. After a quick look at the code, I made the following change and it seems to work:

<div id="gsHeader">
<a href="{g->url}">
<img border="0" src="{g->url href="themes/green/images/header_logo.jpg"}">
</a>
</div>

Edit: btw, IIRC, you should do this in a copy of the theme.tpl that you place in a directory named "local".

 
Dhlamini
Dhlamini's picture

Joined: 2006-01-05
Posts: 4
Posted: Thu, 2006-01-05 13:49

Yes it is. Just the image in your theme.tbl surround it with the openning <a> link tag and close </a> link tag. Take a look at the example below:

<div id="gsHeader">
<a href="http://www.websitename.co.za"><img src="{g->url href="images/galleryLogo_sm.gif"}" width="107" height="48" alt=""/></a>
</div>

Websitename stands for the website address that displays that specific home page

 
fredrik

Joined: 2005-12-28
Posts: 9
Posted: Thu, 2006-01-05 14:01
Dhlamini wrote:
Take a look at the example below:

I would rank that solution as a couple of times less portable than mine...

 
epchristi

Joined: 2006-01-04
Posts: 3
Posted: Thu, 2006-01-05 16:58

Thank you to everyone who replied! I was able to get it working. I appreciate it!