[pmwiki-users] PageList sort order (numerical values)
ABClf
languefrancaise at gmail.com
Sun Apr 5 02:55:08 CDT 2015
Working, good ;) Thank you Petko, one more time.
$FmtPV['$NbSource'] = 'NbSource($page["targets"])';
function NbSource($targets) {
return substr_count($targets, "Source.");
}
# permute $x and $y to have it sort the other way
$PageListSortCmp['nbsource'] = 'NbSource(@$PCache[$x]["targets"]) -
NbSource(@$PCache[$y]["targets"])';
Le 5 avril 2015 08:49, Petko Yotov <5ko at 5ko.fr> a écrit :
> Pardon, j'ai encore oublié de remodifier après l'avoir testé chez moi !
>
> Il faut remettre "Source." au lieu de "PmWiki." !
>
>
> function NbSource($targets) {
> return substr_count($targets, "Source.");
> }
>
> Petko
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20150405/3077d96e/attachment.html>
More information about the pmwiki-users
mailing list