Back to vBulletin 3.8 Template Modifications

Default avatar for users with no selected avatar
Mod Version: 1.00, by Danny702

vB Version: 3.8.6 Rating: (1 vote - 4.00 average) Installs: 6
Released: 04 Jul 2011 Last Update: Never Downloads: 0
Not Supported Template Edits Code Changes Re-usable Code Translations  

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 -

Code:
<if condition="$show['avatar']"><td class="alt2"><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></td></if>
and put this below code before </if> -

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[avheight] alt="<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>
</if>
upload(copy) image noavatar.gif in "your template" /images/misc folder.

In your templete memberlist_resultbits find this:
Code:
<if condition="$show['avatar']"><img src="$avatarurl" border="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

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

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[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
    </div>
   </if>
and after </div> add this

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[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
     </div>
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!
Thanks

Download

No files for download.

Similar Mods

Show Thread Enhancements [1e2] Gravatar as Default Avatar for users without image: auto generate random avatar vBulletin 3.8 Add-ons
Show Thread Enhancements [1e2] Gravatar as Default Avatar for users without image: auto generate random avatar vBulletin 3.7 Add-ons
Add-On Releases Default avatar for users with no selected avatar vBulletin 3.8 Add-ons
[Release -Gamma / RC1 / RC2]Default Avatar for users with no avatar :) vBulletin 3.0 Template Modifications
[Release -Gamma / RC1 / RC2]Default Avatar for users with no avatar :) vBulletin 3.0 Template Modifications

vblts.ru supports vBulletin®, 2022-2024