4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Harry on April 13, 2003, 08:20:47 PM

Title: [Mod] DropShadow on thumbnails
Post by: Harry on April 13, 2003, 08:20:47 PM
Quote from: V@no
I thought those thumbnails were made by external software, not by server-side...
anyway I did test the shadow script u sent me, and...well...it kills my Apache server...litterely...
I have asked the author of that class and he'll look into it.


That's funny, I stumbled on this topic, but no-one ever bothered to ask me, the webmaster of the site how it was done. It's interesting to read your discussion about this but the solution is much simpler:


I added the following to the css files (I use many different CSS for every category etc):

Code: [Select]
.pic {filter: progid:DXImageTransform.Microsoft.Shadow(color=#AF4800,direction=135, strength=5)
   progid:DXImageTransform.Microsoft.Alpha(opacity=100);
   border: 0;}


Then wherever the picture is defined (cannot find it now, though it was in thumbnail bit but it isn't), I added the class="pic" part, that's all  8)

Will probably only work in IE6+, but who cares, 90 use IE6+ and the rest will never knw it was there...

But I am glad you liked it 8)
Title: [Mod] DropShadow on thumbnails
Post by: Harry on April 13, 2003, 08:29:33 PM
small update:

it was changed in functions.php
Change

Code: [Select]
    $thumb = "<img


into

Code: [Select]
    $thumb = "<img class=\"pic\"


 8)
Title: [Mod] DropShadow on thumbnails
Post by: V@no on April 14, 2003, 12:08:17 AM
Quote from: Harry
That's funny, I stumbled on this topic, but no-one ever bothered to ask me, the webmaster of the site how it was done.

that was funny! :lol:

I have tryed a few weeks ago do the same thing, but it didnt work at all...I might massed something up...
Title: [Mod] DropShadow on thumbnails
Post by: Xwall on April 15, 2003, 03:33:58 PM
it´s perfect :D
Title: [Mod] DropShadow on thumbnails
Post by: Harry on April 15, 2003, 03:41:23 PM
Quote from: Xwall
it´s perfect :D


Thanks  8)

Just a little assurance for everybody who's interested: the thumbnails themselves are not changed in any way, just the way they are shown on the screen...

Harry
Title: [Mod] DropShadow on thumbnails
Post by: V@no on April 15, 2003, 07:39:17 PM
Is there a way make shadows half transparent?
Title: [Mod] DropShadow on thumbnails
Post by: Harry on April 15, 2003, 07:48:36 PM
Quote from: V@no
Is there a way make shadows half transparent?


It's been a while since I played around wity the CSS etc, but I think you can just adjust the Opacity if you use my CSS. (0 =invisible, 100 is fully visible)

Or just do a google search for more possibilities: filter, CSS, shadow..

Hope this helps!
 8)
Title: Can you teach me How to make it??
Post by: jackie911 on April 16, 2003, 02:20:30 PM
I'm a stupid guy, Can you teach me with details ??

 :wink:

Quote from: Harry
Quote from: V@no
Is there a way make shadows half transparent?


It's been a while since I played around wity the CSS etc, but I think you can just adjust the Opacity if you use my CSS. (0 =invisible, 100 is fully visible)

Or just do a google search for more possibilities: filter, CSS, shadow..

Hope this helps!
 8)
Title: [Mod] DropShadow on thumbnails
Post by: SLL on April 16, 2003, 03:10:50 PM
Quote from: V@no
Is there a way make shadows half transparent?

