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

Reply
 
Thread Tools
Default avatar for users with no selected avatar Details »»
Default avatar for users with no selected avatar
Version: 1.00, by macc macc is offline
Developer Last Online: May 2010 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.8.1 Rating:
Released: 03-05-2009 Last Update: Never Installs: 79
Template Edits
Re-useable Code Code Changes  
No support by the author.

Just some help if you want to set the default avatar to users who did not select any avatar. It is for postbit, postbit_legacy and member list template.

In your postbit template find -
PHP Code:
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> 
and put this below code before </if> -
PHP Code:
<else />
<if 
condition="$bbuserinfo[showavatars]">
 <
td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$stylevar[imgdir_misc]/noavatar.gif" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a><br /><a href="profile.php?$session[sessionurl]do=editavatar"><b>Set Avatar</b></a></td>
</if> 
upload(copy) image noavatar.gif in "your template" /images/misc folder.




In your templete memberlist_resultbits find this:

PHP Code:
<if condition="$show['avatar']"><img src="$avatarurlborder="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /><else />&nbsp;</if></td></if> 
and &nbsp; replace with this
PHP Code:
<img src="$stylevar[imgdir_misc]/noavatar.gif" border="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /> 

For postbit_legacy find

PHP Code:
<if condition="$show['avatar']">
    <
div class="smallfont">
     &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
    </
div>
   </if> 
and after </div> add this

PHP Code:
<else />
    <if 
condition="$bbuserinfo[showavatars]">
     <
div class="smallfont">
      &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="your url link/noavatar.gif" $post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
     </
div>
</if> 

Change "your url link" to your link to picture (avatar)!

You can make your own pictures (avatar) for users who did not select any avatar!


Hope this will help someone!

Want to see this in action? - http://libar-libar.com


Regards,

macc

Screenshots

File Type: jpg set_avatar.jpg (52.5 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
JohorBahru

Comments
  #22  
Old 03-23-2009, 02:21 PM
newguy's Avatar
newguy newguy is offline
 
Join Date: Nov 2007
Location: USA
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wondering if the instructions have been updated, since some posts suggested some changes?
Reply With Quote
  #23  
Old 03-23-2009, 02:59 PM
jonah1892 jonah1892 is offline
 
Join Date: Jul 2008
Location: Newcastle, UK
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how would i go about doing this on the ipbroarcade avatars
Reply With Quote
  #24  
Old 03-23-2009, 04:27 PM
newguy's Avatar
newguy newguy is offline
 
Join Date: Nov 2007
Location: USA
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jonah1892 View Post
how would i go about doing this on the ipbroarcade avatars
Are you talking about the no avatar that shows in the arcade when that member does not have a avatar installed?

If so I just found the directory of the no avatar for the arcade and uploaded the one I wanted to show, and made it the same file name and over write the no avatar.gif
Reply With Quote
  #25  
Old 03-24-2009, 03:04 AM
jonah1892 jonah1892 is offline
 
Join Date: Jul 2008
Location: Newcastle, UK
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you
Reply With Quote
  #26  
Old 03-25-2009, 06:23 PM
Saviour's Avatar
Saviour Saviour is offline
 
Join Date: Apr 2007
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hate template edits...

Any way to package this as a product?
Reply With Quote
  #27  
Old 03-25-2009, 07:05 PM
Saviour's Avatar
Saviour Saviour is offline
 
Join Date: Apr 2007
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just tried your manual install instructions...and it doesn't work...

I think you need to take a look at the coding so it's compatible with 3.8.1 PL1.

Also...this mod conflicts with [tk] Egg Avatar mod.

Installed...then Uninstalled.

Sorry...
Reply With Quote
  #28  
Old 03-25-2009, 07:14 PM
macc's Avatar
macc macc is offline
 
Join Date: Feb 2008
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i use myself vbulletin 3.8.1 PL1 and this code works fine !

never used [tk] Egg Avatar mod...


regards

macc
Reply With Quote
  #29  
Old 04-02-2009, 06:57 PM
powerful_rogue powerful_rogue is offline
 
Join Date: Jan 2007
Location: Kent
Posts: 603
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Shame this dosent work with [tk] egg avatar
Reply With Quote
  #30  
Old 04-05-2009, 12:48 AM
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Location: Romania
Posts: 731
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is NOT an add-on, but a template modification.
Reply With Quote
  #31  
Old 04-06-2009, 03:33 PM
y2krazy y2krazy is offline
 
Join Date: Jun 2003
Location: Houston, Texas
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by y2krazy View Post
How can I get the "Set Avatar" text to show up for just THAT user. With the code, as it is in the original post. Everyone will see "Set Avatar" under a user's avatar that isn't set. When they click on it, it will take them to edit their own avatar.

Thanks in advance!

~ Sean
3 weeks and no help. Anyone have any ideas? :/

~ Sean
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 06:55 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.04858 seconds
  • Memory Usage 2,370KB
  • 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
  • (6)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • 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