You can use JSPlugin and wiki markup to generate a RecentChange -equivalent table but with sorting and filtering - and much more compact output. Here is an example:

rc.png

And here is the code:


%%sortable
%%table-filter
[{JSPlugin 

var myDate = new Date();
myDate.setDate(myDate.getDate() - 30); 
result = "||Page||Author||Date\n";
for ( i = wikiInfo.pages.iterator(); i.hasNext(); ) {
  page = i.next();
  if (page.getVersions().size() > 0) {
    version = page.getVersions().get(0);
    pageJavaDate = version.getModified();
    pageDate = new Date();
    pageDate.setTime(pageJavaDate.getTime());
    if (pageDate > myDate) {
      result += "|" + page.getName() 
             + "|" + version.author 
             + "|" + pageDate.toLocaleString() + "\n";
    }
  }
}
result;

}]
%%
%%



With the help of some java you can sort the list of recent changes by date and display only the top X changes:

%%sortable
%%table-filter
[{com.ingenta.jspwiki.plugin.js.JSPlugin 

var maxDisplaySize = 20;
var mySortedMap = new java.util.TreeMap(java.util.Collections.reverseOrder());
result = "||Page||Author||Date\n";
for ( i = wikiInfo.pages.iterator(); i.hasNext(); ) {
  page = i.next();
  if (page.getVersions().size() > 0) {
    version = page.getVersions().get(0);
    pageJavaDate = version.getModified();
    mySortedMap.put(pageJavaDate, "|" + page.getName() 
             + "|" + version.author 
             + "|" + pageJavaDate.toLocaleString() + "\n");
    if (maxDisplaySize>0 && count++>=maxDisplaySize) break;
  }
}

mySortedMap.size();

var count = 0;
for ( i = mySortedMap.values().iterator(); i.hasNext() && count<=maxDisplaySize; ) {
  result += i.next();
  count++;
}

result;

}]
%%
%%



Also adding the squared brackets around the pagename in the output will enable links to the recent changed pages:

  mySortedMap.put(pageJavaDate, 
               "|[" + page.getName() + "]"
             + "|" + version.author 
             ...

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
png
rc.png 6.3 kB 1 25-Aug-2006 20:05 Nascif Abousalh-Neto
« This page (revision-4) was last changed on 04-Feb-2008 15:06 by 83.103.35.4