This is slightly a MOD, but it is mainly a great customization many gaming websites may find useful.
This MOD will create a new custom profile field displaying your Xbox Gamertag, your Xbox Live Gamercard, and Friend Request/Live Message images on viewtopic.
To see this MOD in action, please visit: http://www.macommunity.net/viewtopic.php?f=12&t=2330
What is an Xbox LIVE Gamercard? A Gamercard shows your accumulated points earned by playing games, reputation, last five games played, etc. It's basically a way for everyone to see what you play and your Xbox LIVE Gamertag. Users are also able to click your Gamercard and add you to their Xbox LIVE Friends List. For more information about this, visit Xbox.com.
I'll be explaining how to do this in this topic and I'll be using the custom profile field DOC for the beginning instructions.
First, you want to create your Custom Profile Field via your ACP: ACP -> Users -> Add Custom Profile Fields
In this case, make sure the field is as seen in the picture: "xbox". We want to make the Xbox LIVE Gamercard viewable on viewtopic_body.tpl.
Next, open: viewtopic.php
FIND:
$poster_from = ($postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';
AFTER, ADD:
$poster_xbox = ($postrow[$i]['xbox'] && $postrow[$i]['user_id'] != ANONYMOUS) ? ('<a href="http://profile.mygamercard.net/' . urlencode($postrow[$i]['xbox']) . '"><img src="http://card.mygamercard.net/' . urlencode($postrow[$i]['xbox']) . '.png" /></a>') : '';
$poster_gtmessage_360 = ( $postrow[$i]['xbox'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? '<a href="http://live.xbox.com/en-US/profile/MessageCenter/SendMessage.aspx?gt=' . urlencode($postrow[$i]['xbox']) . '" target="_blank"><img src="images/gm.png" alt="'. $lang['gtmessage'] .'" title="'. $lang['gtmessage'] .'" border="0" /></a>' : '';
$poster_gtadd_360 = ( $postrow[$i]['xbox'] && $postrow[$i]['xbox'] != ANONYMOUS ) ? '<a href="http://live.xbox.com/en-US/profile/FriendsMgmt.aspx?act=Add&ru=http://live.xbox.com/en-US/profile/Friends.aspx&gt='. urlencode($postrow[$i]['xbox']) .'&AddAFriendSubmit=Add%20Friend" target="_blank"><img src="images/fr.png" alt="'. $lang['gtadd'] .'" title="'. $lang['gtadd'] .'" border="0" /></a>' : '';
$poster_gtmessage_360 = ( $postrow[$i]['xbox'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? '<a href="http://live.xbox.com/en-US/profile/MessageCenter/SendMessage.aspx?gt=' . urlencode($postrow[$i]['xbox']) . '" target="_blank"><img src="images/gm.png" alt="'. $lang['gtmessage'] .'" title="'. $lang['gtmessage'] .'" border="0" /></a>' : '';
$poster_gtadd_360 = ( $postrow[$i]['xbox'] && $postrow[$i]['xbox'] != ANONYMOUS ) ? '<a href="http://live.xbox.com/en-US/profile/FriendsMgmt.aspx?act=Add&ru=http://live.xbox.com/en-US/profile/Friends.aspx&gt='. urlencode($postrow[$i]['xbox']) .'&AddAFriendSubmit=Add%20Friend" target="_blank"><img src="images/fr.png" alt="'. $lang['gtadd'] .'" title="'. $lang['gtadd'] .'" border="0" /></a>' : '';
Now we need to add the variable.
FIND:
AFTER, ADD:
'POSTER_XBOX' => $poster_xbox,
'POSTER_GTMESSAGE_360' => $poster_gtmessage_360,
'POSTER_GTADD_360' => $poster_gtadd_360,
'POSTER_GTMESSAGE_360' => $poster_gtmessage_360,
'POSTER_GTADD_360' => $poster_gtadd_360,
Now we need to make the Gamercard viewable on viewtopic.
OPEN: viewtopic_body.tpl
FIND:
AFTER, ADD:
FIND:
IN-LINE, AFTER ADD:
Now let's add the language variables for the Custom Profile Field and Friend Request/Live Message icons.
OPEN: lang_profile_fields.php
ADD:
$lang['1_xbox'] = 'XBox ID';
$lang['1_Description'] = 'Insert your xbox gamers ID';
$lang['1_Description'] = 'Insert your xbox gamers ID';
OPEN: lang_main.php
FIND:
AFTER, ADD:
'gtmessage' => 'Send Me An Xbox Live Message',
'gtadd' => 'Send Me An Xbox Live Friend Request',
'gtadd' => 'Send Me An Xbox Live Friend Request',
(CHANGE THE NUMBER TO YOUR CUSTOM PROFILE FIELD ID) (THIS CAN BE FOUND IN ACP -> USERS -> EDIT CUSTOM PROFILE FIELDS.)
Change the number "1" to whatever your Custom Profile Field is numbered. You may also change the text in this file to whatever you wish.
To place your Xbox Live Gamercard under the signature line instead of under post details:
OPEN: viewtopic_body.tpl
FIND AND REMOVE:
FIND:
<span class="post-details"><br />{postrow.below_sig.BELOW_VAL}</span>
<!-- END below_sig -->
</div>
<!-- END below_sig -->
</div>
ADD AFTER:
Make sure to upload the images attached to this post to: your_ip_root/images/
You can move the Xbox Live Gamercard, Friend Request/Live Message icons anywhere you please!
Please post your questions, ideas, suggestions in this topic so all may contribute!
Xbox Live Icons.rar | ||
Description: | Xbox Live Icons (50x50) | Download |
Filename: | Xbox Live Icons.rar | |
Filesize: | 8.02 KB | |
Downloaded: | 309 Time(s) |