Tags:
create new tag
, view all tags
I wanted a way to construct a page that would point to topics and automatically display the last revised date/time. So you could have your Web Home look like:

MainDocument (last modified on XXXX by YYYY)

AnotherDocument (last modified on XXXX by YYYY)

where XXXX and YYYY get filled in automatically.

I added this to the extendHandleCommonTags in wikicfg.pm.

    $text =~ s/%REVISIONNAME{(.*?)}%/(&getRevisionInfo($1,"",1))[1]/geo;
    $text =~ s/%REVISIONDATE{(.*?)}%/(&getRevisionInfo($1,"",1))[0]/geo;

-- AlWilliams - 22 Sep 2000

Does this only apply to the current CVS version? I am using 01Dec2001 and for me getRevisionInfo needs two variables at the beginning, the web and the topic. Also it mentions that getRevisionInfoFromMeta is faster. So I would need something like:

    $text =~ s/%REVISIONNAME{(.*?), *(.*?)}%/" - Changed by: ".(&TWiki::Store::getRevisionInfoFromMeta($1, $2,"",1))[1]/geo;
    $text =~ s/%REVISIONDATE{(.*?), *(.*?)}%/" - Last changed: ".(&TWiki::Store::getRevisionInfoFromMeta($1, $2,"",1))[0]/geo;

The problem here is having to enter the information twice first enter the link, then enter the revisiondata and enter the destination link again. Is there a way to avoid this? The ideal would be something like

[[Dest][Dest name][%REVISIONDATE%]]

-- MartinWatt - 24 Sep 2002

OOPS! Just noticed that AlWilliams entry is from over 2 years ago. I just looked at the date and assumed it was entered 2 days ago :-(.

Anyway, are there any new developements here that make it easier to add "last modified" information to a link?

-- MartinWatt - 24 Sep 2002

Topic revision: r2 - 2002-09-24 - MartinWatt
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.