Adding a link back to my site?

Jump1979man

Joined: 2006-02-28
Posts: 5
Posted: Tue, 2006-02-28 19:54

Love the gallery first off....

What file within the gallery2 files would need modified to add a link back to my site?

Thanks

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2006-02-28 22:59
 
Jump1979man

Joined: 2006-02-28
Posts: 5
Posted: Wed, 2006-03-01 02:10

dang that is too confusing....is their anything easier...

this "breadcrumb" thing isnt what I am used to.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2006-03-01 04:29

edit theme.tpl or album.tpl in themes/{yourtheme}/templates and put a link anywhere you like.

 
rhintz

Joined: 2006-03-01
Posts: 1
Posted: Wed, 2006-03-01 09:17

mindless is absolutely right. In my case I replaced the gallery image in the header with my own and made it a link back to the root of my site. I accomplished this in the theme.tpl file on line 35. (I'm using the matrix theme)

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

You can see the result at http://www.ryansweb.net/gallery2/

Good Luck!

 
Jiveturkey

Joined: 2006-01-20
Posts: 43
Posted: Mon, 2006-03-06 01:59

rhintz,

Your example is exactly what I want to do. I copied your code and changed the domain name to mine and also changed the name of the photo along with the width and heigth.

So some reason the photo just won't show up. There's a small purple line in the far lefthand corner that links back to the home page but the full photo will not.

Any ideas???

Here's a link

http://coastercommunity.com/gallery2/main.php?g2_view=core.ShowItem&g2_itemId=7

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-06 03:33

take out gallery2/ in your href path.. look at the html source of your page and you'll see it has gallery2/gallery2/....
add border="0" in the <img> tag to remove the border.

 
Jiveturkey

Joined: 2006-01-20
Posts: 43
Posted: Mon, 2006-03-06 04:07

Still no worky.

Here's what I have and where I have it. This is just the top of the theme.tpl code.

{*
* $Revision: 1.7 $
* If you want to customize this file, do not edit it directly since future upgrades
* may overwrite it. Instead, copy it into a new directory called "local" and edit that
* version. Gallery will look for that file first and use it if it exists.
*}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>

<div id="gsHeader">
<a href="http://www.coastercommunity.com"><img src="{g->url href="/themes/matrix/images/homelinkblack.jpeg"}" width="800" height="40" border="0" alt=""/></a>
</div>

{* Let Gallery print out anything it wants to put into the <head> element *}
{g->head}
{* If Gallery doesn't provide a header, we use the album/photo title (or filename) *}
{if empty($head.title)}

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-06 04:17

take out the leading /
href="themes/.......

 
Jiveturkey

Joined: 2006-01-20
Posts: 43
Posted: Mon, 2006-03-06 04:36

I really appreciate the help but it's still not working.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-06 06:31

"not working" ?

 
Jiveturkey

Joined: 2006-01-20
Posts: 43
Posted: Mon, 2006-03-06 14:04

In IE the box is there but the pic fails and only a red x shows up. The link works though. Are you able to see the pic?

In Firefox there's no box.

http://coastercommunity.com/gallery2/main.php?g2_view=core.ShowItem&g2_itemId=7&g2_navId=x331f31c4

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2006-03-06 19:14

jpg
please make a little more effort on your own.. that's all the hint i'll give you.

 
Jiveturkey

Joined: 2006-01-20
Posts: 43
Posted: Mon, 2006-03-06 19:26

Whoopie!!!!

You freakin' RULE!!!!

:)

 
NCochise

Joined: 2006-03-06
Posts: 8
Posted: Mon, 2006-03-06 23:07

I used a three cell table in my header graphic.

I took a 800 x 100 banner graphic, cut it into three pieces and made the center cell and the center image component width=100% so regardless of what monitor screen resolution the viewer was using, the image would expand to fill their screen without distorting the look of the image too much.

Below is the table I used, you can substitute your own graphics, width variations etc.

In the directory: /home/gallery2/themes/Template_of_your_choice_here/templates/

Edit the theme.tpl as shown below, of course with your graphics, size dimentions and url references.

FIND THIS CODE IN THEME.TPL

<div id="gsHeader">
<img src="{g->url href="images/galleryLogo_sm.gif"}" width="107" height="48" alt=""/>
</div>

AND REPLACE IT WITH THIS CODE - WHICH YOU MUST ALTER TO SUIT YOUR NEEDS:

<div id="gsHeader" align=center><table border=0 cellpadding=0 cellspacing=0 width=95% height=1><tr><td width=1 align=left><img src="{g->url href="images/g2logoleft.jpg"}" width="464" height="100" alt="Donoghue Memorabilia"/></td><td width=100% align=left><img src="{g->url href="images/g2logocenter.jpg"}" width="100%" height="100" alt="Donoghue Memorabilia"/></td><td width="1" align=right><img src="{g->url href="images/g2logoright.jpg"}" width="275" height="100" alt="Donoghue Memorabilia"/></td></tr></table></div>

You can see the results of this adjustment in my EXPANDING HEADER GRAPHIC shown here http://donoghuephotography.com/g2/

Example of header graphic pieces.
[img]http://www.donoghuephotography.com/g2/images/headerexample.jpg[/img]

Hope that was not too confusing. I used Photoshop to cut the graphic into three pieces. The center graphic will expand to however wide the viewer's screen is without distorting the overall look of the graphic.

PS, I am still trying to find someone to help me with the vertical and horizontal divider line coding in the sidebar though. HELP!!!

Also... I added a LOCAL directory in the /home/gallery2/themes/Template_of_your_choice_here/templates/ folder where I copied customized sidebar.tpl and theme.tpl files so I would not destroy the originals.

So... create a folder named LOCAL and place it in the templates folder which will then look like this.
/home/gallery2/themes/Template_of_your_choice_here/templates/local

 
Jiveturkey

Joined: 2006-01-20
Posts: 43
Posted: Wed, 2006-03-08 22:29

Nice!

I went ahead and copied everything in the "local" folder as you said.

I am rockin' and rollin' now.

This has been one of the most helpful threads I've ever been in.

 
halakahiki82

Joined: 2010-05-24
Posts: 1
Posted: Wed, 2010-05-26 20:40

ok, this is part of my theme.tpl

copied into the local folder:
<div id="gsHeader">
<a href="http://www.quietd.com/home.html"><img src="{g->url href="images/galleryLogo_sm.gif"}" width="107" height="48"/></a>
</div>

still not working

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-05-26 20:55

FAQ: How can I clear cached data?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here