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