I'm pondering on the concept of linking the taxonomy and user concepts together, so that users can be assigned to one or more terms, and any content they post will have only those terms attached (or they can choose the terms if they're assigned to more than one term in a vocabulary). This would in a way create a user groups structure.

I'm kinda new to drupal, and haven't found this sort of functionality - though I might be missing something here. The only user grouping features I've come across are the Taxonomy Access and Organic Groups modules, neither of which seem to do what I want.

Is the idea feasible? Any thoughts/suggestions/idea before I jump in?

vik

Comments

dan90’s picture

http://drupal.org/node/5086 for example
running up against a similar problem myself... was thinking the easiest way would be to associate a node with each user. it would be insane if there ISN'T a modules that does this already, but I couldn't find one from the list... (can't wait until someone thinks of a better module calssification system...)

bonobo’s picture

Organic Groups, Taxonomy Access Control, and Simple Access.

All modules handle grouping users/content on a site in slightly different ways. One of them might/should work for you.

Cheers,

Bill

-------
http://www.funnymonkey.com
Tools for Teachers

dkruglyak’s picture

Unfortunately, this is not so easy. The problem is described in this issue: http://drupal.org/node/42618

Any ideas are welcome.

bonobo’s picture

this post for more details.

Cheers,

Bill

-------
http://www.funnymonkey.com
Tools for Teachers

vik4’s picture

I've been pondering over this the last few days, and have come up with two possible solutions, though I need thoughts and comments as I might have missed things. Both solutions revolve around linking user ids with term ids in the taxonomy. This would initially be done by the admin or some sort of privileged user.

Solution 1:
When a user creates content, that content is automatically associated with the terms that user is associated with. If the user is associated with multiple terms, then the user would (probably) have a choice as to which term/s the content associates with.

Solution 2:
Content creation is not changed, but content can be queried from the database by user-taxonomy terms. So if a user 'sam' is linked to the term 'tomatoes' and someone wants to look at all stories with the term 'tomatoes', all of sam's content will appear.

So solution 1 changes the way content is added, but keeps content access the same as before, while solution 2 is vice versa. Solution 2 will have problems when users are linked to multiple terms, but in some ways in nice as the users' content will change terms if the user does (though this osrt of behaviour will not always be wanted). Solution 1 still presents the problem of users needing to select terms for their content. Perhaps a way to work around this would be that terms associated with each user are 'hard' or 'soft' - 'hard' terms will always be associated with all content that user produces, while 'soft' terms can be added at the user's option. This would only work for solution 1.

In fact, I think solution 2 is probably not that worthwhile, except that it would probably be easier to implement.

Opinions? Thoughts? Ideas?

dkruglyak’s picture

Sound ideas. I think both Solutions 1/2 should be implemented as configurable options. There would also be great value in tying this with Organic Groups module, per this issue: http://drupal.org/node/42618

The reason to integrate with OG is because it has ready mechanisms and UI for subscription, membership management, moderation, etc. This functionality should not be so fragmented.

rjl’s picture

Well, I too have been pondering this issue, so I decided to take a stab at writing a module.

Here's my story...

I have committees, lots of committees, some with sub-committees and workgroups. Each committee has members and, of course, some people are members of multiple committees. They need to share information, set up meetings, discussion boards, etc.

At first I tried creating taxonomy terms for each committee, but they needed to be created in a more ad hoc way. I tried to teach a few people how to admin taxonomy, but that didn't work so well either, then, I tried organic groups, but that wasn't doing it either. Taxonomy Access Control required a patch to core, and well, I am afraid of that (it works great for others; it's a great module, just not for me).

Time for a new invention. I wanted a way for users who know how to make a simple post, able to add to the taxonomy. I needed a way to coordinate groups of people. So I created what I am calling 'Taxonomy Addons'.

Just by enabling the module you get a new way to view taxonomy. Each vocabulary gets a tracker style page, showing all posts in the vocabulary, and if logged in, a tab for the users posts. Each term also gets a similar page. The tracker list is also sort-able, similar (almost exactly) to the xtracker module.

In addition to that there are 4 additional options to add on, hence the name. Each option is available for any or all of the vocabularies and are more or less independant of each other.

Option one: Link a Vocabulary to a Node/Content type. Each new node of the specified type creates a term in the associated vocabulary. You can use an existing type, a flexi-node type, or you can create a simple type with the module. Currently you can do a flat alpha list or single hierarchy, there is not yet a way to indicate weight or multiple hierarchy, for that, you still need to go to admin/taxonomy. If you choose to create a node type, the standard 'create' and 'edit own' permissions are created plus an 'edit all' option.

Option two: Allow a Vocabulary to have linked users (users link to terms in the vocabulary, not the vocabulary itself). This option includes defining an extra field for the user to define their relation to the term (in my case of Committees, is the linked user a 'Member', the 'Chair', 'Secretary' etc.). Once you enable the extra field, you can choose a fill in the blank text box option or select menu where you supply the choices. Additionally you can define how linked users are listed by choosing fields from the user profile (if you have it enabled). The linked user list is a basic table sort and can be seen on the vocabulary home page (shows all linked users) and on the term home pages (showing only users linked to the term). There is also an option to download the linked user list to excel as well a list of email addresses suitable for use with some email programs. (There are plans in my head to include emailing with the module, but one step at a time; this will likely be option 5). With this option, there are some permissions added, such as view the term page, view the member list, link yourself, etc.

Option three: Define the standard vocabulary and term home pages. The default is nice, but here you can define a few things, such as the caption of the tabs. You can add sub tabs for content types. You can choose if you want the basic tracker view, teaser view and an event view (if you have event module), which is similar to tracker, but instead of date updated, it shows the nodes with date of event.

Option four: Override the taxonomy/term/## page to redirect to the term home page instead.

So, most of the code is written, I'm am doing a lot of tweaking and fixing of a few bugs here and there, a few permission issues, and a few back-end admin things as well. I would love for you to check it out. You can see it at a test site http://www.outleft.com/drupal465/ (yes it is drupal 4.6.5 - I will have lots to do to get it ready for 4.7). I've created a user account 'drupal' password '1234'. If you have a chance to check it out, I would love some feed back. If you do visit, notice top left you won't see a 'Committees' link. After you log in you will. Feel free to create a committee or two, link yourself, unlink yourself, and create a story. Don't look at anything else; it's all out of the box drupal.

Thanks

PS If the site isn't working, it means I am working on it. It's a sad situation, but I must code locally, and upload to test (over a dial-up no less). But it's all good.

venkat-rk’s picture

I have to say your description sounds fascinating. Just tried it but your site is probably being hit by many, so it timed out.

About the name- why not taxonomy groups? It is available and it crisply conveys the core idea behind your module, while addons could really mean anything. Of course, I would praise my own idea, wouldn't I?;-)

rjl’s picture

How sad, the first person to test out the system (besides me), and it dies. This doesn't bode well. I am using a few session variables, I wonder if that is an issue? It was a debate I had on whether to store some user data in sessions or not, and I decided, why not give it a try and see if it works.

About the name, thanks for the suggestion. I wasn't sure what to call it. At first I was just calling it 'xyz' and each time I had a new idea, I would write some code and then it hit me to write the code a little more API like so that if I wanted to create a new option I could better re-use my code. So while there are now only 4 options, I have ideas for many more.

dkruglyak’s picture

Wow, this is really cool. When could you contribute this new module? 4.6.5 is perfect, anyone who has a production system will have to use it for awhile.

rjl’s picture

That is the question...

My goal was to have all the kinks worked out by Dec. 31, but I won't make that (maybe I could if I skipped out on year-end festivities, but that's not going to happen).

Then I will have to learn how to post a project, I think I need a CVS account? This is a part of drupal that I have not really learned that much about. And I don't really yet know how to make and apply patches, so I will have to learn how to do that. Many things to learn.

And I have many, many questions, that I probably should have had answers to before developing a module (but why must the cart always come before the horse). Such as

  • When it is appropriate to use sessions? Currently I am storing a users related tids in a session to reduce database hits - is that ok?
  • What's the preferred method of using the drupal variable table? I see many small variables, but I chose to have a few, and some are storing fairly large arrays - is that ok?

And those are just for starters.

So the answer to distribution is hopefully soon.

venkat-rk’s picture

My humble suggestion is that you apply for a CVS account, but don't wait for it come through to finish your module. Going by other forum posts, getting the CVS account takes a long, long time and probably for good reasons.

Alternatively, you can request someone with a CVS account to create the project for you and upload the module, but you may still have to contend with patching and stuff. I am not sure.

The other alternative is to apply for CVS but finish the module and offer it on your own site so that others can download and try it out. This is probably the easiest.

As for your technical queries, I am sure the experienced drupal developers can help you if you go on irc.

bonobo’s picture

http://drupal.org/mailing-lists

Ask some of these development-specific questions there.

The folks on the list could give you some useful advice on these questions.

Cheers,

Bill

-------
http://www.funnymonkey.com
Tools for Teachers

rjl’s picture

Thanks for the kind words of support and helpful ideas. I'm going to sign up for a CVS account today.

And the mailing list hint, great idea, not sure why I didn't think of it.

As for the module, I will get it ready for prime time shortly and then let folks at it.

Will keep you posted.

vik4’s picture

Even if it's half broke, there's people (well, at least me) who'd like to have a play with this. Any chance of putting a link to the module code on your site before it's prime? Don't mean to be pushy or anything, but this may be a faster way to getting it working.