Announcement

Collapse
No announcement yet.

Need a couple of conditionals regarding profile fields.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need a couple of conditionals regarding profile fields.

    Hello,

    I need condtionals for four similar purposes, related to custom profile fields, if these conditionals exist:
    1. A conditional to indicate a specific custom profilefield on the memberlist page.
      For example: I have fields gender, country and region on my memberlist. I would like to add a condition (probably to the memberlist_resultsbit_field template) which allows me to style the field country different from the other two fields.
    2. The same thing, but now for the Advanced Search page. A way to indicate a specific custom field using a conditional, probably in the memberlist_search_ template for the relevant field type.
    3. And once more for the user profile page. Again the same thing, a way to style a specific custom profile field different from the rest.
    4. Edit: and one more: the same thing on the Edit Profile page.

    Any help with one or all of these would be great.

    (I wouldn't be surprised if it turns out to be the same conditional for all four questions, or at least the first two.)

    Regards,

    Walrick
    Last edited by GHC Webmaster; Tue 20 Jan '09, 12:41am. Reason: Added a question

  • #2
    1) Probably this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Member's List Templates -> memberlist_resultsbit_field

    But I don't have variables for you. You would have to examine the code to find variables you can use in conditionals.

    You can choose to show a profile field in the member list with this option:

    Admin CP -> User Profile Fields -> User Profile Field Manager -> [Edit] -> Show on Members List

    2) You can let people search a profile field on the member list with this option:

    Admin CP -> User Profile Fields -> User Profile Field Manager -> [Edit] -> Field Searchable on Members List

    3) Probably this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Member Info Templates -> memberinfo_profilefield

    You can run conditions against variables in that template like $profilefield[profilefieldid].

    4) The edit profile page uses these various templates:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> User Profile Field Templates

    Comment


    • #3
      Hello Jake,

      Yes I know which templates to edit, it's the rest which makes it difficult.

      1. (memberlist) Solved:

      The trick is to compare the contents of the field you want to edit with the $customfield variable which is already used in the template:

      Code:
      <if condition="$userinfo[fieldXX] == $customfield">
      Of course you have to set it to show on the memberlist first in the profile field manager.

      2. I know that options exists, but I'm looking for a way to edit or hide a field on the search page, while keeping the possibility have that field searchable. I use the function to add fieldxx= to the memberlist url in some links, which only works if the field is actually searchable.

      3. I'll give that a try.

      Thanks,

      Walrick

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X