Author Topic: making an image a link?  (Read 5379 times)

0 Members and 1 Guest are viewing this topic.

Offline Shap

  • Full Member
  • ***
  • Posts: 114
    • View Profile
making an image a link?
« 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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
making an image a link?
« Reply #1 on: March 02, 2003, 05:55:58 AM »
u can do this way with download button.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Chris

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.487
  • Did u ever stop to think and then forget to start?
    • View Profile
making an image a link?
« Reply #2 on: March 02, 2003, 06:10:21 AM »
Yes, when the image is uploaded, set the download URL to the location you want.

Offline Shap

  • Full Member
  • ***
  • Posts: 114
    • View Profile
making an image a link?
« Reply #3 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

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
making an image a link?
« Reply #4 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.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Shap

  • Full Member
  • ***
  • Posts: 114
    • View Profile
making an image a link?
« Reply #5 on: March 02, 2003, 08:49:41 PM »
worked like a charm!!

Thanks again!