#author("2025-03-21T19:30:53+09:00","","")
#author("2025-03-22T07:11:23+09:00","","")
*[[chapter4 カスタマイズについて]] [#vb2f00b4]
ここでは、設定変更による動作の切り替えとデザインのカスタマイズについて開設します。カスタマイズの方法をマスターして、Pukiwikiを好みのスタイルで使いましょう。
----------------------------------------------------------------------------------------------------
#contents();
//
** 4-1 設定ファイルによる各種カスタマイズ [#b2a0ed54]
Pukiwikiを設置して使い慣れてくると、各機能の動作を細かく変更したくなります。基本的な動作の有効・無効などを切り替えるのであれば、設定ファイルを変更するだけです。
----------------------------------------------------------------------------------------------------
**設定ファイルの構成について [#obcdc19f]
pukiwikiの設定ファイルは、複数に分かれた構成ファイルとなってます。pukiwikiの全体的な設定を行うために変更するファイルpukiwiki.ini.phpです。
アクセスされるwebブラウザごとの設定内容はdefalut.ini.phpとkeitai.ini.phpに分けて保存されています。置換文字列のルール指定はrules.ini.phpとして用意されてます。

***読み取り専用にしたい [2025.03.17更新] [#i718683f]
Pukiwikiで作成したサイト2全体を読み取り専用で公開したい場合には、pukiwiki.ini.php内のpkwk_readonlyを1にします。
様々な情報をPukiwikiにまとめた上でページ更新を停止した状態で公開したい場合に有効です。
読み取り専用を有効にすると、ナビゲーション部分に用意されている[編集]と[凍結]リンクが非表示になります。
また、URLでダイレクトに編集画面にアクセスしてもエラー表示となり、編集は一切不可能となります。
なお、ページ単位で更新機能を無効化する場合は凍結機能を利用しましょう。

 // PKWK_READONLY - Prohibits editing and maintain via WWW
 //   NOTE: Counter-related functions will work now (counter, attach count, etc)
 if (! defined('PKWK_READONLY'))
    	define('PKWK_READONLY', 0); // 0 or 1 ここで1にすると有効になります。
//
***画像をページ内で展開しないようにしたい[2025.03.18更新] [#kc888438]
一般的に解放しているPukiwikiでは、悪意のあるユーザーに不適切な画像のURLを貼り付けられ、望まない画像がページに表示されてしまい困る場合があります。
対処するのには、画像URLを画像としてページに表示する機能を無効にしてしまうのが手軽な方法です。

画像URLのページ内表示を無効化するには、pukiwiki.ini.phpにあるPKWK_DISABLE_INLINE_IMAGE_FROM_URLを1に変更します。

これで、ページ内に記載された画像URLはURLのリンクとして表示されます。URLリンクとして表示されてしまうため、不適切な画像へのアクセスを完全に遮断することにはなりませんが、ページ内に表示されてしまうことは防げます。

 // PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using inline-image-tag for URIs
 //   Inline-image-tag for URIs may allow leakage of Wiki readers' information
 //   (in short, 'Web bug') or external malicious CGI (looks like an image's URL)
 //   attack to Wiki readers, but easy way to show images.
 if (! defined('PKWK_DISABLE_INLINE_IMAGE_FROM_URI')) 
    	define('PKWK_DISABLE_INLINE_IMAGE_FROM_URI', 0);←ここを1にする。
//
***サイト名などを変更したい[2025.03.19更新] [#q31f719e]
設置したPukiwikiのページタイトルやフッタ部表示されるサイト運営者やサイトURLを変更するには、pukiwiki.ini.php内の変数を変更します。
このうちスクリプトURLを指定する変数$scriptは、初期状態でコメントアウトで無効にされていす。
標準的にはURLが自動的にサーバーの設定より生成されますが、設置したWebサーバーによってはURLが内部で上手く生成されない場合があるので、直接指定するために用意されている項目です。
例えば、自宅サーバーでブロードバンドルーター越しにpukiwikiを設置している場合、インターネット側からアクセスに対応する必要があります。
ダイナミックDNSなどを利用し、ドメイン名を取得した上でそのドメイン名でアクセスできるようにURLを記入しましょう。

 /////////////////////////////////////////////////
 // Title of your Wikisite (Name this)
 // Also used as RSS feed's channel name etc
 $page_title = 'PukiWiki';
 
 // Specify PukiWiki URL (default: auto)
 //$script = 'http://example.com/pukiwiki/';
 
 // Shorten $script: Cut its file name (default: not cut)
 //$script_directory_index = 'index.php';
 
 // Site admin's name (CHANGE THIS)
 $modifier = 'Web Collaboration by PukiWiki';
 
 // Site admin's Web page (CHANGE THIS)
 $modifierlink = 'https://URL';
//
***特別なページの名前を変更したい [#u2a2336e]

***特別なページの名前を変更したい [#ea759828]
トップページとして指定されるFrontPageや更新ページ名一覧としt指定されているRecentChangesなどのページ名を変更するためには、各ページ名を指定する変数を変更します。
特にトップページにある$defaultpage変数は、サイト運営にあわせて変更する可能性が高い項目です。
// Default page name
$defaultpage  = 'FrontPage';     // Top / Default page
$whatsnew     = 'RecentChanges'; // Modified page list
$whatsdeleted = 'RecentDeleted'; // Removeed page list
$interwiki    = 'InterWikiName'; // Set InterWiki definition here
$aliaspage    = 'AutoAliasName'; // Set AutoAlias definition here
$menubar      = 'MenuBar';       // Menu
//
***TrackBackに対応したい [#ped2e8fa]



***検索エンジンになるべく掛からないようにしたい[2025.03.19更新] [#j73bb95d]
Pukiwikiに含まれるすべてのページに対して検索エンジンの検索対象から外したい場合は、HTMLのMETAタグにrobotsの名前でnofollow,noindexを指定します。
スキンファイル直接カスタマイズする方法もありましが、$nofollow変数を変更することで簡単にMETAタグを追加することができます。

 /////////////////////////////////////////////////
 // Always output "nofollow,noindex" attribute
 
 $nofollow = 0; // 1 = Try hiding from search engines ←ここを1にする。
 
 /////////////////////////////////////////////////

ただし、METAタグによる検索対象からの除外は検索エンジンごとの対応によりますので、必ず検索サイトから検索対象として除外されることを保障されるものではありません。
なお、ページごとにnofollowを指定したい場合には$nofollowプラグインを記述した上で、該当ページを凍結してください。
//
***リンク参照先URLを調べたい [#hd8bbb05]
pukiwikiの任意のページに対して外部のサイトからリンクされていることを調べたい場合は、リンク元の保存機能を有効にします。
リンク元保存機能を有効にするには、pukiwiki.ini.phpの$referer変数を1にします。

$referer = 0;←ここを1にする。
//
***ページ名は自動リンクにしたい [#t5aed9aa]
pukiwikiには自動リンク機能があります。
ページ名をwikinameで記述すれば、自動的にページリンクとなりましが、BracketNameのときも自動的にリンクするには$autolink変数を0以上にします。

$autolink変数にはページ内で自動的にリンクするページ名の最小バイト数を指定します。
日本語文字は1文字2バイトで構成されているので、$autolinkを2にするとページ内を2バイト単位(日本語で1文字分)でページを検索し、
ページ名が該当する場合にはリンクに変換されます。
あまり小さい数字にすると短い名前のページが必要以上に自動リンクになってしまう場合もあるので、ある程度大きい数値、8程度から試してみることをおすすめします。

/////////////////////////////////////////////////
// AutoLink feature
// Automatic link to existing pages

// AutoLink minimum length of page name
$autolink = 0; // Bytes, 0 = OFF (try 8)
//          ↑ここを変更する。
/////////////////////////////////////////////////
//
***ページ凍結機能をつかえなくしたい [#ob99532c]
ページ凍結機能を無効にするには、$function_freeze変数を0にします。
ページ凍結機能を無効にするとナビゲーション部にある[凍結/凍結解除]のリンクが非表示になります。

/////////////////////////////////////////////////
// Enable Freeze / Unfreeze feature
$function_freeze = 1;←ここを変更する。

/////////////////////////////////////////////////
//
***ページ更新時のタイムスタンプを変更しない機能を無効にしたい [#nbe3d267]


***ページ名一覧で日本語インデックスを使いたい [#jd8a32aa]


//
***更新ページ名一覧に表示するページ数を変えたい[2025.03.21更新] [#rac2b202]
更新ページ一覧に表示するページ名件数を変更するには、$maxshowの数値を変更します。

/////////////////////////////////////////////////
// $whatsnew: Max number of RecentChanges
$maxs
//
***削除ページ名一覧に表示するページ数を変えたい [#yfe65ea9]


***特定のページだけ編集不可能にしたい [#x5de6f87]
編集不可能なページを指定するには、$cantedit配列にページ名を加えます。
初期状態でじは更新一覧ページ名、削除一覧ページ名が登録されています。
基本的には、pukiwikiのシステムで特殊なページとして取り扱うべきページのみが登録されています。
任意のページを追加した場合、webブラウザから更新できなくなるので注意してください。

/////////////////////////////////////////////////
// Page names can't be edit via PukiWiki
$cantedit = array( $whatsnew, $whatsdeleted );

/////////////////////////////////////////////////
//
***日時の表示方式を変更したい [#j99c02b7]
pukiwiki内部で使用されている日付や時刻の表示形式を指定する文字列は、それぞれ$date_format,$time_formatとして指定されてます。
各アルファベットの意味は、PHPのdate関数で指定できる設定値です。
ここで指定されてる日時の書式は、ページの最終更新日時の表示や最終更新ページ名一覧での日時表示部分で適用されます。
/////////////////////////////////////////////////
// Date format
$date_format = 'Y-m-d';

// Time format
$time_format = 'H:i:s';

/////////////////////////////////////////////////
//
***RSSフィードの表示件数を変更したい [#u624c094]


***バックアップを残したくない [#gaad2c27]


***ページバックアップのタイミングを変更したい [#f4d81fca]


***ページを削除したらバックアップも削除したい [#a08948a1]



***ページ更新のタイミングでコマンドを実行したい [#k6a5d0bb]



***Proxyサーバを通した環境で設置したい [#n8a59a4c]


***ページ更新内容をメールで受け取りたい [2025.03.19更新] [#q2f2dc4c]
ページ更新の内容をメールで受け取りたい場合は、$notifyを1に変更します。初期状態では、差分のみをメールで送信する$notify_diff_onlyが1に設定されています。
$notify_diff_onlyを0にすると、更新時のページの内容がそのままメールで届きます。
メール通知機能を動作させるためには、SMTPサーバーの指定や送信先のメールアドレスを正しく設定する必要があります。
SMTPサーバーがPOP before SMTP形式の認証を必要とする場合はpopサーバを設定し、ユーザー名、パスワードを併せて指定する必要があります。
pop用のパスワードを設定ファイル内に記述する必要があるので、設定ファイルのパーツミッション設定には十分注意を払う必要があります。
メール通知機能はarticleプラグイン内にも独自で設定値を持っているのでarticleプラグインからの書き込みについてメールで更新通知を受けたい場合はarticle.inc.phpの内容を変更してください。

 // Mail related settings
 // Send mail per update of pages
 $notify = 0;
 // Send diff only
 $notify_diff_only = 1;
 // SMTP server (Windows only. Usually specified at php.ini)
 $smtp_server = 'localhost';
 // Mail recipient (To:) and sender (From:)
 $notify_to   = 'to@example.com';	// To:
 $notify_from = 'from@example.com';	// From:
 // Subject: ($page = Page name wll be replaced)
 $notify_subject = '[PukiWiki] $page';
 // Mail header
 // NOTE: Multiple items must be divided by "\r\n", not "\n".
 $notify_header = '';
 /////////////////////////////////////////////////
 // Mail: POP / APOP Before SMTP
 // Do POP/APOP authentication before send mail
 $smtp_auth = 0;
 $pop_server = 'localhost';
 $pop_port   = 110;
 $pop_userid = '';
 $pop_passwd = '';
 // Use APOP instead of POP (If server uses)
 //   Default = Auto (Use APOP if possible)
 //   1       = Always use APOP
 //   0       = Always use POP
 // $pop_auth_use_apop = 1;
//




***隠しページを作りたい [#h1eb333c]


***自動テンプレート機能を設定したい [#t33f82a1]



***見出しアンカーリンクをなくしたい [#p465f4d6]



***ページ内の改行をそのまま表示したい [#h3f81269]


***ユーザーエージェントごとに動作を変更したい [#lfb1e833]



***複数行対応プラグインを使いたい [#lf5daca8]


***ひな形とするページの一覧を無効化したい [#p7f7d789]


***検索語のハイライトを無効化したい [#g39e54ef]


***ページ名一覧のインデックスを解除したい [#d1106ada]


***リスト表示のマージンを調整したい [#q20a0185]


***編集フォームのサイズを変更したい [#t88b1fae]


***水平線の表示状態を変更したい [#p8600321]


***関連するページリンクを消したい [#gc38c44e]


***関連するページリンク一覧の表示を変更したい [#g50fe0fb]


***脚注のタイトル表示文字数を増やす [#n824127c]


***脚注のアンカータグの形式を変更する [#xeade5ad]



***脚注ブロックの区切り表示を変更したい [#rf336b1b]


***ページリンクのタイトルにある更新後の経過時間を消したい [#q1e953f0]

//
***ページリンクのタイトル表示を消したい[2025.03.19更新] [#z108ae88]
wikinameやbracketnameとして表示されるリンク部分にマウスカーソルを合わせしばらく待つと表示される。
ページ名などのタイトル要素を消すには$link_compactに0を設定します。
リンクタイトル要素を非表示にすることでページのデータ量を小さくすることができるので、携帯電話向けなどの表示としては有効です。

■defalut.ini.php
$link_compact = 0;
//
***ユーザー定義の書式を追加 [#w1d685d9]




//
***フェイスマークを使用不可にしたい[2025.03.21更新] [#n402aa8a]
ページ内の書式として使用できるフェイスマークを使用不可にしたい場合には$usefcemarkを0に指定します。
文中にフェイスマーク用の書式を無意識に使用してしまい、思うように表示されず困っているような人は、
フェイスマーク自体を使用不可にしてしまうことで回避することができます。

フェイスマークの書式ひとつひとつについて有効、無効を変更したい場合は書式設定している部分を変更します。

$usefacemark = 1;←ここを変更する。
//


***ファイスマークルールを増やしたい [#pa8bb891]


***日時の閲覧時間置換ルールを無効にしたい [#ga671d02]


***日時の閲覧時置換ルールを変更したい [#v57df8db]


***更新時置換文字列を変更したい [#a79fbdd1]


***英語対応変更したい [#id901a36]


***他言語に対応させたい [#h6536ce1]
日本語、英語以外の言語に対応させたい場合委、言語設定を変更した上で言語指定ファイルを自前で用意する必要があります。
言語指定ファイルは配布パッケージにja.Lng.phpとen.Lng.phpが含まれています。それ以外の言語に対応させる場合には、任意で言語コード識別文字を定義し、識別文字.Lng.phpというファイルで言語指定ファイルを用意してください。
例えば、韓国語に対応する場合、新たにkr.Lng.phpと用意した上でLANGをkrに設定しておきます。
kr.Lng.phpは韓国語に対応した文字コードで作成し、各単語の設定も韓国語に切り替えておきます。
//
***タイムゾーンを追加したい [#xa24f212]
Pukiwikiの対応するタイムゾーンを追加するにはpukiwiki.inc.php内のタイムゾーン判定部分に記述を追加します。言語指定LANGに対応させる形を取っているので、case文に新たに追加した言語指定に対応する記述を追加しましょう。

 /////////////////////////////////////////////////
 // Local time setting
 
 switch (LANG) { // or specifiy one
 case 'ja':
 	 define('ZONE', 'JST');
	 define('ZONETIME', 9 * 3600); // JST = GMT + 9
	 break;
 default  :
	 define('ZONE', 'GMT');
	 define('ZONETIME', 0);
	 break;
 }
 /////////////////////////////////////////////////

//
----------------------------------------------------------------------------------------------------
*オリジナルはここまで [#x264eb0e]
----------------------------------------------------------------------------------------------------

how = 500;←ここを変更する。
//
***調整中 [#zd2ae277]
***調整中 [#rf92dd9e]

***設定ファイルの構成 [#e3b17ece]
PukiWikiの設定ファイルは、複数に分かれた構成となっています。PukiWikiの全体的な設定を行うために変更するファイルは pukiWiki.ini.php です。
アクセスされるWebブラウザごとの設定内容はdefault.phpとkeitai.phpに分けて保存されます。置換文字列のルールは、rulrs.ini.phpとして用意されいます。
また、言語指定ごとに用意されてるメッセージを含む設定ファイルとして、それぞれja.lng.phpとen.lng.phpがあります。
日本語向けにja、英語向けにenとして設定されています。


***ユーザーエージェントごとに動作を変更したい [#q0b28284]
-変更箇所
 /////////////////////////////////////////////////
 // User-Agent settings
 //
 // If you want to ignore embedded browsers for rich-content-wikisite,
 // remove (or comment-out) all 'keitai' settings.
 //
 // If you want to to ignore desktop-PC browsers for simple wikisite,
 // copy keitai.ini.php to default.ini.php and customize it.
 $agents = array(
 // pattern: A regular-expression that matches device(browser)'s name and version
 // profile: A group of browsers
 // Embedded browsers (Rich-clients for PukiWiki)
 // Windows CE (Microsoft(R) Internet Explorer 5.5 for Windows(R) CE)
 // Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE; sigmarion3)" (sigmarion, Hand-held PC) 
 array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#', 'profile'=>'default'),
 // ACCESS "NetFront" / "Compact NetFront" and thier OEM, expects to be "Mozilla/4.0"
 // Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1.0) NetFront/3.0" (PlayStation BB Navigator, for SONY PlayStation 2)
 // Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Revision:1.1.19) NetFront/3.0" (SONY Clie series)
 // Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia/1.1.0) NetFront/3.0" (SHARP Zaurus)
 array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]+)#',	'profile'=>'default'),
 // Embedded browsers (Non-rich)
 // Windows CE (the others)
 // Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320 )" (GFORT, NTT DoCoMo)
 array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keitai'),
 // ACCESS "NetFront" / "Compact NetFront" and thier OEM
 // Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineStation", USB-Modem for PlayStation 2)
 // Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0" (DDI Pocket: AirH" Phone by JRC)
 array('pattern'=>'#\b(NetFront)/([0-9\.]+)#',	'profile'=>'keitai'),
 array('pattern'=>'#\b(CNF)/([0-9\.]+)#',	'profile'=>'keitai'),
 array('pattern'=>'#\b(AveFront)/([0-9\.]+)#',	'profile'=>'keitai'),
 array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#',	'profile'=>'keitai'), // The same?
 // NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOMA (embedded NetFront) phones
 // Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/serXXXX" // c以降は可変
 // Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serXXXX;iccxxxx)" // ()の中は可変
 array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#',	'profile'=>'keitai'),
 // Vodafone's embedded browser
 // Sample: "J-PHONE/2.0/J-T03"	// 2.0は"ブラウザの"バージョン
 // Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0"
 array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#',	'profile'=>'keitai'),
 // Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
 // Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MMP/2.0"
 array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#',	'profile'=>'keitai'),
 // Opera, dressing up as other embedded browsers
 // Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4.1.67.000000/0.1/C100) Opera 7.0" (Like CNF at 'keitai'-mode)
 array('pattern'=>'#\b(?:DDIPOCKET|WILLCOM)\b.+\b(Opera) ([0-9\.]+)\b#',	'profile'=>'keitai'),
 // Planetweb http://www.planetweb.com/
 // Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS JP)" ("EGBROWSER", Web browser for PlayStation 2)
 array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile'=>'keitai'),
 // DreamPassport, Web browser for SEGA DreamCast
 // Sample: "Mozilla/3.0 (DreamPassport/3.0)"
 array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#',	'profile'=>'keitai'),
 // Palm "Web Pro" http://www.palmone.com/us/support/accessories/webpro/
 // Sample: "Mozilla/4.76 [en] (PalmOS; U; WebPro)"
 array('pattern'=>'#\b(WebPro)\b#',	'profile'=>'keitai'),
 // ilinx "Palmscape" / "Xiino" http://www.ilinx.co.jp/
 // Sample: "Xiino/2.1SJ [ja] (v. 4.1; 153x130; c16/d)"
 array('pattern'=>'#^(Palmscape)/([0-9\.]+)#',	'profile'=>'keitai'),
 array('pattern'=>'#^(Xiino)/([0-9\.]+)#',	'profile'=>'keitai'),
 // SHARP PDA Browser (SHARP Zaurus)
 // Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
 array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#',	'profile'=>'keitai'),
 // WebTV
 array('pattern'=>'#^(WebTV)/([0-9\.]+)#',	'profile'=>'keitai'),
 // Desktop-PC browsers
 // Opera (for desktop PC, not embedded) -- See BugTrack/743 for detail
 // NOTE: Keep this pattern above MSIE and Mozilla
 // Sample: "Opera/7.0 (OS; U)" (not disguise)
 // Sample: "Mozilla/4.0 (compatible; MSIE 5.0; OS) Opera 6.0" (disguise)
 array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#',	'profile'=>'default'),
 // MSIE: Microsoft Internet Explorer (or something disguised as MSIE)
 // Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
 array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#',	'profile'=>'default'),
 // Mozilla Firefox
 // NOTE: Keep this pattern above Mozilla
 // Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3"
 array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#',	'profile'=>'default'),
 // Loose default: Including something Mozilla
 array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#',	'profile'=>'default'),
 array('pattern'=>'#^#',	'profile'=>'default'),	// Sentinel
 );
 }}

*** PukiWikiでアップロードファイルの容量を増やす方法について [#z21cae05]
-変更方法 [#hdbd0bb0]
pukiwikiの添付ファイルサイズの上限は、1MBに初期設定されています。容量を増やすには、2つのファイルを計3箇所変更する必要があります。

-変更方法
下は添付ファイルの容量を50MBに増やす方法です。

pukiwiki の設定 [#n91639c5]
pukiwiki側で添付ファイルサイズの上限を変更するには、attachプラグインを直接書き換えないといけません。
attachプラグインは、
 pukiwikiフォルダ/plugin/attach.inc.phpです。このファイルの
 // max file size for upload on PHP(PHP default 2MB)
 ini_set("upload_max_filesize","2M");

となっている行を

 // max file size for upload on PHP(PHP default 2MB)
 ini_set("upload_max_filesize","50M");

に変更します。さらに

 // max file size for upload on script of PukiWiki(default 1MB)
 define("MAX_FILESIZE",1000000);

となっている行を

 // max file size for upload on script of PukiWiki(default 1MB)
 define("MAX_FILESIZE",50000000);

に変更します。

-PHP.iniの設定 [#s496c239]

一番上のディレクトリにphp.iniがあるのでその

 memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

となっている行を

 memory_limit = 80M ; Maximum amount of memory a script may consume (8MB)

に変更します。さらに

    ; Maximum allowed size for uploaded files. upload_max_filesize = 2M
    ; Maximum size of POST data that PHP will accept. post_max_size = 8M

となっている行を

    ; Maximum allowed size for uploaded iles. upload_max_filesize = 50M
    ; Maximum size of POST data that PHP will accept. post_max_size = 80M

に変更します。これで終わりです。

*** GoogleAnalyticsトラッキングコードの挿入  [#ka55cf81]
Googleのアクセス分析サービスGoogleAnalyticsのトラッキングコードの挿入
skinフォルダの中にある「pukiwiki.skin.php」をテキストエディタで開き90行目付近の

 ?php echo $head_tag ?>
 /head>
 /head>の前にトラッキングコードを挿入。

挿入後
 ?php echo $head_tag ?>
 !-- GoogleAnalytics? Start -->
 script>
 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
 ga('create', '************', 'auto');
 ga('send', 'pageview');
 /script>
 !-- GoogleAnalytics? End -->
 /head>
 ga('create', '************', 'auto'); の************はそれぞれのトラッキングID

*** 自動リンクを無効にする方法 [#g842bb84]
「pukiwiki.ini.php」をテキストエディタで開き、173行目からの

$nowikiname = 0;を1へ変更

$nowikiname = 0;

ページ下部のLinks・添付ファイルを表示しない

「default.ini.php」をテキストエディタで開き56・60行目の
$attach_link = 0; ★←1を0にする
$related_link = 0; ★←1を0にする
とリンクが無効になります。

*** テキストエリアサイズをリサイズしたい [#heaa8e1c]
ローカルのメモ用にPukiWikiを使っているのだけど、編集画面のテキストエリアをもう少し広い画面で見たい!と常々思っていたので調べてみました。
まずテキストエリアの大きさは、 default.ini.php で設定できる。

// テキストエリアのカラム数
$cols = 100;
// テキストエリアの行数
$rows = 30;

を変更すればサイズを変更できます。

*** 投稿・編集者の制限 [#zf66c01e]
Wikiを自分ひとりで書く場合の設定(もしくは、Passを知っている人だけが新規、編集可)
「pukiwiki.ini.php」をテキストエディタで開き240行目付に「'ユーザー名' => 'パスワード', // Cleartext」を追加。
※暗号化してる場合は「'ユーザー名' => '{x-php-md5}パスワード', // PHP md5() '」

// User definition
$auth_users = array(
// Username => password
'ユーザー名'	=> 'パスワード', // Cleartext ←★この行追加
'foo'	=> 'foo_passwd', // Cleartext
'bar'	=> '{x-php-md5}', // PHP md5() 'bar_passwd'
'hoge'	=> '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx',      // LDAP SMD5 'hoge_passwd'

);

次に270行目付近に「'/^.*$/' => 'ユーザー名', // 」を追加。

// Edit auth (0:Disable, 1:Enable)
$edit_auth = 1;
$edit_auth_pages = array(
// Regex		   Username
'#BarDiary#'		=> 'bar',
'#HogeHoge#'		=> 'hoge',
'#(NETABARE|NetaBare)#'	=> 'foo,bar,hoge',
'/^.*$/' => 'ユーザー名', //  ←★この行追加
);

これで新規や編集時にパスを求められるようになります。

*** Pukiwikiのパスワード設定 [#rbe37e25]

パスワードとして「password」を設定する場合・・・

Pukiwiki を設置している場所で
 
 http://*****/index.php?cmd=md5

と入力.

Phrase の部分にパスワード「password」を入力 [#v0b3751c]

PHP md5() を設定して,Compute を押す.

下記のように計算結果が出力されるので,それをコピーする.

 {x-php-md5}5f4dcc3b5aa765d61d8327deb882cf99

pukiwiki をインストールしたディレクトリの pukiwiki.ini.php を vi などで開く.

$adminpass をサーチし,現在の設定をコメントアウト.

$adminpass = '{x-php-md5}5f4dcc3b5aa765d61d8327deb882cf99';

と入力.

以上でパスワード設定完了です。そのまんまのパスワードにしておかいようにしてください。

*** ファイル添付時のパスワード認証を行わないようにしたい。 [#gdd1f579]

pukiwikiはXSS脆弱性対策としてデフォルトでファイルを添付する際に管理者権限が必要みたいです。
どうすればいいかは以下のURLに載っていました。

attach.inc.phpファイルの一部を書き換えます。
PLUGIN_ATTACH_UPLOAD_ADMIN_ONLYをTRUE→FALSE に書き換えます。

*** ヘッダーのページURLを短くする方法 [#wb0e8287]
デフォルトのページURL(header の標題の下にあるURL)は、エンコードされて表示されるため、非常に長くなってしまいます。ページを編集していて、横スライドバーが消えずに『え?』と思っていろいろ見てみたら原因は、この長いページURLでした。cssをいじったりしてみましたがうまくいかなかったのですが、本家は、\#topicpath のようなディレクトリの階層表示になっているので『おっこれは良い』とマニュアルなどを再確認したらすでにプラグインされていました。pukiwiki/skin/pukiwiki.skin.php の20行目あたりを以下の様に変更します。 if (!

 defined('SKIN_DEFAULT_DISABLE_TOPICPATH'))
 define('SKIN_DEFAULT_DISABLE_TOPICPATH',0); // 1, 0

*** ページタイトルの階層をそれぞれリンクにする。 [#z21cae05]
pluginフォルダの中の「topicpath.inc.php」をテキストエディタで開く
22行目を

define('PLUGIN_TOPICPATH_THIS_PAGE_DISPLAY', 1); ★←1を0へ変更

30行目を

function plugin_topicpath_convert()
{
return '<div>' . plugin_topicpath_inline() . ' /</div>'; ★</div>の前に「 /」を追加。

}

skinフォルダの「pukiwiki.skin.php」をテキストエディタで開き101行目の

h1 class="title"><?php echo $page ?></h1>

を

h1 class="title"><?php
if ($vars["cmd"] == "read") {

if($vars["page"] != "FrontPage"){
echo ('<span class="smalltitle">');
require_once(PLUGIN_DIR.'topicpath.inc.php');
echo plugin_topicpath_convert();
if ( preg_match('/\//',$title) == TRUE ) {
}
echo ('</span>');
echo preg_replace('/.*\//','',$title);
}else{
echo $page_title;
}

} else {

echo $title;
} ?></h1>

へ置き換え。

skinフォルダの「pukiwiki.css.php」をテキストエディタで開き適当な行にスタイルを追加。

.smalltitle { font-size:60%; }

*** ページ下部のLinks・添付ファイルを表示しない方法 [#me1bc108]
2通りの方法があります。
1:
「default.ini.php」をテキストエディタで開き56・60行目の

 $attach_link = 0; ★←1を0にする
 $related_link = 0; ★←1を0にする

を変更すれば表示しなくなります。
2:
skinフォルダの中にある「pukiwiki.skin.php」をテキストエディタで開き

118行目付近にある
<a href="<?php echo $link['reload'] ?>"><span class="small"><?php echo $link['reload'] ?></span></a>
の先頭に「<!--」最後に「-->」をつけてコメントアウトして非表示にする。削除してしまっても構わない

?php if(SKIN_DEFAULT_DISABLE_TOPICPATH) { ?>

!-- <a href="<?php echo $link['reload'] ?>"><span class="small"><?php echo $link['reload'] ?></span></a> -->

?php } else { ?>

<span class="small"

***パスワードを変更したい [#pfd6fe9a]
/////////////////////////////////////////////////
// Admin password for this Wikisite
// Default: always fail
$adminpass = '{x-php-md5}暗号化したパスワードを入れる';
// Sample:
//$adminpass = 'pass'; // Cleartext
//$adminpass = '{x-php-md5}1a1dc91c907325c69271ddf0c944bc72'; // PHP md5()  'pass'
//$adminpass = '{x-php-sha256}d74ff0ee8da3b9806b18c877dbf29bbde50b5bd8e4dad7a3a725000feb82e8f1'; // PHP sha256  'pass'
//$adminpass = '{CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/';   // LDAP CRYPT 'pass'
//$adminpass = '{MD5}Gh3JHJBzJcaScd3wyUS8cg==';               // LDAP MD5   'pass'
//$adminpass = '{SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx';      // LDAP SMD5  'pass'
//$adminpass = '{SHA256}10/w7o2juYBrGMh32/KbveULW9jk2tejpyUAD+uC6PE=' // LDAP SHA256 'pass'

*** ページタイトルの変更(ブラウザのタイトル) [#t5540fdf]
デフォルトの設定だとページのタイトルが「ページ名 - サイト名」になっているが「サイト名 - ページ名」へ変更する。
skinフォルダの中にある「pukiwiki.skin.php」をテキストエディタで開き78行目の項目を入れ替える。

変更前<title><?php echo $title ?> - <?php echo $page_title ?></title>

変更後<title><?php echo $page_title ?> - <?php echo $title ?></title>
//
***ページ内にある表の左寄せ [#yaf1a0d7]
skinフォルダの中にある「pukiwiki.css.php」をテキストエディタで開き170行目付近にある.style_tableにmargin-left:0px;を追加
編集ファイルcssファイルから以下の内容を変更する。

.style_table {
padding:0px;
border:0px;
margin:auto;
margin-left:0px; ←★この行追加
text-align:left;
color:inherit;
background-color:#ccd5dd;
}

200行目付近にある
div.ie5 {text-align:center; }
を
div.ie5 { text-align:left; }
に書き換えて完了です。

*** ロゴ画像変更・サイズ変更 [#rf087549]
Pukiwikiフォルダの中のimageフォルダの中の「pukiwiki.png」がロゴ画像のデータpukiwiki.pngを変更したい画像へ差し替えればOK

デフォルトだとサイズが80x80なので変更後の画像のサイズへ変更
skinフォルダの中にある「pukiwiki.skin.php」をテキストエディタで開き
97行目からのwidth="80" height="80を変更
ついでに代替テキストalt="[PukiWiki]とタイトル title="[PukiWiki]も変更

 a href="<?php echo $link['top'] ?>"><img id="logo" src="<?php echo IMAGE_DIR .
 $image['logo'] ?>" width="80" height="80" alt="[PukiWiki]" title="[PukiWiki]" /></a>
//
----------------------------------------------------------------------------------------------------
** 4-2 アクセス制限の設定 [#bbaaa972]
編集や閲覧ごとにページ単位でユーザーごとにアクセス制限を行うことができます。

***アクセス制限を行いたい [#t5010565]
まず、ユーザー設定は、&auth_uers配列にユーザー名、パスワードという形で定義します。
パスワードには、平文のパスワードから各種の暗号済みパスワード文字列まで使用することができます。

 $auth_users = array(
	// Username => password
	'foo'	=> 'foo_passwd', // Cleartext
	'bar'	=> '{x-php-md5}', // PHP md5() 'bar_passwd'
	'hoge'	=> '{SMD5}',      // LDAP SMD5 'hoge_passwd'
	);

認証方式は、ページ名単位の設定とコンテンツ単位での設定の2種類から洗濯することができます。
$auth_method_typeにpagenameを設定した場合はページ単位での認証となり、
contentsを指定した場合はページ内に認証有効記述の有無を判断した上で認証の有無が決まります。

それぞれの認証方式の違いはいくつかありますが、大きな違いとしてはページ名単位での設定はアクセス制限対象を事前に設定ファイル内で定義する必要があり、
コンテンツ単位では認証有効化の単語さえわかっていればユーザーが自由にページに対す手の認証の有無を切り替えることができます。

***ページを削除したらバックアップも削除したい [#x664de65]
ページを削除したタイミングでそのページのバックアップデータも含めて削除してしまいたい場合は、$del_backupを1にします。
ただし、意図しないページ削除からページを修復することができなくなるので、ページ削除時のバックアップ同時削除は、あまり有効化しないほうがいいでしょう。

-変更箇所
/////////////////////////////////////////////////
// Backup related settings

// Enable backup
$do_backup = 1;

***単語検索と認証ページ [#dbb6a156]
単語検索を行う際に、認証の掛かっているページを検索対象とするかしないかの設定するには、
$Serach_authで指定することができます。

$Serach_authを1に変更すると認証の掛かっているページは、認証が済んでるユーザー以外には検索対象として表示されない状態になります。

 // Search auth
 // 0: Disabled (Search read-prohibited page contents)
 // 1: Enabled  (Search only permitted pages for the user)
 $search_auth = 0; ←ここを変更する。

** 4-3 ユーザーインターフェイスの変更 [#iaad9803]
** 4-4 スキンを自前でカスタマイズする [#i8ab1c0d]
配布されているスキンで満足できない、あるいは自分でどうしてもスキンを作成したいという場合には、スキンを自作するしかありません。
***独自のスキンにしたい [#c11d87d6]
スキンを自作するためには、よりPHPやHTML、CSSの知識を持っていなければなりませんが、少しずつ改造してゆくとこで知識を習得し、技術として身についていくことでしょう。
スキンの配色はCSSで行うことができます。標準のスキンに対応するCSSファイルはSkinディレクトリに含まれるPukiwiki.css.phpです。

pukiwiki.css.phpは、ファイルの拡張子が示すとおりPHPで実装されてます。CSSファイルなのにPHPで実装されてるのは、印刷時のCSSの切り替えや各種の動的な判定を行うためです。
CSSを変更するだけであれば、PHPとして実装されている部分には特に触れる必要がありません。
背景色や文書全体の文字色を一律で変更するためにはCSS内のbody.tdとして定義されている箇所を変更します。
//
//
-----
<?php
// PukiWiki - Yet another WikiWikiWeb clone
// pukiwiki.ini.php
// Copyright
//   2002-2022 PukiWiki Development Team
//   2001-2002 Originally written by yu-ji
// License: GPL v2 or (at your option) any later version
//
// PukiWiki main setting file

/////////////////////////////////////////////////
// Functionality settings

// PKWK_OPTIMISE - Ignore verbose but understandable checking and warning
//   If you end testing this PukiWiki, set '1'.
//   If you feel in trouble about this PukiWiki, set '0'.
if (! defined('PKWK_OPTIMISE'))
	define('PKWK_OPTIMISE', 0);

/////////////////////////////////////////////////
// Security settings

// PKWK_READONLY - Prohibits editing and maintain via WWW
//   NOTE: Counter-related functions will work now (counter, attach count, etc)
if (! defined('PKWK_READONLY'))
	define('PKWK_READONLY', 0); // 0 or 1

// PKWK_SAFE_MODE - Prohibits some unsafe(but compatible) functions 
if (! defined('PKWK_SAFE_MODE'))
	define('PKWK_SAFE_MODE', 0);

// PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using inline-image-tag for URIs
//   Inline-image-tag for URIs may allow leakage of Wiki readers' information
//   (in short, 'Web bug') or external malicious CGI (looks like an image's URL)
//   attack to Wiki readers, but easy way to show images.
if (! defined('PKWK_DISABLE_INLINE_IMAGE_FROM_URI'))
	define('PKWK_DISABLE_INLINE_IMAGE_FROM_URI', 0);

// PKWK_QUERY_STRING_MAX
//   Max length of GET method, prohibits some worm attack ASAP
//   NOTE: Keep (page-name + attach-file-name) <= PKWK_QUERY_STRING_MAX
define('PKWK_QUERY_STRING_MAX', 2000); // Bytes, 0 = OFF

/////////////////////////////////////////////////
// Experimental features

// Multiline plugin hack (See BugTrack2/84)
// EXAMPLE(with a known BUG):
//   #plugin(args1,args2,...,argsN){{
//   argsN+1
//   argsN+1
//   #memo(foo)
//   argsN+1
//   }}
//   #memo(This makes '#memo(foo)' to this)
define('PKWKEXP_DISABLE_MULTILINE_PLUGIN_HACK', 1); // 1 = Disabled

/////////////////////////////////////////////////
// Language / Encoding settings

// LANG - Internal content encoding ('en', 'ja', or ...)
define('LANG', 'ja');

// UI_LANG - Content encoding for buttons, menus,  etc
define('UI_LANG', LANG); // 'en' for Internationalized wikisite

/////////////////////////////////////////////////
// Directory settings I (ended with '/', permission '777')

// You may hide these directories (from web browsers)
// by setting DATA_HOME at index.php.

define('DATA_DIR',      DATA_HOME . 'wiki/'     ); // Latest wiki texts
define('DIFF_DIR',      DATA_HOME . 'diff/'     ); // Latest diffs
define('BACKUP_DIR',    DATA_HOME . 'backup/'   ); // Backups
define('CACHE_DIR',     DATA_HOME . 'cache/'    ); // Some sort of caches
define('UPLOAD_DIR',    DATA_HOME . 'attach/'   ); // Attached files and logs
define('COUNTER_DIR',   DATA_HOME . 'counter/'  ); // Counter plugin's counts
define('PLUGIN_DIR',    DATA_HOME . 'plugin/'   ); // Plugin directory

/////////////////////////////////////////////////
// Directory settings II (ended with '/')

// Skins / Stylesheets
define('SKIN_DIR', 'skin/');
// Skin files (SKIN_DIR/*.skin.php) are needed at
// ./DATAHOME/SKIN_DIR from index.php, but
// CSSs(*.css) and JavaScripts(*.js) are needed at
// ./SKIN_DIR from index.php.

// Static image files
define('IMAGE_DIR', 'image/');
// Keep this directory shown via web browsers like
// ./IMAGE_DIR from index.php.


// Title of your Wikisite (Name this)
// Also used as RSS feed's channel name etc
$page_title = 'PukiWiki';

// Specify PukiWiki URL (default: auto)
//$script = 'http://example.com/pukiwiki/';

// Shorten $script: Cut its file name (default: not cut)
//$script_directory_index = 'index.php';

// Site admin's name (CHANGE THIS)
$modifier = 'anonymous';

// Site admin's Web page (CHANGE THIS)
$modifierlink = 'http://pukiwiki.example.com/';

// Default page name
$defaultpage  = 'FrontPage';     // Top / Default page
$whatsnew     = 'RecentChanges'; // Modified page list
$whatsdeleted = 'RecentDeleted'; // Removeed page list
$interwiki    = 'InterWikiName'; // Set InterWiki definition here
$aliaspage    = 'AutoAliasName'; // Set AutoAlias definition here
$menubar      = 'MenuBar';       // Menu

$rightbar_name = 'RightBar';     // RightBar

/////////////////////////////////////////////////
// Change default Document Type Definition

// Some web browser's bug, and / or Java apprets may needs not-Strict DTD.
// Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_TRANSITIONAL.

//$pkwk_dtd = PKWK_DTD_XHTML_1_1; // Default
//$pkwk_dtd = PKWK_DTD_XHTML_1_0_STRICT;
//$pkwk_dtd = PKWK_DTD_XHTML_1_0_TRANSITIONAL;
//$pkwk_dtd = PKWK_DTD_HTML_4_01_STRICT;
//$pkwk_dtd = PKWK_DTD_HTML_4_01_TRANSITIONAL;


// PKWK_ALLOW_JAVASCRIPT - Must be 1 only for compatibility
define('PKWK_ALLOW_JAVASCRIPT', 1);

/////////////////////////////////////////////////
// _Disable_ WikiName auto-linking
$nowikiname = 0;


// AutoAlias feature
// Automatic link from specified word, to specifiled URI, page or InterWiki

// AutoAlias minimum length of alias "from" word
$autoalias = 0; // Bytes, 0 = OFF (try 8)

// Limit loading valid alias pairs
$autoalias_max_words = 50; // pairs


// Allow to use 'Do not change timestamp' checkbox
// (0:Disable, 1:For everyone,  2:Only for the administrator)
$notimeupdate = 1;

/////////////////////////////////////////////////
// Page-reading feature settings
// (Automatically creating pronounce datas, for Kanji-included page names,
//  to show sorted page-list correctly)

// Enable page-reading feature by calling ChaSen or KAKASHI command
// (1:Enable, 0:Disable)
$pagereading_enable = 0;

// Specify converter as ChaSen('chasen') or KAKASI('kakasi') or None('none')
$pagereading_kanji2kana_converter = 'none';

// Specify Kanji encoding to pass data between PukiWiki and the converter
$pagereading_kanji2kana_encoding = 'EUC'; // Default for Unix
//$pagereading_kanji2kana_encoding = 'SJIS'; // Default for Windows

// Absolute path of the converter (ChaSen)
$pagereading_chasen_path = '/usr/local/bin/chasen';
//$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';

// Absolute path of the converter (KAKASI)
$pagereading_kakasi_path = '/usr/local/bin/kakasi';
//$pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';

// Page name contains pronounce data (written by the converter)
$pagereading_config_page = ':config/PageReading';

// Page name of default pronouncing dictionary, used when converter = 'none'
$pagereading_config_dict = ':config/PageReading/dict';


/////////////////////////////////////////////////
// Authentication type
// AUTH_TYPE_NONE, AUTH_TYPE_FORM, AUTH_TYPE_BASIC, AUTH_TYPE_EXTERNAL, ...
// $auth_type = AUTH_TYPE_FORM;
// $auth_external_login_url_base = './exlogin.php';

/////////////////////////////////////////////////
// LDAP
$ldap_user_account = 0; // (0: Disabled, 1: Enabled)
// $ldap_server = 'ldap://ldapserver:389';
// $ldap_base_dn = 'ou=Users,dc=ldap,dc=example,dc=com';
// $ldap_bind_dn = 'uid=$login,dc=example,dc=com';
// $ldap_bind_password = '';

/////////////////////////////////////////////////
// User prefix that shows its auth provider
$auth_provider_user_prefix_default = 'default:';
$auth_provider_user_prefix_ldap = 'ldap:';
$auth_provider_user_prefix_external = 'external:';
$auth_provider_user_prefix_saml = 'saml:';


/////////////////////////////////////////////////
// User definition
$auth_users = array(
	// Username => password
	'foo'	=> 'foo_passwd', // Cleartext
	'bar'	=> '{x-php-md5}f53ae779077e987718cc285b14dfbe86', // PHP md5() 'bar_passwd'
	'hoge'	=> '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx',      // LDAP SMD5 'hoge_passwd'
);

// Group definition
$auth_groups = array(
	// Groupname => group members(users)
	'valid-user' => '', // Reserved 'valid-user' group contains all authenticated users
	'groupfoobar'	=> 'foo,bar',
);

/////////////////////////////////////////////////
// Authentication method

$auth_method_type	= 'pagename';	// By Page name
//$auth_method_type	= 'contents';	// By Page contents

/////////////////////////////////////////////////
// Read auth (0:Disable, 1:Enable)
$read_auth = 0;

$read_auth_pages = array(
	// Regex		   Groupname or Username
	'#PageForAllValidUsers#'	=> 'valid-user',
	'#HogeHoge#'		=> 'hoge',
	'#(NETABARE|NetaBare)#'	=> 'foo,bar,hoge',
);

/////////////////////////////////////////////////
// Edit auth (0:Disable, 1:Enable)
$edit_auth = 0;

$edit_auth_pages = array(
	// Regex		   Username
	'#BarDiary#'		=> 'bar',
	'#HogeHoge#'		=> 'hoge',
	'#(NETABARE|NetaBare)#'	=> 'foo,bar,hoge',
);

/////////////////////////////////////////////////
// Search auth
// 0: Disabled (Search read-prohibited page contents)
// 1: Enabled  (Search only permitted pages for the user)
$search_auth = 0;

/////////////////////////////////////////////////
// AutoTicketLink
// (0:Create AutoTicketLinkName page automatically, 1:Don't create the page)
$no_autoticketlinkname = 0;
$ticket_link_sites = array(
/*
	array(
		'key' => 'phpbug',
		'type' => 'redmine', // type: redmine, jira or git
		'title' => 'PHP :: Bug #$1',
		'base_url' => 'https://bugs.php.net/bug.php?id=',
	),
	array(
		'key' => 'asfjira',
		'type' => 'jira',
		'title' => 'ASF JIRA [$1]',
		'base_url' => 'https://issues.apache.org/jira/browse/',
	),
	array(
		'key' => 'pukiwiki-commit',
		'type' => 'git',
		'title' => 'PukiWiki revision $1',
		'base_url' => 'https://ja.osdn.net/projects/pukiwiki/scm/git/pukiwiki/commits/',
	),
 */
 );
// AutoTicketLink - JIRA Default site
/*
$ticket_jira_default_site = array(
	'title' => 'My JIRA - $1',
	'base_url' => 'https://issues.example.com/jira/browse/',
);
//*/

/////////////////////////////////////////////////
// Show External Link Cushion Page
// 0: Disabled
// 1: Enabled
$external_link_cushion_page = 0;
$external_link_cushion = array(
	// Wait N seconds before jumping to an external site
	'wait_seconds' => 5,
	// Internal site domain list
	'internal_domains' => array(
		'localhost',
		// '*.example.com',
	),
	// Don't show extenal link icons on these domains
	'silent_external_domains' => array(
		'pukiwiki.osdn.jp',
		'pukiwiki.example.com',
	),
);

/////////////////////////////////////////////////
// Show Topicpath title
// 0: Disabled
// 1: Enabled
$topicpath_title = 1;

/////////////////////////////////////////////////
// Output HTML meta Referrer Policy
// Value: '' (default), no-referrer, origin, same-origin, ...
// Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy
$html_meta_referrer_policy = '';

/////////////////////////////////////////////////
// Output custom HTTP response headers
$http_response_custom_headers = array(
	// 'Strict-Transport-Security: max-age=86400',
	// 'X-Content-Type-Options: nosniff',
);


// $whatsdeleted: Max number of RecentDeleted
// (0 = Disabled)
$maxshow_deleted = 200;


// HTTP: Output Last-Modified header
$lastmod = 0;


// Max number of RSS feed
$rss_max = 15;



// When a page had been removed, remove its backup too?
$del_backup = 0;

// Bacukp interval and generation
$cycle  =   3; // Wait N hours between backup (0 = no wait)
$maxage = 120; // Stock latest N backups

// NOTE: $cycle x $maxage / 24 = Minimum days to lost your data
//          3   x   120   / 24 = 15

// Splitter of backup data (NOTE: Too dangerous to change)
define('PKWK_SPLITTER', '>>>>>>>>>>');

/////////////////////////////////////////////////
// Command execution per update

define('PKWK_UPDATE_EXEC', '');

// Sample: Namazu (Search engine)
//$target     = '/var/www/wiki/';
//$mknmz      = '/usr/bin/mknmz';
//$output_dir = '/var/lib/namazu/index/';
//define('PKWK_UPDATE_EXEC',
//	$mknmz . ' --media-type=text/pukiwiki' .
//	' -O ' . $output_dir . ' -L ja -c -K ' . $target);

/////////////////////////////////////////////////
// HTTP proxy setting

// Use HTTP proxy server to get remote data
$use_proxy = 0;

$proxy_host = 'proxy.example.com';
$proxy_port = 8080;

// Do Basic authentication
$need_proxy_auth = 0;
$proxy_auth_user = 'username';
$proxy_auth_pass = 'password';

// Hosts that proxy server will not be needed
$no_proxy = array(
	'localhost',	// localhost
	'127.0.0.0/8',	// loopback
//	'10.0.0.0/8'	// private class A
//	'172.16.0.0/12'	// private class B
//	'192.168.0.0/16'	// private class C
//	'no-proxy.com',
);

////////////////////////////////////////////////
// Mail related settings

// Send mail per update of pages
$notify = 0;

// Send diff only
$notify_diff_only = 1;

// SMTP server (Windows only. Usually specified at php.ini)
$smtp_server = 'localhost';

// Mail recipient (To:) and sender (From:)
$notify_to   = 'to@example.com';	// To:
$notify_from = 'from@example.com';	// From:

// Subject: ($page = Page name wll be replaced)
$notify_subject = '[PukiWiki] $page';

// Mail header
// NOTE: Multiple items must be divided by "\r\n", not "\n".
$notify_header = '';

/////////////////////////////////////////////////
// Mail: POP / APOP Before SMTP

// Do POP/APOP authentication before send mail
$smtp_auth = 0;

$pop_server = 'localhost';
$pop_port   = 110;
$pop_userid = '';
$pop_passwd = '';

// Use APOP instead of POP (If server uses)
//   Default = Auto (Use APOP if possible)
//   1       = Always use APOP
//   0       = Always use POP
// $pop_auth_use_apop = 1;

/////////////////////////////////////////////////
// Ignore list

// Regex of ignore pages
$non_list = '^\:';

// Search ignored pages
$search_non_list = 1;


// Page redirect rules
$page_redirect_rules = array(
	//'#^FromProject($|(/(.+)$))#' => 'ToProject$1',
	//'#^FromProject($|(/(.+)$))#' => function($matches) { return 'ToProject' . $matches[1]; },
);

/////////////////////////////////////////////////
// Template setting

$auto_template_func = 1;
$auto_template_rules = array(
	'((.+)\/([^\/]+))' => '\2/template'
);

/////////////////////////////////////////////////
// Automatically add fixed heading anchor
$fixed_heading_anchor = 1;

/////////////////////////////////////////////////
// Remove the first spaces from Preformatted text
$preformat_ltrim = 1;

/////////////////////////////////////////////////
// Convert linebreaks into <br />
$line_break = 0;

/////////////////////////////////////////////////
// Use date-time rules (See rules.ini.php)
$usedatetime = 1;

/////////////////////////////////////////////////
// Logging updates (0 or 1)
$logging_updates = 0;
$logging_updates_log_dir = '/var/log/pukiwiki';

/////////////////////////////////////////////////
// Page-URI mapping handler ( See https://pukiwiki.osdn.jp/?PukiWiki/PageURI )
$page_uri_handler = null; // default
// $page_uri_handler = new PukiWikiStandardPageURIHandler();


}}

//

トップ   差分 履歴 リロード   一覧 検索 最終更新   ヘルプ   最終更新のRSS