Jump to content

  •  

  • Tutorial info Visit support topic

    • Added on: May 26 2009 02:47 PM
    • Views: 2247


    * * * * *
    4 Ratings

    Adding Twitter Custom Profile Field

    This adds Twitter to the Contact Methods profile section.

    Posted by Dazer on May 26 2009 02:47 PM
    First log into your AdminCP and go to the "Members" tab. Then select "Custom Profile Fields" and click "Add Field".

    Field Title: Twitter
    Field Type: Text Input
    Profile Group: Contact Methods

    For the profile icon, I use Posted Image
    However, you can use any image you like. Upload the desired image to /public/style_extra/cprofile_icons/ folder.
    E.g. Profile Icon: style_extra/cprofile_icons/profile_twitter.gif

    Field Key: twitter
    Field can be edited by the member? Yes

    Remove the content from the Topic View Format area.
    If I have not mentioned the others, it's because they can be left as default :).

    Now click "Add Field".


    Once this is done, go to the "Look & Feel" tab and click on your main skin. Now go to Profile > customFieldGroup__contact

    Look for:
    								<else />
    									{$f->parsed}
    								</if>

    And 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 />
    									{$f->parsed}
    									</if>
    								</if>

    Now click Save.

    All done!
    Powered by Tutorials 1.3.1 © 2012, by Michael McCune