Wow! This module is amazing. This module has performed as described. Well, I have a feature request already for this module … if it can be done.
I already have a hierarchical taxonomy that is category. For example:
Cars
--Domestic
----Chevrolet
----Ford
--Import
----Ferrari
----Honda
So, when I create a story I select the deepest term of my hierarchical taxonomy. Now, I want to use Autotagging to auto-tag the content of the story. However, I want it to compare the auto-generated-terms to the terms in the hierarchical taxonomy I already have created. Then I want the auto-generated-terms that are created in a 2nd taxonomy category called e.g. OpenCalias Tags to link to the existing terms in my hierarchical taxonomy. If they don’t exist, then new terms are created in the OpenCalias Tags category.
I read the description of the FeedAPI Taxonomy Compare module, and that is what I am looking for but just not based on feedapi . I searched for other modules and couldn’t find anything else that was similar.
Any thoughts on this?
Comments
Comment #1
IncrediblyKenzi commentedInteresting use case!
I just committed some code that adds a new api hook:
This should allow you to wire up a module to act on $terms and filter out what you need, reassign terms to other taxonomies, etc. and should satisfy your requirement.
Let me know if you need a hand!
Comment #2
mkinnan commentedThanks for the feedback and getting a jump start on this. I know some basis programming that I have taught myself, but nothing very complex. I can do stuff like get all the menus, pages, tabs, etc setup ... the easy stuff. I looked at the FeedAPI Taxonomy Compare module to get some idea of how it worked. I follow the logic, but don't know if the actual comparing function can be a copy/paste with some minor changes.
Well ... I will go ahead and get started on this tomorrow ... at least the easier stuff.
Comment #3
mkinnan commentedI think that this would be a great module to be included as a sub-module with the Auto Tagging module.
Comment #4
IncrediblyKenzi commentedWhile I agree that the feature you suggest is interesting, the purpose of this module is exclusively to handle the retrieval of taxonomy tags from third party services, and to expose an API to facilitate other modules' interaction with the fetched data.
Comment #5
mkinnan commentedWell ... I started giving this shot. I created a module called 'attcomp'. I am now trying to test the implementation of the hook function as such
However, I am not seeing my test message when I save a node. The autotagging module does it's work, but I don't see my message. This is the method I normally use to make sure a function is being called. Will this not work in this case?
Comment #6
IncrediblyKenzi commentedmkinnan: are you using 6.x-1.4-beta1?
Comment #7
mkinnan commentedI am using 6.x-1.4-beta1. If I throw in a drupal_set_message for a hook_nodeapi function in my module just because, it works fine. However, I still can't get the hook_autotagging_api_presave to display a drupal_set_message.
Comment #8
IncrediblyKenzi commentedI changed the way the hook is invoked (previously it was getting invoked per-sub module, which wasn't ideal.. also converted out to using module_invoke_all.
You'll need to update $node->taxonomy on the passed in node object.
Comment #9
mkinnan commentedI don't know what to tell you. I still can't get a drupal_set_message to show or even get any database queries to execute using the api hook function.
Comment #10
IncrediblyKenzi commentedI just tested it out using the following code (called it atag_test):
The atag_test.info file:
The atag_test.module:
The result: http://skitch.com/aaronstewart/ba1pe/test-tag.local
Make sure that you have the dependencies[] section in there, otherwise the module might not load in the right order.
Comment #11
mkinnan commentedIt works now. I tested your module, then mine again, and now both work. I don't have a clue why it didn't work a minute ago. I try to be very conscious of doing hard refreshes, checking setting and module pages, etc. but I guess didn't do something right.
Well, now it's time to see what I can do on getting a module together.
Comment #12
mkinnan commentedThanks for all the work you have done! I appreciate it.
Comment #13
IncrediblyKenzi commentedAny time!