A few minor changes to this sub,and you could pass in a parameter to indicate how (what field) you wanted to sort by.
This is a chunk of code I have in my utilties file at the moment, and I hope to get it released soon, with updates to the other plug ins. This is something that goes with the top_n searches, last_n links, etc.
For those new, or who might not remember, about a year ago I started to hack heavily on the system, then about 8-10 months ago, just after making significant improvements, my life sort of bottomed out, and took a second down turn on 9/11.
Anyway, what I was doing at the time, and have been trying to reconstruct, is to add a new "utilities" group to the Plugins area, Plugins::PUGDOG, into which I've been putting my various routines and utilties. I've avoided where possible, using globals to do things, since I have to update each site manually to do that. By putting the functions into a hierarchy, and calling them as functions from inside the templates, you get the same effect, and even more features -- plus easy updating (just copy the new modules in, to all your sites.
It's the same idea PERL uses, and that Links itself uses.
Because the Plugins area is designed to be user-edited, and third-party accessible, I chose to put the modules in there, rather than in some other area, even if the routines are not really "plugins" like my Days_Old routines.
Layout is currently:
PUGDOG::Utils (general things, odds and ends, etc)
PUGDOG::Image (all my image routines, and such)
PUGDOG::Upload (all the stuff I've done working with files, this all has to be redone, moved out of "Image")
And a few others. But, basically, the idea is that my routines will not clash with anyone elses, and they should survive any sort of upgrade, and be accessible from any routines.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
This is a chunk of code I have in my utilties file at the moment, and I hope to get it released soon, with updates to the other plug ins. This is something that goes with the top_n searches, last_n links, etc.
For those new, or who might not remember, about a year ago I started to hack heavily on the system, then about 8-10 months ago, just after making significant improvements, my life sort of bottomed out, and took a second down turn on 9/11.
Anyway, what I was doing at the time, and have been trying to reconstruct, is to add a new "utilities" group to the Plugins area, Plugins::PUGDOG, into which I've been putting my various routines and utilties. I've avoided where possible, using globals to do things, since I have to update each site manually to do that. By putting the functions into a hierarchy, and calling them as functions from inside the templates, you get the same effect, and even more features -- plus easy updating (just copy the new modules in, to all your sites.
It's the same idea PERL uses, and that Links itself uses.
Because the Plugins area is designed to be user-edited, and third-party accessible, I chose to put the modules in there, rather than in some other area, even if the routines are not really "plugins" like my Days_Old routines.
Layout is currently:
PUGDOG::Utils (general things, odds and ends, etc)
PUGDOG::Image (all my image routines, and such)
PUGDOG::Upload (all the stuff I've done working with files, this all has to be redone, moved out of "Image")
And a few others. But, basically, the idea is that my routines will not clash with anyone elses, and they should survive any sort of upgrade, and be accessible from any routines.
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.