2

I've many of my people tagging content in my site. I'd like to review all those newly entered terms of any vocabulary. Is there any easy way to do so? I understand there no author/date time entry when a new term is added.

I know one crude method. I can remember the tid from yesterday and display all terms greater than it if I want to see today's entry.

4

You could add a field to the term which saves the current date when saved. Use the hook_taxonomy_term_insert() for this.

I think there is no other information on the term itself than the tid.

  • We can't modify the term inserted but I'm now logging those with user name in a log file. – AgA Oct 31 '13 at 9:51
0

What about creating this field (that saves the current date) like Lance suggested, and creating a View that displays taxonomy terms, + your field and Sort them.

Regards

0

If you want something quick and dirty with MySQL and don't need complex access control to this information (no one but yourself needs to access the data):

  • Add a new column of type TIMESTAMP with default of CURRENT_TIMESTAMP to the table (in D6, its term_data). I don't know what the PostgreSQL equivalent. It will then automatically get the timestamp for when the new record is created.
  • Browse the table in a GUI SQL browser (example: Toad or Sequel Pro).
  • Let us not do it. Don't know what will happen during upgrade. – AgA Oct 23 '13 at 4:39
  • @AgA: Only an evil upgrade would delete a column that you manually added. I've been working with the nuts & bolts of Drupal for years, and make direct edits to the database all the time. Never seen an upgrade cause problems with manual columns. If you're backing up your data regularly (which you should be), then you have the historical info. There are other caveats to this method (such as, editing a record will also affect the timestamp, doesn't provide a web interface to see the report, etc...), but if it serves your need it's quick and doesn't require jumping through hoops with Drupal. – kentr Oct 23 '13 at 14:10
0

I think Lance's answer is a good approach. However, you could also use the message module (https://drupal.org/project/message). Messages are fieldable entities. You would:

  1. Create a message type for tracking new tags (i.e. tag_added, or similar)

  2. Add a field to store the tag created.

  3. Use hook_taxonomy_term_insert() to catch the event and create a new message (you could probably use a rule instead if you prefer)

  4. Build a view to show tag_added messages (or use the built-in, generic view that message ships with)

This is a more generic approach that would make sense if you also want to track other events or activities on your site (new users, new content, modified content, etc). One advantage is that you'd also collect the user info for each new tag.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.