forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: farmergiles on August 25, 2005, 12:26:50 pm

Title: Adding a link
Post by: farmergiles on August 25, 2005, 12:26:50 pm
Hi, all I am trying to do is add/change a link so that it's easy to get back to my sites home page from the gallery.  I have searched through all the custom header/footer threads and tried most things with no success.  When I amend the link on the template.html page, the new link works but the gallery loses all its artwork and appearance.  Can anyone tell me what I am doing wrong.  I'm sure there is a really easy thing I'm not doing or doing wrong but I've been trying this for 4 days and can't do it  :\'(

Can anyone give me some advice bearing in mind my zero knowledge of code writing...  ???
___________________________
Regards, Simon
Title: Re: Adding a link
Post by: Abbas Ali on August 25, 2005, 12:58:52 pm
For classic theme Edit themes/classic/theme.php

Find

Code: [Select]
<br />
                        <a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::
                        <a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a> ::

and replace with

Code: [Select]
<br />
                        <a href="homepagelink.php">Home Page</a> ::
                        <a href="{LASTUP_TGT}">{LASTUP_LNK}</a> ::
                        <a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a> ::
Similarly edit theme.php for other themes too
Title: Re: Adding a link
Post by: farmergiles on August 26, 2005, 12:14:36 am
Many, many thanks.  No more late nights trying to work it out  ;D

Fantastic product and support forum, why aren't most sites this helpful!!

Regards,
Simon
Title: Re: Adding a link
Post by: ac99 on August 30, 2005, 08:08:50 pm
Hi ;D

I'm using Rainy day template and it have this code:
Code: [Select]
<a href="{LASTUP_TGT}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
                                        <td background="themes/rainy_day/images/button1_r1_c2.gif">
                                                <a href="{LASTCOM_TGT}">{LASTCOM_LNK}</a>

Is this code that I have to replace? What I have to replace?

Thanks
Title: Re: Adding a link
Post by: Joachim Müller on August 31, 2005, 09:20:07 am
all plain html, not sure why you ask - should be easy. However, edit themes/rainy_day/themes.php, find
Code: [Select]
                                        <td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
                                        <td background="themes/rainy_day/images/button1_r1_c2.gif">
                                                <a href="{SEARCH_TGT}">{SEARCH_LNK}</a>
                                        </td>
                                        <td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
and add after it (in a new line)
Code: [Select]
                                        <td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
                                        <td background="themes/rainy_day/images/button1_r1_c2.gif">
                                                <a href="your/custom/link.htm">your link text</a>
                                        </td>
                                        <td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
Title: Re: Adding a link
Post by: Mobilemick on November 07, 2005, 12:12:28 pm
thanks for the advice but ..
 I have added the code to make the link appear in the header,
but. it doesnt link to www.cakesbyjen.co.uk 
it links to http://www.cakesbyjen.co.uk/coppermine/www.cakesbyjen.co.uk

this is the code i used :-

                           $template_main_menu = <<<EOT
                <span class="topmenu">
<a href="www.cakesbyjen.co.uk">my board</a> 

Have looked through the searches u posted and tried different ways but alas,  I`m still stuck

Thanks
Mick
Title: Re: Adding a link
Post by: Nibbler on November 07, 2005, 12:18:07 pm
You need to use a full url in your link, ie. http://www.cakesbyjen.co.uk
Title: Re: Adding a link
Post by: Mobilemick on November 07, 2005, 12:21:07 pm
As easy has that, 


Working fine now,

thanks M8

Mick 
Title: Re: Adding a link
Post by: Joachim Müller on November 15, 2005, 11:46:01 pm
split unrelated reply to http://forum.coppermine-gallery.net/index.php?topic=23803.0
Title: Re: Adding a link
Post by: yhwhdesign on August 08, 2006, 03:09:59 am
here is what is listed in all my theme.php files ( I have none of the code you guys are talking about.) what am I doing wrong?

<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.8
  $Source$
  $Revision: 3116 $
  $Author: gaugau $
  $Date: 2006-06-08 00:11:54 +0200 (Do, 08 Jun 2006) $
**********************************************/

define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until
                                           // you have validated it. See docs/theme.htm.

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='<img src="themes/water_drop/images/orange_carret.gif" width="8" height="8" border="0" alt="" />';

?>
Title: Re: Adding a link
Post by: Abbas Ali on August 08, 2006, 07:00:40 am
The only thing you are doing wrong is searching for solution in cpg1.3.x support board while you are using cpg1.4.x.