![]() |
Rounded avatars, profile pictures and attachment thumbnails
Description:
Rounded Avatar & Image Effects allows you to add rounded corners (and also shading and shadow) to avatars and images on your forums. It uses unobtrusive javascript to keep your code clean. It works in all the major browsers - Mozilla Firefox 1.5+, Opera 9+, Safari and IE6+. This modification is a nice addition to all of you, who want your forums to have a nice Web2.0 effect. Installation: 1. Upload the attached corner.js to your clientscript directory 2. In your header template, find: Code:
<!-- content table --> Code:
<script type="text/javascript" src="clientscript/corner.js"></script> 3. In your postbit_legacy template, find Code:
<div class="smallfont"> Code:
<div class="smallfont"> Note that you can alter the javascript classes to suit your needs. If you want a shadow in your avatars/profile pics you may add ishadowXX to the class, so it may become: class="corner iradius10 ishadow25". It is very flexible and you can tweak it as much as you want. v.1.01 added rounded effects for attachment thumbnails v.1.0 Initial release Credits for this modification go out to CVI Lab for the original javascript. I just made it to work for vBulletin Enjoy, Val. |
Here are the additional changes for postbit template, memberprofile, memberlist and profile picture
In your postbit template, find Code:
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> Code:
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" class="corner iradius10" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> Code:
<td><img src="$userinfo[avatarurl]" $userinfo[avatarsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td> Code:
<td><img src="$userinfo[avatarurl]" $userinfo[avatarsize] class="corner iradius10" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" /></td> Code:
<if condition="$show['avatarcol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['avatar']"><img src="$avatarurl" border="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /><else /> </if></td></if> Code:
<if condition="$show['avatarcol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['avatar']"><img src="$avatarurl" class="corner iradius10" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" /><else /> </if></td></if> Code:
<img src="$userinfo[profilepicurl]" $userinfo[profilepicsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /> Code:
<img src="$userinfo[profilepicurl]" $userinfo[profilepicsize] class="corner iradius10" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" /> Code:
class="thumbnail" Code:
class="thumbnail corner iradius10" |
This is very nice, but it has one single problem. It destroys animated avatars.
Thanks. :) |
Quote:
|
Ah!! It was almost great... any way to keep those gifs away from these action? I can't leave my animations.
|
I don't think this javascript works for animated gifs.
But hey someone might find it useful though. ;) |
Absolutely. I didn't mean to dishonor your work. This hack is very cool, I just don't have use for it, because I have animated gifs as avatars on my website. :)
|
Quote:
|
Nice, I think I'll add this to my forum :)
Thanks valdet oh, just seen it's for 3.6, will this work in 3.7 ? thanks |
i don't understand how i can shadow it
|
Quote:
In your postbit_legacy search for $vbphrase[xs_avatar] , because there is only one instance of this phrase and do the replace accordingly between the <div> ...... </div> tags. Same goes with other templates too where you want to tweak the avatars. For profile picture look for phrase $vbphrase[xs_picture]. I am sure it will work. Quote:
In my replacements, all you need to do is add the ishadowXX (XX is a number) to the javascript class. Example if you need to add shadows in postbit_legacy you would use this replacement: Code:
<div class="smallfont"> The result: http://img182.imageshack.us/img182/6...owedfi9.th.png Cheers, Val. |
thanks vaLdet, i understand now : )
its very nice |
Superb find. thx.
|
valdet,
pershendetje edhe urime per kete script... kam nevoje per ndonje script qe mund te mi zvogeloje automatikisht avataret ne 80x80 pixel, edhe pse custom avatars mund te jene te medhej, automatikisht te zvogelohen ne 80x80 |
very nice dude
i´ll use it but i´ll edit it with a pretty rounded |
awsome
thx |
my forum has a probLem because of corner.js
some antivirus programs immediateLy aLert; EXP/HTML.VML.Gen virus. how can we soLve this issue? |
Quote:
What's more, I provided the link to original author of this script and since it is widely used, I don't think it is a virus/trojan and whatsoever. I hope that helps. Regards, Val. |
Not working for me! :(
Still the avatars are same, no curve or any other effect. |
What does the shading do?
|
Quote:
If you want you may PM me your URL to take a look. Click Install too. :) Quote:
This adds a shadow to rounded avatars if you selected the appropriate settings in javascript class. Attached is a screenshot of shades and rounded avatars in action. |
You did shadow, not shading, though. Isn't the shading on the pic itself?
I finally got the optimal setting for this and it really looks great! Thank you. ;) |
Quote:
The attached picture has a drop shadow on bottom right side of the picture/avatars. I am glad you sorted it out. |
hello valdet, it looks nice but do you know if it possible to do it with categories?
rounded categories if so any ideas on how I would go around this? |
Quote:
If that's your question, then YES, it can be done by using conditionals. If, you're thinking categories of your users (aka usergroups) then it can be done with conditionals too. Regards, Val. |
Erm I mean, just having categories, rounded
e.g. Plain categories nothing but a gradient in with a curve in? Do you understand if not reply please... I can explain further. Edit: doesn't matter now, sorted :) |
-deleted-
never mind, stupid question :) |
tried this in vB 3.8.1 doesnt work.
any similar mod for the latest vB? |
this is great
|
great hack , but makes animated gif avatars , freezing
|
Yes it does. That is one of the limitations of the javascript file.
|
anyway great hack , worked fine on 3.8 , thanks 4 quick reply
|
Great! It also works with 3.8.2 !!! :up:
Thanks, we like it! Karin |
All times are GMT. The time now is 04:48 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|