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
XBox Live Avatar Details »»
XBox Live Avatar
Version: 1.00, by smokin1337 smokin1337 is offline
Developer Last Online: Oct 2012 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 3.8.x Rating:
Released: 10-18-2009 Last Update: Never Installs: 4
Template Edits
Code Changes  
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-23-2009, 12:49 PM
Big-Pete Big-Pete is offline
 
Join Date: May 2009
Posts: 187
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cheers, I'll have a go at this over the weekend... Thanks!
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 07:15 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.13402 seconds
  • Memory Usage 2,226KB
  • Queries Executed 18 (?)
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
  • (8)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)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_postinfo_query
  • fetch_postinfo
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete