I am using the tree behaviour in conjunction with the jQuery tree at www.jstree.com to create a admin interface for a forum that allows multiple and unlimited subforums.
It is working quite well. The only problem is that jstree doesn't tell you how far a node has been moved, but rather gives a reference node and tells you if the item was moved after, before or inside the reference node (Inside meaning it is now a subnode, after meaning that it moved upwards and before meaning downwards). My problem is how do I calculate the distance between two nodes (With the same parent id) if I only know what the two nodes are? Currently I am calculating the difference in lft values between the nodes, but it does not always give correct values. So, what is the recommended method for calculating the distance between two nodes in a MPTT tree? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. 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/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
