Author Topic: Link/bordercolor around thumbnails?  (Read 38739 times)

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Link/bordercolor around thumbnails?
« Reply #15 on: May 22, 2006, 11:38:21 AM »
...
REF mawenzi's post:
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> < ... here your thumb-code ..> </td></tr></table>";
...
Where does the red code go exactly?
...

... that means ...

find your original thumb-code ( 5 x $thumb ) in functions.php :
( e.g. the following ... ! it's your thumb-code ... ! my code looks differently ... ! therefore the general code like above ... !)
Code: [Select]
...
$thumb = "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
...
$thumb = "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" />";
...
$thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
...
$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>";
...
$thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>";
...

should be changed as follows :

Quote
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" /> </td></tr></table>";
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" /> </td></tr></table>";
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" /> </td></tr></table>";
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <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> </td></tr></table>";
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a> </td></tr></table>";
...

configuration :
- cellpadding=\"2\"  -  your bordersize
- bgcolor=\"#FF0000\" - your bordercolor
- in APC set image border - 0

mawenzi

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline alekseyn1

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • My Project
Re: Link/bordercolor around thumbnails?
« Reply #16 on: December 22, 2007, 12:32:55 PM »
...
REF mawenzi's post:
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> < ... here your thumb-code ..> </td></tr></table>";
...
Where does the red code go exactly?
...

... that means ...

find your original thumb-code ( 5 x $thumb ) in functions.php :
( e.g. the following ... ! it's your thumb-code ... ! my code looks differently ... ! therefore the general code like above ... !)
Code: [Select]
...
$thumb = "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
...
$thumb = "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" />";
...
$thumb = "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
...
$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>";
...
$thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>";
...

should be changed as follows :

Quote
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" /> </td></tr></table>";
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" /> </td></tr></table>";
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" /> </td></tr></table>";
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <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> </td></tr></table>";
...
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> <a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a> </td></tr></table>";
...

configuration :
- cellpadding=\"2\"  -  your bordersize
- bgcolor=\"#FF0000\" - your bordercolor
- in APC set image border - 0

mawenzi




Well, this modification does not really work. I think you have forgotten "<" right after "$thumb =" in every instance of your code.
The problem is even if I correct it and put the "<" it makes a border, but it's not clickable... after some code diggin' found out that something funny was happening with nested tables... Unfortunately I do not know enough about the code to correct it... Please help... (example http://kristina.napolskih.com)
« Last Edit: December 22, 2007, 12:56:01 PM by alekseyn1 »

Offline KurtW

  • 4images Guru
  • *******
  • Posts: 2.778
    • View Profile
    • Malediven-Bilder ~~Dreams~~
Re: Link/bordercolor around thumbnails?
« Reply #17 on: December 22, 2007, 01:01:42 PM »
Code: [Select]
  if ($show_link) {
    if ($open_window) {
      $thumb = "<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#ffc0cb\">\n";
      $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>\n";
      $thumb .= "</td></tr></table>\n";
    }
    else {
      $thumb = "<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#ffc0cb\">\n";
      $thumb .= "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>\n";
      $thumb .= "</td></tr></table>\n";
    }
  }
  return $thumb;


Kurt

Offline alekseyn1

  • Full Member
  • ***
  • Posts: 102
    • View Profile
    • My Project
Re: Link/bordercolor around thumbnails?
« Reply #18 on: December 22, 2007, 01:47:36 PM »
Thanks very much Kurt  :D

Your multiple line code did not work for me as well (could be a bug in "hands.sys"  :lol:)

in any case this is the code that worked:

Code: [Select]
  if ($show_link) {
    if ($open_window) {
      $thumb = "<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#ffc0cb\"><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></td></tr></table>";
    }
    else {
      $thumb = "<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#ffc0cb\"><a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a></td></tr></table>";
    }
  }
  return $thumb;
}

Thanks a lot for your help!

Offline niad

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Re: Link/bordercolor around thumbnails?
« Reply #19 on: December 28, 2015, 12:38:33 PM »
It works great, thank you! :D
I love 4images, it is really great work!