]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/blog/lib/RecentChanges.php
Reformat code
[SourceForge/phpwiki.git] / themes / blog / lib / RecentChanges.php
1 <?php
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     {
14         if (!$link_text and $rev->get('pagetype') == 'wikiblog')
15             $link_text = $rev->get('summary');
16         elseif (preg_match("/\/Blog\b/", $rev->_pagename))
17             return '';
18         if ($link_text and strlen($link_text) > 20)
19             $link_text = substr($link_text, 0, 20) . "...";
20         return WikiLink($rev->getPage(), 'auto', $link_text);
21     }
22 }
23
24 class _blog_RecentChanges_Formatter
25     extends _RecentChanges_HtmlFormatter
26 {
27     function pageLink(&$rev, $link_text = false)
28     {
29         if (!$link_text and $rev->get('pagetype') == 'wikiblog')
30             $link_text = $rev->get('summary');
31         return WikiLink($rev, 'auto', $link_text);
32     }
33 }
34 /*
35 class _blog_PageHistory_Formatter
36 extends _PageHistory_HtmlFormatter
37 {
38     function pageLink (&$rev, $link_text=false) {
39         if (!$link_text and $rev->get('pagetype') == 'wikiblog')
40             $link_text = $rev->get('summary');
41         return WikiLink($rev,'auto',$link_text);
42     }
43 }
44 */
45
46 // Local Variables:
47 // mode: php
48 // tab-width: 8
49 // c-basic-offset: 4
50 // c-hanging-comment-ender-p: nil
51 // indent-tabs-mode: nil
52 // End: