vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - [hoangkiso] Avatar First letter from username in postbit (https://vborg.vbsupport.ru/showthread.php?t=297807)

hoangserip 05-03-2013 10:00 PM

[hoangkiso] Avatar First letter from username in postbit
 
1 Attachment(s)
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.

djbaxter 05-04-2013 12:23 PM

:confused:

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?

Thangvip9x 05-04-2013 12:31 PM

Thanks, but not use

hoangserip 05-04-2013 11:58 PM

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> 


lazytown 05-04-2013 11:58 PM

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.

hoangserip 05-05-2013 12:02 AM

You may Development added of mod, thanks vissa

Toorak Times 05-05-2013 01:45 PM

Quote:

Originally Posted by hoangserip (Post 2419996)
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

Toorak Times 05-05-2013 01:49 PM

Quote:

Originally Posted by hoangserip (Post 2419999)
You may Development added of mod, thanks vissa

You change this mod to your needs...please post them in this thread.

Toorak Times 05-05-2013 01:49 PM

Love this mate, hope you don't take offence I thought I'd clarify what you mean't, did I get it right?

hoangserip 05-06-2013 12:57 AM

If you do not want to interfere with the member's avatar


All times are GMT. The time now is 01:52 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.01165 seconds
  • Memory Usage 1,772KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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