https://www.icyphoenix.com/viewtopic.php?f=4&t=6292 ----------------------------------- 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! ----------------------------------- DWho Fri 14 Aug, 2009 18:04 Re: [DOC] How To Create Custom Profile Fields ----------------------------------- Great Doc again Chaotic... number one in the docs department.. :mrgreen: :mrgreen: ----------------------------------- spydie Fri 14 Aug, 2009 18:36 Re: [DOC] How To Create Custom Profile Fields ----------------------------------- Very nice DOC Chaotic. I just needed some explanacions of how to implement these thing´s . You´re the Best :drink_02: ----------------------------------- Chaotic Wed 18 Nov, 2009 19:54 Re: PROFILE - How To Create Custom Profile Fields ----------------------------------- Like [url=http://www.facebook.com]Facebook? Want to add a button to your posts that links users straight to your Facebook page so they can add you as a friend? Enter your [b]ACP -> USERS -> Add Custom Profile Field[/b]. Field Name: facebook Field Description: facebook Just enter those two fields and click SUBMIT. [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_facebook = ( $postrow[$i]['facebook'] && $postrow[$i]['user_id'] != ANONYMOUS ) ? ''. $lang['facebook'] .'' : '';[/code] [b]FIND:[/b] [code linenumbers=false] 'POSTER_FROM_FLAG' => $poster_from_flag,[/code] [b]BEFORE, ADD:[/b] [code linenumbers=false] 'POSTER_FACEBOOK' => $poster_facebook,[/code] [b]OPEN:[/b] [i]viewtopic_body.tpl[/i] [b]FIND:[/b] [code linenumbers=false]{postrow.POSTER_POSTS}[/code] [b]AFTER, ADD:[/b] [code linenumbers=false]{postrow.POSTER_FACEBOOK}
[/code] [b]OPEN:[/b] [i]lang_profile_fields.php[/i] [b]FIND:[/b] [code linenumbers=false]/* //An Australian Example for Profile Fields $lang['1_Phone'] = 'Phone'; $lang['1_Description'] = 'Phone Number'; $lang['2_Team'] = 'Team'; $lang['2_Description'] = 'Australian Team'; $lang['2_Juve'] = 'Wallabies'; $lang['2_Milan'] = 'Kangaroos'; $lang['2_Altro'] = 'Other'; */[/code] [b]AFTER, ADD:[/b] [code linenumbers=false]$lang['10_facebook'] = 'Facebook'; $lang['10_Description'] = 'Insert your Facebook ID number here. To find your Facebook ID number, log into your Facebook account and click your name next to SETTINGS at the top of the page. Look at the link in your browser and copy the number following "ref=name&id=". Your ID number will be a series of only numbers.';[/code] In the above lines, ([b]$lang['10_facebook'][/b]), please replace the number 10 with your custom profile field ID. To find your custom profile field ID, ACP -> Users -> Edit Custom Profile Fields. Look for your custom profile field and note the number to the left of the field you created. You should change the number in the above code to YOUR custom profile field ID. [img]http://www.icyphoenix.com/files/images/3295/facebook.jpg[/img] ----------------------------------- paramine-gx Thu 10 Dec, 2009 02:12 Re: PROFILE - How To Create Custom Profile Fields ----------------------------------- Nice word chaotic, but i dont understand how to add custom profiles without external references... for example... I want add a custom field called "My Points", this field only could be modified for administrators (that option is in the ACP) and i'd like that field appear only in the user profile and/or any part my posts... I dont know if you understand me. I'd like add custom fields that can be modified and set by admins... how i could put that? I hope you can help me =) and nice tutorial =D ----------------------------------- odelot Wed 16 Mar, 2011 08:53 Re: PROFILE - How To Create Custom Profile Fields ----------------------------------- How i put the logo? ----------------------------------- TheSteffen Sun 20 Mar, 2011 17:29 Re: PROFILE - How To Create Custom Profile Fields ----------------------------------- Can you please ask your question in "General Support" and can you please explain a little bit more your question, because I don't understand what you mean. ----------------------------------- elvamo Fri 29 Jul, 2011 01:05 Re: PROFILE - How To Create Custom Profile Fields ----------------------------------- Se puede poner algo como el id de play station osea algo asi¿?¿? [img]http://mypsn.eu.playstation.com/psn/profile/elvamo.png[/img] pero con la información del centro de los juegos y eso... ----------------------------------- Joshua203 Fri 29 Jul, 2011 07:50 Re: PROFILE - How To Create Custom Profile Fields ----------------------------------- English please Elvamo :shock: Inglés, por favor :wink: ----------------------------------- jeff909 Sun 11 Sep, 2011 17:47 Re: PROFILE - How To Create Custom Profile Fields ----------------------------------- This is great! Thanks! Ur one BIG help! Keep it up! ----------------------------------- kerwin Fri 13 Jul, 2012 09:51 Re: PROFILE - How To Create Custom Profile Fields ----------------------------------- Very nice DOC Chaotic. keep it up. you are awesome. :lol: :lol: