ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

profile fields not being parsed

January 20, 2011 10:22pm

Subscribe [2]
  • #1 / Jan 20, 2011 10:22pm

    florian

    395 posts

    Hi,

    I am trying to output my users profile information but my fields are not being parsed. some work and some dont. For example I can use {screen_name} and {email} but for example {bio} {gender} and {photo_url} does not work. All i get in the front end is the actual tag name.

    I also have user module installed and when I use their tags, I get the same result.

    Here is my test template and attached is the rendered page:

    In the EE docs it says that all the field are variables that can be used anywhere on the templates.

    I did make sure that the member photo and avatar are enabled in the preferences.

    any ideas?

    {screen_name} 
    
    {email} 
    
    {gender}
    {bio}
    {photo_url}{photo_filename} 
    
    {exp:user:stats} 
     
    <div id="main">
    {if avatar_filename}{avatar_url}{avatar_filename}{/if}
    <h2>{screen_name}</h2>
    <p>{group_title}<br />
    <a href="/?ACT=19&mbr={member_id}">View all posts by this member</a><br />
    {if photo_filename}{photo_url}{photo_filename}{if:else}Member photo does not exist{/if}<br />
    {photo_url}{photo_filename}</p>
    
    <p></div></p>
    
    <p> <br />
    <div id="communications"></p><h3>Communications</h3>
    <p><label>URL</label> {url}<br />
    <label>Email Address</label> {encode="{email}"}<br />
    <label>Private Message</label> <a href="http://{path=">/themes/profile_themes/default/images/icon_pm.gif</a><br />
    <label>AOL IM</label> {if aol_im}<a href="http://edit.yahoo.com/config/send_webmesg?.target=bnvvbn&.src=pg%22&gt/themes/profile_themes/default/images/icon_aim.gif&lt/a&gt{/if}&ltlabel&gtICQ&lt/label&gt" rel="noopener">/themes/profile_themes/default/images/icon_yim.gif</a>{/if}<br />
    <label>MSN Messenger</label> {msn_im}<br />
    </div><br />
     <br />
    <div id="personal_info"></p><h3>Personal Info</h3>
    <p><label>Location</label> {location}<br />
    <label>Occupation</label> {occupation}<br />
    <label>Interests</label> {interests}<br />
    <label>Your Custom Field</label> {your_custom_field}<br />
    <label>Another Custom Field</label> {another_custom_field}<br />
    </div><br />
     <br />
    <div id="statistics"></p><h3>Statistics</h3>
    <p><label>Member Group</label> {group_title}<br />
    <label>Total Weblog Entries</label> {total_entries}<br />
    <label>Total Comments</label> {total_comments}<br />
    <label>Member Local Time</label> {current_time format="%F %j, %Y %g:%i %a"}<br />
    <label>Last Visit</label> {last_visit format="%F %j, %Y %g:%i %a"}<br />
    <label>Join Date</label> {join_date format="%F %j, %Y %g:%i %a"}<br />
    <label>Most Recent Entry</label> {last_entry_date format="%F %j, %Y %g:%i %a"}<br />
    <label>Most Recent Comment</label> {last_comment_date format="%F %j, %Y %g:%i %a"}<br />
    <label>Birthday</label> {if bday_m == "1"}January{if:elseif bday_m == "2"}February{if:elseif bday_m == "3"}March{if:elseif bday_m == "4"}April{if:elseif bday_m == "5"}May{if:elseif bday_m == "6"}June{if:elseif bday_m == "7"}July{if:elseif bday_m == "8"}August{if:elseif bday_m == "9"}September{if:elseif bday_m == "10"}October{if:elseif bday_m == "11"}November{if:elseif bday_m == "12"}December{if:else}{/if}{if bday_d} {bday_d}{/if}{if bday_d && bday_y},{/if}{if bday_y} {bday_y}{/if}<br />
    </div><br />
     <br />
    <div id="bio"></p><h3>Bio</h3>
    <p>{bio}<br />
    </div><br />
     <br />
    {/exp:user:stats}

  • #2 / Jan 21, 2011 12:24am

    Cheif

    626 posts

    I think you;d better read this post:
    http://ellislab.com/expressionengine/user-guide/modules/member/custom_profile_data.html

    What ur trying to target falls inside custom_profile_data tags

  • #3 / Jan 21, 2011 12:27am

    florian

    395 posts

    I think i exhausted even this reference. my problem is actually having to turn off the automatic linking for member custom fields. that’s why i am not seeing what I am supposed to see in the front end.

    is there anything short of hacking core files?

  • #4 / Jan 21, 2011 12:31am

    Cheif

    626 posts

    So this doesnt work:

    {screen_name} 
    
    {email} 
    
    {exp:member:custom_profile_data}
    {gender}
    {bio}
    {photo_url}{photo_filename} 
    {/exp:member:custom_profile_data}
  • #5 / Jan 21, 2011 12:37am

    florian

    395 posts

    the issue from my original post was resolved. I didnt realize that the socialEE extension installed a set of custom fields automatically so i was using the wrong tags. My photo tag is actually called ‘socialee_photo’ .. BUT when I use that, it auto generates a link, hence I can not put it in my img src tag to pull the facebook/twitter images from the url.

    my issue is that i need to turn of ‘auto linking for member custom fields’ .

    yes, your example works just fine! I was looking at wrong fields for my original post.

  • #6 / Jan 21, 2011 12:39am

    Cheif

    626 posts

    Auto linking - you turn it off in the Channels admin settings, then to re-enable for specific items, use this plugin from EE themselves: http://expressionengine.com/downloads/details/auto_linker/

  • #7 / Jan 21, 2011 12:42am

    florian

    395 posts

    I know. but that is only per channel. I am talking about the ‘custom member fields’.
    MEMBERS > CUSTOM MEMBER FIELDS

  • #8 / Jan 21, 2011 12:47am

    Cheif

    626 posts

    I had assumes if you had your fields “Text Formatting” option to none it would treat it as plain text, what about if you use tagstripper (http://supergeekery.com/) to remove the auto tags and wrap it inside whatever tags you want

    <h1>{exp:tagstripper:stripAllTags}{custom_field}{/exp:tagstripper:stripAllTags}</h1>

    PS. This is theory only :|

  • #9 / Jan 21, 2011 12:53am

    florian

    395 posts

    i’ll try that! depending on how things get parsed this might work

  • #10 / Jan 21, 2011 12:58am

    florian

    395 posts

    HA. tagstripper worked for me! this is awesome

  • #11 / Jan 21, 2011 12:59am

    Cheif

    626 posts

    Yippee, file that one under “bizarre” 😊

  • #12 / Jan 21, 2011 11:56am

    Ingmar

    29245 posts

    Excellent 😊 Please post again in case there’s anything else.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases