[pmwiki-users] Highlight pagelist search results based on time thresholds

Randy Brown randy at brownragfilms.com
Sun Jul 13 15:51:45 CDT 2008

I like the color coded pagelist, but it doesn't work for me (PmWiki  
2.2.0-beta65 with a custom $TimeFmt).

My config.php contains:

$TimeFmt = '%F at %R %Z'; # dates as 2007-12-22 at 19:18 CST

$FmtPV['$LastModifiedTime'] = '$page["time"]'; //last modified unix time

My Site.LocalTemplates contains:

(:if     date -2days..  @{=$LastModifiedTime} :)>>bgcolor=#ffcccc<<
(:elseif date -7days.. @{=$LastModifiedTime} :)>>bgcolor=#ccccff<<
* [[{=$FullName}]] {=$LastModified}

I invoke the pagelist with code like this:

(:pagelist trail=Site.AllRecentChanges count=10 fmt=#sidecolorbydate  

I get results such as:

Main.Sandbox 2008-07-13 at 15:39 CDT

where every item in the pagelist shows the current time, not the time  
the page was last modified, and the wrong pages are in the list.

How would I make this work?


On Jul 13, 2008, at 2:33 PM, Patrick R. Michaud wrote:
> If it still doesn't work with that addition, let me know and
> I'll look into it further.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080713/84d0ef8b/attachment.html 

More information about the pmwiki-users mailing list