https://www.icyphoenix.com/viewtopic.php?f=4&t=6292&p=46022#p46022 ----------------------------------- 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]