[pmwiki-users] Re: Is there a way to display the number of revisions for a page?

chr at home.se chr at home.se
Sun Jan 30 06:35:53 CST 2005


On Sun, 30 Jan 2005, Patrick R. Michaud wrote:

> On Sat, Jan 29, 2005 at 11:16:10PM -0600, Jonathan Scott Duff wrote:
> > > > On Sat, Jan 29, 2005 at 08:10:29PM -0800, Noel Llopis wrote:
> > > > > I'd like to indicate how many revisions a page has gone through (I
> > > > > find it's a very good indication of how busy the page has been and
> > > > > it's quite useful). Is there a way to do that with PmWiki? 
> > 
> > Markup('showrev','inline','/\{\$Rev\}/e', 
> >        "\$GLOBALS['PCache'][\$pagename]['rev']+0");
> 
> Actually, for consistency with other pmwiki markups I'd probably make
> it:
> 
> Markup('{$Rev}', '{$var}',
>   '/\\{\\$Rev\\}/e',
>   "\$GLOBALS['PCache'][\$pagename]['rev']+0");
> 
> I just changed the markup's name and its position to be consistent
> with the other {$var} substitutions.

I'd like to suggest that we use {$Revisions} instead of {$Rev} because 
it's more verbose.  Other than that I think this could be a useful markup 
for certain pages - is anyone planning on putting this in a cookbook?

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list