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
  #12  
Old 02-06-2007, 05:51 PM
Nazarath Nazarath is offline
 
Join Date: Jan 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SnapOff Racing View Post
hope that's all u needed...i'd like to get this working asap. thanks man! :up:
Hmm... The code looks like it is in there correctly, Try taking a look at your usergroup permissions and also your forum permissions to see if you have it where it displays custom fields from a users profile.
Reply With Quote
  #13  
Old 02-07-2007, 10:09 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nazarath View Post
Hmm... The code looks like it is in there correctly, Try taking a look at your usergroup permissions and also your forum permissions to see if you have it where it displays custom fields from a users profile.

i can't find where you're talking about...can you paste a screenshot?
Reply With Quote
  #14  
Old 02-09-2007, 08:44 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nothing to do with my skin either...it's something in the coding or something...

i think you need to check it bro.

i did it on the base default skin and it didnt work either...i REALLY want this to work on my boards, please take a look at it bro
Reply With Quote
  #15  
Old 02-10-2007, 08:02 AM
Nazarath Nazarath is offline
 
Join Date: Jan 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm post a link to your site and i'll register on there and see what could be going on. You may have to give me admin rights for me to be able to see what could be causing it. But that is completely up to you
Reply With Quote
  #16  
Old 02-10-2007, 06:22 PM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nazarath View Post
hmm post a link to your site and i'll register on there and see what could be going on. You may have to give me admin rights for me to be able to see what could be causing it. But that is completely up to you
i'm willing to do that.


www.sanpoffracing.com/forums


thanks dude, sooner the better =)
Reply With Quote
  #17  
Old 02-11-2007, 08:38 AM
Nazarath Nazarath is offline
 
Join Date: Jan 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm I tried to go to your site and it wouldn't load? were you having server troubles with your site the other night?

EDIT:

lol I saw the problem.... you had www.sanpoffracing.com/forums

should have been www.snapoffracing.com/forums (it was spelled sanp instead of snap.)....lol no probs though

EDIT #2:

Ok I have registered on your site and my username is (what else) Nazarath. I will need admin access and the ability to edit the styles to see what could be going on.... though right now it looks like it may deal with the zoints add-on you have. won't know till i can see the code
Reply With Quote
  #18  
Old 02-11-2007, 08:58 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oops, sorry about that.

I'm giving your name temp. admin priveleges
Reply With Quote
  #19  
Old 02-11-2007, 10:06 PM
Nazarath Nazarath is offline
 
Join Date: Jan 2007
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK I have registered on your site. Ill need admin to see what could be causing it. Right now it looks like it might be the zoints but I won't know till i get in there.

Actually it looks like you may need to give me super admin rights... the only way to do that is through the config.php file and find the line that says
PHP Code:
$config['SpecialUsers']['superadministrators'] = '1'
and add my user ID number to that and that will get me super admin.... sorry for the trouble
Reply With Quote
  #20  
Old 02-12-2007, 03:38 AM
SnapOff Racing SnapOff Racing is offline
 
Join Date: Apr 2006
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nazarath View Post
OK I have registered on your site. Ill need admin to see what could be causing it. Right now it looks like it might be the zoints but I won't know till i get in there.

Actually it looks like you may need to give me super admin rights... the only way to do that is through the config.php file and find the line that says
PHP Code:
$config['SpecialUsers']['superadministrators'] = '1'
and add my user ID number to that and that will get me super admin.... sorry for the trouble
ok, you're superadmin now...i edited the file
Reply With Quote
  #21  
Old 02-12-2007, 08:03 AM
Noonster Noonster is offline
 
Join Date: Jun 2005
Location: East Yorkshire, UK
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone tell me how big in size the avatar will be?

Thanks
Darren
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 05:26 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.05228 seconds
  • Memory Usage 2,409KB
  • Queries Executed 26 (?)
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
  • (7)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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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