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 |
|
Posts: 8601
look for "Home" Link in
http://codex.gallery2.org/index.php/Gallery2:User_Contributions
Posts: 5
dang that is too confusing....is their anything easier...
this "breadcrumb" thing isnt what I am used to.
Posts: 8601
edit theme.tpl or album.tpl in themes/{yourtheme}/templates and put a link anywhere you like.
Posts: 1
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!
Posts: 43
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
Posts: 8601
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.
Posts: 43
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)}
Posts: 8601
take out the leading /
href="themes/.......
Posts: 43
I really appreciate the help but it's still not working.
Posts: 8601
"not working" ?
Posts: 43
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
Posts: 8601
jpg
please make a little more effort on your own.. that's all the hint i'll give you.
Posts: 43
Whoopie!!!!
You freakin' RULE!!!!
Posts: 8
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
Posts: 43
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.
Posts: 1
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
Posts: 16504
FAQ: How can I clear cached data?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here