]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/blog/lib/RecentChanges.php
more blog hacks
[SourceForge/phpwiki.git] / themes / blog / lib / RecentChanges.php
1 <?php rcs_id('$Id: RecentChanges.php,v 1.2 2005-02-02 19:14:14 rurban Exp $');
2 /*
3  * Extensions/modifications to the stock RecentChanges (and PageHistory) format.
4  */
5
6 require_once('lib/plugin/RecentChanges.php');
7 //require_once('lib/plugin/PageHistory.php');
8
9 class _blog_RecentChanges_BoxFormatter
10 extends _RecentChanges_BoxFormatter
11 {
12     function pageLink (&$rev, $link_text=false) {
13         if (!$link_text and $rev->get('pagetype') == 'wikiblog')
14             $link_text = $rev->get('summary');
15         elseif (preg_match("/\/Blog\b/", $rev->_pagename))
16             return '';
17         if ($link_text and strlen($link_text) > 20)
18             $link_text = substr($link_text,0,20)."...";
19         return WikiLink($rev->getPage(),'auto',$link_text);
20     }
21 }
22
23 class _blog_RecentChanges_Formatter
24 extends _RecentChanges_HtmlFormatter
25 {
26     function pageLink (&$rev, $link_text=false) {
27         if (!$link_text and $rev->get('pagetype') == 'wikiblog')
28             $link_text = $rev->get('summary');
29         return WikiLink($rev,'auto',$link_text);
30     }
31 }
32 /*
33 class _blog_PageHistory_Formatter
34 extends _PageHistory_HtmlFormatter
35 {
36     function pageLink (&$rev, $link_text=false) {
37         if (!$link_text and $rev->get('pagetype') == 'wikiblog')
38             $link_text = $rev->get('summary');
39         return WikiLink($rev,'auto',$link_text);
40     }
41 }
42 */
43
44 // $Log: not supported by cvs2svn $
45 // Revision 1.1  2004/12/15 17:47:32  rurban
46 // fix RecentChanges links
47 // fix footer layout
48 //
49
50 // (c-file-style: "gnu")
51 // Local Variables:
52 // mode: php
53 // tab-width: 8
54 // c-basic-offset: 4
55 // c-hanging-comment-ender-p: nil
56 // indent-tabs-mode: nil
57 // End:   
58 ?>