New widget that supports multiple levels of taxonomy

GLHMarmot - October 4, 2007 - 02:45
Project:Content Taxonomy
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:GLHMarmot
Status:patch (code needs review)
Description

I wrote this widget because the content_taxonomy_activeselect did not fill my need.

This widget is used to display a hierarchy of select fields based on a multi-level taxonomy vocabulary. Such that, when you select a value from the first field, the second field is populated with the children of the first and so on. It has the following features:

- It supports an arbitrary number of levels (though only tested up to three levels deep)
- It saves each level as a value. (For example: The make of a vehicle and the model are in a hierarchy and both are saved instead of just the model)
- You define each field independently of each other. That is, you have a seperate CCK field for each level of the hierarchy and point the parent to the child and the child to the grandchild, etc.

It still relies on activeselect as a dependent module just like the content_taxonomy_activeselect widget. My hope is that this will be accepted into the main content_taxonomy module. I am happy to make any required changes for style or bugs.

The attached file is a gzipped tar file renamed with a .patch extension that contains:

- content_taxononomy_activemulti.module
- content_taxononomy_activemulti.info

AttachmentSize
content_taxonomy_activemulti.tgz_.patch2.16 KB

#1

Summit - March 20, 2008 - 10:30

Hi,

Somebody experience with this patch?
Please post!
Thanks in advance,
greetings,
Martijn

#2

Raving - May 1, 2008 - 04:52

I really should learn to read before saying something is corrupt... Leaving post here as subscription.

#3

that0n3guy - June 25, 2008 - 15:24

I tested this widget out this morning. Seems to work very well (I only went 1 levels deap, ie select Make, then model) It allows views to display the make and model in different columns.

I could not get content_taxonomy to do this correctly. I get a "page not found" when I add a "Content Taxonomy Field:" to a view, erase it and the view works again.

#4

Wim Leers - June 26, 2008 - 14:12

Seems like you're duplicating the work I've been doing with the Hierarchical Select module. Version 3 of that module includes a CCK widget that supports content_taxonomy fields.

If the module maintainer is interested, I'd be very happy to see that code included in this module instead of an extra module in the Hierarchical Select module.

#5

that0n3guy - June 27, 2008 - 17:04

I just noticed, this widget doesnt work right with IE7. It shows the second terms blank.

It would be awesome use HS will the beta still be released this weekend?

#6

Wim Leers - June 27, 2008 - 17:13

You can use it today. No major changes will be made anymore. Just some renaming of files.

#7

that0n3guy - June 28, 2008 - 14:56

Anyone get this working right with IE? I have a site almost complete but need this.

HS does NOT quite do the same thing that this does.

edit: im using the latest drupal 5

#8

that0n3guy - June 28, 2008 - 15:49

I just confirmed that I get the same 'blank' selection box in IE6 as well as IE7.

Im looking for a fix, anyone?

#9

that0n3guy - July 1, 2008 - 13:18

I fixed it useing this info http://drupal.org/node/180107#comment-762115

Thanks

#10

Wim Leers - July 3, 2008 - 16:22

Another note: Hierarchical Select previously was limited to the 'save as tag' Save option. Not anymore, now it supports all of them (I had avoided supporting the others because the code is very awkward).

So this means Hierarchical Select now really is a fully qualified Content Taxonomy widget. I'll probably post an issue for it here as soon as the HS 3 final is ready, so we can move it into the Content Taxonomy module itself.

#11

Hyper - July 4, 2008 - 05:10

#12

Hyper - July 4, 2008 - 05:11

Awsome wim!

#13

mh86 - July 4, 2008 - 08:40

I'm looking forward, that you post the code :) I really would like to commit it as a widget to the content taxonomy. and is there already a drupal6 version of HS?

#14

Wim Leers - July 4, 2008 - 15:06

mh86: it's ready. See http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/hierarchica..., both the hs_content_taxonomy and hs_content_taxonomy_views modules.

