Jump to content
vBWarez - Rest In Peace

Xbox LIVE Gamercard in Postbit

Recommended Posts

[B]Want to Add your Xbox LIVE Gamercard to Your Forum Postbit?[/B]

With just an addition of a profile field and one template edit, you'll have your Xbox LIVE Gamercard show up in the postbit in no time!

[B]Demo[/B] - [url]http://www.xboxoneclans.com/showthread.php?t=5888[/url]

If you already have the [URL="http://vbwarez.net/showthread.php/629-GamerCards-Block-in-Profile-Sidebar-and-Postbit"]GamerCards Block in Profile mod[/URL], then you can simply use the [B]Xbox Live profile field #[/B] that you created for the Xbox Live gamertag instead of creating a new profile field for your postbit.

If you already have the above mod, skip the next step.

[B]Step 1[/B] - Making the Profile Field
[*]Create a new User Profile Field
[*]Select "Single-Line Text Box"
[*]Enter Gamertag as the title
[*]Put, Enter your Xbox Live Gamertag Here, as your description
[*]The rest of the settings are you up to you to decide

Remember to make a note of your [B]Field Number[/B] that you have just created.

I put the gamercard under the users Avatar, but your free to place it where you want. Now you need to make one edit to the coding.

[B]Step 2[/B] - Go to [B]postbit_legacy[/B] template


[PHP] <vb:if condition="$show['avatar']">
<a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
</vb:if> [/PHP]
and after that, add:

[PHP] <vb:if condition="$post['fieldX']">
<a class="postuseravatar">
<iframe src="http://gamercard.xbox.com/{vb:raw post.fieldX}.card" scrolling="no" frameBorder="0" height="140" width="204">{vb:raw post.fieldX}</iframe>
</vb:if> [/PHP]
Now in the code that you have just added, you need to change the '[B]X[/B]' with your [B]Gamertag field number[/B] that you created earlier!

[B]Step 3[/B] - Changing the Width of the Postbit

Now the postbit width in default vB4.0 style is smaller than the gamercards actual size. You can edit the width of the post bit area to ensure that the Gamercard fits. To do this:
[*]Go to Styles & Templates and select Style Manager.
[*]Then select StyleVars for the theme your editing.
[*]Find Postbitlegacy-Userinfo-Width.
[*]Change the size to 220 and save.

Your finished.
Link to post
Share on other sites
  • 2 years later...
  • Create New...