This tutorial will show you how to add extra contact fields to members profiles. This is an amalgamation of a few other tutorials I have seen that show how to add each one separately I just thought it would be easier to add them all at one time so wrote this tutorial with that in mind
ScreenShot:-

Compatability :-
These were all added during IPB 3.1.2 and still work perfectly in IPB 3.1.3
Uploads :-
First off lets upload all the icons we will need!

- Download the icons above and save them as "profile_*****.png" replacing ***** with the name of the icon(facebook/twitter etc.)
- Open up your FTP program
- Navigate to to (Forum path)\public\style_extra\cprofile_icons\
- Upload the images you saved to this folder.
Thats the easy bit done
-----------------------------------------------------------------------------------------------------------------------------------------------------
Adding The Custom Fields
- Login To Your ACP And Select The Members Tab
- Select The Custom Profile Fields Link
- Click The Add Field Icon
- Use The Information Below To Add The Custom Profile Field, Leave Everything Else Not Listed Blank/Set To No.
- After You Have Entered The Information Below Click Add Field.
Facebook :-
- Field Title: Facebook
- Description: You Can Add One Or Leave Blank
- Field Type: Text Input
- Profile Group: Contact Methods
- Profile Icon: style_extra/cprofile_icons/profile_facebook.png
- Field Key: facebook
- Maximum Input: 0
- Display Order: 0
- Field can be edited by the member?: Yes
Twitter :-
- Field Title: Twitter
- Description: You Can Add One Or Leave Blank
- Field Type: Text Input
- Profile Group: Contact Methods
- Profile Icon: style_extra/cprofile_icons/profile_twitter.png
- Field Key: twitter
- Maximum Input: 0
- Display Order: 0
- Field can be edited by the member?: Yes
MySpace
- Field Title: MySpace
- Description: You Can Add One Or Leave Blank
- Field Type: Text Input
- Profile Group: Contact Methods
- Profile Icon: style_extra/cprofile_icons/profile_myspace.png
- Field Key: myspace
- Maximum Input: 0
- Display Order: 0
- Field can be edited by the member?: Yes
Steam
- Field Title: STEAM
- Description: You Can Add One Or Leave Blank
- Field Type: Text Input
- Profile Group: Contact Methods
- Profile Icon: style_extra/cprofile_icons/profile_steam.png
- Field Key: steam
- Maximum Input: 0
- Display Order: 0
- Field can be edited by the member?: Yes
Now you have setup the profile Fields just the skin edits left to do.
------------------------------------------------------------------------------------------------------------
Skin Edits
login to your ACP and Navigate to the Look & Feel tab
Select the skin you want.
Under the Templates Tab select Profiles
Select "customFieldGroup_contact"
*IMPORTANT* Take a copy of the info in the template and save it on notepad in case of problems.
Find :-
<else />
{$f->parsed}
</if>
Replace with :-
<else />
<if test="cf_twitter:|:$f->raw_data['pf_key'] == 'twitter'">
<a class='url' href='http://www.twitter.com/{$f->parsed}'>{$f->parsed}</a>
<else />
<if test="cf_facebook:|:$f->raw_data['pf_key'] == 'facebook'">
<a class='url uid' rel="me" href='http://www.facebook.com/{$f->parsed}'>{$f->parsed}</a>
<else />
<if test="cf_myspace:|:$f->raw_data['pf_key'] == 'myspace'">
<a class='url' href='http://www.myspace.com/{$f->parsed}'>{$f->parsed}</a>
<else />
<if test="cf_steam:|:$f->raw_data['pf_key'] == 'steam'">
<a class='url' href='steam://friends/add/{$f->parsed}'>{$f->parsed}</a>
<else />
{$f->parsed}
</if>
</if>
</if>
</if>
</if>
And thats all the skin edits that are required. Remember to do this for each skin you use on your forum.
I hope this tutorial has been of help!
Źródło: http://www.codersrefuge.com/tutorials/article/92-adding-more-profile-contact-field/
nie, 31 październik 2010