Icy Phoenix already comes with Custom Profile Fields (ACP -> Users -> Add Custom Profile Fields), but what if you wanted to create a deeper, richer Custom Profile Field? This guide will help get you started down the right path.
In this DOC, I will be explaining how to add a new Custom Profile Field for Xbox LIVE Gamercards.
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
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>') : '';
Now we need to add the variable.
FIND:
AFTER, ADD:
Now we need to make the Gamercard viewable on viewtopic.
OPEN: viewtopic_body.tpl
FIND:
AFTER, ADD:
Now let's add the language variable for the Custom Profile Field.
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';
(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. The end result is this:
You are able to do anything with the Custom Profile Fields and this is just one of the many different things you can use it for.
Thanks to Luca for guidance!