Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
Show Your XBOX 360 Gamertag as your Avatar in Postbit Details »»
Show Your XBOX 360 Gamertag as your Avatar in Postbit
Version: 1.00, by Nazarath Nazarath is offline
Developer Last Online: Jun 2008 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.4 Rating:
Released: 01-20-2007 Last Update: Never Installs: 14
Template Edits
Code Changes  
No support by the author.

Ok for those of you that have an xbox 360 site that is running this great software I have a mod for you.

If you would like to have it when your members post a message it shows there gamertag instead of the avatar that they post then follow these simple steps. Please keep in mind that this mod implies that you have not modified your postbit template. If you have modified your postbit template then you will need to change this around a bit.

Modifications:
2 Extra Fields
1 Template modification

Add 2 New Fields:

Note the field IDs for each new UserField, which you will need in the template code.

1st New UserField

Go to AdminCP -> User Profile Fields -> Add New User Profile Field
Profile Field Type: Single-Selection Radio Buttons
Title: XBOX 360 (or what ever you want it to be)
Description: Do you have an XBOX 360 Gamertag? If so Please select Yes. (or what ever you want it to be)
Options:

No
Yes
Note... these options have to be exactly Yes and No otherwise the changes won't work

Set Default: Yes (This will set "No" To the default Option if you put "No" First)
Field Required: No, but display at registration (or what ever you want it to be)
Field Editable by User: Yes
Allow user to input their own value for this option: No
Click Save.

2nd New UserField

Go to AdminCP -> User Profile Fields -> Add New User Profile Field
Profile Field Type: Single-Line Text Box
Title: XBOX 360 Gamertag (or what ever you would like it to be)
Description: Please type your Gamertag Here. (or what ever you would like it to be)
Field Required: No, but display at registration (or what ever you want it to be)
Field Editable by User: Yes
Click Save.

Now don't forget to get the Field ID's From these 2 options. Cause you are going to need them in the next step.

Template Modification:

Go to AdminCP -> Styles & Templates -> Style Manager
In the drop down for your style click on the "Edit Template"
In the list expand the "Postbit Templates"
Then double-click on "postbit"

Find The Following:
PHP Code:
<!-- user info -->
            <
table cellpadding="0" cellspacing="$stylevar[cellpadding]border="0" width="100%">
                <
tr>
                    <
td>
                        <if 
condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></if>
                        <
div id="postmenu_$post[postid]">
                            <if 
condition="$show['profile']">
                                <
class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
                                
$post[onlinestatus]
                                <
script type="text/javascript"vbmenu_register("postmenu_$post[postid]"true); </script>
                            <else />
                                
$post[musername]
                            </if>
                        </
div>
                        <if 
condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
                        <if 
condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
                        <if 
condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
                        <
br>
                        <
div class="smallfont">
                            <if 
condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
                            <if 
condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
                            <if 
condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
                            <
div>
                                
$vbphrase[posts]: $post[posts]
                            </
div>
                            <if 
condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
                            <
