https://www.icyphoenix.com/viewtopic.php?f=28&t=6469&p=44413#p44413 ----------------------------------- Chaotic Tue 15 Sep, 2009 18:23 [Mod Release 1.3] Xbox Live Gamercard ----------------------------------- [size=14][b][Mod Release 1.3] Xbox Live Gamercard[/b][/size] [hr] [img align=right]http://www.icyphoenix.com/files/images/3295/xboxpic.png[/img] This is slightly a MOD, but it is mainly a great customization many gaming websites may find useful. This MOD will create a new [url=http://www.icyphoenix.com/viewtopic.php?f=4&t=6292]custom profile field displaying your Xbox Gamertag, your Xbox Live Gamercard, and Friend Request/Live Message images on viewtopic. [b]To see this MOD in action, please visit:[/b] 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 [url=http://www.xbox.com]Xbox.com. I'll be explaining how to do this in this topic and I'll be using the [url=http://www.icyphoenix.com/viewtopic.php?f=4&t=6292]custom profile field DOC for the beginning instructions. [hr] First, you want to create your Custom Profile Field via your ACP: ACP -> Users -> Add Custom Profile Fields [img align=right]http://www.icyphoenix.com/files/images/3295/gamertag1.png[/img] 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, [b]open:[/b] [i]viewtopic.php[/i] [b]FIND:[/b] [code linenumbers=false] $poster_from = ($postrow[$i]['user_from'] && $postrow[$i]['user_id'] != ANONYMOUS) ? $lang['Location'] . ': ' . $postrow[$i]['user_from'] : '';[/code] [b]AFTER, ADD:[/b] [code linenumbers=false] $poster_xbox = ($postrow[$i]['xbox'] && $postrow[$i]['user_id'] != ANONYMOUS) ? ('') : ''; $poster_gtmessage_360 = ( $postrow[$i]['xbox'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? ''. $lang['gtmessage'] .'' : ''; $poster_gtadd_360 = ( $postrow[$i]['xbox'] && $postrow[$i]['xbox'] != ANONYMOUS ) ? ''. $lang['gtadd'] .'' : '';[/code] Now we need to add the variable. [b]FIND:[/b] [code linenumbers=false] 'POSTER_FROM' => $poster_from,[/code] [b]AFTER, ADD:[/b] [code linenumbers=false] 'POSTER_XBOX' => $poster_xbox, 'POSTER_GTMESSAGE_360' => $poster_gtmessage_360, 'POSTER_GTADD_360' => $poster_gtadd_360,[/code] Now we need to make the Gamercard viewable on viewtopic. [b]OPEN:[/b] [i]viewtopic_body.tpl[/i] [b]FIND:[/b] [code linenumbers=false][/code] [b]AFTER, ADD:[/b] [code linenumbers=false]{postrow.POSTER_XBOX}
[/code] [b]FIND:[/b] [code linenumbers=false]{postrow.SKYPE_IMG}{postrow.YIM_IMG}[/code] [b]IN-LINE, AFTER ADD:[/b] [code linenumbers=false]{postrow.POSTER_GTMESSAGE_360}{postrow.POSTER_GTADD_360}[/code] Now let's add the language variables for the Custom Profile Field and Friend Request/Live Message icons. [b]OPEN:[/b] [i]lang_profile_fields.php[/i] [b]ADD:[/b] [code linenumbers=false]$lang['1_xbox'] = 'XBox ID'; $lang['1_Description'] = 'Insert your xbox gamers ID';[/code] [b]OPEN:[/b] [i]lang_main.php[/i] [b]FIND:[/b] [code linenumbers=false] 'Location' => 'Location',[/code] [b]AFTER, ADD:[/b] [code linenumbers=false] 'gtmessage' => 'Send Me An Xbox Live Message', 'gtadd' => 'Send Me An Xbox Live Friend Request',[/code] (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. [hr] To place your Xbox Live Gamercard under the signature line instead of under post details: [b]OPEN:[/b] [i]viewtopic_body.tpl[/i] [b]FIND AND REMOVE:[/b] [code linenumbers=false]{postrow.POSTER_XBOX}
[/code] [b]FIND:[/b] [code linenumbers=false]
{postrow.below_sig.BELOW_VAL} [/code] [b]ADD AFTER:[/b] [code linenumbers=false]

{postrow.POSTER_XBOX}
[/code] Make sure to upload the images attached to this post to: [i]your_ip_root/images/[/i] 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!