Author Topic: Link {image_name} same way as {thumbnail} link in thumbnail_bit.html  (Read 5778 times)

0 Members and 1 Guest are viewing this topic.

Offline Eagle Eye

  • Full Member
  • ***
  • Posts: 191
    • View Profile
How can we add a link to the thumbnail name {image_name} made by template file thumbnail_bit.html same way as the link {thumbnail} gets when the page loads  :?
« Last Edit: May 22, 2006, 03:29:07 PM by maxpaul »

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
Re: Link {image_name} same was {thumbnail} in thumbnail_bit.html
« Reply #1 on: May 21, 2006, 10:41:26 PM »
try this:
in includes/functions.php find:
Code: [Select]
  $site_template->register_vars(array(
    "image_id" => $image_row['image_id'],
Insert above:
Code: [Select]
  if (check_permission("auth_viewimage", $image_row['cat_id']) && check_permission("auth_viewcat", $image_row['cat_id']))
  {
    $image_url = $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&mode=".$mode : ""));
  }
  else
  {
    $image_url = "";
  }
  $site_template->register_vars("image_details_url", $image_url);
Then you can use {image_details_url} in thumbnail_bit.html template.
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 Eagle Eye

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Re: Link {image_name} same was {thumbnail} in thumbnail_bit.html
« Reply #2 on: May 22, 2006, 03:28:31 PM »
WOW :D it works perfect!!!!

Thanks V@no  8)

Offline khansahib

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Link {image_name} same way as {thumbnail} link in thumbnail_bit.html
« Reply #3 on: December 03, 2010, 05:13:05 PM »
Thanks V@no  :)