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()¤òÀßÄê
13 * 2002.07.02: <ul>¤Ë¤è¤ë½ÐÎϤËÊѹ¹¤·¹½Â¤²½
18 function plugin_recent_init()
20 $_plugin_recent_messages = array(
21 '_recent_plugin_frame '=>'<h5 class="side_label" style="margin:auto;margin-top:0px;margin-bottom:.5em">ºÇ¿·¤Î%d·ï</h5><div class="small" style="margin-left:.8em;margin-right:.8em">%s</div>');
22 set_plugin_messages($_plugin_recent_messages);
25 function plugin_recent_convert()
27 global $_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><ul class=\"recent_list\">";
62 $title = htmlspecialchars($title);
63 $items .="<li><a href=\"".$script."?".rawurlencode($name)."\" title=\"$title ".get_pg_passage($name,false)."\">".$title."</a></li>\n";
68 return sprintf($_recent_plugin_frame,$cnt,$items);