]> 4ch.mooo.com Git - test.git/blob - config.php
modified: yotsubanome.php
[test.git] / config.php
1 <?php
2 /*
3 Pixmicat! : 圖咪貓貼圖版程式
4 http://pixmicat.openfoundry.org/
5 版權所有 © 2005-2009 Pixmicat! Development Team
6
7 版權聲明:
8 此程式是基於レッツPHP!<http://php.s3.to/>的gazou.php、
9 双葉ちゃん<http://www.2chan.net>的futaba.php所改寫之衍生著作程式,屬於自由軟體,
10 以The Clarified Artistic License作為發佈授權條款。
11 您可以遵照The Clarified Artistic License來自由使用、散播、修改或製成衍生著作。
12 更詳細的條款及定義請參考隨附"LICENSE"條款副本。
13
14 發佈這一程式的目的是希望它有用,但沒有任何擔保,甚至沒有適合特定目的而隱含的擔保。
15 關於此程式相關的問題請不要詢問レッツPHP!及双葉ちゃん。
16
17 如果您沒有隨著程式收到一份The Clarified Artistic License副本,
18 請瀏覽http://pixmicat.openfoundry.org/license/以取得一份。
19 */
20
21 /*
22 yotsubanome development status
23 α = core under development [Database management] [core html output]
24 β = module system under development & αtesting & multi BBS development
25 γ = language documentation and comments & β testing
26 δ = clean up and testing & γ testing and finishing
27
28 ><
29
30 //comment guide
31 //---- removed
32 //==== ????
33 //++++---- QUICK AND DIRTY
34 //++++ planned to be added on
35
36 sparky4 made alot of changes with out following the guide lines
37 TODO:
38         1. when pixmicat release 6 comes out, upgrade the code with all fixes.... (this will be a long prossess)
39         2. import functions ported to yotsubanome's standards testing.
40         3. multiboard system.
41         4. core board execution option.
42
43 ChangeLog:
44 ----------------------
45 2011/2/18
46 -[lib_common.php] credit was given where credit was due w
47
48 2011/2/17
49 -[yotsubanome.php] Minor changes and fixes: added TEMP_DIR to init();
50 -[env.php] Created
51 -{lib/lib_common.php] very minor fix
52
53 2011/2/16
54 -[x.php] applied
55
56 2011/2/12
57 -[x.php] Created
58
59 2011/2/11
60 -[futaba2pio.php] Added more functionality
61 -[yotsubanome.php] Fixed comment too long click "here" bug
62 */
63 //error_reporting(E_ALL);  //Show the cursed errors
64
65
66 include_once('../../conk/.pass.php'); // The password file sparky4 uses this line until the stable release is released
67
68
69 /*---- Part 1:程式基本設定 ----*/
70 // 伺服器常態設定
71 if(!defined("PHP_SELF"))define("PHP_SELF", 'yotsubanome.php'); // このスクリプト名 // 主程式名 (若是修改了主程式名,請配合修改)
72 //----define("TIME_ZONE", '-6'); // 時區設定 (GMT時區,參照 http://wwp.greenwichmeantime.com/ )
73 define("DATE_FORMAT", "Y/m/d"); // date format
74 define("EN_SEC", 1); // 時間表示に「秒」を含める  含める:1 含めない:0
75 define("PIXMICAT_LANGUAGE", 'en_US'); // 語系語定 // ja_JP en_US zh_TW
76 define("HTTP_UPLOAD_DIFF", 50); // HTTP上傳所有位元組與實際位元組之允許誤差值
77 ini_set("memory_limit", '24M'); // PHP運行的最大記憶體使用量 (php內定8M / 建議32M)
78
79 // FileIO設定
80 define("FILEIO_BACKEND", 'normal'); // FileIO後端指定
81 define("FILEIO_INDEXLOG", 'fileioindex.daty'); // FileIO索引記錄檔 (儲存在本機端)
82 define("FILEIO_PARAMETER", ''); // FileIO參數 (本機端儲存)
83 //define("FILEIO_PARAMETER", serialize(array('ftp.example.com', 21, 'demo', 'demo', 'PASV', '/pwd/', 'http://www.example.com/~demo/pwd/', true))); // FileIO參數 (FTP)
84 //define("FILEIO_PARAMETER", serialize(array('00000000000000000000000000000000'))); // FileIO參數 (ImageShack)
85 //define("FILEIO_PARAMETER", serialize(array('http://www.example.com/~demo/satellite.cgi', true, '12345678', 'http://www.example.com/~demo/src/', true))); // FileIO參數 (Satellite)
86
87 // PIO資料來源設定
88 if(!defined("CONNECTION_STRING")){ // incase you use a different database in a different board
89 define("CONNECTION_STRING", 'log://img.csv_loog:tree.csv_loog/'); // PIO 連線字串 (Log)
90 //under development //define("CONNECTION_STRING", 'mysql://yotsubanome:pass@localhost/yotsubanome/img_loog/'); // PIO 連線字串 (MySQL)
91 //define("CONNECTION_STRING", 'sqlite://yotsubanome.db/img_loog/'); // PIO 連線字串 (SQLite)
92 //define("CONNECTION_STRING", 'pgsql://yotsubanome:pass@localhost/yotsubanome/img_loog/'); // PIO 連線字串 (PostgreSQL)
93 }
94
95 // CSV Data file names
96 // daty = yotsubanome data file
97 // loog = yotsubanome log file
98 define("LUT_CACHE", 'lutcache.daty');
99 define("SIZE_CACHE", 'sizecache.daty');
100 define("CSVSS", '_css.csv_daty');
101 define("CSV_SS", 'stylesheets.csv_daty');
102
103 /*---- Part 2:板面各項細部功能設定 ----*/
104 define("IMG_DIR", 'src/'); // 画像保存ディレクトリ。futaba.phpから見て // 圖片存放目錄
105 define("THUMB_DIR", 'thumb/'); //サムネイル保存ディレクトリ // 預覽圖存放目錄
106 define("PHP_SELF2", 'index.htm'); // 入り口ファイル名 // 入口檔名
107 define("PHP_EXT", '.htm'); // 1ページ以降の拡張子 // 第一頁以後生成檔案之副檔名
108
109 $config['TITLE'] = '画像掲示板';
110 if(!defined("TITLE"))define("TITLE", $config['TITLE']); // タイトル // 網頁標題
111 define("TITLECOM", ''); // <small>TITLECOM</small>
112 define("SHOWTITLEIMG", 0); // Show the title image (rotating:2 yes:1 no:0)
113 define("SHOWTITLETXT", 1); // Show the title text (yes:1 no:0)
114 define("TITLEIMG", 'logo.gif'); // Title image (point to php file if rotating)
115 define("HOME", '../'); // 「ホーム」へのリンク // 回首頁的連結
116 define("TOP_LINKS", ''); // 頁面右上方的額外連結,請直接以[<a href="網址" rel="_blank">名稱</a>]格式鍵入,如果不需要開新視窗可刪除rel一段
117 if(!defined("ADMIN_PASS"))define("ADMIN_PASS", 'yotsubanome'); // 管理者パス // 管理員密碼
118 define("IDSEED", 'idの種'); // idの種 // 生成ID之隨機種子
119 define("TRIP_KEY", '◆');
120 define("TRIP_KEY_FAKE", '◇');
121
122 // 管理員キャップ(Cap)設定 (啟用條件:開啟使用;名稱輸入識別名稱,E-mail輸入#啟動密碼)
123 define("CAP_ENABLE", 1); // 是否使用管理員キャップ (使用:1 不使用:0)
124 define("CAP_NAME", 'futaba'); // 管理員キャップ識別名稱
125 define("CAP_PASS", 'futaba'); // 管理員キャップ啟動密碼 (在E-mail一欄輸入#啟動密碼)
126 define("CAP_SUFFIX", ' ■'); // 管理員キャップ後綴字元 (請務必有★以便程式防止偽造,或可自行修改程式的防偽造部份)
127 define("CAP_SUFFIX_FAKE", ' []');
128 define("CAP_ISHTML", 1); // 管理員キャップ啟動後內文是否接受HTML標籤 (是:1 否:0)
129
130 // ^^????^^
131
132 // 功能切換
133 define("USE_THUMB", 1); // サムネイルを作る  する:1 しない:0 // 使用預覽圖機能 (使用:1 不使用:0)
134 define("STYLEBAR", 1); // location of style bar [CSS decoration style for the pages] (top & bottom:1 bottom:0)
135 define("USE_FLOATFORM", 0); // 新增文章表單使用自動隱藏 (是:1 否:0)
136 define("USE_SEARCH", 1); // 開放搜尋功能 (是:1 否:0)
137 define("OPTION", 1); // allow options to show up (yes:1 no:0)
138 define("USE_UPSERIES", 1); // 是否啟用連貼機能 [開主題後自動指向到主題下以方便連貼] (是:1 否:0)
139 define("RESIMG", 1); // レスにも画像を添付できるようにする 添付可能:1 添付不可:0 // 回應附加圖檔機能 (開啟:1 關閉:0)
140 //++++define("RES_MARK", '…'); // レスの頭に付ける文字列
141 define("AUTO_LINK", 1); // URL自動リンクを行う  する:1 しない:0 // 討論串文字內的URL是否自動作成超連結 (是:1 否:0)
142 define("KILL_INCOMPLETE_UPLOAD", 1); // 自動刪除上傳不完整附加圖檔 (是:1 否:0)
143 define("ALLOW_NOPASS", 0); // 削除キーの入力をチェックする  する:1 しない:0
144 define("ALLOW_NOSUB",  1); // 題名省略時拒絶する  する:1 しない:0
145 define("ALLOW_NONAME", 1); // 名前省略時拒絶する  強制的に名前をハック:2 する:1 しない:0 // 是否接受匿名發送 (強制砍名:2 是:1 否:0)
146 define("ALLOW_NOCOM",  1); // 本文省略時拒絶する  する:1 しない:0
147 // もし、有効にした場合、注意書きを書くことをお勧めします。
148 define("DISP_ID", 2); // IDを表示する  強制:2 する:1 しない:0 // 顯示ID (強制顯示:2 選擇性顯示:1 永遠不顯示:0)
149 define("CLEAR_SAGE", 0); // 使用不推文模式時清除E-mail中的「sage」關鍵字 (是:1 否:0)
150 define("USE_QUOTESYSTEM", 1); // 是否打開引用瀏覽系統 [自動轉換>>No.xxxx文字成連結並導引] (是:1 否:0)
151 define("KB", 1); // Kilobytes or Bytes on the image file size display (Kilobytes:1 Bytes:0)
152 define("SHOW_IMGWH", 1); // 是否顯示附加圖檔之原檔長寬尺寸 (是:1 否:0)
153 define("SHOW_FILENAME", 1); // 是否顯示附加圖檔之原檔文件名 (是:1 否:0)
154 define("USE_CATEGORY", 0); // 是否開啟使用類別標籤分類功能 (是:1 否:0)
155 define("USE_RE_CACHE", 1); // 是否使用回應頁面顯示快取功能 (是:1 否:0)
156 if(!defined("USE_XHTML"))define("USE_XHTML", 1); // 是否回傳 XHTML 檔頭讓瀏覽器以更嚴格的方式解析 [僅限瀏覽器支援者] (是:1 否:0)
157
158 // 模組載入
159 $ModuleList = array();
160 //$ModuleList[] = 'mod_rss';
161
162 $ModuleList[] = 'mod_adminenhance';//<- ? help me please
163 $ModuleList[] = 'mod_archiver';
164 $ModuleList[] = 'mod_audit';
165 $ModuleList[] = 'mod_bbcode';
166
167 //$ModuleList[] = 'mod_captcha';
168 $ModuleList[] = 'mod_catalog';//<-sparky4 needs here .... HELP
169 //$ModuleList[] = 'mod_code';//<- missing JS and CSS files
170 $ModuleList[] = 'mod_code_prettify';//<-sparky4 is here
171
172 //$ModuleList[] = 'mod_dummy';
173 //$ModuleList[] = 'mod_edit';//<-important
174 //$ModuleList[] = 'mod_eggpoll';
175 //$ModuleList[] = 'mod_exif';
176 //$ModuleList[] = 'mod_imgsizelimit';
177 //$ModuleList[] = 'mod_mobile';
178 //$ModuleList[] = 'mod_neta';
179 //$ModuleList[] = 'mod_opentag';
180 //$ModuleList[] = 'mod_paint';
181 //$ModuleList[] = 'mod_pm';
182 //$ModuleList[] = 'mod_pushpost';
183 //$ModuleList[] = 'mod_readonly';
184 //$ModuleList[] = 'mod_recaptcha';
185 //$ModuleList[] = 'mod_robottrap';
186 //$ModuleList[] = 'mod_rss';
187 //$ModuleList[] = 'mod_sectrip';
188 //$ModuleList[] = 'mod_shoutbox';
189 //$ModuleList[] = 'mod_showhide';
190 //$ModuleList[] = 'mod_showip';
191 //$ModuleList[] = 'mod_siokara';
192 //$ModuleList[] = 'mod_tag';
193 //$ModuleList[] = 'mod_threadlist';
194 //$ModuleList[] = 'mod_threadorder';
195 //$ModuleList[] = 'mod_tripcheck';
196 //$ModuleList[] = 'mod_typepad_antispam';
197 //$ModuleList[] = 'mod_userrepair';
198 //$ModuleList[] = 'mod_vipquality';
199
200 // 封鎖設定
201 define("BAN_CHECK", 0); // 綜合性封鎖檢查功能 (關閉:0, 開啟:1)
202 $BANPATTERN = array(); // 拒絶するホスト // IP/Hostname封鎖黑名單
203 $DNSBLservers = array(0, 'sbl-xbl.spamhaus.org', 'list.dsbl.org', 'bl.blbl.org', 'bl.spamcop.net'); // DNSBL伺服器列表 (首項:使用伺服器個數)
204 $DNSBLWHlist = array(); // DNSBL白名單 (請輸入IP位置)
205 $BAD_STRING = array("dummy_string","dummy_string2"); // 拒絶する文字列 // 限制出現之文字
206 $BAD_FILEMD5 = array("dummy","dummy2"); // 拒絶するファイルのmd5 // 限制上傳附加圖檔之MD5檢查碼
207
208 // 附加圖檔限制
209 define("MAX_KB", 9000); // 投稿容量制限 KB(phpの設定により2Mまで // 投稿容量制限 KB(phpの設定により2Mまで // 附加圖檔上傳容量限制KB (php內定為最高2MB)
210 define("STORAGE_LIMIT", 0); // 附加圖檔總容量限制功能 (啟動:1 關閉:0)
211 define("STORAGE_MAX", 30000); // 附加圖檔總容量限制上限大小 (單位:KB)
212 define("ALLOW_UPLOAD_EXT", 'GIF|JPG|PNG|BMP|SWF|TXT'); // 接受之附加圖檔副檔名 (送出前表單檢查用,用 | 分隔)
213
214 // 連續投稿時間限制
215 define("RENZOKU", 4); // 連続投稿秒数 // 連續投稿間隔秒數
216 define("RENZOKU2", 13); // 画像連続投稿秒数 // 連續貼圖間隔秒數
217
218 // 預覽圖片相關限制
219 define("MAX_W", 240); // 投稿サイズ幅(これ以上はwidthを縮小 // 討論串本文預覽圖片寬度 (超過則自動縮小)
220 define("MAX_H", 240); // 投稿サイズ高さ // 討論串本文預覽圖片高度
221 define("MAX_RW", 240); // 投稿サイズ幅(これ以上はwidthを縮小 // 討論串回應預覽圖片寬度 (超過則自動縮小)
222 define("MAX_RH", 240); // 投稿サイズ高さ // 討論串回應預覽圖片高度
223 //++++define("MIN_W", 2); // minimal width size
224 //++++define("MIN_H", 2); // minimal hieght size
225 //++++define("MAX_DIMENSION", 9000); // maximum dimentions
226 define("THUMB_Q", 84); // 預覽圖片之品質 (1-100, 建議預設75,越高品質越好但檔案也越大)
227
228 // 外觀設定
229 $ADDITION_INFO = ""; // 可在表單下顯示額外文字
230 $LIMIT_SENSOR = array('ByPostCountCondition'=>9000); // 文章自動刪除機制設定
231 define("TEMPLATE_FILE", TPLT_DIR.'inc_yo.tplt'); // 樣板位置
232 define("CSSFILE", "yotsubanome.css"); // default CSS file name
233 define("FAV_ICON", '<link rel="shortcut icon" href="'.ICON_DIR.'favicon.ico" />'); // favicon file name
234 define("PAGE_DEF", 16); // 一ページに表示する記事 // 一頁顯示幾篇討論串
235 define("ADMIN_PAGE_DEF", 20); // 管理模式下,一頁顯示幾筆資料
236 define("RE_DEF", 4); // 「レス省略」を表示するレスの数 // 一篇討論串最多顯示之回應筆數 (超過則自動隱藏,全部隱藏:0)
237 define("RE_PAGE_DEF", 40); // 回應模式一頁顯示幾筆回應內容 (分頁用,全部顯示:0)
238 define("MAX_RES", 0); // 強制sageレス数 // 回應筆數超過多少則不自動推文 (關閉:0)
239 define("MAX_AGE_TIME", 0); // 強制sageまでの時間   0で強制sageなし // 討論串可接受推文的時間範圍 (單位:小時,討論串存在超過此時間則回應皆不再自動推文 關閉:0)
240 define("COMM_MAX", 9000); // 內文接受Bytes數 (注意:中文字為2Bytes)
241 define("MAX_LINES", 16); // The number of lines in the comment feild that are displayed in the index (unlimited:0)
242 define("NO_TEXTONLY", 0); // no text only? behavior with the no image switch (Ost [Eastern]:2 Futaba:1 Yotsubanome [OLD]:0)
243 define("BR_CHECK", 0); // 改行を抑制する行数 しない:0 // 文字換行行數上限 (不限:0)
244 define("STATIC_HTML_UNTIL", -1); // 更新文章時自動生成的靜態網頁至第幾頁止 (全部生成:-1 僅入口頁:0)
245 define("GZIP_COMPRESS_LEVEL", 4); // PHP動態輸出頁面使用Gzip壓縮層級 (關閉:0 啟動:1~9,推薦值:3)
246 define("DEFAULT_NOTITLE", "無題"); // 省略時の題名 // 預設文章標題
247 define("DEFAULT_NONAME", "名無し"); // 省略時の名前 // 預設文章名稱
248 define("DEFAULT_NOCOMMENT", "本文なし"); // 省略時の本文 // 預設文章內文
249
250 /*---- Part 3:Anti-SPAM 防止垃圾訊息機器人發文 ----*/
251 /* 欄位陷阱 (Field Trap)
252 介紹:
253 機器人會針對常見的欄位名稱送出垃圾資料,將這些常見的欄位製成陷阱,
254 另設名稱怪異的欄位為正確欄位,以避免直接的攻擊。
255 防止機器人學習的可能,請隔一段時間修改底下欄位值,建議英數大小寫隨機6~10個 (避免特殊符號、第一位不能為數字)。
256 */
257 define("FT_NAME", 'bvUFbdrIC'); // 名稱欄位
258 define("FT_EMAIL", 'ObHGyhdTR'); // E-mail欄位
259 define("FT_SUBJECT", 'SJBgiFbhj'); // 標題欄位
260 define("FT_COMMENT", 'pOBvrtyJK'); // 內文欄位
261 ?>