OSDN Git Service

Added pkwk_mail_notify(): Send a mail to the administrator
[pukiwiki/pukiwiki.git] / pukiwiki.ini.php
1 <?php
2 // PukiWiki - Yet another WikiWikiWeb clone
3 // $Id: pukiwiki.ini.php,v 1.126 2005/06/07 14:37:47 henoheno Exp $
4 // Copyright (C)
5 //   2002-2005 PukiWiki Developers Team
6 //   2001-2002 Originally written by yu-ji
7 // License: GPL v2 or (at your option) any later version
8 //
9 // PukiWiki main setting file
10
11 /////////////////////////////////////////////////
12 // Functionality settings
13
14 // PKWK_OPTIMISE - Ignore verbose but understandable checking and warning
15 //   If you end testing this PukiWiki, set '1'.
16 //   If you feel in trouble about this PukiWiki, set '0'.
17 if (! defined('PKWK_OPTIMISE'))
18         define('PKWK_OPTIMISE', 0);
19
20 /////////////////////////////////////////////////
21 // Security settings
22
23 // PKWK_READONLY - Prohibits editing and maintain via WWW
24 //   NOTE: Counter-related functions will work now (counter, attach count, etc)
25 if (! defined('PKWK_READONLY'))
26         define('PKWK_READONLY', 0); // 0 or 1
27
28 // PKWK_SAFE_MODE - Prohibits some unsafe(but compatible) functions 
29 if (! defined('PKWK_SAFE_MODE'))
30         define('PKWK_SAFE_MODE', 0);
31
32 // PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using inline-image-tag for URIs
33 //   Inline-image-tag for URIs may allow leakage of Wiki readers' information
34 //   (in short, 'Web bug') or external malicious CGI (looks like an image's URL)
35 //   attack to Wiki readers, but easy way to show images.
36 if (! defined('PKWK_DISABLE_INLINE_IMAGE_FROM_URI'))
37         define('PKWK_DISABLE_INLINE_IMAGE_FROM_URI', 0);
38
39 // PKWK_QUERY_STRING_MAX
40 //   Max length of GET method, prohibits some worm attack ASAP
41 //   NOTE: Keep (page-name + attach-file-name) <= PKWK_QUERY_STRING_MAX
42 define('PKWK_QUERY_STRING_MAX', 640); // Bytes, 0 = OFF
43
44 /////////////////////////////////////////////////
45 // Language / Encoding settings
46
47 // LANG - Internal content encoding ('en', 'ja', or ...)
48 define('LANG', 'ja');
49
50 // UI_LANG - Content encoding for buttons, menus,  etc
51 define('UI_LANG', LANG); // 'en' for Internationalized wikisite
52
53 /////////////////////////////////////////////////
54 // Directory settings I (ended with '/', permission '777')
55
56 // You may hide these directories (from web browsers)
57 // by setting DATA_HOME at index.php.
58
59 define('DATA_DIR',      DATA_HOME . 'wiki/'     ); // Latest wiki texts
60 define('DIFF_DIR',      DATA_HOME . 'diff/'     ); // Latest diffs
61 define('BACKUP_DIR',    DATA_HOME . 'backup/'   ); // Backups
62 define('CACHE_DIR',     DATA_HOME . 'cache/'    ); // Some sort of caches
63 define('UPLOAD_DIR',    DATA_HOME . 'attach/'   ); // Attached files and logs
64 define('COUNTER_DIR',   DATA_HOME . 'counter/'  ); // Counter plugin's counts
65 define('TRACKBACK_DIR', DATA_HOME . 'trackback/'); // TrackBack logs
66 define('PLUGIN_DIR',    DATA_HOME . 'plugin/'   ); // Plugin directory
67
68 /////////////////////////////////////////////////
69 // Directory settings II (ended with '/')
70
71 // Skins / Stylesheets
72 define('SKIN_DIR', 'skin/');
73 // Skin files (SKIN_DIR/*.skin.php) are needed at
74 // ./DATAHOME/SKIN_DIR from index.php, but
75 // CSSs(*.css) and JavaScripts(*.js) are needed at
76 // ./SKIN_DIR from index.php.
77
78 // Static image files
79 define('IMAGE_DIR', 'image/');
80 // Keep this directory shown via web browsers like
81 // ./IMAGE_DIR from index.php.
82
83 /////////////////////////////////////////////////
84 // Local time setting
85
86 switch (LANG) { // or specifiy one
87 case 'ja':
88         define('ZONE', 'JST');
89         define('ZONETIME', 9 * 3600); // JST = GMT + 9
90         break;
91 default  :
92         define('ZONE', 'GMT');
93         define('ZONETIME', 0);
94         break;
95 }
96
97 /////////////////////////////////////////////////
98 // Title of your Wikisite (Name this)
99 // Also used as RSS feed's channel name etc
100 $page_title = 'PukiWiki';
101
102 // Specify PukiWiki URL (default: auto)
103 //$script = 'http://example.com/pukiwiki/';
104
105 // Shorten $script: Cut its file name (default: not cut)
106 //$script_directory_index = 'index.php';
107
108 // Site admin's name (CHANGE THIS)
109 $modifier = 'anonymous';
110
111 // Site admin's Web page (CHANGE THIS)
112 $modifierlink = 'http://pukiwiki.example.com/';
113
114 // Default page name
115 $defaultpage  = 'FrontPage';     // Top / Default page
116 $whatsnew     = 'RecentChanges'; // Modified page list
117 $whatsdeleted = 'RecentDeleted'; // Removeed page list
118 $interwiki    = 'InterWikiName'; // Set InterWiki definition here
119 $menubar      = 'MenuBar';       // Menu
120
121 /////////////////////////////////////////////////
122 // Change default Document Type Definition
123
124 // Some web browser's bug, and / or Java apprets may needs not-Strict DTD.
125 // Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_TRANSITIONAL.
126
127 //$pkwk_dtd = PKWK_DTD_XHTML_1_1; // Default
128 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_STRICT;
129 //$pkwk_dtd = PKWK_DTD_XHTML_1_0_TRANSITIONAL;
130 //$pkwk_dtd = PKWK_DTD_HTML_4_01_STRICT;
131 //$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL;
132
133 /////////////////////////////////////////////////
134 // Always output "nofollow,noindex" attribute
135
136 $nofollow = 0; // 1 = Hide from search engines
137
138 /////////////////////////////////////////////////
139
140 // PKWK_ALLOW_JAVASCRIPT - Allow / Prohibit using JavaScript
141 define('PKWK_ALLOW_JAVASCRIPT', 0);
142
143 /////////////////////////////////////////////////
144 // TrackBack feature
145
146 // Enable Trackback
147 $trackback = 0;
148
149 // Show trackbacks with an another window (using JavaScript)
150 $trackback_javascript = 0;
151
152 /////////////////////////////////////////////////
153 // Referer list feature
154 $referer = 0;
155
156 /////////////////////////////////////////////////
157 // _Disable_ WikiName auto-linking
158 $nowikiname = 0;
159
160 /////////////////////////////////////////////////
161 // AutoLink feature
162
163 // AutoLink minimum length of page name
164 $autolink = 8; // Bytes, 0 = OFF
165
166 /////////////////////////////////////////////////
167 // Enable Freeze / Unfreeze feature
168 $function_freeze = 1;
169
170 /////////////////////////////////////////////////
171 // Enable 'Do not change timestamp' at edit
172 // (1:Enable, 2:Enable only administrator, 0:Disable)
173 $notimeupdate = 1;
174
175 /////////////////////////////////////////////////
176 // Admin password for this Wikisite
177
178 // CHANGE THIS
179 $adminpass = '{x-php-md5}1a1dc91c907325c69271ddf0c944bc72'; // md5('pass')
180 //$adminpass = '{CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/'; // CRYPT 'pass'
181 //$adminpass = '{MD5}Gh3JHJBzJcaScd3wyUS8cg==';             // MD5   'pass'
182 //$adminpass = '{SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx';    // SMD5  'pass'
183
184 /////////////////////////////////////////////////
185 // Page-reading feature settings
186 // (Automatically creating pronounce datas, for Kanji-included page names,
187 //  to show sorted page-list correctly)
188
189 // Enable page-reading feature by calling ChaSen or KAKASHI command
190 // (1:Enable, 0:Disable)
191 $pagereading_enable = 0;
192
193 // Specify converter as ChaSen('chasen') or KAKASI('kakasi') or None('none')
194 $pagereading_kanji2kana_converter = 'none';
195
196 // Specify Kanji encoding to pass data between PukiWiki and the converter
197 $pagereading_kanji2kana_encoding = 'EUC'; // Default for Unix
198 //$pagereading_kanji2kana_encoding = 'SJIS'; // Default for Windows
199
200 // Absolute path of the converter (ChaSen)
201 $pagereading_chasen_path = '/usr/local/bin/chasen';
202 //$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';
203
204 // Absolute path of the converter (KAKASI)
205 $pagereading_kakasi_path = '/usr/local/bin/kakasi';
206 //$pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';
207
208 // Page name contains pronounce data (written by the converter)
209 $pagereading_config_page = ':config/PageReading';
210
211 // Page name of default pronouncing dictionary, used when converter = 'none'
212 $pagereading_config_dict = ':config/PageReading/dict';
213
214 /////////////////////////////////////////////////
215 // User definition
216 $auth_users = array(
217         'foo'   => 'foo_passwd', // Cleartext
218         'bar'   => '{x-php-md5}f53ae779077e987718cc285b14dfbe86', // md5('bar_passwd')
219         'hoge'  => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx', // SMD5 'hoge_passwd'
220 );
221
222 /////////////////////////////////////////////////
223 // Authentication method
224
225 $auth_method_type = 'contents'; // By Page contents
226 //$auth_method_type = 'pagename';       // By Page name
227
228 /////////////////////////////////////////////////
229 // Read auth (0:Disable, 1:Enable)
230 $read_auth = 0;
231
232 // Read auth regex
233 $read_auth_pages = array(
234         '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
235         '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo,bar,hoge',
236 );
237
238 /////////////////////////////////////////////////
239 // Edit auth (0:Disable, 1:Enable)
240 $edit_auth = 0;
241
242 // Edit auth regex
243 $edit_auth_pages = array(
244         '#Bar¤Î¸ø³«Æüµ­#'       => 'bar',
245         '#¤Ò¤­¤³¤â¤ë¤Û¤²#'      => 'hoge',
246         '#(¥Í¥¿¥Ð¥ì|¤Í¤¿¤Ð¤ì)#' => 'foo,bar,hoge',
247 );
248
249 /////////////////////////////////////////////////
250 // Search auth
251 // 0: Disabled (Search read-prohibited page contents)
252 // 1: Enabled  (Search only permitted pages for the user)
253 $search_auth = 0;
254
255 /////////////////////////////////////////////////
256 // $whatsnew: Max number of RecentChanges
257 $maxshow = 60;
258
259 // $whatsdeleted: Max number of RecentDeleted
260 // (0 = Disabled)
261 $maxshow_deleted = 60;
262
263 /////////////////////////////////////////////////
264 // Page names can't be edit via PukiWiki
265 $cantedit = array( $whatsnew, $whatsdeleted );
266
267 /////////////////////////////////////////////////
268 // HTTP: Output Last-Modified header
269 $lastmod = 0;
270
271 /////////////////////////////////////////////////
272 // Date format
273 $date_format = 'Y-m-d';
274
275 // Time format
276 $time_format = 'H:i:s';
277
278 /////////////////////////////////////////////////
279 // Max number of RSS feed
280 $rss_max = 15;
281
282 /////////////////////////////////////////////////
283 // Backup related settings
284
285 // Enable backup
286 $do_backup = 1;
287
288 // When a page had been removed, remove its backup too?
289 $del_backup = 0;
290
291 // Bacukp interval and generation
292 $cycle  =   3; // Wait N hours between backup (0 = no wait)
293 $maxage = 120; // Stock latest N backups
294
295 // NOTE: $cycle x $maxage / 24 = Minimum days to lost your data
296 //          3   x   120   / 24 = 15
297
298 // Splitter of backup data (NOTE: Too dangerous to change)
299 define('PKWK_SPLITTER', '>>>>>>>>>>');
300
301 /////////////////////////////////////////////////
302 // Command executed per update
303 $update_exec = '';
304 //$update_exec = '/usr/bin/mknmz --media-type=text/pukiwiki -O /var/lib/namazu/index/ -L ja -c -K /var/www/wiki/';
305
306 /////////////////////////////////////////////////
307 // HTTP proxy setting (for TrackBack etc)
308
309 // Use HTTP proxy server to get remote data
310 $use_proxy = 0;
311
312 $proxy_host = 'proxy.example.com';
313 $proxy_port = 8080;
314
315 // Do Basic authentication
316 $need_proxy_auth = 0;
317 $proxy_auth_user = 'username';
318 $proxy_auth_pass = 'password';
319
320 // Hosts that proxy server will not be needed
321 $no_proxy = array(
322         'localhost',    // localhost
323         '127.0.0.0/8',  // loopback
324 //      '10.0.0.0/8'    // private class A
325 //      '172.16.0.0/12' // private class B
326 //      '192.168.0.0/16'        // private class C
327 //      'no-proxy.com',
328 );
329
330 ////////////////////////////////////////////////
331 // Mail related settings
332
333 // Send mail per update of pages
334 $notify = 0;
335
336 // Send diff only
337 $notify_diff_only = 1;
338
339 // SMTP server (Windows only. Usually specified at php.ini)
340 $smtp_server = 'localhost';
341
342 // Mail recipient (To:) and sender (From:)
343 $notify_to   = 'to@example.com';        // To:
344 $notify_from = 'from@example.com';      // From:
345
346 // Subject: ($page = Page name wll be replaced)
347 $notify_subject = '[PukiWiki] $page';
348
349 // Mail header
350 // NOTE: Multiple items must be divided by "\r\n", not "\n".
351 $notify_header = '';
352
353 /////////////////////////////////////////////////
354 // Mail: POP / APOP Before SMTP
355
356 // Do POP/APOP authentication before send mail
357 $smtp_auth = 0;
358
359 $pop_server = 'localhost';
360 $pop_port   = 110;
361 $pop_userid = '';
362 $pop_passwd = '';
363
364 // Use APOP instead of POP (If server uses)
365 //   Default = Auto (Use APOP if possible)
366 //   1       = Always use APOP
367 //   0       = Always use POP
368 // $pop_auth_use_apop = 1;
369
370 /////////////////////////////////////////////////
371 // Ignore list
372
373 // Regex of ignore pages
374 $non_list = '^\:';
375
376 // Search ignored pages
377 $search_non_list = 1;
378
379 /////////////////////////////////////////////////
380 // Template setting
381
382 $auto_template_func = 1;
383 $auto_template_rules = array(
384         '((.+)\/([^\/]+))' => '\2/template'
385 );
386
387 /////////////////////////////////////////////////
388 // Automatically add fixed heading anchor
389 $fixed_heading_anchor = 1;
390
391 /////////////////////////////////////////////////
392 // Remove the first spaces from Preformatted text
393 $preformat_ltrim = 1;
394
395 /////////////////////////////////////////////////
396 // Convert linebreaks into <br />
397 $line_break = 0;
398
399 /////////////////////////////////////////////////
400 // Use date-time rules (See rules.ini.php)
401 $usedatetime = 1;
402
403 /////////////////////////////////////////////////
404 // User-Agent settings
405 //
406 // If you want to ignore embedded browsers for rich-content-wikisite,
407 // remove (or comment-out) all 'keitai' settings.
408 //
409 // If you want to to ignore desktop-PC browsers for simple wikisite,
410 // copy keitai.ini.php to default.ini.php and customize it.
411
412 $agents = array(
413 // pattern: A regular-expression that matches device(browser)'s name and version
414 // profile: A group of browsers
415
416     // Embedded browsers (Rich-clients for PukiWiki)
417
418         // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE)
419         // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC)
420         array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#', 'profile'=>'default'),
421
422         // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0"
423         // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2)
424         // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
425         // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus)
426         array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]+)#',   'profile'=>'default'),
427
428     // Embedded browsers (Non-rich)
429
430         // Windows CE (the others)
431         // Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo)
432         array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keitai'),
433
434         // ACCESS "NetFront" / "Compact NetFront" and thier OEM
435         // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
436         // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
437         array('pattern'=>'#\b(NetFront)/([0-9\.]+)#',   'profile'=>'keitai'),
438         array('pattern'=>'#\b(CNF)/([0-9\.]+)#',        'profile'=>'keitai'),
439         array('pattern'=>'#\b(AveFront)/([0-9\.]+)#',   'profile'=>'keitai'),
440         array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#',  'profile'=>'keitai'), // The same?
441
442         // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
443         // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c°Ê¹ß¤Ï²ÄÊÑ
444         // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()¤ÎÃæ¤Ï²ÄÊÑ
445         array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#',      'profile'=>'keitai'),
446
447         // Vodafone's embedded browser
448         // Sample: "J-PHONE/2.0/J-T03"  // 2.0¤Ï"¥Ö¥é¥¦¥¶¤Î"¥Ð¡¼¥¸¥ç¥ó
449         // Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0"
450         array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#',     'profile'=>'keitai'),
451
452         // Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
453         // Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0"
454         array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#',        'profile'=>'keitai'),
455
456         // Opera, dressing up as other embedded browsers
457         // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
458         array('pattern'=>'#\bDDIPOCKET\b.+\b(Opera) ([0-9\.]+)\b#',     'profile'=>'keitai'),
459
460         // Planetweb http://www.planetweb.com/
461         // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
462         array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile'=>'keitai'),
463
464         // DreamPassport, Web browser for SEGA DreamCast
465         // Sample: "Mozilla/3.0 (DreamPassport/3.0)"
466         array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#',      'profile'=>'keitai'),
467
468         // Palm "Web Pro" http://www.palmone.com/us/support/accessories/webpro/
469         // Sample: "Mozilla/4.76 [en] (PalmOS; U; WebPro)"
470         array('pattern'=>'#\b(WebPro)\b#',      'profile'=>'keitai'),
471
472         // ilinx "Palmscape" / "Xiino" http://www.ilinx.co.jp/
473         // Sample: "Xiino/2.1SJ [ja] (v. 4.1; 153x130; c16/d)"
474         array('pattern'=>'#^(Palmscape)/([0-9\.]+)#',   'profile'=>'keitai'),
475         array('pattern'=>'#^(Xiino)/([0-9\.]+)#',       'profile'=>'keitai'),
476
477         // SHARP PDA Browser (SHARP Zaurus)
478         // Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
479         array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#',        'profile'=>'keitai'),
480
481         // WebTV
482         array('pattern'=>'#^(WebTV)/([0-9\.]+)#',       'profile'=>'keitai'),
483
484     // Desktop-PC browsers
485
486         // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail
487         // NOTE: Keep this pattern above MSIE and Mozilla
488         // Sample: "Opera/7.0 (OS; U)" (not disguise)
489         // Sample: "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise)
490         array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile'=>'default'),
491
492         // MSIE: Microsoft Internet Explorer (or something disguised as MSIE)
493         // Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
494         array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#',     'profile'=>'default'),
495
496         // Mozilla Firefox
497         // NOTE: Keep this pattern above Mozilla
498         // Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
499         array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#',  'profile'=>'default'),
500
501         // Loose default: Including something Mozilla
502         array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#',     'profile'=>'default'),
503
504         array('pattern'=>'#^#', 'profile'=>'default'),  // Sentinel
505 );
506 ?>