By ranavaibhav on
Hello,
I'm looking for a way to list terms created by a specific user. Is there any module available to support this feature?
I want to list all the terms created by user on their profile page.
Any ideas? Please help.
Thanks.
Comments
I'm pretty sure that taxonomy
I'm pretty sure that taxonomy terms don't contain this data so it will not be possible to do this easily.
I created a module called
I created a module called "term_author" and all is does is it creates a table called "term_author" in the database. And using Rules module I'm executing this code when new term is created >
I have similar rule to delete the entry from the table upon term deletion.
Now, at least i have a data which i need. Now looking for a way to handle database updates without Rules module as well as an implementation with Views.
Jackie R
Created custom module
Hello,
I finally created a custom module to serve the purpose. As described in my last comment, this module will create a database table called "term_author" and in this table the module will keep record of the Vocabulary ID, Term ID and User ID who created the term.
To use this data, i have integrated the module with Views. So there is "Taxonomy: Author" field available to use as field, sort, filter & argument.
Due to some responsibilities mentioned on this page "http://drupal.org/node/7765" I'm not willing to publish in on drupal.org. However, i request someone who have in depth knowledge of PHP and Drupal, and would like to take over and take ownership of the module.
I'm unable to attach the module data here, so please let me know if anyone interested taking over and take ownership of it.
Jackie R
Hi, Thanks your idea.
Hi,
Thanks your idea. Actually I'm developing this module to Drupal 7... I just need to solve issues with the taxonomy term creation and finish the View integration.
Cya!
I added the Field "Term
I added the Field "Term Author" "field_term_author"
and used this rule to populate the author field
{ "rules_author_terms" : {
"LABEL" : "Author Terms",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "taxonomy" ],
"ON" : [ "taxonomy_term_update", "taxonomy_term_insert" ],
"IF" : [
{ "entity_has_field" : { "entity" : [ "term" ], "field" : "field_term_author" } }
],
"DO" : [
{ "data_set" : { "data" : [ "term:field-term-author" ], "value" : "[site:current-user]" } }
]
}
}
I use the same method. It
I use the same method. It works. Because term in Drupal 7 is also a fieldable entity, so it's very easy to add a field to it, and it certainly can be manipulated in Views.
Simpler way
Create an entity reference field
e.g. field_author
target type = user
widget type = select list
token for default value = [site:current-user:uid]
Voila!
First click a text field to insert your tokens into
i create with the entity reference a field with the widget of select list; but in the token i got this message:
First click a text field to insert your tokens into