Merging terms

ahoeben - January 29, 2007 - 20:57
Project:Taxonomy Batch Operations
Version:4.7.x-1.1
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

I have been looking for a 'mother project' for some functionality I need and this module seems as good a place as any.

On a large community site, I have a pretty big freetagging vocabulary. Slight differences in spelling of terms while freetagging 'pollute' the vocabulary with superfluous tags. I'ld like to be able to merge one term into another, changing the term of nodes with term B into term A, and removing term B from the vocabulary.

Eg on a photo community site, where users can post photos and tag their photos with the equipment used. A user tags his photo with 'D200', even though a 'Nikon D200' term has already been created. I would like to be able to retag all nodes that have the 'D200' tag to the 'Nikon D200' tag.

#1

patchak - January 30, 2007 - 05:36

Hi!

I think the feature you're talking about is great, a big +1 from me.

#2

GC_Chi - February 8, 2007 - 18:37

I really surprised there aren't more posts on the topic. I think this should be an "essential" feature as well. Great idea.

#3

jwells - February 9, 2007 - 02:02

this was a a great request - I am always looking for ways to keep the data clean. I firmly believe that a few hours of thinkiing - is much better spent --- than days of data cleaning.

My thoughts on this:

I think you should post this as a Feature Request for Drupal Ver 6. I really feel it is that important. Actaully if you think about a feature already found in Terms "Synonyms" it could almost be worked into there as a cross reference perhaps.

I made a Term Feature Request for V6, that would allow for FreeTagging to be toggled On/Off at the Node level- very much the same way, we can toggle TinyMCE on/off with a Role access setting.

I hope this request you suggested comes through at some level!

#4

ahoeben - February 9, 2007 - 08:06

The way I am probably going to implement it (in this module) is by altering the term delete confirmation page. That page will include the question if you want to tag nodes currently tagged with the term that is going to be deleted with another term. I'll also add a checkbox to add the to-be-deleted term name as a synonym of the target term.

#5

jwells - February 10, 2007 - 01:46

very cool :-)

#6

ahoeben - February 20, 2007 - 14:18

Here is a work in progress module* for 4.7.x that implements the term delete confirmation page alteration. The code seems to work, but doesn't add the deleted term name as a synonym yet. Use at own risk at this time, and please let me know if it works, or doesn't work.

*: I have chosen to put this in a separate module for testing and development independent of taxonomy_batch_operations, but intend to merge the functionality into that module when it has finalised.

AttachmentSize
term_merge.txt 3.03 KB

#7

patchak - March 8, 2007 - 11:43

Hey there, your module looks very promising!

Have you continued the developpement? It's a *really* useful feature and a great addition to this module!

This is really becoming the perfect 'freetagger's' admin best friend!

patchak

#8

GC_Chi - March 22, 2007 - 16:08

If this is folded into module release, I will gladly help test it. I don't know how to test the attached txt file separately.

#9

canadrian@elect... - April 20, 2007 - 05:11

Huge +1 on this one. I just merged multiple vocabularies into one, and I have a swathe of redundant terms. I'd like to see it on the Drupal 5 branch though...

#10

NaSPA1 - April 22, 2007 - 18:02

I agree, this would be a great function! Would love to see it in the 5.x branch as well.

Radi

#11

ahoeben - April 24, 2007 - 07:03
Assigned to:ahoeben» Anonymous

Releasing issue back into "the open", since I now longer have time (hence the silence).

The functionality is available as a module (just rename the .txt file to .module and place it somewhere logical in the modules directory). It should be fairly trivial to convert it to a 5.x module.

#12

eli - May 10, 2007 - 15:04

I've picked up ahoeben's code and turned it into a working Drupal 5 module. Rather than modify the delete confirmation form, it adds a link at the bottom of the Term Edit page.

http://drupal.org/project/term_merge

Right now it's rough & not well tested, but it seems to work for me.

#13

ahoeben - May 11, 2007 - 07:19

Thanks

 
 

Drupal is a registered trademark of Dries Buytaert.