Back to vBulletin 3.8 Template Modifications

Use XBox Live stuff as avatars
Mod Version: 1.00, by euantor

vB Version: 3.8.x Rating: (1 vote - 4.00 average) Installs: 6
Released: 21 Nov 2009 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code Translations External Content  

This is yet another XBox Live based mod. This one allows your users the choice to use their gamercard as an avatar, their official XBox Live avatar as their avatar or a standard uploaded one.

There are two profile fields to create (assuming you already have a profile field for XBox Live Gamertags...)

#1

Name: Use XBL Gamercard
Type: Multiple-Selection Checkbox
Description: Do you wish to use your XBox Live Gamercard as your avatar on the site? For this to work, you must enter your gamertag in the gamertag field.
Fields: Use XBox Live Gamertag?

#2

Name: Use XBL Avatar?
Type: Multiple-Selection Checkbox
Description: Do you wish to use your XBox LiveAvatar as your avatar on the site? For this to work, you must enter your gamertag in the gamertag field.

Note: You cannot have both this option ticked and the option to use your gamercard. Please make sure only one is ticked.
Fields: Use XBox LiveAvatar?

__________________________________________________________

Now for some template edits!

Open up your postbit or postbit_legacy template - depending on which yu are using.

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:
<!-- Avatar -->
<if condition="$post[fieldY]">
<div class="smallfont">
&nbsp;<br /><iframe src="http://gamercard.xbox.com/$post[fieldX].card" scrolling="no" frameBorder="0" height="140" width="204">$post[fieldX].</iframe>
</div>
<else />
<if condition="$post[fieldZ]">
<div class="smallfont">
					&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="http://avatar.xboxlive.com/avatar/$post[fieldX]/avatarpic-l.png" alt="XBL Avatar" title="$post[fieldX]" border="0" /></a>
</div>
<else />
<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>
</if>
			</if>
<!-- /Avatar -->
Ok, to get this to work with your site, you're going to need to change the field IDs.

Change the IDs as shown belo:

Change fieldX -> the field ID of your gamertag field
Change fieldY -> the field ID of the field that asks if the user wants to use their gamercard
Change fieldZ -> The field ID of the field that asks if the user wants to use their XBL Avatar

_____________________________________________

Now just save and reload the template. If the user selects the checkbox to use their gamerard as their avatar, the avatar shown in their posts will be replaced by their gamercard.

Screenshots below.

Download

No files for download.

Screenshots

Click image for larger version
Name:	360Elites - Edit Your Details_1258798057747.png
Views:	71
Size:	12.9 KB
ID:	106479   Click image for larger version
Name:	A few kind of new features =P - 360Elites_1258798079996.jpg
Views:	159
Size:	61.4 KB
ID:	106480  

Similar Mods

Xbox LIVE Avatars vBulletin 3.8 Template Modifications
Forum Display Enhancements Xbox LIVE Avatars vBulletin 3.7 Template Modifications

vblts.ru supports vBulletin®, 2022-2024