Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By jibbajabba on
I'm in interested in creating a Drupal system where each user has their own private taxonomy/vocabulary for freetagging. Has anyone had any experience with creating services using Drupal, where each user gets their own gated CMS? This relates to my privacy bounty. In addition to a users having their own private areas of the Drupal system where only they will view their content, each user would have their own vocabulary for freetagging entries.
Comments
agree.
agree.
I would like to make use of
I would like to make use of a feature like that too. Have you started any project about it?
groups discussion seed...
is here
Community tags is what
Community tags is what you're looking for: http://drupal.org/project/community_tags
I was looking forward this
I was looking forward this some weeks ago, I wanted to allow each user to have their own vocabulary where they could edit and add terms but only inside their vocabulary, since I couldn'd find a module for that I had to hack the "taxonomy module", more exaclty in the hook_menu(), I did:
I commented the following:
And inserted at the end of the hook:
The "_special_access()" function relates to:
This way, the user named "foo", for exemple, can insert and edit terms in the vocabulary named: "foo_taxonomy" without having the "edit taxonomy" permission. This can be achieved in D6 without hacking the taxonomy module, though.
private vocabulary per user
Very good hack. Thanks.
It works as you described. I do have a couple questions, see below.
What's happening:
A user called Mike
Admin created a vocabulary called Mike_taxonomy with vocabulary id 25
Admin created a test term called test, this term has the id of 123
Mike logs in, he goes to SITENAME/admin/content/taxonomy/edit/term/123
Since this term 123 belongs to Mike's vocab Mike can edit/delete this term.
The 3 questions that come up that we need to address:
1-Where does Mike go to add another term to his vocabulary? or does the Admin have to create the tems?
2-Where does Mike go to view all his Vocabulary terms? in a custom view?
3-In the example above the vocabulary for Mike, the Admin created the Vocabulary (and set it up to work with Blog Entry, multi-select, etc..). If a site has many users like Mike, would the Admin have to create the vocabulary for each user?
Things I'm looking for are like:
SITENAME/admin/content/taxonomy/edit/term/123 - this is working
To-Do:
Give Mike access to:
SITENAME/admin/content/taxonomy/edit/vocabulary/25 - to edit vocabulary
SITENAME/admin/content/taxonomy/25 - view tax terms
SITENAME/admin/content/taxonomy/25/add/term - add term
SITENAME/category/miketaxonomy/testtest - options to view/edit/clone/export displayed term
If the above is done, the only step left is creating the initial vocabulary for each new user.
Any ideas? lets brainstorm here
Add term and View terms code
1)
To add a term with this URL: SITENAME/admin/content/taxonomy/25/add/term
I did these changes:
Add:
Notice the call to _special_acess_b, let's add special access b code:
2)
To view terms with a URL like: SITENAME/admin/content/taxonomy/25 - view tax terms
Modify one line i.e. this: "'access' => user_access('administer taxonomy')" by adding the special access:
Now Mike can do the following:
Add terms to vocab - example URL: SITENAME/admin/content/taxonomy/25/add/term
View terms in vocb - example URL: SITENAME/admin/content/taxonomy/25
Edit term (see my previous comment) - URL: SITENAME/admin/content/taxonomy/edit/term/123
Two thing left, I'll work on this later,
1) Allow Mike to see admin options when viewing a term with a URL like: SITENAME/taxonomy/term/123
2) Automatically create a vocabulary for a new user upon registering, or have them press a button to create the vocab.
If you have ideas that can help pls share.
Issue
I ran across an issue that's a show stopper.
If I had a 100 users like Mike, this means 100 vocabularies, each of these will have 'Blog Entry' selected as content type, this means that when a user opens a 'Blog Entry' form they will have all these 100 categories show up on that 'blog entry' form. Unless we create a new content type to go with the new category for each user. oh my.
Add another table
Your solution is to add another table that binds vid to uid instead of relying on the username.
I'm currently working on a similar module that allows users to have their own terms within a common vocabulary (to be called private_taxonomy). I'll publish it when it's done :)
Thanks
Great! I'll be looking forward to your module.
My module
allows settings a vocabulary as "private". Vocabularies with this setting have per-user terms, each user can only view / alter their own terms. I'm not sure that this is exactly what you need, and I still can't upload the code (it's pre-alpha), but the general idea is using hook_db_rewrite_sql to add a join and a where clause on an external table which holds the term and user ids. I guess that implementing this for vocabulary ids instead should be too difficult.
My module has been released
Find it here:
http://drupal.org/project/private_taxonomy
I found and tested this
I found and tested this workaround.
Since we can't have private free tagging vocabularies I just modified the autocomplete field on the node edit form. Instead of fetching results from all the terms of a given vocabulary the autocomplete field just fetch terms from a given vocabulary AND assigned to nodes authored by the current user
I did it by altering the 'taxonomy/autocomplete' menu defined on taxonomy module. It now calls a custom function that fetches the desired results.
All you have to do is create a custom module and insert this code snippet
Thanks!! Good idea!
Thanks!! Good idea!
My module for basically using
My module for basically using the override autocomplete method above for D7:
http://drupal.org/sandbox/that0n3guy/1379404