As everybody knows, profile.module is a wonderful tool to distribute the maintenance of your site user’s information. Each user can change his/her own data and it saves a lot of time to the administrator, but as "free text" shown, it’s also the door of a new kind of web interaction: Why limit profiles to static fields? Why not use the profile area as (for instance) an space of user-content relationship?
Imagine you are building a site for a university department and you like your teachers’s role indicate what subjects are they teaching, what articles they wrote or what research groups they belong (btw, subjects, articles and groups are nodes).
Imagine you are building a site for music groups, and you want to let your musicians to join in different groups and refer what songs they wrote (once again, groups and songs are also nodes).
Drupal can offer you some different solutions to develop the former scenarios, but imagine you want to let your users refer some nodes from their own profile’s page… is it possible with drupal profile.module?
I know about a hack that relates profile fields and a taxonomy and CCK can help in some sense, but “out of the box” it wasn’t possible so this is why I hacked the original profile.module to add a new kind of node that I called “related with”.
With this new profile’s field type you will be able to indicate the kind of nodes that finally will be listed to the registered users as a multi-select field.
Sorry in advance to dirty the great profile.module with my humble hands, and also sorry to make it public… but I though my hack could be also useful for someone else. :-P
Here you have a patch to hack your profile.module, but you are warned: This is a dirty hack, so use this at your own risk.
If any expert drupal developer would like to review the code and update a new patch, no offense with this. :-)
PD: Some harcoded texts are in Catalan (a minority EU's language), but they aren't important to play with the hack and discover what I'm talking about. If at the end you expect to use this patch in production, let me know to translate it to English.
| Comment | File | Size | Author |
|---|---|---|---|
| relatedWith01.patch | 6.85 KB | mbria |
Comments
Comment #1
wafaa commentedThis is a Drupal patch, not related to Profile CSV.
Comment #2
dmitrig01 commentedreally old...
Comment #3
mbria commentedThis "snippet" is abandoned, because nobody expressed interest in been integrated with profiles.
Any case looks like most of we are moving to userprofile.
A combination between userprofiles+nodefamily+views will do the work.
Comment #4
mbria commentedclosed