Unfortunatelly,  MSDN says "no" (http://msdn.microsoft.com/library/default.asp?url=/workshop/author/filter/reference/filters/shadow.asp)
Very nice solution, though, and it works. One remark: only first line is needed, like this:
Code: [Select]
.pic {filter: progid:DXImageTransform.Microsoft.Shadow(color=#000000, direction=135, strength=2)}
All other lines apply to the whole thumb, and there's no need to make it transparent or blur. You could also try another filter - DropShadow - maybe it looks better for you.
Title: [Mod] DropShadow on thumbnails
Post by: Harry on April 16, 2003, 03:15:38 PM
@SSL: you are right, the other part is for making the pic transparent (if you would want that).
But you can create a semitransparent look bij choosing a light color

@ Jackie: I probably could, but have no time!
I have expeditions to organise   8) and my site to update...  :roll:
 
I am no coder myself and just read some online tutorials about CSS, so just do a search and try things out..

Good luck,
Harry
Title: Thanks !!
Post by: jackie911 on April 16, 2003, 03:22:06 PM
If you have time, please teach me.
It is because I'm the beginner of 4images.

Thank you again.

 :lol:

Quote from: Harry
@SSL: you are right, the other part is for making the pic transparent (if you would want that).
But you can create a semitransparent look bij choosing a light color

@ Jackie: I probably could, but have no time!
I have expeditions to organise   8) and my site to update...  :roll:
 
I am no coder myself and just read some online tutorials about CSS, so just do a search and try things out..

Good luck,
Harry
Title: Re: Thanks !!
Post by: Harry on April 16, 2003, 03:27:30 PM
Quote from: jackie911
If you have time, please teach me.
It is because I'm the beginner of 4images.
Thank you again.

 :lol:


If I would have time I would work on my site first  :wink:
Most of my mods are to be found on this forum, so read that first.

If you need more time from me, you will have to buy it by signing up for a Kilimanjaro trip first  8)

Any detailed question I will be glad to help with as you can read in my posts.

Good luck,
Harry
Title: Re: Thanks !!
Post by: jackie911 on April 16, 2003, 03:30:21 PM
Really !!

I search it by myself.

 :D  

Quote from: Harry
Quote from: jackie911
If you have time, please teach me.
It is because I'm the beginner of 4images.
Thank you again.

 :lol:


If I would have time I would work on my site first  :wink:
Most of my mods are to be found on this forum, so read that first.

If you need more time from me, you will have to buy it by signing up for a Kilimanjaro trip first  8)

Any detailed question I will be glad to help with as you can read in my posts.

Good luck,
Harry
Title: Re: Thanks !!
Post by: jackie911 on April 16, 2003, 04:57:43 PM
Done !!
http://album.barndisco.com

 :lol:

Quote from: jackie911
Really !!

I search it by myself.

 :D  

Quote from: Harry
Quote from: jackie911
If you have time, please teach me.
It is because I'm the beginner of 4images.
Thank you again.

 :lol:


If I would have time I would work on my site first  :wink:
Most of my mods are to be found on this forum, so read that first.

If you need more time from me, you will have to buy it by signing up for a Kilimanjaro trip first  8)

Any detailed question I will be glad to help with as you can read in my posts.

Good luck,
Harry
http://
Title: [Mod] DropShadow on thumbnails
Post by: Harry on April 16, 2003, 05:12:13 PM
Well, that wasn't too difficultafter all, right?
You migjht want to change the color of the shadow as this color (The "color=#AF4800" part)was good for my Kilimanjaro CSS, but it does not match your site.

You can use http://www.boogiejack.com/colorpop.html to find the right code for your color, I would choose someting like #000060 or so...

good luck,
Harry
Title: Thanks a lot !!
Post by: jackie911 on April 16, 2003, 05:47:28 PM
Thanks a lot !!

 :lol:


Quote from: Harry
Well, that wasn't too difficultafter all, right?
You migjht want to change the color of the shadow as this color (The "color=#AF4800" part)was good for my Kilimanjaro CSS, but it does not match your site.

You can use http://www.boogiejack.com/colorpop.html to find the right code for your color, I would choose someting like #000060 or so...

good luck,
Harry
Title: Error Message after modification
Post by: theMoonPrincess on April 18, 2003, 07:03:26 PM
I tried modifying my functions.php to enable dropshadow but got an error message. Is this script incompatible with the pop up message alert for guests that i've earlier modified?

I would like to hear from people who have installed this script and what they did to make this work.

thanks.

