Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Glossy avatars,profile pictures and attachment thumbnails Details »»
Glossy avatars,profile pictures and attachment thumbnails
Version: 1.01, by valdet valdet is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.8 Rating:
Released: 02-28-2008 Last Update: 02-28-2008 Installs: 17
Template Edits
Additional Files  
No support by the author.

Description:
Glossy Avatar & Image Effects allows you to add glossy 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 glossy.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/glossy.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="glossy ibgcolor00aa00 igradient00aaaa horizontal noshadow" 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.
Quote:
vary the radius by adding iradius followed by the desired radius in percent of half of the smaller picture dimension:

Corner radius class "iradius25" - min=20 max=50 default=25vary the shadow by adding noshadow:

Noshadow class "noshadow" - default=falsevary the background by adding ibgcolor followed by the desired color as hex:

Background color class "ibgcolor" - min=000000 max=ffffff default=0vary the background by adding igradient followed by the desired color as hex:

Gradient color class "igradient" - min=000000 max=ffffff default=0vary the color gradient direction by adding horizontal:

Horizontal gradient class "horizontal" - default=false
It is very flexible and you can tweak it as much as you want.

v.1.01 added glossy 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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-10-2008, 07:29 AM
montsa007 montsa007 is offline
 
Join Date: Feb 2008
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will it work on bbcode images hosted on other sites?
Reply With Quote
  #13  
Old 12-10-2008, 09:17 AM
Mazinger's Avatar
Mazinger Mazinger is offline
 
Join Date: Nov 2006
Location: Egypt
Posts: 355
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting mod, downloaded!
Reply With Quote
  #14  
Old 12-10-2008, 12:08 PM
Infopro Infopro is offline
 
Join Date: May 2003
Location: Pennsylvania
Posts: 267
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by valdet View Post
It does not work if you place the javascript in headinclude (<head>...</head>), because this one needs to be included after the <body> tag..

Believe me I tried to place in headinclude and it won't display these effects.

Val.

Hmm, works fine for me. Added to the bottom of the headerinclude, last line.

Once this is added, you can basically add it to any image. Find where the image is located in your template and add this right before the alt tag:
class="glossy ibgcolor00aa00 igradient00aaaa horizontal noshadow"

Doesn't matter of the size, but colors will need to be edited to look good.

One last note, I added this to 3.8.0. Forum version shouldn't be a concern with this simple script I don't think.
Reply With Quote
  #15  
Old 12-10-2008, 12:11 PM
Infopro Infopro is offline
 
Join Date: May 2003
Location: Pennsylvania
Posts: 267
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works in firefox but not in IE7 for me here. Just noticed. Might be something on my end.
Reply With Quote
  #16  
Old 12-12-2008, 09:46 AM
IoGhost IoGhost is offline
 
Join Date: Oct 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tested on IE7, FF2, FF3, Opera 9.27, Opera 9.62, Safari 3.2 - works.
My recomendation, replace last two strings in js-file (setup window.onload event) with:
Code:
if (navigator.appName == "Microsoft Internet Explorer")
{
	window.attachEvent('onload', function() { addIEGlossy(); });
}
else
{
	window.addEventListener('load',function OnLoad() { addGlossy(); }, true);
}
Reply With Quote
  #17  
Old 12-12-2008, 10:56 AM
IoGhost IoGhost is offline
 
Join Date: Oct 2008
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And insert code:
Code:
if (isIE) { addIEGlossy(); } else { addGlossy(); }
in "clientscript/vbulletin_quick_edit.js" after
Code:
		else
		{
			vB_QuickEditor.restore(vB_QuickEditor.ajax.fetch_data(fetch_tags(AJAX.responseXML, 'postbit')[0]), 'tableobj');
			PostBit_Init(fetch_object('post' + vB_QuickEditor.postid), vB_QuickEditor.postid);
and in "clientscript/vbulletin_quick_reply.js" after
Code:
					PostBit_Init(postbit, postbits[i].getAttribute('postid'));
				}
if you want to keep glossy-effect in "quick-edited" and "qucik-added" posts.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:52 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06496 seconds
  • Memory Usage 2,273KB
  • Queries Executed 21 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete