Author Topic: Thumbnail link  (Read 2629 times)

0 Members and 1 Guest are viewing this topic.

Offline fah

  • Newbie
  • *
  • Posts: 20
    • View Profile
Thumbnail link
« on: January 24, 2008, 07:38:45 PM »
Where I can change thumbnail URL?

This is a source code of thumbnail:

<a href="./details.php?image_id=12"><img src="./data/thumbnails/1/1.jpg" border="1" width="140" height="140" alt="Test image" /></a><br />
<b>Test image</b> <sup class="new">new</sup> (<a href="./member.php?action=showprofile&amp;user_id=1">admin</a>)
<br />
<a href="./categories.php?cat_id=1">Test category</a><br />
Comments: 0<br />
<a href="index.php?action=addtolightbox&amp;id=12"><img src="./templates/default/images_english/lightbox_no.gif" border="0" alt="" /></a>


The URL, which I would like to change (eg. add CLASS or STYLE parameter) is bolded above. Please help.

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Thumbnail link
« Reply #1 on: January 24, 2008, 07:59:45 PM »
Hi,

you can found the code in:
includes/functions.php

Code: [Select]
function get_thumbnail_code($media_file_name, $thumb_file_name = "", $image_id, $cat_id, $image_name = "", $mode = "", $show_link = 1, $open_window = 0) {
  global $site_sess, $config;

  if (!check_media_type($media_file_name)) {
    $thumb = "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
  }
  else {
    if (!get_file_path($thumb_file_name, "thumb", $cat_id, 0, 0)) {
      $file_src = ICON_PATH."/".get_file_extension($media_file_name).".gif";
      $image_info = @getimagesize($file_src);
      $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      $thumb = "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" />";
    }
    else {
      $file_src = get_file_path($thumb_file_name, "thumb", $cat_id, 0, 1);
      $image_info = @getimagesize($file_src);
      $width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      $thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
    }
  }

  if ($show_link) {
    if ($open_window) {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
    }
    elseif ($mp3) {
      $thumb = "".$thumb."";
    }
    else {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>";
    }
  }
  return $thumb;
}


Kurt