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[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></if>
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a 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[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></if>
<if condition="$show['profile']">
<br>
<a 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 http://javascript
:vborg_doinstall(131143,true).