Tags:
create new tag
, view all tags

Moldy Oldies

2008-07-22 - 22:45:00 by VickiBrown in Usability
How can you determine if old content is "moldy" (stale) or simply doesn't need to be changed regularly?

TWiki is terrific. Anyone can add pages. However, if you don't have a dedicated TWiki librarian, content can become stale. I wanted a relatively easy way to mark "old" pages and ask for feedback: is this content still useful?

I installed a custom view template and combined that with a comment form. Pages older than a pre-defined date now appear with an extra block of text at the top:

  • Screenshot of the top of an "old" page
    screensnap.jpg

Any "votes in favor" of the usefulness of the page are added to a list (table) on a MoldyOldies page.

  • Screenshot of the "votes" in favor of old pages:
    screensnap2.jpg

The computer keeps track. Pages no-one visits never get a vote. Over time, I'll be able to use the "votes" to determine which old pages are truly outdated and should be archived or removed vs. which are valuable (and, perhaps, should have their date stamp updated. smile

Steps to Create a Moldy Oldies Tracker

  1. Define several useful global variables, including a variable that stores my definition of "old".
  2. Create a custom view template, wrapping the standard skin view template. I use PatternSkin so I'm starting from view.pattern.tmpl. See TWiki/TWikiTemplates for details regarding customizing the view template.
  3. Create a comment template (or use one you already have). I created a template that captures the name of the page being viewed, as well as the comment date, commenting user, the comment (optional) and the REVINFO of the page. This information is appended to a table on a single tracking page.
  4. Enable the Moldy Oldies Tracker.

Global Variables

My view template uses several global variables.

SHELFDATE defines "old".

   * Set SHELFDATE = 01 Jan 2007

PAGEAGE prints the last-modified date of the current page.

   * Set PAGEAGE = This page was last modified: %RED% %REVINFO{"$date"}% %ENDCOLOR% 

HILITE_PINK highlights the background behind some text. I used pink to avoid conflicting with the default BROADCAST_MESSAGE color.

   * Set HILITE_PINK = <span style="background-color: #FFCCFF;">
   * Set END_HI = </span>

(Note: our TWiki already had HILITE_PINK defined, as well as variants for green, purple, blue, yellow, and orange. We've found these to be generally useful on many pages.)

WebViewTemplate

My view template imports the default TWiki view template, then wraps the body text of the page in a test for age. For simplicity, I named my template page WebViewTemplate.

%TMPL:INCLUDE{"view"}%


%TMPL:DEF{"topiccomment"}% $NOP(%)HILITE_PINK$NOP(%) <b><i>$NOP(%)PAGEAGE$NOP(%)</i> %BR% Please let us know if the content is still useful.</b> $NOP(%)END_HI$NOP(%) %BR% $NOP(%)COMMENT{type="topiccomment" target="MoldyOldies"}$NOP(%) <hr> %TMPL:END%

%TMPL:DEF{"textcontent"}%<div class="patternTopic">%TMPL:P{"broadcastmessage"}% 

%CALC{$IF(%REVINFO{"$epoch"}% > 86400, $IF($TIME(%SHELFDATE%) > %REVINFO{"$epoch"}%, %TMPL:P{"topiccomment"}% , ), ) }%

%TEXT%

</div><!-- /patternTopic-->%TMPL:END%

Notes on the Template

1. I defined topiccomment in my template to avoid causing the IF statement to become large and unwieldy.

3. Ephemeral pages, e.g. the page that says "This topic does not exist" do not have a modification date. I needed to configure my "old" test so that these pages weren't marked. So, the first thing I do is ensure that the ppage has a datestamp and it's newer than January 1, 1970.

$IF(%REVINFO{"$epoch"}% > 86400

2. My company is still using TWiki 4.05, in which the $epoch argumednt to %REVINFO% is not yet supported. So, I had to calculate seconds myself, using

$TIME(%REVINFO{"$date"}%
instead of
%REVINFO{"$epoch"}%

The sample WebViewTemplate code shows the more "modern" way. If your TWiki is old, use $TIME(%REVINFO{"$date"}%

Comment Template

My comment template provides a simple one line text box. It writes the results to a table in another page. That table collects results from any use of the template in any page in the TWiki.

Use:

   %COMMENT{type="topiccomment" target="SomeOtherPage"}%

Result forat:

  | Topic | Comment Date | Commenter | Comment text | Rev Info |

If you've never created a comment template, see TWiki.CommentPlugin for details .

topiccomment

%TMPL:DEF{PROMPT:topiccomment}%
Your response will be "signed" with your TWiki name and dated with today's date.  %BR%
<input %DISABLED% type="hidden" name="base_topic"  value="%TOPIC%" /> %BR%
<input class="twikiInputField" %DISABLED% type="text" size="100" name="comment_text" id="comment_text" value="" /> %BR%
<input %DISABLED% type="submit" class="twikiButton" value="%button|Submit%" /> 
%TMPL:END%

%TMPL:DEF{OUTPUT:topiccomment}%%POS:AFTER%| %URLPARAM{"base_topic"}% | %DATE% | %WIKIUSERNAME% | %URLPARAM{"comment_text" }% | %REVINFO{topic="%URLPARAM{"base_topic"}%" "$date - $wikiusername"}%  |  %TMPL:END%

Enable the Moldy Oldies Tracker

When all the pieces are in place, enable the Moldy Oldies tracker by setting VIEW_TEMPLATE in WebPreferences.

   * Set VIEW_TEMPLATE = Blog.WebViewTemplate

Update the Datestamp on Useful Pages

When a page is marked as useful, I update it by adding a block of TWIKi code at the end, like this:

---------
%TWISTY{showlink="datestamp updated 06 Aug 2008"}%

content last updated %BR%
  09 Sept 2006 - 14:29:58 UTC - Main.MarySample

page timestamp updated - 06 Aug 2008 %BR%
-- Main.VickiBrown 

This page has had at least one vote in favor of its continued value ([[MoldyOldies]]). %BR%
      21 Jul 2008  Main.AnnWhite -- "I refer to this daily"

%ENDTWISTY%

This logs the comment and removes the "moldy oldies" form from the top of the page.

Comments

Couldn't we use this here on Codev? wink

-- Franz Josef Gigler - 24 Jul 2008

I also like the idea of having a good tool to "clean up" in the corporate wiki.

-- Martin Seibert - 02 Aug 2008

Certainly something should be used on Codev.

I'd like Subscribe Plugin installed on TWiki, with everyone who contributed to the page subscribed on a weekly notification cycle. TWiki.org has a lot of casual visitors so email is pretty much the only way to prompt people to revisit old content.

-- Martin Cleaver MSc MBA - 06 Aug 2008

I've had this process installed for three weeks now where I work. We've accumulated comments on 23 topics so far. I improved the Comment template a bit, adding a current REVINFO field so we can track updates as well.

I've been updating the date stamps on the "useful" pages so that the moldy notice isn't shown. The entry above has been updated to include the enhancements to the process.

-- Vicki Brown - 07 Aug 2008

.

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2008-08-07 - VickiBrown
 

Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Help
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.