vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Show Thread Enhancements - Rounded avatars, profile pictures and attachment thumbnails (https://vborg.vbsupport.ru/showthread.php?t=171664)

valdet 02-27-2008 10:00 PM

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 -->
and add this below
Code:

<script type="text/javascript" src="clientscript/corner.js"></script>


3.
In your postbit_legacy template, find
Code:

<div class="smallfont">
                    &nbsp;<br /><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>
                </div>

replace it with
Code:

                <div class="smallfont">
                    &nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]"  class="corner iradius10" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                </div>

Finished.

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.

valdet 02-28-2008 05:43 PM

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>
replace it with
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>
For rounded avatar in member profile, in MEMBERINFO template, find:
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>
and replace it with
Code:

<td><img src="$userinfo[avatarurl]" $userinfo[avatarsize] class="corner iradius10" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" /></td>
For rounded avatar in memberlist, in memberlist_resultsbit template, find this
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 />&nbsp;</if></td></if>
replace it with:
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 />&nbsp;</if></td></if>
For rounded display picture in member profile, in MEMBERINFO template find:
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" />
replace it with:
Code:

<img src="$userinfo[profilepicurl]" $userinfo[profilepicsize] class="corner iradius10" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_picture]</phrase>" />
For rounded attachment thumbnails, in postbit_attachmentthumbnail template find this:
Code:

class="thumbnail"
as it is the only instance of a class in the template, and replace it with
Code:

class="thumbnail corner iradius10"

Defkalion 02-28-2008 06:28 PM

This is very nice, but it has one single problem. It destroys animated avatars.

Thanks. :)

iogames 02-28-2008 07:38 PM

Quote:

Originally Posted by Defkalion (Post 1453079)
This is very nice, but it has one single problem. It destroys animated avatars.

Thanks. :)

you destroyed my illusions :rolleyes:

Forum Lover 02-28-2008 07:55 PM

Ah!! It was almost great... any way to keep those gifs away from these action? I can't leave my animations.

valdet 02-28-2008 08:56 PM

I don't think this javascript works for animated gifs.

But hey someone might find it useful though. ;)

Defkalion 02-28-2008 09:04 PM

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. :)

Forum Lover 03-01-2008 04:21 AM

Quote:

Originally Posted by valdet (Post 1453184)
I don't think this javascript works for animated gifs.

But hey someone might find it useful though. ;)

Chill, sure its handy with jpeg.

Brandon Sheley 03-01-2008 06:15 AM

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

erdiyilmaz 03-01-2008 11:06 AM

i don't understand how i can shadow it


All times are GMT. The time now is 12:35 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
  • Page Generation 0.01279 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (14)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete