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

Reply
 
Thread Tools
Use XBox Live stuff as avatars Details »»
Use XBox Live stuff as avatars
Version: 1.00, by euantor euantor is offline
Developer Last Online: Jul 2011 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 11-20-2009 Last Update: Never Installs: 6
Template Edits
Re-useable Code Translations  
No support by the author.

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.

Screenshots

File Type: png 360Elites - Edit Your Details_1258798057747.png (12.9 KB, 0 views)
File Type: jpg A few kind of new features =P - 360Elites_1258798079996.jpg (61.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
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 03:49 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.03328 seconds
  • Memory Usage 2,214KB
  • Queries Executed 15 (?)
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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (2)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete