Re: A simple question about ordering of posts

Chris G <[email protected]> Mon, 1 Feb 2010 11:24:45 +0000
Newsgroups gmane.comp.web.pyblosxom.user
Message-ID <20100201112445.GK3466@chris>
On Sun, Jan 31, 2010 at 09:58:54PM -0500, will kahn-greene wrote:
> On 01/31/2010 11:16 AM, Chris G wrote:
> > Yes, I've got this done, I have a cb_filelist which essentially
> > duplicates blosxom_file_list_handler() but without the reverse of the
> > sort order.
> 
> You could cheat and use the truncatelist callback which kicks of after 
> the entrylist is sorted in blosxom_file_list_handler.
> 
I found this callback in the code when I was copying duplicates
blosxom_file_list_handler() as I had to have a copy of the code which
is called as the default truncatelist for blosxom_file_list_handler()
to work.

> It'd look something like this:
> 
> from Pyblosxom.pyblosxom import blosxom_truncate_list_handler
> 
> def cb_truncatelist(args):
>      entrylist = args["entry_list"]
>      entrylist.reverse()
>      args["entry_list"] = entrylist
> 
>      return blosxom_truncate_list_handler(args)
> 
> 
> This fails miserably if you have other plugins that implement the 
> truncatelist callback and want to do other things.  For example, I have 
> a wbgpager plugin that implements truncatelist to provide paging and the 
> above cb_truncatelist would hose that.
> 
Should it be added to the documentation? (cb_truncatelist that is)
Or is it too likely to cause problems?


> I almost added a sort callback for 1.5.  I'm pretty sure blosxom has 
> one.  If any of you think it'd be useful to have, I can add it in a 
> jiffy for 1.5.
> 
Well I do I suppose.  :-)

-- 
Chris Green


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com