Resource icon

Custom User Fields broken into groups

Mutt

Well-known member
Mutt submitted a new resource:

Custom User Fields broken into groups (version 1) - Seperate Custom User Fields (Personal Details, Prefrence Options, & Contacts Identites)

If you have a LOT of custom user fields, you may want them broken into more groups than personal details, contact detail identities, & preferences options.

on the edit personal details page the default grouping is as follows with horizontal bars between them.
  • the first group is status message
  • then is avatar & custom title
  • then it's gender & birth
  • then it's EVERYTHING ELSE
  • then it's about you which allows BBCode
This small template edit lets you break up EVERYTHING...

Read more about this resource...
 
Hey Mutt, is there a way to do this and have some custom user fields available/viewable to certain usergroups?
 
Hey Mutt, is there a way to do this and have some custom user fields available/viewable to certain usergroups?
you mean you want to hide some of the stuff to some groups but viewable to others?

you could edit the same template again and wrap the entire template w/ a if
Code:
<xen:if is="!in_array({$field.field_id}, array('stuff_1', 'differentstuff_1')) OR {xen:helper ismemberof, $visitor, x, y}">
 
</xen:if>

change 'stuff_1', 'differentstuff_1' to a comma separated list of the field ids you want hidden from some
change x,y to a comma separated list of usgergroup id #s that are allowed to see the fields

this will display any filed that isn't one of those listed & if it is one of them it will still display them anyway if you are in the list of usergroup ids

it will get a little trickier if you are using my category breaks because you might wind up hiding a break. fine tuning it will really depend on your situation. if you are going to hide a whole section, no problem. if it's just parts of a section I'd make sure the first one in the group isn't one of the one you hide. that way you won't lose the break.

it would get even trickier if you had some fields that some could see & others that others can see.
 
Top Bottom