Well, I'm over a week late, but I'm claiming my first piece of the taxonomy segment if nobody tells me not to. First on my list is to provide is an MPTT class with a series of methods that allow for simple hierarchical storing of data in a database. The functionality is easily split into four categories along the lines of CRUD:
Creating appendChild(parentNodeID, newNode, [sort]) insertBefore(siblingNodeID, newNode) insertAfter(siblingNodeID, newNode) Reading getNode(nodeID) getSiblings(nodeID) getParent(nodeID) getPath(nodeID) getDescendants(nodeID) Updating sortLevel(nodeOnLevelID, TIME || NODENAME) replaceNode(oldNodeID, newNode) moveNode(method, relatedNodeID, targetNodeID) Deleting remove(nodeID) I will be making one schema change to make things as fast as possible: the addition of mptt_parent into the "terms" table. I don't see this as a problem since this table is presently unused. That will allow for single-query sibling selection without parsing the descendants out of the selection. After this class is complete in a standalone form I'll figure out how to reconcile it with Habari--I'm currently unfamiliar with how all the underlying sections work and where all changes will need to appear. Also, something I'm considering for the future, I'm planning a second class that implements/extends this base-level MPTT class with chaining (ala JavaScript, jQuery). If you've any objections, speak now or forever hold your peace. I'm starting on this within the hour. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/habari-dev -~----------~----~----~----~------~----~------~--~---
