Thanks Peter, thats great 2009/10/13 Peter Bowers <[email protected]>
> On Mon, Oct 12, 2009 at 11:53 AM, Simon <[email protected]> wrote: > > I've been wanting to do something similar, > > with the added proviso that if the first wiki work is one of A, An, The > then > > that should be ignored in the sort. > > Here's a rough idea, depending on the {$Title} for your sorting, but > getting rid of A, An, & The: > > $article_pat = '/^(?:The|An?) /i'; > SDV($PageListSortCmp['title_no_article'], > '@strcasecmp(preg_replace(\''.$article_pat.'\', \'\', > $PCache[$x][\'=title\']), preg_replace(\''.$article_pat.'\', \'\', > $PCache[$y][\'=title\']))'); > > The quoting is pretty messy and could be cleaned up, but it seems to > work in my (albeit brief) testing. > > -Peter > -- ____ http://kiwiwiki.co.nz
_______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
