This request is relevant to the category module. Is it possible to make this module to look for Distant Parents when it does not find any direct parents and in addition when a free tag is assigned under a selected distant parent it will make it as distant child and not direct child (as it should)?
Comments
Comment #1
rconstantine commentedCould you point me to some docs explaining what distant children and parents are? I have no idea what you're talking about.
Comment #2
zandros commentedDistant Parents is a feature of the Category Module. In the category module what you have is containers and their categories (like vocabularies and their terms). A container is a parent of its categories. And each category can be a parent of its child categories. When you have more than one container you can set one of them as a distant parent (A) of the other container (B). That would mean that the categories inside container (B) apart from being children for the container (B), they are also distant children for the container (A) and for each category belonging directly to that container (A).
My problem with that module was that the free tagging feature is not following this hierarchical structure. Whereas your module does and is usable with the category module too (apart from distant parenting). My query has started months ago as you can see in the issue http://drupal.org/project/issues/39683
Now the only problem that I face is that it is totally taxonomy-module orientated (as it should) and therefore it is using the taxonomy wrapper module which is included in the category module (it is something that makes the category module compatible to other taxonomy oriented modules) so it's difficult to just add the "look-for-distant-parents-or-children-too" feature...
I think I am making my life complicated for having distant parents, as you could just say why don't you put everything under the same container, but I think it gives more usability advantages to the user in that way.
Comment #3
zandros commentedI am talking about the CCK Taxonomy Super Select Ultra module
Comment #4
rconstantine commentedI'm interested to learn more about distant parents. Could you tell me a use-case or two so that I can understand why you would use them? It sounds like in your example above that (A) and (B) are at the same level, or siblings. Is that right? I'm headed to the issue you mentioned to see what's there.
Comment #5
rconstantine commentedI briefly tried to find a relevant page at the category doc site: http://category.greenash.net.au/docs but didn't see anything about distant parents. Care to point me to the right place?
That said, I'm suspecting that this will be more than a little difficult to implement if I'm understanding your description correctly.
Comment #6
zandros commentedI think the best example is shown in the thread: http://drupal.org/node/74747#comment-157813
This was where I got all the answers I wanted to use the category module.
But let me make it more specific to my case. What I want is to have 2 containers (that would mean two vocabularies if I used the taxonomy module). In one of the containers I want to put all possible categories (=terms) that will be used for tagging any post. However, there are so many that I've set some categories in the Other container, these categories will be used for categorizing the categories in the first container. Now the trick is to set the second container as a distant parent of the first container (which will have all the categories for tagging). I want it that way, because I want to put some structure to all the tags that I will have but I don't want the categories of the tags to be shown at each post. And also I want to do a series of things just on the container with the categories that will be used as tags and I don't want the other container with the categories (used for categorizing these tags) to be involved. (I know it's getting a bit confusing, but I think there will be a nice outcome from this)
The good thing about setting also a distant parent is that you can use the activeselect feature: In the form two columns will appear. The first column will represent the container that has all the categories that are also distant parents and the second column will represent the container that has all the categories that will be used for tagging (distant children) BUT these categories will be shown according to which distant parent category you have selected. I mean whenever you select one category in the first column then only the categories that are distant children of the selected category will be shown in the second column. So the user can select any of these (distant children) categories to tag his/her post.
However, this is not enough for me, because I want the user to put his own tag too. That's where your module comes into need. I want the distant parents to be shown as collapsible form branches because I don't want the user to select them, just to put something inside, or select a distant children inside this collapsible form branch.
Now, what happens with all modules that are using the taxonomy module when the category module is installed, they are using the category's taxonomy wrapper which is used for making it compatible with these taxonomy dependable modules.
Specially in your module's case, one of the function that is using is the
$terms = taxonomy_get_tree($vid, 0, -1, 1);and if you go to the category's taxonomy wrapper (modules\category\wrappers\taxonomy.module.copyme which has replaced the modules\taxonomy\taxonomy.module) it will trigger this:
But the function category_get_tree (in modules/category/category.inc) gives you the option to ask for distant parents:
function category_get_tree($cnid, $parent = NULL, $depth = -1, $max_depth = NULL, $distant = FALSE)by setting $distant=TRUE
Therefore, as I see it, there can be two solutions, either hack the category's taxonomy module wrapper and allow getting distant parents (which I don't think is recommended, because I don't know yet how I will distinguish the distant parents from real parents afterwards) or use directly the category's module functions in the CCK Taxonomy Super Select Ultra module and that would mean make it also category oriented module.. which I don't know you would want something like that.
Comment #7
rconstantine commentedI can see that there may be value in this, but I'm behind several deadlines for the next several weeks at least, so I'm marking this as postponed.
Comment #8
rconstantine commentedThis just isn't going to happen. Too many other things need doing and this is a fringe use case.