Back to vBulletin 3.8 Template Modifications

XBox Live Avatar
Mod Version: 1.00, by smokin1337

vB Version: 3.8.x Rating: (0 vote - 0 average) Installs: 4
Released: 19 Oct 2009 Last Update: Never Downloads: 1
Not Supported Template Edits Code Changes External Content  

This is a mod to allow users to use their XBox live avatar as their forum avatar. For this there will need to be 2 custom profile fields added.

Install time: 10 min.

The first is:

Single-line text box

Name: XBox live Gamertag

Description: whatever you like

The second is:

Multiple-Selection Checkbox

Name: Use XBox Live avatar

Description: whatever you like

Options: Yes

Then there are 3 template mods to be made:

In memberinfo_block_ministats find:

Code:
 
<if condition="$prepared['avatarurl']">
<td>
<img src="$prepared[avatarurl]" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td>
</if>
Replace with:

Code:
<if condition="$prepared['avatarurl']">
<if condition="$userinfo[fieldX]"><td><img src="http://avatar.xboxlive.com/avatar/$userinfo[fieldX]/avatarpic-l.png" border="0" /></td>
<else />
<td>
<img src="$prepared[avatarurl]" alt="<phrase 1="$prepared[username]">$vbphrase[xs_avatar]</phrase>" $prepared[avatarsize] class="alt2" id="user_avatar" /></td></if>
		</if>
In memberlist_resultsbit find:

Code:
<if condition="$show['avatarcol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['avatar']"><img src="$avatarurl" border="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /></if><else />&nbsp;</if></td>
Replace with:

Code:
<if condition="$show['avatarcol'] AND exec_switch_bg()"><td class="$bgclass"><if condition="$show['avatar']">
<if condition="$userinfo[fieldX]"><img src="http://avatar.xboxlive.com/avatar/$userinfo[fieldX]/avatarpic-l.png" border="0" />
<else />
<img src="$avatarurl" border="0" $avwidth $avheight alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" hspace="4" vspace="4" /></if><else />&nbsp;</if></td></if>
In postbit or 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>
Replace with:

Code:
<if condition="$show['avatar']">
	<if condition="$post[fieldX]"><div>
				<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="http://avatar.xboxlive.com/avatar/$post[fieldX]/avatarpic-l.png" border="0" /></a></div>
<else />		
<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>
                          </if>
Replace the red X with the field id for the gamertag.

Replace the blue X with the field id for the avatar.

And that's it their avatar will be replaced with their xbox live avatar pic.

This is optional to show it on the navbar too,

In navbar find:

Code:
<if condition="$show['member']">
<td class="alt5" nowrap="nowrap">
	<div class="smallfont">
<strong><phrase 1="$bbuserinfo[musername]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br />
Above it add:

Code:
<if condition="$bbuserinfo[fieldX]"><td><img src="http://avatar.xboxlive.com/avatar/$bbuserinfo[field23]/avatarpic-l.png" border="0" /></td></if>
Please mark installed if you use it.

Have any questions feel free to ask.

Download

No files for download.

Similar Mods

Xbox LIVE Avatars vBulletin 3.8 Template Modifications
Profile Enhancements Xbox Live Avatar System vBulletin 3.7 Add-ons

vblts.ru supports vBulletin®, 2022-2024