Add to Favorites as a "button" Add to Favorites as a "button"
 

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

Add to Favorites as a "button"

Started by tjreynolds, April 29, 2004, 07:32:30 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

tjreynolds

First of all thanks for all of the hard work on this wonderful gallery. I love copermine!

http://www.whitneyinteriors.info/Gallery/displayimage.php?album=1&pos=21

How would I add a BUTTON next to an image for "add to favorites" . I do not want to show picture information, so I'd have to have a link near the displayed image.

I found the raw php in displayimage... but now what   ???

Quote// Create the add to fav link
   if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
       $info[$lang_picinfo['addFavPhrase']] = "<a href=addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . " >" . $lang_picinfo['addFav'] . '</a>';
   } else {
       $info[$lang_picinfo['addFavPhrase']] = "<a href=addfav.php?pid=" . $CURRENT_PIC_DATA['pid'] . " >" . $lang_picinfo['remFav'] . '</a>';
   }

   return theme_html_picinfo($info);
}

Rather have a button for asthetic purposes. Thanks

Joachim Müller

Then change the code you found to have an image instead of the text link, like this:// Create the add to fav link
   if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
       $info[$lang_picinfo['addFavPhrase']] = '<a href=addfav.php?pid="' . $CURRENT_PIC_DATA['pid'] . '" ><img src="path_to_you_button/your_add_to_fav_button.gif" width="100" height="100" alt="" title="'. $lang_picinfo['addFav'] . '" /></a>';
   } else {
       $info[$lang_picinfo['addFavPhrase']] = '<a href=addfav.php?pid="' . $CURRENT_PIC_DATA['pid'] . '" ><img src="path_to_you_button/your_remove_from_fav_button.gif" width="100" height="100" alt="" title="'. $lang_picinfo['remFav'] . '" /></a>';
   }

   return theme_html_picinfo($info);
}


GauGau

tjreynolds

Hi GauGau,

Thanks for the response. I changed the code and that works great,

However, I'd like the link in a more prominent place without displaying the picture information such as just below the image on displayimage.php. Customer doesn't want any pic info on the page...    Does that make sense?

Thanks alot for the help on this.

If you ever need an eCommerce solution I use osCommerce which is built similar and know the in's and out's of that like the back of my hand.

TTYL
TJ.

Casper

My suggestion would be to edit displayimage.php, so the only info shown is the button you have created.

See this thread how to do it;
http://forum.coppermine-gallery.net/index.php?topic=3411

Then set your config to show the info.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here