theMoonPrincess
Title: help a php dummy
Post by: maile808 on June 08, 2003, 07:30:27 PM
Quote from: Harry
small update:

it was changed in functions.php
Change

Code: [Select]
    $thumb = "<img


into

Code: [Select]
    $thumb = "<img class=\"pic\"


 8)


I need some help in this department.  In functions.php, how would I apply the code above?  I must be doing something wrong, because I receive errors when adding the class to:

Quote
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($dummy);
      $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>";
    }
    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;
}


Thanks!
Title: Got it to work!
Post by: maile808 on June 08, 2003, 08:05:17 PM
woops, thanks V@no.  I, too, thought that was it at first, but it wasn't.  I finally got it to work...My blind eyes didn't see an extra "<" when I applied the  img class=\"pic\"  to :

Code: [Select]

$thumb = "<img class=\"pic\" img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" /> ";
   
    }
  }

 :oops:
Title: Re: Got it to work!
Post by: V@no on June 08, 2003, 08:11:38 PM
Quote from: maile808
woops, thanks V@no.  I, too, thought that was it at first, but it wasn't.
hmmm...I thought I deleted my post before u read it...It was a mistake. :oops:

Quote from: maile808
$thumb = "<img class=\"pic\" img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" /> ";
I think it should be like this:
Quote
$thumb = "<img class=\"pic\" src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" /> ";
Title: [Mod] DropShadow on thumbnails
Post by: fanncy pants on June 08, 2003, 08:15:35 PM
Ooh, thanks for posting, Maile808 & V@no!  I don't need to post my question anymore.  :wink:  Thanks!
Title: [Mod] DropShadow on thumbnails
Post by: Lucifix on June 29, 2003, 11:17:43 PM
Quote
.pic {filter: progid:DXImageTransform.Microsoft.Shadow(color=#AF4800,direction=135, strength=5)
   progid:DXImageTransform.Microsoft.Alpha(opacity=100);
   border: 0;}


In which file should i add this?
Title: [Mod] DropShadow on thumbnails
Post by: SLL on June 30, 2003, 08:04:59 AM
Quote from: Lucifix1
In which file should i add this?

style.css
Title: Re: [Mod] DropShadow on thumbnails
Post by: earthlyk on March 12, 2005, 04:07:00 PM
This .pic just work fine in IE, but don't work in FireFox. Could someone tell me how to change the css code ?

Thanks.
Title: Re: [Mod] DropShadow on thumbnails
Post by: Chris on March 12, 2005, 09:54:23 PM
The css code is an Internet Explorer ONLY trick.  There is no w3c web standard to do what that Microsoft filter does.  Therefore there is no CSS solution
Title: Re: [Mod] DropShadow on thumbnails
Post by: earthlyk on March 13, 2005, 05:01:54 PM
Thanks Chris, now I see.
Title: Re: [Mod] DropShadow on thumbnails
Post by: eshpro on March 22, 2005, 06:30:19 AM
Is there way i can add shodow to images instead of thumbnails?
Title: Re: [Mod] DropShadow on thumbnails
Post by: V@no on March 22, 2005, 07:38:08 AM
just use same code in templates from templates/<yourtemplate>/media/ folder
Title: Re: [Mod] DropShadow on thumbnails
Post by: getcom on March 29, 2005, 01:51:20 AM
There is a way of adding shadows so they can be seen in firefox as well as IE using html and css. If anyone is interested let me know and I'll post it.
Title: Re: [Mod] DropShadow on thumbnails
Post by: V@no on March 29, 2005, 02:04:51 AM
There is a way of adding shadows so they can be seen in firefox as well as IE using html and css. If anyone is interested let me know and I'll post it.
why not just post it ;)
Title: Re: [Mod] DropShadow on thumbnails
Post by: getcom on April 09, 2005, 04:48:10 PM
Dropdown shaddows for IE and Firefox.

Add this to the end of your style.css file

Quote
.ds_right   { background: url(images/ds_right.jpg) no-repeat }
.ds_corner  { background: url(images/ds_corner.jpg) no-repeat center }
.ds_bottom   { background: url(images/ds_bottom.jpg) no-repeat left  }



