4images Modifications / Modifikationen > Templates & Styles (Requests & Discussions)
Link/bordercolor around thumbnails?
mawenzi:
--- Quote from: technobia on April 12, 2006, 04:55:22 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?
...
--- End quote ---
... 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: ---...
$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)) ? "&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)) ? "&mode=".$mode : ""))."\">".$thumb."</a>";
...
--- End code ---
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)) ? "&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)) ? "&mode=".$mode : ""))."\">".$thumb."</a> </td></tr></table>";
...
--- End quote ---
configuration :
- cellpadding=\"2\" - your bordersize
- bgcolor=\"#FF0000\" - your bordercolor
- in APC set image border - 0
mawenzi
alekseyn1:
--- Quote from: mawenzi on May 22, 2006, 11:38:21 AM ---
--- Quote from: technobia on April 12, 2006, 04:55:22 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?
...
--- End quote ---
... 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: ---...
$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)) ? "&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)) ? "&mode=".$mode : ""))."\">".$thumb."</a>";
...
--- End code ---
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)) ? "&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)) ? "&mode=".$mode : ""))."\">".$thumb."</a> </td></tr></table>";
...
--- End quote ---
configuration :
- cellpadding=\"2\" - your bordersize
- bgcolor=\"#FF0000\" - your bordercolor
- in APC set image border - 0
mawenzi
--- End quote ---
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)
KurtW:
--- Code: --- 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)) ? "&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)) ? "&mode=".$mode : ""))."\">".$thumb."</a>\n";
$thumb .= "</td></tr></table>\n";
}
}
return $thumb;
--- End code ---
Kurt
alekseyn1:
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: --- 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)) ? "&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)) ? "&mode=".$mode : ""))."\">".$thumb."</a></td></tr></table>";
}
}
return $thumb;
}
--- End code ---
Thanks a lot for your help!
niad:
It works great, thank you! :D
Navigation
[0] Message Index
[*] Previous page
Go to full version