vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Avatar Glossy Effect - Postbit_Legacy (https://vborg.vbsupport.ru/showthread.php?t=317013)

thetechgenius 01-28-2015 10:00 PM

Avatar Glossy Effect - Postbit_Legacy
 
1 Attachment(s)
I found a really cool Javascript library that automatically adds a cool Glossy Shine effect to an image. You can add the Glossy Shine to any image on your forum, but I think it looks best with user's avatars.

And the best part is, the end-user doesn't need to do anything extra. They just upload their Avatar as normal, and when they see their avatar in posts, it will have a professional looking Shine/Glossy effect.

Lets get started!

1) First download the zip at the bottom, extract the contents, and upload the "js" folder to your forum root.

2) Add this code to your headerinclude template.

Code:


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


3) Edit the postbit_legacy template.

Find:

Code:


<vb:if condition="$show['avatar']">
                        <a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
                                <img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" title="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                        </a>
                        </vb:if>

Now since my style is very custom, that code might not be exactly like yours.

You have to basiclly put a class on the avatar "IMG" tag.

Like this:

Code:



<vb:if condition="$show['avatar']">
                        <a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
                                <img class="glossy" src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" title="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                        </a>
                        </vb:if>

And save!


I also added a screenshot of what it will look like when its done.

EDIT
: You could also use the Javascript to make any image have the Glossy/Shine Effect. I added the code to my Postbit Legacy and the User Profile Avatars. I changed the code in the profiles so instead of the profiles showing the Profile Pictures, it only shows the User's Avatar with the Glossy/Shine Effect.

I added a screenshot of my profiles with the Avatar Shine/Glossy effect.

concepts 02-06-2015 05:23 PM

Pretty cool, and looks great on the site, thanks!

valdet 02-12-2015 02:35 PM

Same effect for vB 3.x series

https://vborg.vbsupport.ru/showthread.php?t=171714

lapiervb 02-26-2015 03:09 PM

Does this take any additional resources?

CAG CheechDogg 02-26-2015 03:47 PM

Quote:

Originally Posted by lapiervb (Post 2538876)
Does this take any additional resources?

Some because of the javascript ...but shouldn't be that bad ....

thetechgenius 03-25-2015 09:08 PM

Quote:

Originally Posted by CAG CheechDogg (Post 2538882)
Some because of the javascript ...but shouldn't be that bad ....

Yes, it does take up some resources, but not much at all. Its only a little bit of javascript.

hazem_aliraqi 08-01-2015 03:52 PM

thank you


All times are GMT. The time now is 07:18 PM.

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.01186 seconds
  • Memory Usage 1,730KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete