From cffcc40367a41c169506364f93128f9e221087bc Mon Sep 17 00:00:00 2001 From: andi Date: Sat, 23 Apr 2005 13:07:29 +0200 Subject: links to diff and old revisions on recent changes page #255 darcs-hash:20050423110729-9977f-c5830c49d60c32b3b9153412445cd3bfeeca7a15.gz --- images/history.png | Bin 0 -> 202 bytes inc/html.php | 27 +++++++++++++++++++++------ inc/parser/xhtml.php | 12 ++++++++++-- 3 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 images/history.png diff --git a/images/history.png b/images/history.png new file mode 100644 index 000000000..ef9e311d3 Binary files /dev/null and b/images/history.png differ diff --git a/inc/html.php b/inc/html.php index 9df9aae72..8f717f8c4 100644 --- a/inc/html.php +++ b/inc/html.php @@ -22,7 +22,7 @@ function html_wikilink($id,$name='',$search=''){ $xhtml_renderer = new Doku_Renderer_xhtml(); } - return $xhtml_renderer->internallink($id,$name,$search); + return $xhtml_renderer->internallink($id,$name,$search,true); } /** @@ -396,6 +396,8 @@ function html_revisions(){ print ''; @@ -435,6 +438,7 @@ function html_revisions(){ */ function html_recent(){ global $conf; + global $lang; $recents = getRecents(0,true); print p_locale_xhtml('recent'); @@ -442,12 +446,23 @@ function html_recent(){ foreach(array_keys($recents) as $id){ $date = date($conf['dformat'],$recents[$id]['date']); print '
  • '; + + print ''; + print ''; + print ' '; + + print ''; + print ''; + print ' '; + + print $date.' '.html_wikilink($id,$id); - print ' '.htmlspecialchars($recents[$id]['sum']); + print htmlspecialchars($recents[$id]['sum']); print ' ('; print $recents[$id]['ip']; if($recents[$id]['user']) print ' '.$recents[$id]['user']; print ')'; + print '
  • '; } print ''; diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 1c26b0645..70a8c7830 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -388,7 +388,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $this->internallink($link,$link); } - function internallink($id, $name = NULL, $search=NULL) { + /** + * $search and $returnonly are not for the renderer but are used + * elsewhere - no need to implement them in other renderers + */ + function internallink($id, $name = NULL, $search=NULL,$returnonly=false) { global $conf; global $ID; @@ -423,7 +427,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer { } //output formatted - echo $this->_formatLink($link); + if($returnonly){ + return $this->_formatLink($link); + }else{ + echo $this->_formatLink($link); + } } function externallink($url, $name = NULL) { -- cgit v1.2.3