Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Tree functions for plugin authors
Would it be possible to modify txplib_db.php such that it adds a $tbl
argument to the four tree functions?
As it stands txp_category
is hard-coded as the table name. If there was an optional extra attribute $tbl='txp_category'
then people who wish to make use of binary tree functionality wouldn’t have to duplicate the core code just to offer this in a plugin. Thus I could employ my own table and use the core functions to traverse it.
unified diff (based on vanilla TXP 4.0.6)
Thoughts?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Tree functions for plugin authors
A reasonable request.
Offline
Re: Tree functions for plugin authors
Offline
Re: Tree functions for plugin authors
w00t! Thank you, wet. Sorry I missed one of the $tbl
s in my diff.
*slaps hand*
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline