coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: ir803 on January 30, 2007, 03:22:19 PM

Title: changing link names
Post by: ir803 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.
Title: Re: changing link names
Post by: Nibbler on January 30, 2007, 03:41:29 PM
Change the names in your language file eg lang/english.php.
Title: Re: changing link names
Post by: ir803 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 ??
Title: Re: changing link names
Post by: Joachim Müller on January 31, 2007, 07:55:04 AM
Change the text to some HTMl code that contains the <img> tag.
Title: Re: changing link names
Post by: ir803 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,
Title: Re: changing link names
Post by: Stramm on January 31, 2007, 01:49:30 PM
post exactly what you've written

<img =src
is no valid html
Title: Re: changing link names
Post by: ir803 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>';
Title: Re: changing link names
Post by: ir803 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 (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
Title: Re: changing link names
Post by: Stramm 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
Title: Re: changing link names
Post by: ir803 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.
Title: Re: changing link names
Post by: ir803 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.
$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;
Title: Re: changing link names
Post by: Nibbler on February 03, 2007, 02:20:50 PM
Add the border="0" as suggested.

$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;
Title: Re: changing link names
Post by: ir803 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.