Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: changing link names  (Read 4959 times)

0 Members and 1 Guest are viewing this topic.

ir803

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 92
changing link names
« on: January 30, 2007, 03:22:19 pm »

I want to change "favorites" and add / remove from favorites on the display image php to lightbox add / remove from lightbox (either as text or a grafic button) as it then links in with the plugin I use "add to lightbox" link under thumbnails on the album page. BUT I've found the code that makes the link but as I don't really know PHP that well I'm unsure how to change the name that appears on screen without messing up the code, an alternative is to replace the text link with a grafic add / remove button so it stands out a bit more but again I'm unsure how to add an image into that particular bit of code.
« Last Edit: February 03, 2007, 05:35:31 pm by GauGau »
Logged

Nibbler

  • Guest
Re: changing link names
« Reply #1 on: January 30, 2007, 03:41:29 pm »

Change the names in your language file eg lang/english.php.
Logged

ir803

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 92
Re: changing link names
« Reply #2 on: January 30, 2007, 10:57:51 pm »

cool thanks nibbler but if I wanted to change it to an image would I have to somehow code that in to the language file aswell ??
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: changing link names
« Reply #3 on: January 31, 2007, 07:55:04 am »

Change the text to some HTMl code that contains the <img> tag.
Logged

ir803

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 92
Re: changing link names
« Reply #4 on: January 31, 2007, 11:56:03 am »

OK the code is this  'addFav'=>'Add to Favorites',   -  but if I add the code <img =src and then the route to the image and close the tag it just screws up the php,
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: changing link names
« Reply #5 on: January 31, 2007, 01:49:30 pm »

post exactly what you've written

Code: [Select]
<img =srcis no valid html

ir803

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 92
Re: changing link names
« Reply #6 on: January 31, 2007, 03:11:55 pm »

sorry for the typo,  this is what I have now done

'addFav'=>'<img src="themes/k2/images/addtolightbox.gif" alt="lightbox" />',

and it now works but on another php file there is more code where I want to put an image and it is not as straight forward to see where the img goes

function  download_link($info)
{
   global $CURRENT_PIC_DATA,$CONFIG;
      
   $info = array_reverse($info);
   if( fullsize_check_user() ){      
      $info['Download'] .= '<a href="plugins/fullsize_access/jpgdownload.php?pid=' . $CURRENT_PIC_DATA['pid'] . '" >Download Original File</a>';      
   } else {
      $info['Download'] = 'TO DOWNLOAD HIGH RESOLUTION IMAGES >> <a href="mailto:grafic.house@ntlworld.com" >CONTACT GHS IMAGES</a> or <a href="login.php" >LOGIN</a>';
Logged

ir803

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 92
Re: changing link names
« Reply #7 on: February 03, 2007, 11:35:32 am »

OK fixed it BUT I am finding on one site where I've done this there is no highlighted line around the link image but on this site http://www.itsmy-space.co.uk/ghs_images/cpg1410/displayimage.php?album=43&pos=2 the login and add to lighbox is (in IE) surrounded by a blue or purple (active or visited highlight colour, and I can't find anywhere in the CSS file to change it and the default html page link colours are not set to any colour so how do I get rid of it ???it makes my buttons look crap
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: changing link names
« Reply #8 on: February 03, 2007, 12:30:50 pm »

border="0"

add that to your img tag

PS: sorry, have forgotten to answer your question, but cool that you got it going yourself

ir803

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 92
Re: changing link names
« Reply #9 on: February 03, 2007, 02:07:59 pm »

problem with that is that I want an image border for my actual images, is there a way of separating the two?? I guess this is probably more a general html question, sorry.
Logged

ir803

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 92
Re: changing link names
« Reply #10 on: February 03, 2007, 02:17:08 pm »

sorry, can't edit last post.... I just removed the image border to see if that did it but it didn't change the border around the links, here's the code that the images sit in, I can't see how I would style it any different.
Code: [Select]
$info = array_reverse($info);
if( fullsize_check_user() ){
$info['Download'] .= '<a href="plugins/fullsize_access/jpgdownload.php?pid=' . $CURRENT_PIC_DATA['pid'] . '" ><img src="themes/chaoticsoul/images/download.gif" alt="download" /></a>';
} else {
$info['Download'] = ' <a href="login.php" ><img src="themes/chaoticsoul/images/logindownload.gif" alt="login to download" width="387" height="26"/></a>';
}
$info = array_reverse($info);
return $info;
Logged

Nibbler

  • Guest
Re: changing link names
« Reply #11 on: February 03, 2007, 02:20:50 pm »

Add the border="0" as suggested.

Code: [Select]
$info = array_reverse($info);
if( fullsize_check_user() ){
$info['Download'] .= '<a href="plugins/fullsize_access/jpgdownload.php?pid=' . $CURRENT_PIC_DATA['pid'] . '" ><img src="themes/chaoticsoul/images/download.gif" border="0" alt="download" /></a>';
} else {
$info['Download'] = ' <a href="login.php" ><img src="themes/chaoticsoul/images/logindownload.gif" border="0" alt="login to download" width="387" height="26"/></a>';
}
$info = array_reverse($info);
return $info;
Logged

ir803

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 92
Re: changing link names
« Reply #12 on: February 03, 2007, 03:30:13 pm »

sorry guy's I thought you meant add a 0 border to the .image tag in the style sheet. OK all fixed now.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 15 queries.