Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Adding a link  (Read 13323 times)

0 Members and 1 Guest are viewing this topic.

farmergiles

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Adding a link
« 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
« Last Edit: August 26, 2005, 08:25:47 am by Abbas Ali »
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Adding a link
« Reply #1 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
« Last Edit: August 26, 2005, 09:13:35 am by GauGau »
Logged
Chief Geek at Ranium Systems

farmergiles

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Adding a link
« Reply #2 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
Logged

ac99

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Adding a link
« Reply #3 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Adding a link
« Reply #4 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>
Logged

Mobilemick

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Adding a link
« Reply #5 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
Logged

Nibbler

  • Guest
Re: Adding a link
« Reply #6 on: November 07, 2005, 12:18:07 pm »

You need to use a full url in your link, ie. http://www.cakesbyjen.co.uk
Logged

Mobilemick

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Adding a link
« Reply #7 on: November 07, 2005, 12:21:07 pm »

As easy has that, 


Working fine now,

thanks M8

Mick 
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Adding a link
« Reply #8 on: November 15, 2005, 11:46:01 pm »

Logged

yhwhdesign

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Adding a link
« Reply #9 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="" />';

?>
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Adding a link
« Reply #10 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.
Logged
Chief Geek at Ranium Systems
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.