[pmwiki-users] Highlight pagelist search results based on time thresholds
Patrick R. Michaud
pmichaud at pobox.com
Sun Jul 13 14:33:42 CDT 2008
On Sun, Jul 13, 2008 at 08:29:43PM +0100, stevecrisp at gmail.com wrote:
> 2008/7/13 Patrick R. Michaud <pmichaud at pobox.com>:
> > FWIW, here's my version of the above (in PmWiki 2.2.0-beta66,
> > locally adding {$LastModifiedTime}):
> >
> > [@
> > [[#colorbydate]]
> > (:if date -7days.. @{=$LastModifiedTime} :)>>bgcolor=#ffcccc<<
> > (:elseif date -30days.. @{=$LastModifiedTime} :)>>bgcolor=#ccccff<<
> > (:else:)>>bgcolor=#ccffcc<<
> > (:ifend:)
> > * [[{=$FullName}]] {=$LastModified}
> > [[#colorbydateend]]
> > @]
> >
> > No need to use {(ftime)} at all. :-)
> >
> > Demonstrated at http://www.pmwiki.org/wiki/Test/ColorByDate .
>
> Wow, this is turning out to be a competition ;-)
>
> Thanks for your version Patrick. I see it working on your site, but
> does not on mine.
You have to have {$LastModifiedTime} defined on your site:
$FmtPV['$LastModifiedTime'] = '$page["time"]';
This will be standard in the next release of PmWiki, unless
we change the variable name to be something else (not very likely
I suspect).
If it still doesn't work with that addition, let me know and
I'll look into it further.
Pm
More information about the pmwiki-users
mailing list