There is no search built in yet, but in essence it should not be difficult to do. It requires checking the privileges to see which fields the current logged in user is allowed to look at, then adding an outer-join to the user search looking at just those fields. I have been careful to avoid putting data into the fields as serialized PHP structures, so that searching (when it is implemented) will be easier.
You can extend the field types by writing new classes for them. For example, you may want a drop-down list of games, followed by a field for a cheat code, and another field for some notes. That can all be done fairly easily. The field types list is hard-coded at the moment, but another TODO is in there to drive that from some kind of metadata that can be configured, perhaps in the same way as the module metadata works now, but placing it into comments.
New version includes some minor bugfixes and a new field type: ticklist. The 'ticklist' field type supports a list of checkboxes or radio buttons. Example options for a radio button list to select a single colour:
item=red:The Colour Red item=green:The Colour Green item=blue:The Colour Blue multiselect=0 mandatory=1
Play around with multiselect (0 or 1) and mandatory (0 or 1) to switch the list between checkboxes and radio buttons, with and without the 'none of the above' option.
TODO: 1. forgot to put IDs on the labels, so the labels are not clickable in IE 2. Would like to support validating against a minimum and maximum number of selected items, e.g. tick at least N, but no more than M 3. Along with other field types, the default value is not properly supported. The default needs to be presented when the user first goes in to edit a field.
I'm also getting the error: Err create userfield config
and am kinda stuck about what to do. Database tables are installed but empty. Sould the be some configuration section with admin rights? Admin right are set to allow editing user fields. Nothing to edit just exists.
I unactivated and uninstalled UserFields and suddenly my forum is crashing Warning: include() [function.include]: Failed opening '/home/a3076355/public_html/extensions/UserFields/default.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a3076355/public_html/conf/extensions.php on line 7
There are no APIs for pulling arbitrary data from the module at this time. If some APIs get written, then they could be used in the theme to pull out the custom field data and display it where-ever.
In the meantime, you will probably be best off writing your own page script and reading the custom data directly from the database.
Comments
You can extend the field types by writing new classes for them. For example, you may want a drop-down list of games, followed by a field for a cheat code, and another field for some notes. That can all be done fairly easily. The field types list is hard-coded at the moment, but another TODO is in there to drive that from some kind of metadata that can be configured, perhaps in the same way as the module metadata works now, but placing it into comments.
-- Jason
- Spam
- Abuse
0 · Insightful Awesome LOL ·-- Jason
- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·item=red:The Colour Red
item=green:The Colour Green
item=blue:The Colour Blue
multiselect=0
mandatory=1
Play around with multiselect (0 or 1) and mandatory (0 or 1) to switch the list between checkboxes and radio buttons, with and without the 'none of the above' option.
TODO:
1. forgot to put IDs on the labels, so the labels are not clickable in IE
2. Would like to support validating against a minimum and maximum number of selected items, e.g. tick at least N, but no more than M
3. Along with other field types, the default value is not properly supported. The default needs to be presented when the user first goes in to edit a field.
- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·-- Jason
- Spam
- Abuse
0 · Insightful Awesome LOL ·I'm also getting the error:
Err create userfield configand am kinda stuck about what to do. Database tables are installed but empty.
Sould the be some configuration section with admin rights? Admin right are set to allow editing user fields. Nothing to edit just exists.
Help highly appreciated
-Sharon
- Spam
- Abuse
0 · Insightful Awesome LOL ·Did you every get your problem solved?
- Spam
- Abuse
0 · Insightful Awesome LOL ·Warning: include() [function.include]: Failed opening '/home/a3076355/public_html/extensions/UserFields/default.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a3076355/public_html/conf/extensions.php on line 7- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·could you tell me, how i can make list with all users on the one page, with all informations + custom fields?
regards,
igor
- Spam
- Abuse
0 · Insightful Awesome LOL ·/home/a3076355/public_html/conf/extensions.php on line 7
Take out line 7.
- Spam
- Abuse
0 · Insightful Awesome LOL ·There are no APIs for pulling arbitrary data from the module at this time. If some APIs get written, then they could be used in the theme to pull out the custom field data and display it where-ever.
In the meantime, you will probably be best off writing your own page script and reading the custom data directly from the database.
-- Jason
- Spam
- Abuse
0 · Insightful Awesome LOL ·- Spam
- Abuse
0 · Insightful Awesome LOL ·