Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Category Categories

2»

Comments

  • MarkMark Vanilla Staff
    This will be possible as an extension, and I know lots of people would like it.

    Is anyone interested in taking it on?
  • oh please oh please, show yourself mighty brave soul. who will tackle such a magnificent goal? i would love to live up to that title but MySQL and I have had some bad times together. even stylesheets fear my messin'.
  • mark, would throwing an extra column or two into the Lum_Catagories suffice as a core feature for this? Just to support a child-of-category and category number within that category. Not quite sure how this would role out as an extension.
  • edited February 2006
    SQL was not designed to traverse arbitrary tree structures; it leads to extremely inefficient queries.

    I was thinking about how much work would be involved for a tag extension that wouldn't touch the category functionality. Initial research suggests "not much"; too bad I'm busy this weekend.
  • MarkMark Vanilla Staff
    I don't think Tagging is really what he's looking for, but I could be wrong. Lech, I'd go the simple route and add a "ParentCategoryID" to the Category table. That way you can go as deep as necessary - or not at all.
  • I was about to consider having a bash at this to see what i could make of it. Till i realised i'd have to handle blocking of categories and role permissions and stuff. Why are things never simple..
  • edited February 2006
    Lech, I'd go the simple route and add a "ParentCategoryID" to the Category table. That way you can go as deep as necessary - or not at all.
    But there's no way to make sure that a category's parent doesn't already have a parent, so you end up having to query the table once for each record in the table, to test whether it has any children.

    Now, the category table probably won't get very large, but O(n2) is nothing to scoff at, when a recursive solution would be linear.

    Not to mention the nightmare you'd have if a *loop* found it's way into the table.
  • MarkMark Vanilla Staff
    Yeah, bergamot, there are problems involved no question. But you'd just have to programmatically figure it out. I mean, all of this would be managed through an interface in the settings tab. A pretty easy solution would be to add yet another field called "IsParent" to the category table. Then you'd only allow IsParent == 1 categories to have children, and no child can have IsParent == 1.
  • or 0 might make a little more sense in the latter, huh? ;)
  • Or, make a LUM_Folders table, and point LUM_Category.ParentID to *that*
  • MarkMark Vanilla Staff
    yep - there's more than one way to skin a cat.
  • MarkMark Vanilla Staff
    ... egory
  • Ok, that method sounds better than storing it into its own column. It should provide enough freedom (i hope) the only madness to arise from it though is tracking/linking of the actual discussions then. Instead of storing it as a simple 1-2 digit ID number, would it then too be serialized ala (1,3) for parent cat 1 child cat 3?
  • No, the discussion would point to the category (as it does now) and the category would point to the folder (if any)
  • a physical folder, or a pointer?
  • no it's just an entry in a LUM_Folder table
  • ahh, gotcha.
  • does all this discussion mean someone is working on it or just throwing ideas out? please don't lead me on. ;)
  • if it doesn't appear to be a work in progress, it's not, we're simply hashing out ideas here. Unless someone is working on it, then we have no idea.
This discussion has been closed.