Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[hoangkiso] Avatar First letter from username in postbit Details »»
[hoangkiso] Avatar First letter from username in postbit
Version: 1.3, by hoangserip hoangserip is offline
Developer Last Online: Jan 2021 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.2.x Rating:
Released: 05-03-2013 Last Update: 09-09-2014 Installs: 7
Uses Plugins Template Edits
Code Changes Is in Beta Stage  
No support by the author.

Demo online: T?i Liệu

Info:

Getting alphabet The first of names user as a avatar.

How to install:
  • Download attachments
  • Import file product-hoangkiso_avatar.xml

Open postbit or postbit_legacy, add anywhere code:

Code:
{vb:raw ad_location.hoangkiso_avatar_show}
additional.css:

Code:
.khung {
float: left;
margin: 3px 5px;
}
.pavatar {
color: white;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
float: left;
width: 50px;
height: 50px;
text-align: center;
font-size: 30px;
cursor: default;
}
Way displayed avatar member is already avatar

Find :
PHP Code:
                <vb:if condition="$show['avatar']">
                    <
class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
                        <
vb:if condition="$post.avatarurl">
                            <
img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                        <
vb:else />
                            <
img src="{vb:stylevar imgdir_misc}/unknown.gif" />
                        </
vb:if>
                    </
a>
                </
vb:if> 
And change :

PHP Code:
                <vb:if condition="$show['avatar']">
                    <
class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
                        <
vb:if condition="$post.avatarurl">
                            <
img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                        <
vb:else />
                            <
img src="{vb:stylevar imgdir_misc}/unknown.gif" />
                        </
vb:if>
                    </
a>
                <
vb:else />
                    {
vb:raw ad_location.hoangkiso_avatar_show}
                </
vb:if> 
Thats all.

Download Now

File Type: xml product-hoangkiso_avatar.xml (3.8 KB, 55 views)

Screenshots

File Type: jpg vidu.jpg (64.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
nacaruncr, Toorak Times

Comments
  #2  
Old 05-04-2013, 12:23 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



So does this add the letter avatar only if another avatar does not already exist for that member? Or does it override the current avatar and replace it with this one?
Reply With Quote
  #3  
Old 05-04-2013, 12:31 PM
Thangvip9x Thangvip9x is offline
 
Join Date: Apr 2012
Location: Yen Bai, Vietnam
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, but not use
Reply With Quote
  #4  
Old 05-04-2013, 11:58 PM
hoangserip's Avatar
hoangserip hoangserip is offline
 
Join Date: Jun 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Way displayed avatar member is already avatar

PHP Code:
<vb:if condition="$show['avatar']"><class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">                        <vb:if condition="$post.avatarurl">                            <img width="50px" src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />                        <vb:else />                            <img src="{vb:stylevar imgdir_misc}/unknown.gif" />                        </vb:if>                    </a>                <vb:else />                {vb:raw template_hook.postbit_userinfo_right_after_posts.postbit_avatar}</vb:if> 
Reply With Quote
  #5  
Old 05-04-2013, 11:58 PM
lazytown lazytown is offline
 
Join Date: Feb 2004
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Interesting, but it would be more useful if we could have some type of background image behind the letter -- or assign a unique color to each member with the same letter. I know that's probably way beyond the scope of this mod, but it would be neat.
Reply With Quote
  #6  
Old 05-05-2013, 12:02 AM
hoangserip's Avatar
hoangserip hoangserip is offline
 
Join Date: Jun 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You may Development added of mod, thanks vissa
Reply With Quote
  #7  
Old 05-05-2013, 01:45 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hoangserip View Post
Way displayed avatar member is already avatar

PHP Code:
<vb:if condition="$show['avatar']"><class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">                        <vb:if condition="$post.avatarurl">                            <img width="50px" src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />                        <vb:else />                            <img src="{vb:stylevar imgdir_misc}/unknown.gif" />                        </vb:if>                    </a>                <vb:else />                {vb:raw template_hook.postbit_userinfo_right_after_posts.postbit_avatar}</vb:if> 
Will not interfere with the member's chosen avatar
Reply With Quote
  #8  
Old 05-05-2013, 01:49 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hoangserip View Post
You may Development added of mod, thanks vissa
You change this mod to your needs...please post them in this thread.
Reply With Quote
  #9  
Old 05-05-2013, 01:49 PM
Toorak Times's Avatar
Toorak Times Toorak Times is offline
 
Join Date: Jan 2011
Posts: 436
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Love this mate, hope you don't take offence I thought I'd clarify what you mean't, did I get it right?
Reply With Quote
  #10  
Old 05-06-2013, 12:57 AM
hoangserip's Avatar
hoangserip hoangserip is offline
 
Join Date: Jun 2009
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you do not want to interfere with the member's avatar
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 05:58 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.04607 seconds
  • Memory Usage 2,361KB
  • Queries Executed 26 (?)
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
  • (2)bbcode_code
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete