OSDN Git Service

[[pukiwiki:BugTrack/60]] recentプラグインを構造化 - reimy
authormasui <masui>
Mon, 8 Jul 2002 11:04:30 +0000 (20:04 +0900)
committermasui <masui>
Mon, 8 Jul 2002 11:04:30 +0000 (20:04 +0900)
plugin/recent.inc.php
skin/default.en.css
skin/default.ja.css

index 535b742..8212261 100644 (file)
  *              ²½¤±¤ë¤Î¤ò½¤Àµ
  * 
  *  2002.06.17: plugin_recent_init()¤òÀßÄê
+ *  2002.07.02: <ul>¤Ë¤è¤ë½ÐÎϤËÊѹ¹¤·¹½Â¤²½
  *
- * $Id: recent.inc.php,v 1.3 2002/07/01 07:08:57 masui Exp $
+ * $id$
  */
 
 function plugin_recent_init()
 {
   $_plugin_recent_messages = array(
-    '_recent_plugin_li'=>'¡¦',
-    '_recent_plugin_frame '=>'<h5 class="side_label">ºÇ¿·¤Î%d·ï</h5><span class="small">%s</span>');
+    '_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>');
   set_plugin_messages($_plugin_recent_messages);
 }
 
 function plugin_recent_convert()
 {
-       global $_recent_plugin_li,$_recent_plugin_frame;
+       global $_recent_plugin_frame;
        global $WikiName,$BracketName,$script,$whatsnew;
        
        $recent_lines = 10;
@@ -53,17 +53,18 @@ function plugin_recent_convert()
                        if(preg_match("/([0-9]{4}-[0-9]{2}-[0-9]{2})/",$line,$match)) {
                                if($date != $match[0]) {
                                        if($date != '') {
-                                               $items .= "<br />";
+                                               $items .= "</ul>";
                                        }
-                                       $items .= "<strong>".$match[0]."</strong><br />";
+                                       $items .= "<strong>".$match[0]."</strong><ul class=\"recent_list\">";
                                        $date = $match[0];
                                }
                        }
                        $title = htmlspecialchars($title);
-                       $items .= $_recent_plugin_li."<a href=\"".$script."?".rawurlencode($name)."\" title=\"$title ".get_pg_passage($name,false)."\">".$title."</a><br />\n";
+                       $items .="<li><a href=\"".$script."?".rawurlencode($name)."\" title=\"$title ".get_pg_passage($name,false)."\">".$title."</a></li>\n";
                        $cnt++;
                }
        }
+       $items .="</ul>";
        return sprintf($_recent_plugin_frame,$cnt,$items);
 }
 ?>
index 7e494bc..af96367 100644 (file)
@@ -212,3 +212,18 @@ address {
 .vote_td2{\r
        background-color: #EEF5FF;\r
 }\r
+\r
+.recent_list{\r
+       margin:0px;\r
+       margin-left:1em;\r
+       padding:0px;\r
+       border:0px;\r
+       word-wrap:break-word;\r
+       word-break:break-all;\r
+}\r
+\r
+.side_label{\r
+       margin:auto;\r
+       margin-top:0px;\r
+       margin-bottom:.5em;\r
+}\r
index c785c22..1b55551 100644 (file)
@@ -213,3 +213,18 @@ address {
 .vote_td2{\r
        background-color: #EEF5FF;\r
 }\r
+\r
+.recent_list{\r
+       margin:0px;\r
+       margin-left:1em;\r
+       padding:0px;\r
+       border:0px;\r
+       word-wrap:break-word;\r
+       word-break:break-all;\r
+}\r
+\r
+.side_label{\r
+       margin:auto;\r
+       margin-top:0px;\r
+       margin-bottom:.5em;\r
+}\r