Can anyone point me to existing code for classifying users by taxonomy (i.e., assigning terms to users)? Thanks, Nedjo
On 18/02/06, Nedjo Rogers <nedjo@islandnet.com> wrote:
Can anyone point me to existing code for classifying users by taxonomy (i.e., assigning terms to users)?
http://drupal.org/node/19014 -- * http://www.theatre.asn.au/ Connect with your local theatre online
The nodesingleton and usercategories modules in my sandbox were written to do this. I was unhappy with the approach in the end, so never released the modules, but here is what they do; nodesingleton enforces that a user can only have one of a certain type of node. usercategories creates a profile node for every user (there can only be one), and this node is nothing except a container for taxonomy widgets (though you could ostensibly location enable it as well, or use it for file uploads, or any number of things that nodes can do). I seem to remember that the node renders itself by rendering its user instead, so the users show up in node listings where they've been categorized. All in all, it is merely a demonstration of what we could be doing if users were nodes (or could at least participate in the nodeapi system). -Robert Nedjo Rogers wrote:
Can anyone point me to existing code for classifying users by taxonomy (i.e., assigning terms to users)?
Thanks, Nedjo
Nedjo Rogers wrote:
Can anyone point me to existing code for classifying users by taxonomy (i.e., assigning terms to users)? Thanks, Nedjo
My sandbox has a userstag module for this. Pretty crude but works. It's a copy-paste of sometime HEAD taxonomy with some modifications. You need a users_term (tid,uid) table for it and I do not know whether the mysql is there.
All in all, it is merely a demonstration of what we could be doing if users were nodes (or could at least participate in the nodeapi system).
I'm glad that you brought this up. The current thinking is that users should remain their own first class object but that a profile should be converted to a node. With this, we can deprecate most of profile.module and just use CCK admin as the profile form builder. Furthermore, this opens the door to "personnas" by letting a single user have multiple profiles. Yahoo is an excellent example of a site which lets a single uid have multiple personnas. I do think it is reasonable for a profile to be tagged with terms so the original suggestion in this thread of adding terms to profile makes sense to me. Now that CCK is in decent shape, I'd be pleased if someone experimented with the profiles as nodes design and eventually submits a patch for 4.8 -moshe
Op zaterdag 18 februari 2006 13:36, schreef Moshe Weitzman:
Now that CCK is in decent shape, I'd be pleased if someone experimented with the profiles as nodes design and eventually submits a patch for 4.8
I have no immediate need myself, so this is rather far down on my todolist. My plan, however, was to start of with a cck_profiles.module. That, IMO is a far better and quicker route (e.g. it can be ready for 4.7) then patches for core. It also allows us to finetune its behaviour before we push it in core. Eventually we will want them in core, but that a) will not make it into 4.7 b) will cause a lot of political debates c) is a rather big patch Those are all the non-technical issues I foresee with a core patch. Bèr
The "users as nodes" and "comments as nodes" were discussed in the relationship session. Not the details of whether it is a good idea or not (there seems to be disagreement on this in the community), nor how to do it, but rather along the lines of "if we had this we could do much more with relationships". Perhaps profiles as nodes is a step in that direction ...
Khalid B wrote:
The "users as nodes" and "comments as nodes" were discussed in the relationship session.
Not the details of whether it is a good idea or not (there seems to be disagreement on this in the community), nor how to do it, but rather along the lines of "if we had this we could do much more with relationships".
I'm guessing that the other side of this argument thinks that taxonomy can handle all 2-d and 3-d relationships? I can see the advantages of introducing "has-one", "has-many", "belongs-to" and all that into Drupal, but please let's not make establishing those relationships as flap-waggingly tedious as it is in Rails (where I'm sure this pressure's coming from in part). My current thing has relationships which ought, if we're being Drupal purists, to make exclusive use of taxonomy. For the sake of lightening the DB load and making it at least slightly comprehansible for site maintainers (including me), I had to set up the largest two "taxonomies" as node types instead. A relationship works by autocomplete-referencing an existing thing when creating a new thing and storing it in the new thing's table. One of the 'taxonomies' I'm talking about here has over 1m terms. So the short version of this is to suggest that under some circumstances, taxonomy doesn't scale -- but only at the UI level. jh
My current thing has relationships which ought, if we're being Drupal purists, to make exclusive use of taxonomy. For the sake of lightening the DB load and making it at least slightly comprehansible for site maintainers (including me), I had to set up the largest two "taxonomies" as node types instead.
Which is not a problem, but is the solution IMHO. It is a lot easier to add access control, aliases, etc based on node type. Goba
Moshe Weitzman wrote:
All in all, it is merely a demonstration of what we could be doing if users were nodes (or could at least participate in the nodeapi system).
I'm glad that you brought this up. The current thinking is that users should remain their own first class object but that a profile should be converted to a node. With this, we can deprecate most of profile.module and just use CCK admin as the profile form builder.
Furthermore, this opens the door to "personnas" by letting a single user have multiple profiles. Yahoo is an excellent example of a site which lets a single uid have multiple personnas.
I do think it is reasonable for a profile to be tagged with terms so the original suggestion in this thread of adding terms to profile makes sense to me.
Now that CCK is in decent shape, I'd be pleased if someone experimented with the profiles as nodes design and eventually submits a patch for 4.8
The bio module (http://drupal.org/node/46589) is also a step in this direction, just in case someone collects these :) Goba
participants (9)
-
Bèr Kessels -
Gabor Hojtsy -
Grant Malcolm -
John Handelaar -
Karoly Negyesi -
Khalid B -
Moshe Weitzman -
Nedjo Rogers -
Robert Douglass