[pmwiki-users] How to get the rev number from the wiki.d pages ?

ABClf languefrancaise at gmail.com
Mon Feb 23 09:01:08 CST 2009


Hi Rogutès,

Thank your for your reply ; but sorry, no, it doesn't still work (11 still <
2)
Maybe some faulty syntax ? or something else, I don't know (is FmtPV a Page
Text Variable ?).

Note that, for a pagelist ordering by revcount, I have to write $RevCount
(not revcount) as in :
(:pagelist group=Argot order=-$RevCount list=normal fmt=#nb_rev:)

Thank you for your help.
Gilles.



> The first example in that page ought to work. Did you try adding this to
> config.php?
>
> # sorting pages by numerical integer pagetextvar data
> function IntegerDataCompare($x, $y, $var) {
>      # get integer value of the page text variable
>      $xval = intval(PageTextVar($x, $var));
>      $yval = intval(PageTextVar($y, $var));
>      # compare integer values
>      if ($xval > $yval) $c = 1;
>      elseif ($xval < $yval) $c = -1;
>      else $c = 0;
>      return $c;
> }
>
> # order=revcount will sort integers numerically by $:RevCount
> $PageListSortCmp['revcount'] = 'IntegerDataCompare($x, $y, "RevCount")';
>
> And then use
> (:pagelist group=Argot order=-revcount list=normal fmt=#nb_rev:)
>
>
> --
> --  Rogutės Sparnuotos
>



-- 
---------------------------------------
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com
---------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090223/7fd0cf27/attachment.html 


More information about the pmwiki-users mailing list