3 * PukiWiki ºÇ¿·¤Î?·ï¤òɽ¼¨¤¹¤ë¥×¥é¥°¥¤¥ó
5 * CopyRight 2002 Y.MASUI GPL2
6 * http://masui.net/pukiwiki/ masui@masui.net
9 * 2002.04.08: pat¤µ¤ó¡¢¤ß¤Î¤ë¤µ¤ó¤Î»ØŦ¤Ë¤è¤ê¡¢¥ê¥ó¥¯À褬ÆüËܸì¤Î¾ì¹ç¤Ë
12 * 2002.06.17: plugin_recent_init()¤òÀßÄê
14 * $Id: recent.inc.php,v 1.3 2002/07/01 07:08:57 masui Exp $
17 function plugin_recent_init()
19 $_plugin_recent_messages = array(
20 '_recent_plugin_li'=>'¡¦',
21 '_recent_plugin_frame '=>'<h5 class="side_label">ºÇ¿·¤Î%d·ï</h5><span class="small">%s</span>');
22 set_plugin_messages($_plugin_recent_messages);
25 function plugin_recent_convert()
27 global $_recent_plugin_li,$_recent_plugin_frame;
28 global $WikiName,$BracketName,$script,$whatsnew;
31 if(func_num_args()>0) {
32 $array = func_get_args();
33 $recent_lines = $array[0];
36 $lines = file(get_filename(encode($whatsnew)));
39 foreach($lines as $line)
41 if($cnt > $recent_lines - 1) break;
42 if(preg_match("/(($WikiName)|($BracketName))/",$line,$match))
51 $title = strip_bracket($match[1]);
53 if(preg_match("/([0-9]{4}-[0-9]{2}-[0-9]{2})/",$line,$match)) {
54 if($date != $match[0]) {
58 $items .= "<strong>".$match[0]."</strong><br />";
62 $title = htmlspecialchars($title);
63 $items .= $_recent_plugin_li."<a href=\"".$script."?".rawurlencode($name)."\" title=\"$title ".get_pg_passage($name,false)."\">".$title."</a><br />\n";
67 return sprintf($_recent_plugin_frame,$cnt,$items);