If you're willing to commit this to the DRUPAL-5 branch of content_taxonomy, let me know, so I can remove it from the Hierarchical Select module itself. I expect that you also give me commit access because I'll probably end up maintaining the code that's specific to Hierarchical Select (you'll probably maintain the widget processing code, which is only 10 lines or so, and is almost a direct copy of the code in content_taxonomy_options). Let me know.

#15

mh86 - July 7, 2008 - 09:23

I added the hs widget to the content taxonomy cvs. I renamed the module and functions to content_taxonomy_hs and content_taxonomy_views_hs so that it has the same naming conventions as the other widgets.
Additionally I gave you (wim leers) CVS access to the Content Taxonomy for maintaining the Hierarchical Select Widget.
and thanks for writing the hierarchical select widget, it's really awesome.

#16

that0n3guy - July 7, 2008 - 18:47

What about the activeMulti widget? Can it be added to CVS?

It does not do the same thing as HS (see here http://drupal.org/node/261341#comment-899324). It allows you to store the different hierarchy levels in separate cck fields.

Or is this not needed with views 2?

#17

careyhung - July 22, 2008 - 03:46

Does this widget apply to Content Taxonomy for Durpal 6???

#18

Summit - September 9, 2008 - 20:40

Hi,

Content_taxonomy Hierarchical Select widget doesn't comply with the CCK access rules I think.
IS this issue to alter please?
I would very much like the HS widget, but needs the CCK access rules working. See: http://drupal.org/node/298611#comment-1002702

Greetings,
Martijn

#19

that0n3guy - September 16, 2008 - 19:17

[quote]Does this widget apply to Content Taxonomy for Durpal 6???[/quote]

I doubt it because it uses parts of active select, and its not D6 yet also.

#20

Wim Leers - October 13, 2008 - 13:52

I reverted the commit that resulted in the inclusion of Hierachical Select because I don't want to maintain my module in 2 separate repositories. It was severely outdated.

#21

no2e - October 14, 2008 - 16:51

Didn't test the patch, but from reading the description, I think it's exactly the feature I need.
Is there any way to get something like this for Drupal 6?

#22

mansspams - November 8, 2008 - 09:23

+1 for D6! Somebody has to make SOMETHING. D6 has NO CHOICE of taxonomy widgets AT ALL :(

#23

that0n3guy - November 11, 2008 - 15:28

Attached is my attempt to convert this module to D6. I am not a coder so I just looked at the changes from the active select widget to this: http://drupal.org/node/302397#comment-1082529 and jacked with it.

It doesn't really work and suffers from the same problem that the patched activeselect widget (http://drupal.org/node/302397#comment-1082529 ) does (ie..it doesn't reference the next select drop down).

This may be a problem with the widget... or with the ported activeselect module http://drupal.org/node/298230

Edit: 11-11-2008
I edited the top two links as they were wrong.

AttachmentSize
content_taxonomy_activemulti.zip2.29 KB

#24

mansspams - November 10, 2008 - 18:45

Coder would be helpfull over here! Anyone? Hello! :)

#25

that0n3guy - November 11, 2008 - 17:29

I cleaned up this thing a little with coder module, it still doesn't work... but I was hoping :)

AttachmentSize
content_taxonomy_activemulti.zip2.29 KB

#26

arhak - November 12, 2008 - 14:33

subscribing
where to follow or D6? HS or this issue?

#27

that0n3guy - November 12, 2008 - 17:46

Well.... how's about 20 bucks for anyone to get this thing work'n...

Is that too little? it seems like it might be easy to do since its already half way there.

#28

arhak - November 12, 2008 - 21:01

@that0n3guy well, I won't do it, but certainly if I would dedicate time for it 20 bucks would be an insult
I think there is an initial price: wait until the community do this for free
or else make somebody feel proud of being paid for it
IMO

#29

that0n3guy - November 12, 2008 - 21:46

Good to know, I've never had anyone develop a module for me before so didn't really know and I defiantly didn't mean for it to be an insult. I figured if it took someone an hour to fix one day when they were bored... they just made 20 bones. Some freelance developers only charge $20-$30 an hour and if they are slow one day... their ya go.

Also I thought that if I through in 20 bones... someone else might also... and so on.

 
 

Drupal is a registered trademark of Dries Buytaert.