4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Shap on March 02, 2003, 01:18:43 AM

Title: making an image a link?
Post by: Shap on March 02, 2003, 01:18:43 AM
I'm wondering if its possible to make an image in a gallery a link? Example would be upload some image, and if they click it, it takes them to www.yahoo.com
Title: making an image a link?
Post by: V@no on March 02, 2003, 05:55:58 AM
u can do this way with download button.
Title: making an image a link?
Post by: Chris on March 02, 2003, 06:10:21 AM
Yes, when the image is uploaded, set the download URL to the location you want.
Title: making an image a link?
Post by: Shap on March 02, 2003, 07:50:56 AM
cool, i see that, I guess my next question would be, is it possible to use a different image for the download button, in just one catagorie?

thanks guys
Title: making an image a link?
Post by: V@no on March 02, 2003, 07:20:04 PM
Quote from: Shap
is it possible to use a different image for the download button, in just one catagorie?


Try this:
Open /includes/functions.php
Find:
Code: [Select]
   $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";

Replace with:
Code: [Select]
   $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image(($image_row['cat_id'] == XXXXX) ? "YOUR_IMAGE.GIF" : "download.gif")."\" border=\"0\" alt=\"\" /></a>";


Replace XXXXX to number of your category
And YOUR_IMAGE.GIF to your image name.
Title: making an image a link?
Post by: Shap on March 02, 2003, 08:49:41 PM
worked like a charm!!

Thanks again!