Enhancements to Recent Changes page

Idea now included in dokuwiki development version, with fancy icons too :-),
refer dokuwiki wiki, recent changes page

I find the recent changes page to be the most common page I check on the Wiki's I frequent. Often, especially on complex pages or pages I am not familiar with, I want to see the revision history or the most recent changes to the page. Rather than go through several mouse clicks to get to these pages I figured why aren't there links on the recent changes page to take you straight to that information.

  • To see the idea in action, click the recent changes button.
  • Future improvements
    • add configurable choice of predecessor for recent changes, e.g. most recent predecessor older than x days.
    • replace text links with fancy icon graphics - ideas/examples welcome :-)
    • be able to view 'recent pages' by namespace (NEW - hope you like)
    • document how to make 'do=recent' a link OR a button (NEW - hope you like)
      this should be present in the current development version, see templating documentation
      — Chris 2005-05-27
  • The code to implement this idea.
    Replace the function html_recent() in file /inc/html.php with the function below:
/**
 * display recent changes
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function html_recent(){
  global $conf;
  $recents = getRecents(0,true);
 
  print parsedLocale('recent');
  print '<ul>';
  foreach(array_keys($recents) as $id){
    $date = date($conf['dformat'],$recents[$id]['date']);
//--CS additional code to generate recent changes link
	$revisions = getRevisions($id);
	$rev = $revisions[0];
//--CS end	
    print '<li>';
//--CS replacement code to offer links to revision history and recent changes	
//  print $date.' '.html_wikilink($id,$id);
    print $date.
	      ' <a href="'.wl($id,"do=revisions").'">[revisions]</a>'.
		  ' <a href="'.wl($id,"rev=$rev&amp;do=diff").'">[changes]</a>'.
		  ' '.html_wikilink($id,$id);
//--CS end		  
    print ' '.htmlspecialchars($recents[$id]['sum']);
    print ' <span class="user">(';
    print $recents[$id]['ip'];
    if($recents[$id]['user']) print ' '.$recents[$id]['user'];
    print ')</span>';
    print '</li>';
  }
  print '</ul>';
}
 
tutorials/recent_changes_page_enhancements.txt · Last modified: 2010/05/31 16:21 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki