OSDN Git Service

separate each (ul/ol/dl) list margin size.
authorpanda <panda>
Wed, 26 Feb 2003 01:28:53 +0000 (10:28 +0900)
committerpanda <panda>
Wed, 26 Feb 2003 01:28:53 +0000 (10:28 +0900)
convert_html.php
default.ini.php
i_mode.ini.php
jphone.ini.php

index 202c593..32d8952 100644 (file)
@@ -2,13 +2,18 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: convert_html.php,v 1.21 2003/02/20 12:22:51 panda Exp $
+// $Id: convert_html.php,v 1.22 2003/02/26 01:28:39 panda Exp $
 //
-function &convert_html(&$lines)
+function convert_html($lines)
 {
        global $script,$vars,$digest;
        static $contents_id = 0;
        
+       if (!is_array($lines))
+       {
+               $lines = explode("\n",$lines);
+       }
+       
        $digest = md5(join('',get_source($vars['page'])));
        
        $body = new Body(++$contents_id);
@@ -190,6 +195,7 @@ class HRule extends Block
 class ListContainer extends Block
 {
        var $tag,$tag2,$level,$style;
+       var $margin,$left_margin;
        
        function ListContainer($tag,$tag2,$level,$text)
        {
@@ -217,16 +223,16 @@ class ListContainer extends Block
        }
        function setParent(&$parent)
        {
-               global $_list_left_margin, $_list_margin, $_list_pad_str;
+               global $_list_pad_str;
 
                parent::setParent($parent);
                $step = $this->level;
                if (isset($parent->parent) and is_a($parent->parent,'ListContainer')) {
                        $step -= $parent->parent->level; 
                }
-               $margin = $_list_margin * $step;
+               $margin = $this->margin * $step;
                if ($step == $this->level) {
-                       $margin += $_list_left_margin;
+                       $margin += $this->left_margin;
                }
                $this->style = sprintf($_list_pad_str,$this->level,$margin,$margin);
        }
index a17cc61..0dd371d 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: default.ini.php,v 1.1 2003/02/21 07:07:00 panda Exp $
+// $Id: default.ini.php,v 1.2 2003/02/26 01:28:53 panda Exp $
 //
 // PukiWiki setting file (user agent:default)
 
@@ -24,8 +24,12 @@ $list_index = 1;
 
 /////////////////////////////////////////////////
 // ¥ê¥¹¥È¹½Â¤¤Îº¸¥Þ¡¼¥¸¥ó
-$_list_left_margin = 0; // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
-$_list_margin = 16;      // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
+$_ul_left_margin = 0;   // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
+$_ul_margin = 16;       // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
+$_ol_left_margin = 0;   // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
+$_ol_margin = 16;       // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
+$_dl_left_margin = 0;   // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
+$_dl_margin = 16;        // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
 $_list_pad_str = ' class="list%d" style="padding-left:%dpx;margin-left:%dpx"';
 
 /////////////////////////////////////////////////
index 333fa86..bb07e44 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: i_mode.ini.php,v 1.1 2003/02/21 07:07:00 panda Exp $
+// $Id: i_mode.ini.php,v 1.2 2003/02/26 01:28:53 panda Exp $
 //
 // PukiWiki setting file (user agent:DoCoMo)
 
@@ -24,8 +24,12 @@ $list_index = 0;
 
 /////////////////////////////////////////////////
 // ¥ê¥¹¥È¹½Â¤¤Îº¸¥Þ¡¼¥¸¥ó
-$_list_left_margin = 0; // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
-$_list_margin = 16;      // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
+$_ul_left_margin = 0;   // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
+$_ul_margin = 16;       // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
+$_ol_left_margin = 0;   // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
+$_ol_margin = 16;       // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
+$_dl_left_margin = 0;   // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
+$_dl_margin = 16;        // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
 $_list_pad_str = '';
 
 /////////////////////////////////////////////////
index 9ca0061..97ea71e 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: jphone.ini.php,v 1.1 2003/02/21 07:07:00 panda Exp $
+// $Id: jphone.ini.php,v 1.2 2003/02/26 01:28:53 panda Exp $
 //
 // PukiWiki setting file (user agent:J-PHONE)
 
@@ -24,8 +24,12 @@ $list_index = 0;
 
 /////////////////////////////////////////////////
 // ¥ê¥¹¥È¹½Â¤¤Îº¸¥Þ¡¼¥¸¥ó
-$_list_left_margin = 0; // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
-$_list_margin = 16;      // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
+$_ul_left_margin = 0;   // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
+$_ul_margin = 16;       // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
+$_ol_left_margin = 0;   // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
+$_ol_margin = 16;       // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
+$_dl_left_margin = 0;   // ¥ê¥¹¥È¤È²èÌ̺¸Ã¼¤È¤Î´Ö³Ö(px)
+$_dl_margin = 16;        // ¥ê¥¹¥È¤Î³¬Áش֤δֳÖ(px)
 $_list_pad_str = '';
 
 /////////////////////////////////////////////////