[pmwiki-users] Highlight pagelist search results based on time thresholds
Patrick R. Michaud
pmichaud at pobox.com
Sun Jul 13 14:16:43 CDT 2008
On Sun, Jul 13, 2008 at 07:00:52PM +0100, stevecrisp at gmail.com wrote:
> A simple bullet list of page names. Colored %red%red%% if within last
> 7 days, %blue%blue%% if within last 30 days, %green%green%% if older.
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 .
Pm
More information about the pmwiki-users
mailing list