The code for your content in your template files is:

Quote
<table border="0" cellspacing="0" cellpadding="0"><tr><td>

{thumbnail} NOTE THIS CAN BE ANY CONTENT NOT JUST {thumbnail}. TRY IT WITH {image} OR ANYTHING

</td><td valign="top" width="7" class="ds_right" ></td></tr><tr height="7"><td align="left" height="7" class="ds_bottom" ></td><td width="7" height="7" class="ds_corner"></td></tr></table>


Download the images. You can change these to something else if you wish

d_shaddow_images.zip (http://www.rentthisnow.com/images/d_shaddow_images.zip)

Unzip them to your template/image folder.


Now all you have to do is add the above table to your template files anywhere you want a dropshaddow.

Hope this helps
Title: Re: [Mod] DropShadow on thumbnails
Post by: police22 on April 28, 2005, 06:12:46 AM
Just installed this little mod on my site.. works pretty good..
Thanks Harry  :D
Title: Re: [Mod] DropShadow on thumbnails
Post by: toroslar on June 03, 2005, 04:34:10 PM
I am sorry ... I did not understand this subject. I did them but not see. who can tell me all thing to do by order, plesase ...I am happy İf you send instructions to my e-mail adress ...thanks..
my e-mail adres : info@toroslar.org
Title: Re: [Mod] DropShadow on thumbnails
Post by: IzyB on July 30, 2005, 05:45:31 AM
Is the original Mod not located in this thread? This thread just isn't making sense to me...there doesn't really seem to be an actual full mod listed here. Can someone post the mod entirely please? Thank you! :)

Tina
Title: Re: [Mod] DropShadow on thumbnails
Post by: V@no on July 30, 2005, 06:54:23 AM
I dont know how could u miss the very first message of this topic...
Title: Re: [Mod] DropShadow on thumbnails
Post by: IzyB on July 30, 2005, 08:10:20 PM
I dont know how could u miss the very first message of this topic...

No, I did see the first message and did try it just as it was stated and nothing worked. I do have IE6. I tried for 30 mins.+ to get it to work last night.
Title: Re: [Mod] DropShadow on thumbnails
Post by: V@no on July 30, 2005, 09:14:10 PM
on the first page it also says what to change in functions.php
Title: Re: [Mod] DropShadow on thumbnails
Post by: JensF on October 22, 2005, 12:53:09 AM
small update:

it was changed in functions.php
Change

Code: [Select]
    $thumb = "<img


into

Code: [Select]
    $thumb = "<img class=\"pic\"

 8)

When i do this, i become a blank page....can anyone help me??
Title: Re: [Mod] DropShadow on thumbnails
Post by: bibabobu on November 25, 2005, 09:56:05 PM
Salut,

perhaps i am too stupid. I have read this whole MOD thread for three times. But i don't know what i am doing wrong.
I added the pics code to the style.css like explanation of the first posting.
Also i added the following code to my functions.php in one line.
Code: [Select]
$thumb = "<img src=\"".$file_src."\" ".(($show_link) ? "" : "onClick=\"alert('".$lang['members_only']."'); \"")."border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
But i cannot see any dropshadow on my thumbnails.
What i am doing wrong or did i forget something to add?
 :roll:
Title: Re: [Mod] DropShadow on thumbnails
Post by: Anderson on July 23, 2007, 06:07:17 AM
I inserted the 1st. code inside style.css and I changed functions.php but it didn't work out...
Did I miss anything?
Title: Re: [Mod] DropShadow on thumbnails
Post by: getcom on November 11, 2007, 09:29:40 PM
Hi Anderson

I think Harry's mod only works with IE. Mine (top of page 3) works for all browsers and you can also have a dropdown shadow on anything you like, not just the images.

Getcom

Title: Re: [Mod] DropShadow on thumbnails
Post by: jojomart on December 13, 2007, 06:46:44 AM
Hey guys, I found a javascript that will make your images have a drop shadow in both IE and FireFox - all you have to do is put it in the header.html file before the closing </head> code:

