[pmwiki-users] Yet another blogging question

Thomas -Balu- Walter list+pmwiki-users at b-a-l-u.de
Tue Aug 28 06:56:19 CDT 2007


On Mon, Aug 27, 2007 at 03:02:01PM +0100, Steve Glover wrote:
> I'd like to be able to take the date information from each page's name
> and use it to display a date in a more human readable format within the
> page - either at the top of each article as part of the header, or as
> part of a "posted by UserName at..." string at the bottom.

{(ftime fmt="%d.%m.%Y %H:%M" when="{$Title}")}

This works because the PHP strtotime() function tries to parse the title
as a date string and it begins with an ISO formatted date. A better way
would be to use {(substr {$Title} 0 10)}, but that can not (yet?) be
used as the when parameter.

It also does not help to assign the substr value to a pagetext variable,
because they can not be used in the when parameter too.

> I'd also like to be able to generate two pagelists that could be
> displayed in a sidebar - one which would list (say) the last 5-10 news
> items by date and title (with links to the complete story), and another
> which lists just the year and month names for every month that has an
> entry.

If noone else gives a hint I'll have a closer look at that too, but I'm
a little low on time at the moment.

     Balu



More information about the pmwiki-users mailing list