https://www.icyphoenix.com/viewtopic.php?f=4&t=6292&p=42818#p42818 ----------------------------------- Chaotic Fri 14 Aug, 2009 02:08 PROFILE - How To Create Custom Profile Fields ----------------------------------- [b][DOC] How To Create Custom Profile Fields[/b] 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 [url=http://www.xbox.com]Xbox.com First, you want to create your Custom Profile Field via your ACP: ACP -> Users -> Add Custom Profile Fields [img]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) ? ('') : '';[/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,[/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] Now let's add the language variable for the Custom Profile Field. [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] (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: [img]http://www.icyphoenix.com/files/images/3295/mysite.png[/img] [hr] 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!