4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
February 22, 2018, 01:44:29 PM

Login with username, password and session length
Search:     Advanced search
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Templates & Styles (Requests & Discussions) (Moderator: Rembrandt)
| | |-+  Link/bordercolor around thumbnails?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: «« « 1 [2] Print
Author Topic: Link/bordercolor around thumbnails?  (Read 23371 times)
mawenzi
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4500

Thank You
-Given: 36
-Receive: 121


View Profile
« 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 ... !)
1
2
3
4
5
6
7
8
9
10
11
...
$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  [Expand]
...
$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

Logged

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) ...
alekseyn1
Full Member
***
Offline Offline

Posts: 102

Thank You
-Given: 13
-Receive: 9


View Profile WWW
« 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 ... !)
1
2
3
4
5
6
7
8
9
10
11
...
$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  [Expand]
...
$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 » Logged

KurtW
4images Guru
*******
Offline Offline

Posts: 2778

Thank You
-Given: 0
-Receive: 8


View Profile WWW
« Reply #17 on: December 22, 2007, 01:01:42 PM »

1
2
3
4
5
6
7
8
9
10
11
12
13
  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
Logged

alekseyn1
Full Member
***
Offline Offline

Posts: 102

Thank You
-Given: 13
-Receive: 9


View Profile WWW
« Reply #18 on: December 22, 2007, 01:47:36 PM »

Thanks very much Kurt  Very Happy

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

in any case this is the code that worked:

1
2
3
4
5
6
7
8
9
10
  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!
Logged

niad
Jr. Member
**
Offline Offline

Posts: 80

Thank You
-Given: 31
-Receive: 2


View Profile
« Reply #19 on: December 28, 2015, 12:38:33 PM »

It works great, thank you! Very Happy
Logged

I love 4images, it is really great work!
Pages: «« « 1 [2] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.119 seconds with 19 queries.
Post your comments here