• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisióna0dee2061cc363e028f3e0a05a261be58653195d (tree)
Tiempo2003-02-21 16:07:00
Autorpanda <panda>
Commiterpanda

Log Message

Cambiar Resumen

Diferencia incremental

--- /dev/null
+++ b/default.ini.php
@@ -0,0 +1,99 @@
1+<?php
2+/////////////////////////////////////////////////
3+// PukiWiki - Yet another WikiWikiWeb clone.
4+//
5+// $Id: default.ini.php,v 1.1 2003/02/21 07:07:00 panda Exp $
6+//
7+// PukiWiki setting file (user agent:default)
8+
9+/////////////////////////////////////////////////
10+// スキンファイルの場所
11+define('SKIN_FILE','./skin/pukiwiki.skin.'.LANG.'.php');
12+
13+/////////////////////////////////////////////////
14+// 雛形とするページの読み込みを表示させる
15+$load_template_func = 1;
16+
17+/////////////////////////////////////////////////
18+// 検索文字列を色分けする
19+$search_word_color = 1;
20+
21+/////////////////////////////////////////////////
22+// 一覧ページに頭文字インデックスをつける
23+$list_index = 1;
24+
25+/////////////////////////////////////////////////
26+// リスト構造の左マージン
27+$_list_left_margin = 0; // リストと画面左端との間隔(px)
28+$_list_margin = 16; // リストの階層間の間隔(px)
29+$_list_pad_str = ' class="list%d" style="padding-left:%dpx;margin-left:%dpx"';
30+
31+/////////////////////////////////////////////////
32+// テキストエリアのカラム数
33+$cols = 80;
34+
35+/////////////////////////////////////////////////
36+// テキストエリアの行数
37+$rows = 20;
38+
39+/////////////////////////////////////////////////
40+// 大・小見出しから目次へ戻るリンクの文字
41+$top = $_msg_content_back_to_top;
42+
43+/////////////////////////////////////////////////
44+// 関連ページ表示のページ名の区切り文字
45+$related_str = "\n ";
46+
47+/////////////////////////////////////////////////
48+// 整形ルールでの関連ページ表示のページ名の区切り文字
49+$rule_related_str = "</li>\n<li>";
50+
51+/////////////////////////////////////////////////
52+// 水平線のタグ
53+$hr = '<hr class="full_hr" />';
54+
55+/////////////////////////////////////////////////
56+// 文末の注釈の直前に表示するタグ
57+$note_hr = '<hr class="note_hr" />';
58+
59+/////////////////////////////////////////////////
60+// 関連するリンクを常に表示する(負担がかかります)
61+$related_link = 1;
62+
63+/////////////////////////////////////////////////
64+// WikiName,BracketNameに経過時間を付加する
65+$show_passage = 1;
66+
67+/////////////////////////////////////////////////
68+// リンク表示をコンパクトにする
69+$link_compact = 0;
70+
71+/////////////////////////////////////////////////
72+// フェイスマークを使用する
73+$usefacemark = 1;
74+
75+/////////////////////////////////////////////////
76+// ユーザ定義ルール
77+//
78+// 正規表現で記述してください。?(){}-*./+\$^|など
79+// は \? のようにクォートしてください。
80+// 前後に必ず / を含めてください。行頭指定は ^ を頭に。
81+// 行末指定は $ を後ろに。
82+//
83+/////////////////////////////////////////////////
84+// ユーザ定義ルール(コンバート時に置換)
85+$line_rules = array(
86+"COLOR\(([^\(\)]*)\){([^}]*)}" => '<span style="color:$1">$2</span>',
87+"SIZE\(([^\(\)]*)\){([^}]*)}" => '<span style="font-size:$1px">$2</span>',
88+"COLOR\(([^\(\)]*)\):((?:(?!COLOR\([^\)]+\)\:).)*)" => '<span style="color:$1">$2</span>',
89+"SIZE\(([^\(\)]*)\):((?:(?!SIZE\([^\)]+\)\:).)*)" => '<span class="size$1">$2</span>',
90+"%%%(?!%)((?:(?!%%%).)*)%%%" => '<ins>$1</ins>',
91+"%%(?!%)((?:(?!%%).)*)%%" => '<del>$1</del>',
92+"'''(?!')((?:(?!''').)*)'''" => '<em>$1</em>',
93+"''(?!')((?:(?!'').)*)''" => '<strong>$1</strong>',
94+'&amp;br;' => '<br />',
95+'&amp;(#[0-9]+|#x[0-9a-f]+|[0-9a-zA-Z]+);' => '&$1;',
96+"\r" => "<br />\n", /* 行末にチルダは改行 */
97+'#related' => '<del>#related</del>',
98+);
99+?>
\ No newline at end of file
--- /dev/null
+++ b/i_mode.ini.php
@@ -0,0 +1,118 @@
1+<?php
2+/////////////////////////////////////////////////
3+// PukiWiki - Yet another WikiWikiWeb clone.
4+//
5+// $Id: i_mode.ini.php,v 1.1 2003/02/21 07:07:00 panda Exp $
6+//
7+// PukiWiki setting file (user agent:DoCoMo)
8+
9+/////////////////////////////////////////////////
10+// スキンファイルの場所
11+define('SKIN_FILE','./skin/keitai.skin.'.LANG.'.php');
12+
13+/////////////////////////////////////////////////
14+// 雛形とするページの読み込みを表示させる
15+$load_template_func = 0;
16+
17+/////////////////////////////////////////////////
18+// 検索文字列を色分けする
19+$search_word_color = 0;
20+
21+/////////////////////////////////////////////////
22+// 一覧ページに頭文字インデックスをつける
23+$list_index = 0;
24+
25+/////////////////////////////////////////////////
26+// リスト構造の左マージン
27+$_list_left_margin = 0; // リストと画面左端との間隔(px)
28+$_list_margin = 16; // リストの階層間の間隔(px)
29+$_list_pad_str = '';
30+
31+/////////////////////////////////////////////////
32+// テキストエリアのカラム数
33+$cols = 22;
34+
35+/////////////////////////////////////////////////
36+// テキストエリアの行数
37+$rows = 5;
38+
39+/////////////////////////////////////////////////
40+// 大・小見出しから目次へ戻るリンクの文字
41+$top = '';
42+
43+/////////////////////////////////////////////////
44+// 関連ページ表示のページ名の区切り文字
45+$related_str = "\n ";
46+
47+/////////////////////////////////////////////////
48+// 整形ルールでの関連ページ表示のページ名の区切り文字
49+$rule_related_str = "</li>\n<li>";
50+
51+/////////////////////////////////////////////////
52+// 水平線のタグ
53+$hr = '<hr>';
54+
55+/////////////////////////////////////////////////
56+// 文末の注釈の直前に表示するタグ
57+$note_hr = '<hr>';
58+
59+/////////////////////////////////////////////////
60+// 関連するリンクを常に表示する(負担がかかります)
61+$related_link = 0;
62+
63+/////////////////////////////////////////////////
64+// WikiName,BracketNameに経過時間を付加する
65+$show_passage = 0;
66+
67+/////////////////////////////////////////////////
68+// リンク表示をコンパクトにする
69+$link_compact = 1;
70+
71+/////////////////////////////////////////////////
72+// フェイスマークを使用する
73+$usefacemark = 0;
74+
75+/////////////////////////////////////////////////
76+// accesskey (SKINで使用)
77+$accesskey = 'accesskey';
78+
79+/////////////////////////////////////////////////
80+// ユーザ定義ルール
81+//
82+// 正規表現で記述してください。?(){}-*./+\$^|など
83+// は \? のようにクォートしてください。
84+// 前後に必ず / を含めてください。行頭指定は ^ を頭に。
85+// 行末指定は $ を後ろに。
86+///////////////////////////////////////////////////
87+// ユーザ定義ルール(コンバート時に置換)
88+$line_rules = array(
89+"COLOR\(([^\(\)]*)\){([^}]*)}" => '<font color="$1">$2</font>',
90+"SIZE\(([^\(\)]*)\){([^}]*)}" => '$2',
91+"COLOR\(([^\(\)]*)\):((?:(?!COLOR\([^\)]+\)\:).)*)" => '<font color="$1">$2</font>',
92+"SIZE\(([^\(\)]*)\):((?:(?!SIZE\([^\)]+\)\:).)*)" => '$2',
93+"%%%(?!%)((?:(?!%%%).)*)%%%" => '<ins>$1</ins>',
94+"%%(?!%)((?:(?!%%).)*)%%" => '<del>$1</del>',
95+"'''(?!')((?:(?!''').)*)'''" => '<em>$1</em>',
96+"''(?!')((?:(?!'').)*)''" => '<strong>$1</strong>',
97+'&amp;br;' => '<br>',
98+'&amp;(#[0-9]+|#x[0-9a-f]+|[0-9a-zA-Z]+);' => '&$1;',
99+"\r" => "<br>", /* 行末にチルダは改行 */
100+'#related' => '<del>#related</del>',
101+);
102+
103+/////////////////////////////////////////////////
104+// max_size (SKINで使用)
105+$max_size = 4; //KByte
106+if ($user_agent['matches'][1] == '1.0') {
107+ $max_size = $user_agent['matches'][2];
108+}
109+else if ($user_agent['matches'][1] == '2.0') {
110+ $max_size = min($user_agent['matches'][2],30);
111+}
112+
113+/////////////////////////////////////////////////
114+// $scriptを短縮
115+if (preg_match('#([^/]+)$#',$script,$matches)) {
116+ $script = $matches[1];
117+}
118+?>
\ No newline at end of file
--- a/init.php
+++ b/init.php
@@ -2,7 +2,7 @@
22 /////////////////////////////////////////////////
33 // PukiWiki - Yet another WikiWikiWeb clone.
44 //
5-// $Id: init.php,v 1.29 2003/02/18 12:02:32 panda Exp $
5+// $Id: init.php,v 1.30 2003/02/21 07:04:44 panda Exp $
66 //
77
88 /////////////////////////////////////////////////
@@ -19,7 +19,7 @@ define('INI_FILE','./pukiwiki.ini.php');
1919
2020 /////////////////////////////////////////////////
2121 // 初期設定 (バージョン/著作権)
22-define('S_VERSION','1.4pre4');
22+define('S_VERSION','1.4pre5');
2323 define('S_COPYRIGHT','
2424 <strong>"PukiWiki" '.S_VERSION.'</strong> Copyright &copy; 2001,2002
2525 <a href="http://pukiwiki.org">PukiWiki Developers Team</a>.
@@ -63,6 +63,35 @@ if (!file_exists(INI_FILE)||!is_readable(INI_FILE)) {
6363 require(INI_FILE);
6464
6565 /////////////////////////////////////////////////
66+// 初期設定($script)
67+if (!isset($script) or $script == '') {
68+ $script =
69+ ($_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://')
70+ . $_SERVER['SERVER_NAME']
71+ .($_SERVER['SERVER_PORT'] == 80 ? '' : ':'.$_SERVER['SERVER_PORT'])
72+ . $_SERVER['SCRIPT_NAME'];
73+}
74+if (php_sapi_name() == 'cgi' && !preg_match("/^http:\/\/[-a-zA-Z0-9\@:;_.]+\//",$script)) {
75+ die_message("please set '\$script' in ".INI_FILE);
76+}
77+
78+/////////////////////////////////////////////////
79+// 設定ファイル読み込み(UserAgent)
80+foreach ($agents as $agent) {
81+ if (preg_match($agent['pattern'],HTTP_USER_AGENT,$matches)) {
82+ $agent['matches'] = $matches;
83+ $user_agent = $agent;
84+ break;
85+ }
86+}
87+define('UA_INI_FILE',$user_agent['name'].'.ini.php');
88+
89+if (!file_exists(UA_INI_FILE)||!is_readable(UA_INI_FILE)) {
90+ die_message(UA_INI_FILE.' is not found.');
91+}
92+require(UA_INI_FILE);
93+
94+/////////////////////////////////////////////////
6695 // 設定ファイルの変数チェック
6796 if(!is_writable(DATA_DIR)) {
6897 die_message('DATA_DIR is not found or not writable.');
@@ -100,19 +129,6 @@ if (!is_page($interwiki)) {
100129 }
101130
102131 /////////////////////////////////////////////////
103-// 初期設定($script)
104-if (!isset($script) or $script == '') {
105- $script =
106- ($_SERVER['SERVER_PORT'] == 443 ? 'https://' : 'http://')
107- . $_SERVER['SERVER_NAME']
108- .($_SERVER['SERVER_PORT'] == 80 ? '' : ':'.$_SERVER['SERVER_PORT'])
109- . $_SERVER['SCRIPT_NAME'];
110-}
111-if (php_sapi_name() == 'cgi' && !preg_match("/^http:\/\/[-a-zA-Z0-9\@:;_.]+\//",$script)) {
112- die_message("please set '\$script' in ".INI_FILE);
113-}
114-
115-/////////////////////////////////////////////////
116132 // 入力値の整形
117133 if (get_magic_quotes_gpc()) {
118134 $get = $post = $cookie = array();
@@ -133,6 +149,19 @@ else {
133149 $get = is_array($HTTP_GET_VARS) ? $HTTP_GET_VARS : array();
134150 $cookie = is_array($HTTP_COOKIE_VARS) ? $HTTP_COOKIE_VARS : array();
135151 }
152+
153+// ポストされた文字のコードを変換
154+// original by nitoyon (2003/02/20)
155+$encode = mb_detect_encoding(join('',array_merge($post,$get)));
156+if ($encode != 'ASCII' and $encode != SOURCE_ENCODING) {
157+ foreach(array_keys($get) as $key) {
158+ $get[$key] = mb_convert_encoding($get[$key],SOURCE_ENCODING,$encode);
159+ }
160+ foreach(array_keys($post) as $key) {
161+ $post[$key] = mb_convert_encoding($post[$key],SOURCE_ENCODING,$encode);
162+ }
163+}
164+
136165 if (!empty($get['page'])) {
137166 $get['page'] = preg_replace('/^(\[\[)?(.*)(?(1)\]\])$/','$2',$get['page']);
138167 }
--- /dev/null
+++ b/jphone.ini.php
@@ -0,0 +1,116 @@
1+<?php
2+/////////////////////////////////////////////////
3+// PukiWiki - Yet another WikiWikiWeb clone.
4+//
5+// $Id: jphone.ini.php,v 1.1 2003/02/21 07:07:00 panda Exp $
6+//
7+// PukiWiki setting file (user agent:J-PHONE)
8+
9+/////////////////////////////////////////////////
10+// スキンファイルの場所
11+define('SKIN_FILE','./skin/keitai.skin.'.LANG.'.php');
12+
13+/////////////////////////////////////////////////
14+// 雛形とするページの読み込みを表示させる
15+$load_template_func = 0;
16+
17+/////////////////////////////////////////////////
18+// 検索文字列を色分けする
19+$search_word_color = 0;
20+
21+/////////////////////////////////////////////////
22+// 一覧ページに頭文字インデックスをつける
23+$list_index = 0;
24+
25+/////////////////////////////////////////////////
26+// リスト構造の左マージン
27+$_list_left_margin = 0; // リストと画面左端との間隔(px)
28+$_list_margin = 16; // リストの階層間の間隔(px)
29+$_list_pad_str = '';
30+
31+/////////////////////////////////////////////////
32+// テキストエリアのカラム数
33+$cols = 24;
34+
35+/////////////////////////////////////////////////
36+// テキストエリアの行数
37+$rows = 20;
38+
39+/////////////////////////////////////////////////
40+// 大・小見出しから目次へ戻るリンクの文字
41+$top = '';
42+
43+/////////////////////////////////////////////////
44+// 関連ページ表示のページ名の区切り文字
45+$related_str = "\n ";
46+
47+/////////////////////////////////////////////////
48+// 整形ルールでの関連ページ表示のページ名の区切り文字
49+$rule_related_str = "</li>\n<li>";
50+
51+/////////////////////////////////////////////////
52+// 水平線のタグ
53+$hr = '<hr>';
54+
55+/////////////////////////////////////////////////
56+// 文末の注釈の直前に表示するタグ
57+$note_hr = '<hr>';
58+
59+/////////////////////////////////////////////////
60+// 関連するリンクを常に表示する(負担がかかります)
61+$related_link = 0;
62+
63+/////////////////////////////////////////////////
64+// WikiName,BracketNameに経過時間を付加する
65+$show_passage = 0;
66+
67+/////////////////////////////////////////////////
68+// リンク表示をコンパクトにする
69+$link_compact = 1;
70+
71+/////////////////////////////////////////////////
72+// フェイスマークを使用する
73+$usefacemark = 0;
74+
75+/////////////////////////////////////////////////
76+// accesskey (SKINで使用)
77+$accesskey = 'accesskey';
78+
79+/////////////////////////////////////////////////
80+// ユーザ定義ルール
81+//
82+// 正規表現で記述してください。?(){}-*./+\$^|など
83+// は \? のようにクォートしてください。
84+// 前後に必ず / を含めてください。行頭指定は ^ を頭に。
85+// 行末指定は $ を後ろに。
86+///////////////////////////////////////////////////
87+// ユーザ定義ルール(コンバート時に置換)
88+$line_rules = array(
89+"COLOR\(([^\(\)]*)\){([^}]*)}" => '<font color="$1">$2</font>',
90+"SIZE\(([^\(\)]*)\){([^}]*)}" => '$2',
91+"COLOR\(([^\(\)]*)\):((?:(?!COLOR\([^\)]+\)\:).)*)" => '<font color="$1">$2</font>',
92+"SIZE\(([^\(\)]*)\):((?:(?!SIZE\([^\)]+\)\:).)*)" => '$2',
93+"%%%(?!%)((?:(?!%%%).)*)%%%" => '<ins>$1</ins>',
94+"%%(?!%)((?:(?!%%).)*)%%" => '<del>$1</del>',
95+"'''(?!')((?:(?!''').)*)'''" => '<em>$1</em>',
96+"''(?!')((?:(?!'').)*)''" => '<strong>$1</strong>',
97+'&amp;br;' => '<br>',
98+'&amp;(#[0-9]+|#x[0-9a-f]+|[0-9a-zA-Z]+);' => '&$1;',
99+"\r" => "<br>", /* 行末にチルダは改行 */
100+'#related' => '<del>#related</del>',
101+);
102+
103+/////////////////////////////////////////////////
104+// max_size (SKINで使用)
105+$max_size = 6; //KByte
106+if ($user_agent['matches'][1] != '') {
107+ $max_size = 12;
108+}
109+
110+/////////////////////////////////////////////////
111+// $scriptを短縮
112+if (preg_match('#([^/]+)$#',$script,$matches)) {
113+ $script = $matches[1];
114+}
115+
116+?>
\ No newline at end of file
--- a/make_link.php
+++ b/make_link.php
@@ -2,7 +2,7 @@
22 /////////////////////////////////////////////////
33 // PukiWiki - Yet another WikiWikiWeb clone.
44 //
5-// $Id: make_link.php,v 1.15 2003/02/17 07:31:25 panda Exp $
5+// $Id: make_link.php,v 1.16 2003/02/21 07:04:44 panda Exp $
66 //
77
88 // リンクを付加する
@@ -515,7 +515,7 @@ EOD;
515515 // ページ名のリンクを作成
516516 function make_pagelink($page,$alias='',$anchor='',$refer='')
517517 {
518- global $script,$vars,$show_passage,$related;
518+ global $script,$vars,$show_title,$show_passage,$link_compact,$related;
519519
520520 $s_page = htmlspecialchars(strip_bracket($page));
521521 $s_alias = ($alias == '') ? $s_page : $alias;
@@ -532,11 +532,14 @@ function make_pagelink($page,$alias='',$anchor='',$refer='')
532532 }
533533
534534 if (is_page($page)) {
535- $passage = $show_passage ? ' '.get_pg_passage($page,FALSE) : '';
536- return "<a href=\"$script?$r_page$anchor\" title=\"$s_page$passage\">$s_alias</a>";
535+ $passage = get_pg_passage($page,FALSE);
536+ $title = $link_compact ? '' : " title=\"$s_page$passage\"";
537+ return "<a href=\"$script?$r_page$anchor\"$title>$s_alias</a>";
537538 }
538539 else {
539- return "<span class=\"noexists\">$s_alias<a href=\"$script?cmd=edit&amp;page=$r_page$r_refer\">?</a></span>";
540+ return $link_compact ?
541+ "$s_alias<a href=\"$script?cmd=edit&amp;page=$r_page$r_refer\">?</a>" :
542+ "<span class=\"noexists\">$s_alias<a href=\"$script?cmd=edit&amp;page=$r_page$r_refer\">?</a></span>";
540543 }
541544 }
542545 // 相対参照を展開
--- a/pukiwiki.ini.php
+++ b/pukiwiki.ini.php
@@ -2,7 +2,7 @@
22 /////////////////////////////////////////////////
33 // PukiWiki - Yet another WikiWikiWeb clone.
44 //
5-// $Id: pukiwiki.ini.php,v 1.24 2003/02/17 07:31:14 panda Exp $
5+// $Id: pukiwiki.ini.php,v 1.25 2003/02/21 07:04:44 panda Exp $
66 //
77 // PukiWiki setting file
88
@@ -25,14 +25,6 @@ define('PLUGIN_DIR','./plugin/');
2525 define('CACHE_DIR','./cache/');
2626
2727 /////////////////////////////////////////////////
28-// Language
29-//define('LANG','ja');
30-
31-/////////////////////////////////////////////////
32-// スキンファイルの場所
33-define('SKIN_FILE','./skin/pukiwiki.skin.'.LANG.'.php');
34-
35-/////////////////////////////////////////////////
3628 // 関連するページのキャッシュ
3729 // ファイルベースのときはdefine('LINK_DB',...)をコメントアウト
3830 // MySQL
@@ -110,48 +102,6 @@ $maxshow = 80;
110102 $cantedit = array( $whatsnew, );
111103
112104 /////////////////////////////////////////////////
113-// 検索文字列を色分けする
114-$search_word_color = 1;
115-/////////////////////////////////////////////////
116-// 一覧ページに頭文字インデックスをつける
117-$list_index = 1;
118-
119-/////////////////////////////////////////////////
120-// リスト構造の左マージン
121-$_list_left_margin = 0; // リストと画面左端との間隔(px)
122-$_list_margin = 16; // リストの階層間の間隔(px)
123-$_list_pad_str = ' class="list%d" style="padding-left:%dpx;margin-left:%dpx"';
124-
125-/////////////////////////////////////////////////
126-// テキストエリアのカラム数
127-$cols = 80;
128-/////////////////////////////////////////////////
129-// テキストエリアの行数
130-$rows = 20;
131-
132-/////////////////////////////////////////////////
133-// 大・小見出しから目次へ戻るリンクの文字
134-$top = $_msg_content_back_to_top;
135-/////////////////////////////////////////////////
136-// 関連ページ表示のページ名の区切り文字
137-$related_str = "\n ";
138-/////////////////////////////////////////////////
139-// 整形ルールでの関連ページ表示のページ名の区切り文字
140-$rule_related_str = "</li>\n<li>";
141-/////////////////////////////////////////////////
142-// 水平線のタグ
143-$hr = '<hr class="full_hr" />';
144-/////////////////////////////////////////////////
145-// 文末の注釈の直前に表示するタグ
146-$note_hr = '<hr class="note_hr" />';
147-/////////////////////////////////////////////////
148-// 関連するリンクを常に表示する(負担がかかります)
149-$related_link = 1;
150-/////////////////////////////////////////////////
151-// WikiName,BracketNameに経過時間を付加する
152-$show_passage = 1;
153-
154-/////////////////////////////////////////////////
155105 // Last-Modified ヘッダを出力する
156106 $lastmod = 0;
157107
@@ -196,10 +146,6 @@ $update_exec = '';
196146 $non_list = '^\:';
197147
198148 /////////////////////////////////////////////////
199-// 雛形とするページの読み込みを表示させる
200-$load_template_func = 1;
201-
202-/////////////////////////////////////////////////
203149 // ページ名に従って自動で、雛形とするページの読み込み
204150 $auto_template_func = 1;
205151 $auto_template_rules = array(
@@ -207,6 +153,17 @@ $auto_template_rules = array(
207153 );
208154
209155 /////////////////////////////////////////////////
156+// ユーザーエージェント対応設定
157+// デフォルト
158+$user_agent = array('name'=>'default');
159+// 携帯端末
160+$agents = array(
161+ array('name'=>'jphone','pattern'=>'#^J-PHONE.+(Profile/)?#'),
162+ array('name'=>'i_mode','pattern'=>'#DoCoMo/(1\.0)/[^/]+/c([0-9]+)#'),
163+ array('name'=>'i_mode','pattern'=>'#DoCoMo/(2\.0) [^(]+\(c([0-9]+)#'),
164+);
165+
166+/////////////////////////////////////////////////
210167 // ユーザ定義ルール
211168 //
212169 // 正規表現で記述してください。?(){}-*./+\$^|など
@@ -223,28 +180,10 @@ $str_rules = array(
223180 );
224181
225182 /////////////////////////////////////////////////
226-// ユーザ定義ルール(コンバート時に置換)
227-$line_rules = array(
228-"COLOR\(([^\(\)]*)\){([^}]*)}" => '<span style="color:$1">$2</span>',
229-"SIZE\(([^\(\)]*)\){([^}]*)}" => '<span style="font-size:$1px">$2</span>',
230-"COLOR\(([^\(\)]*)\):((?:(?!COLOR\([^\)]+\)\:).)*)" => '<span style="color:$1">$2</span>',
231-"SIZE\(([^\(\)]*)\):((?:(?!SIZE\([^\)]+\)\:).)*)" => '<span class="size$1">$2</span>',
232-"%%%(?!%)((?:(?!%%%).)*)%%%" => '<ins>$1</ins>',
233-"%%(?!%)((?:(?!%%).)*)%%" => '<del>$1</del>',
234-"'''(?!')((?:(?!''').)*)'''" => '<em>$1</em>',
235-"''(?!')((?:(?!'').)*)''" => '<strong>$1</strong>',
236-'&amp;br;' => '<br />',
237-'&amp;(#[0-9]+|#x[0-9a-f]+|[0-9a-zA-Z]+);' => '&$1;',
238-"\r" => "<br />\n", /* 行末にチルダは改行 */
239-'#related' => '<del>#related</del>',
240-);
241-
242-/////////////////////////////////////////////////
243183 // フェイスマーク定義ルール
244184 // $usefacemark = 1ならフェイスマークが置換されます
245185 // 文章内にXDなどが入った場合にfacemarkに置換されてしまうので
246186 // 必要のない方は $usefacemarkを0にしてください。
247-$usefacemark = 1;
248187 $facemark_rules = array(
249188 '\s(\:\))' => ' <img src="./face/smile.png" alt="$1" />',
250189 '\s(\:D)' => ' <img src="./face/bigsmile.png" alt="$1" />',
--- /dev/null
+++ b/skin/keitai.skin.ja.php
@@ -0,0 +1,58 @@
1+<?php
2+global $script,$vars,$page_title,$max_size,$accesskey;
3+
4+header('Content-Type: text/html; charset=Shift_JIS');
5+
6+//1KByte余裕を見る(ヘッダなど)
7+$max_size = (--$max_size * 1024);
8+
9+// エンコード
10+$title = mb_convert_encoding($title,'SJIS',SOURCE_ENCODING);
11+$body = mb_convert_encoding($body,'SJIS',SOURCE_ENCODING);
12+
13+// 画像を置換
14+$body = preg_replace('#(<div[^>]+>)?(<a[^>]+>)?<img[^>]*alt="([^"]+)"[^>]*>(?(2)</a>)(?(1)</div>)#','$3',$body);
15+
16+// ページ番号
17+$pageno = (isset($vars['p']) and is_numeric($vars['p'])) ? $vars['p'] : 0;
18+$pagecount = ceil(strlen($body) / $max_size);
19+$lastpage = $pagecount - 1;
20+$r_page = rawurlencode($vars['page']);
21+
22+// ナビゲーション
23+$navi = array();
24+$navi[] = "<a href=\"$link_top\" $accesskey=\"0\">0.Top</a>";
25+$navi[] = "<a href=\"$script?plugin=newpage\" $accesskey=\"1\">1.New</a>";
26+$navi[] = "<a href=\"$link_edit\" $accesskey=\"2\">2.Edit</a>";
27+if ($is_read and $function_freeze) {
28+ if ($is_freeze) {
29+ $navi[] = "<a href=\"$link_unfreeze\" $accesskey=\"3\">3.Defreeze</a>";
30+ }
31+ else {
32+ $navi[] = "<a href=\"$link_freeze\" $accesskey=\"3\">3.Freeze</a>";
33+ }
34+}
35+$navi[] = "<a href=\"$script?MenuBar\" $accesskey=\"4\">4.Menu</a>";
36+$navi[] = "<a href=\"$link_whatsnew\" $accesskey=\"5\">5.Recent</a>";
37+
38+// 前/次のブロック
39+if ($pagecount > 1) {
40+ $prev = $pageno - 1;
41+ $next = $pageno + 1;
42+ if ($pageno > 0) {
43+ $navi[] = "<a href=\"$script?cmd=read&amp;page=$r_page&amp;p=$prev\" $accesskey=\"7\">7.Prev</a>";
44+ }
45+ $navi[] = "$next/$pagecount ";
46+ if ($pageno < $lastpage) {
47+ $navi[] = "<a href=\"$script?cmd=read&amp;page=$r_page&amp;p=$next\" $accesskey=\"8\">8.Next</a>";
48+ }
49+}
50+$navi = join(' | ',$navi);
51+$body = substr($body,$pageno * $max_size, $max_size);
52+?>
53+<html>
54+<head><title><?php echo $title ?></title></head>
55+<body>
56+<?php echo $navi ?><hr><?php echo $body ?>
57+</body>
58+</html>