[REQ] Xbox GameCard

HERE U GO.....


XBOX Gamer tag in user profile & postbit_legacy

Important

First always backup the files that you're going to edit so you can revert to the old version if something goes wrong.

We do appreciate if you gave us the due credits for these functions.


Installation

This modification was tested on vbulletin 3.5.x 3.6.x 3.7.0 beta 4.
You might have to put some codes on another location in your files depending on the version of vbulletin your have.

1. Add a gamertag field to your user (editable in profile) =>

vBulletin features a wide array of input options for you to gather information from your members through the creation of custom profile fields. With these fields you can present a list of options for the user to choose from or you can ask the user to give their own input.

Go to the adminCP and add a custom field => User Profile fields => Add New User Profile Field

You need a "Single-Line Text Box"

Title => Gamertag
Description => Xbox Live Gamertag
Default Value => Leave empty
Max length of allowed user input => 30
Display Size => 30
Display Order => put something like 10 or 15
Field Required => No as default but you can change if you want
Field Editable by User => Yes because gamertags do tend to change
Private Field => No the field is public
Field Searchable on Members List => No
Show on Members List => Yes
Regular Expression => leave empty

Save the field

Go to the User Profile Field Manager and look for your custom field you just added and look for the name column there is an ID for the field.
Something like "fieldXX" where XX is a number. Make sure you remember this value.

2. Go to the template you are using (Styles & Templates/Style Manager) and select Edit templates.

Go to "postbit templates" and select the template you are using (probably postbit or postbit_legacy).
and add the following code:

fieldXX is the field value you got from step 1.

You can embed the code in a div or a special table construction but that is up to you.

USE THIS CODE .. change [fieldXX] 3 time


Code:
<if condition="$post[fieldXX]">
<iframe src="http://card.mygamercard.net/mini/$post[fieldXX].png" scrolling="no" frameBorder="0" height="101" width="151">$post[fieldXX]</iframe>
</if>




Xbox Live Gamertag with BB Code

n Admin Panel..

Custom BB Codes > Add New BB Code

Title: live

Tag: live

Replacement:

Code:
<iframe src="http://gamercard.xbox.com/{option}.card" scrolling="no" frameBorder="0" height="140" width="204"></iframe>
Example:

Code:
[live=option]name[/live]
Description: Show your Xbox360 Live Gamecard

Use {Option}: YES

Thats it

Now instructions on how to add to your posts or signatures

example


Code:
[live=option]name[/live]
if your name has spaces put %20 as the space

example



Code:
[live=Bald%20Bouncer]name[/live]
 
I post the code that i used for my forum

Code:
<if condition="$post['fieldXX']">
<a href="http://profile.mygamercard.net/$post[fieldXX]">
<img src="http://card.mygamercard.net/mini/$post[fieldXX].png" border=0>
</a>
</if>
 
hey guys, thanks for the code, but can someone tell me if it has to be in specific place in the postbit legacy, sorry i am very new to this

cheers
 
Back
Top