4images Forum & Community
4images Modifications / Modifikationen => Templates & Styles (Requests & Discussions) => Topic started by: tobz on March 12, 2003, 02:53:20 PM
-
I have changed my link and visited link colors and it worked but I still have a blue link color and a purple visited color around my thumbnail images, how do I change this? I have tried the css and header file but with no luck.
Thanks in advance...
Tobias
-
Check inside thumbnail_bit.html
-
i'm having difficulty changing the border color around the thumbnails. this is what i have in my thumbnail_bit.html:
<!-- you wish detail page in a small javascript open window, use {thumbnail_openwindow} -->
{thumbnail}<br />
<b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new}
<br />
<a href="{cat_url}">{cat_name}</a><br />
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}<br />
i do not see where to change the border. help finding where i need to do this would be greatly appreciated. thanks.
-
find in /includes/functions.php all thumbnail-codes (similar like) :
$thumb = "< ... here your thumb-code ... >";
and replace every (and similar) by :
$thumb = "<table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\">< ... here your thumb-code ... ></td></tr></table>";
configuration :
- cellpadding=\"2\" - your bordersize
- bgcolor=\"#FF0000\" - your bordercolor
- in APC set image border - 0
mawenzi
PS.: We all use other thumb-code-versions, therefore the new general representation of the thumbnail-code !
« Letzte Änderung: 24.11.2005 um 19.18 von mawenzi »
-
am i only to replace the EXACT code (the first mentioned), or do i replace ALL that look remotely similar?
i tried it, and it just gave me errors on line 328 and such. ??? meh. it's not a big deal, but my thumbnails would look nicer with a border.
thanks for the help. :)
-
Try again, I've updated mawenzi's post above, there was a little misstake ;)
-
i did that and got the following error:
Fatal error: Call to undefined function: multilang() in /home/realeyes/public_html/4images/includes/functions.php on line 333
so i just took out the multilang() and it worked fine, so if you could please edit that code again for others that would be great.
thank you both very much. :mrgreen:
-
ok, fixed again...:?
-
ok ... my mistake ... I did not take the original thumb code ... :?
thanks V@no for the correction ... !
-
ut-oh. i just realized that now the link doesn't work on the thumbnails. you hover over the thumbnail and the url shows up in the status window but it doesn't go anywhere when you click on them. :?: ah, so complicated.
-
ok, now I fixed again ... :wink:
mawenzi
-
Hi!
I have the nice white border but also cannot click on the pictures... :roll:
Can you help me?
Thanks!
:oops:
-
you only add the table code (red code) to your $thumb - tag ?
for a fresh 4images functions.php it should look like this ...
if ($show_link) {
if ($open_window) {
$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>";
}
else {
$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>";
}
}
-
Is this the procedure good for ver. 1.7.2? My thumbnail borders are the standard normal (blue) and visited (purple) link color. I would therfore assume this would be controled by a stylesheet but I have not had luck with that apporch. Then I found this post but I am sure I understand what code to put where.
REF mawenzi's post:
$thumb = "table cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td bgcolor=\"#FF0000\"> < ... here your thumb-code ..> ></td></tr></table>";
Below is all the code that appears to be related to thumbnails in my includes/functions.php Where does the red code go exactly? Is there a way to use the a.link, a.hover, a.visited colors as one might in a css file?
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)) ? "&mode=".$mode : ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
}
else {
$thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&mode=".$mode : ""))."\">".$thumb."</a>";
}
}
return $thumb;
}
Thanks - Technobia
-
I would like to know too! :?:
-
...
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 ... !)
...
$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>";
...
should be changed as follows :
...
$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>";
...
configuration :
- cellpadding=\"2\" - your bordersize
- bgcolor=\"#FF0000\" - your bordercolor
- in APC set image border - 0
mawenzi
-
...
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 ... !)
...
$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>";
...
should be changed as follows :
...
$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>";
...
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 (http://kristina.napolskih.com))
-
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;
Kurt
-
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:
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;
}
Thanks a lot for your help!
-
It works great, thank you! :D