Code: [Select]
<script type="text/javascript">

var gradientshadow={}
gradientshadow.depth=6 //Depth of shadow in pixels
gradientshadow.containers=[]

gradientshadow.create=function(){
var a = document.all ? document.all : document.getElementsByTagName('*')
for (var i = 0;i < a.length;i++) {
if (a[i].className == "shadow") {
for (var x=0; x<gradientshadow.depth; x++){
var newSd = document.createElement("DIV")
newSd.className = "shadow_inner"
newSd.id="shadow"+gradientshadow.containers.length+"_"+x //Each shadow DIV has an id of "shadowL_X" (L=index of target element, X=index of shadow (depth)
if (a[i].getAttribute("rel"))
newSd.style.background = a[i].getAttribute("rel")
else
newSd.style.background = "black" //default shadow color if none specified
document.body.appendChild(newSd)
}
gradientshadow.containers[gradientshadow.containers.length]=a[i]
}
}
gradientshadow.position()
window.onresize=function(){
gradientshadow.position()
}
}

gradientshadow.position=function(){
if (gradientshadow.containers.length>0){
for (var i=0; i<gradientshadow.containers.length; i++){
for (var x=0; x<gradientshadow.depth; x++){
  var shadowdiv=document.getElementById("shadow"+i+"_"+x)
shadowdiv.style.width = gradientshadow.containers[i].offsetWidth + "px"
shadowdiv.style.height = gradientshadow.containers[i].offsetHeight + "px"
shadowdiv.style.left = gradientshadow.containers[i].offsetLeft + x + "px"
shadowdiv.style.top = gradientshadow.containers[i].offsetTop + x + "px"
}
}
}
}

if (window.addEventListener)
window.addEventListener("load", gradientshadow.create, false)
else if (window.attachEvent)
window.attachEvent("onload", gradientshadow.create)
else if (document.getElementById)
window.onload=gradientshadow.create

</script>

You can see it in action at my site http://www.wallpaper-downloads.info

Joanne
Title: Re: [Mod] DropShadow on thumbnails
Post by: Boatswain on September 17, 2008, 12:06:36 PM
just use same code in templates from templates/<yourtemplate>/media/ folder

Hello,

Dropshadow on thumbs is working fine but I can't get it to work for the picture.
What and where exactly do I have to add to the templates?

Quote:    edit /templates/<yourtemplate>/media/jpg.html
              add this class:
              class="pic"

Template jpg.html:

<!-- Template file for JPG Files -->
<img src="{media_src}" border="0" alt="{image_name}"{width_height} /><br />

What do I have to add/change in this template ?

thanks

Title: Re: [Mod] DropShadow on thumbnails
Post by: mawenzi on September 17, 2008, 02:25:29 PM
... this should work ...
Code: [Select]
<span class="pic"><img src="{media_src}" border="0" alt="{image_name}"{width_height} /></span>
Title: Re: [Mod] DropShadow on thumbnails
Post by: Boatswain on September 17, 2008, 04:03:44 PM
... this should work ...
Code: [Select]
<span class="pic"><img src="{media_src}" border="0" alt="{image_name}"{width_height} /></span>

No, still no drop shadow   :(
Title: Re: [Mod] DropShadow on thumbnails
Post by: V@no on September 18, 2008, 02:09:23 AM
hmmmm maybe
Code: [Select]
<img src="{media_src}" border="0" alt="{image_name}"{width_height} class="pic" />?
Title: Re: [Mod] DropShadow on thumbnails
Post by: Boatswain on September 18, 2008, 11:52:57 AM
hmmmm maybe
Code: [Select]
<img src="{media_src}" border="0" alt="{image_name}"{width_height} class="pic" />?

Yes, it works now !!  :D Thanks again V@no  :thumbup:

One more question: Is it possible to make the shadow border wider/thicker ? 

Update:

I found it in css add:  strength=20

Thanks again  :D