Thanks Peter, thats great<br><br><div class="gmail_quote">2009/10/13 Peter Bowers <span dir="ltr"><<a href="mailto:pbowers@pobox.com">pbowers@pobox.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon, Oct 12, 2009 at 11:53 AM, Simon <<a href="mailto:nzskiwi@gmail.com">nzskiwi@gmail.com</a>> wrote:<br>
> I've been wanting to do something similar,<br>
> with the added proviso that if the first wiki work is one of A, An, The then<br>
> that should be ignored in the sort.<br>
<br>
</div>Here's a rough idea, depending on the {$Title} for your sorting, but<br>
getting rid of A, An, & The:<br>
<br>
$article_pat = '/^(?:The|An?) /i';<br>
SDV($PageListSortCmp['title_no_article'],<br>
'@strcasecmp(preg_replace(\''.$article_pat.'\', \'\',<br>
$PCache[$x][\'=title\']), preg_replace(\''.$article_pat.'\', \'\',<br>
$PCache[$y][\'=title\']))');<br>
<br>
The quoting is pretty messy and could be cleaned up, but it seems to<br>
work in my (albeit brief) testing.<br>
<font color="#888888"><br>
-Peter<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>____<br><a href="http://kiwiwiki.co.nz">http://kiwiwiki.co.nz</a><br>