changing link names changing link names
 

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]

Main Menu

changing link names

Started by ir803, January 30, 2007, 03:22:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ir803

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.

Nibbler

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

ir803

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 ??

Joachim Müller

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

ir803

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,

Stramm

post exactly what you've written

<img =src
is no valid html

ir803

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 (grafic.house@ntlworld.com)" >CONTACT GHS IMAGES</a> or <a href="login.php" >LOGIN</a>';

ir803

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

Stramm

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

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.

ir803

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;

Nibbler

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;

ir803

sorry guy's I thought you meant add a 0 border to the .image tag in the style sheet. OK all fixed now.