Decent Blogging using TWiki

Function: RenderWebChanges

Replacement for TWiki's default WebChanges

Parameters

  • SKIP: topic offset
  • LIMIT: number of hits per page

Implementation

%STARTINCLUDE%
*~~
%~~ DBQUERY{
~~~    order="modified" 
~~~    limit="%IFDEFINED{"%LIMIT%" then="%LIMIT%" else="10"}%" 
~~~    reverse="on" 
~~~    skip="%SKIP%"
~~~    header="<noautolink>$n
~~~      | *&nbsp;* | *Topic* | *Type* | *Changed* | *Author* |"
~~~    format="
~~~      | $index 
~~~      | [[$web.$topic][$topic]] 
~~~      | $percntFORMATLIST{\"$formfield(TopicType)\" sort=\"on\" format=\"[[$web.$1][$1]]\"}$percnt
~~~      |  <span style=\"white-space:nowrap\">$formatTime(info.date)</span>  |  [[%MAINWEB%.$expand(info.author)][$expand(info.author)]]  |$n
~~~      | &nbsp; | <div style=\"margin:2px 10px 5px 0px;\">$flatten($expand(Teaser or Headline or TopicDescription or Text or 'no description')) </div>||||"
~~~    footer="$percntCALC{\"$dollarSET(nrTopics,$count)\"}$percnt$n</noautolink>"
~~~ }%
%~~ DBCALL{"RenderPageNavigation" 
~~~   SKIP="%SKIP%" 
~~~   MAX="%CALC{"$GET(nrTopics)"}%"
~~~   LIMIT="%IFDEFINED{"%LIMIT%" then="%LIMIT%" else="10"}%"
~~~ }%
*~~
%STOPINCLUDE%

Test

  Topic Type Changed Author   1 TestBlogEntry0 BlogEntry 2006-03-03 - 16:23 TWikiContributor
 
This is a test blog entry.
2 BlogArchive BlogPage 2006-03-01 - 23:47 TWikiContributor
 
Blog Archive
3 BlogEntry0 BlogEntry 2006-02-27 - 15:46 TWikiContributor
 
This is a blogging setup for TWiki.
4 WebAliases AdminTool 2006-02-22 - 14:14 TWikiContributor
 
Aliases for the WEB web
5 RenderBlogPage TopicFunction 2006-02-15 - 21:58 TWikiContributor
 
Render the header of a BlogPage
*~~

Calls to 'RenderWebChanges'

TopicForm
TopicType: TopicFunction
TopicDescription: Replacement for TWiki's default WebChanges
r1 - 2005-12-20 - 21:13:29 - TWikiContributor
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.