div>$post[icqicon$post[aimicon$post[msnicon$post[yahooicon$post[skypeicon]</div>
                        </
div
Change that to be:
PHP Code:
<!-- user info -->
            <
table cellpadding="0" cellspacing="$stylevar[cellpadding]border="0" width="100%">
                <
tr>
                    <
td>
                        <
div id="postmenu_$post[postid]">
                            <!-- 
Xbox 360 Gamertag Hack -->
                            <if 
condition="$post['fieldX'] == 'Yes'">
                                <
iframe src="http://gamercard.xbox.com/$post[fieldX].card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
                            <else />
                                <if 
condition="$show['avatar']"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]$post[avwidth$post[avheightalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></if>
                                    <if 
condition="$show['profile']">
                                        <
br>
                                        <
class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
                                        
$post[onlinestatus]
                                        <
script type="text/javascript"vbmenu_register("postmenu_$post[postid]"true); </script>
                                    <else />
                                        
$post[musername]
                                </if>
                            </if>
                            <!-- / 
End Xbox 360 Gamertag Hack -->
                        </
div>
                        <if 
condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
                        <if 
condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
                        <if 
condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
                        <
br>
                        <
div class="smallfont">
                            <if 
condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
                            <if 
condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
                            <if 
condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
                            <
div>
                                
$vbphrase[posts]: $post[posts]
                            </
div>
                            <if 
condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
                            <
div>$post[icqicon$post[aimicon$post[msnicon$post[yahooicon$post[skypeicon]</div>
                        </
div
After Changing it find the following line:
PHP Code:
<if condition="$post['fieldX'] == 'Yes'"
Change the X in $post['fieldX'] == 'Yes' to match the Field ID of the Single-Selection Radio Buttons Field

Next, Find:
PHP Code:
<iframe src="http://gamercard.xbox.com/$post[fieldX].card" scrolling="no" frameBorder="0" height="140" width="204"></iframe

Added on 02/12/07.

If you would like to have it display just the gamercard without taking the place of anything else just put the code below where ever you like.


PHP Code:
<if condition="$post['fieldX'] == 'Yes'">
                                <
iframe src="http://gamercard.xbox.com/$post[fieldX].card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
                            </if> 
Change the X in $post[fieldX].card to the Field ID of the Single-Line Text Box.

Thats It for any changes. Save your template and go add your gamertag to your profile and have a look.

If you have any questions feel free to ask.

Help support me and my site by going to http://www.ravensreapers.com and helping our site grow.

If you use this Mod Please click Installed.

Supporters / CoAuthors

Show Your Support

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

Comments
  #2  
Old 01-21-2007, 10:04 PM
Qwest Qwest is offline
 
Join Date: Jun 2004
Location: United States
Posts: 223
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where's teh demo?
Reply With Quote
  #3  
Old 01-21-2007, 11:12 PM
jgommel's Avatar
jgommel jgommel is offline
 
Join Date: Jun 2005
Location: Ohio
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I modified it to show in the Members profile instead, but thanks for the idea.
Reply With Quote
  #4  
Old 01-22-2007, 12:09 AM
Nazarath Nazarath is offline
 
Join Date: Jan 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Qwest View Post
Where's teh demo?
Oops... Forgot to put a screenshot... my bad.. Kind of hard to show a demo though as it deals with a member profile...(goes to do that now)
Reply With Quote
  #5  
Old 01-25-2007, 12:38 AM
GruntHalo GruntHalo is offline
 
Join Date: Dec 2006
Location: New Jersey, USA
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic Thanks Alot!
Reply With Quote
  #6  
Old 02-05-2007, 12:22 AM
xboxchatdotus xboxchatdotus is offline
 
Join Date: Feb 2007
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

forsome reason i cant get this too work
Reply With Quote
  #7  
Old 02-05-2007, 04:46 AM
Nazarath Nazarath is offline
 
Join Date: Jan 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What problems are you having with this? Is it not showing up when you make a post?

Make sure that you made this modification on the postbit (Not postbit_legacy I will post up the modification to postbit_legacy in a couple of days as I just changed it on my board to work)
Reply With Quote
  #8  
Old 02-05-2007, 09:44 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nazarath View Post
What problems are you having with this? Is it not showing up when you make a post?

Make sure that you made this modification on the postbit (Not postbit_legacy I will post up the modification to postbit_legacy in a couple of days as I just changed it on my board to work)
it's not showing up for me either...i made all changes accordingly...i am running iskinblack...would this make a difference?

all profile fields are filled out accordingly but it's not showing up
Reply With Quote
  #9  
Old 02-06-2007, 07:06 AM
Nazarath Nazarath is offline
 
Join Date: Jan 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SnapOff Racing View Post
it's not showing up for me either...i made all changes accordingly...i am running iskinblack...would this make a difference?

all profile fields are filled out accordingly but it's not showing up
Copy your postbit template to a text document and attach it here and i'll take a look at it and see what the problem could be. Same goes for you xboxchatdotus
Reply With Quote
  #10  
Old 02-06-2007, 07:23 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nazarath View Post
Copy your postbit template to a text document and attach it here and i'll take a look at it and see what the problem could be. Same goes for you xboxchatdotus
hope that's all u needed...i'd like to get this working asap. thanks man! :up:
Reply With Quote
Reply

Thread Tools

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 04:50 PM.


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.06497 seconds
  • Memory Usage 2,392KB
  • Queries Executed 24 (?)
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
  • (5)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete