Web Collaboration by PukiWiki-chapter4 カスタマイズについて
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
*[[chapter4 カスタマイズについて]] [#vb2f00b4]
ここでは、設定変更による動作の切り替えとデザインのカスタ...
---------------------------------------------------------...
#contents();
//
** 4-1 設定ファイルによる各種カスタマイズ [#b2a0ed54]
Pukiwikiを設置して使い慣れてくると、各機能の動作を細かく...
---------------------------------------------------------...
**設定ファイルの構成について [#obcdc19f]
pukiwikiの設定ファイルは、複数に分かれた構成ファイルとな...
アクセスされるwebブラウザごとの設定内容はdefalut.ini.php...
***読み取り専用にしたい [2025.03.17更新] [#i718683f]
Pukiwikiで作成したサイト2全体を読み取り専用で公開したい場...
様々な情報をPukiwikiにまとめた上でページ更新を停止した状...
読み取り専用を有効にすると、ナビゲーション部分に用意され...
また、URLでダイレクトに編集画面にアクセスしてもエラー表示...
なお、ページ単位で更新機能を無効化する場合は凍結機能を利...
// PKWK_READONLY - Prohibits editing and maintain via WWW
// NOTE: Counter-related functions will work now (coun...
if (! defined('PKWK_READONLY'))
define('PKWK_READONLY', 0); // 0 or 1 ここで1にする...
//
***画像をページ内で展開しないようにしたい[2025.03.18更新]...
一般的に解放しているPukiwikiでは、悪意のあるユーザーに不...
対処するのには、画像URLを画像としてページに表示する機能を...
画像URLのページ内表示を無効化するには、pukiwiki.ini.phpに...
これで、ページ内に記載された画像URLはURLのリンクとして表...
// PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using i...
// Inline-image-tag for URIs may allow leakage of Wiki...
// (in short, 'Web bug') or external malicious CGI (lo...
// 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);←こ...
//
***サイト名などを変更したい[2025.03.19更新] [#q31f719e]
設置したPukiwikiのページタイトルやフッタ部表示されるサイ...
このうちスクリプトURLを指定する変数$scriptは、初期状態で...
標準的にはURLが自動的にサーバーの設定より生成されますが、...
例えば、自宅サーバーでブロードバンドルーター越しにpukiwik...
ダイナミックDNSなどを利用し、ドメイン名を取得した上でその...
/////////////////////////////////////////////////
// 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';
//
***特別なページの名前を変更したい [#ea759828]
トップページとして指定されるFrontPageや更新ページ名一覧と...
特にトップページにある$defaultpage変数は、サイト運営にあ...
// Default page name
$defaultpage = 'FrontPage'; // Top / Default page
$whatsnew = 'RecentChanges'; // Modified page list
$whatsdeleted = 'RecentDeleted'; // Removeed page list
$interwiki = 'InterWikiName'; // Set InterWiki definit...
$aliaspage = 'AutoAliasName'; // Set AutoAlias definit...
$menubar = 'MenuBar'; // Menu
//
***TrackBackに対応したい [#ped2e8fa]
***検索エンジンになるべく掛からないようにしたい[2025.03.1...
Pukiwikiに含まれるすべてのページに対して検索エンジンの検...
スキンファイル直接カスタマイズする方法もありましが、$nofo...
/////////////////////////////////////////////////
// Always output "nofollow,noindex" attribute
$nofollow = 0; // 1 = Try hiding from search engines ←こ...
/////////////////////////////////////////////////
ただし、METAタグによる検索対象からの除外は検索エンジンご...
なお、ページごとにnofollowを指定したい場合には$nofollowプ...
//
***リンク参照先URLを調べたい [#hd8bbb05]
pukiwikiの任意のページに対して外部のサイトからリンクされ...
リンク元保存機能を有効にするには、pukiwiki.ini.phpの$ref...
$referer = 0;←ここを1にする。
//
***ページ名は自動リンクにしたい [#t5aed9aa]
pukiwikiには自動リンク機能があります。
ページ名をwikinameで記述すれば、自動的にページリンクとな...
$autolink変数にはページ内で自動的にリンクするページ名の最...
日本語文字は1文字2バイトで構成されているので、$autolinkを...
ページ名が該当する場合にはリンクに変換されます。
あまり小さい数字にすると短い名前のページが必要以上に自動...
/////////////////////////////////////////////////
// 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;←ここを変更する。
/////////////////////////////////////////////////
//
***ページ更新時のタイムスタンプを変更しない機能を無効にし...
***ページ名一覧で日本語インデックスを使いたい [#jd8a32aa]
//
***更新ページ名一覧に表示するページ数を変えたい[2025.03.2...
更新ページ一覧に表示するページ名件数を変更するには、$maxs...
/////////////////////////////////////////////////
// $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内部で使用されている日付や時刻の表示形式を指定す...
各アルファベットの意味は、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更新] ...
ページ更新の内容をメールで受け取りたい場合は、$notifyを1...
$notify_diff_onlyを0にすると、更新時のページの内容がその...
メール通知機能を動作させるためには、SMTPサーバーの指定や...
SMTPサーバーがPOP before SMTP形式の認証を必要とする場合は...
pop用のパスワードを設定ファイル内に記述する必要があるので...
メール通知機能はarticleプラグイン内にも独自で設定値を持っ...
// 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.i...
$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 "...
$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]
***ページリンクのタイトルにある更新後の経過時間を消したい...
//
***ページリンクのタイトル表示を消したい[2025.03.19更新] [...
wikinameやbracketnameとして表示されるリンク部分にマウスカ...
ページ名などのタイトル要素を消すには$link_compactに0を設...
リンクタイトル要素を非表示にすることでページのデータ量を...
■defalut.ini.php
$link_compact = 0;
//
***ユーザー定義の書式を追加 [#w1d685d9]
//
***フェイスマークを使用不可にしたい[2025.03.21更新] [#n40...
ページ内の書式として使用できるフェイスマークを使用不可に...
文中にフェイスマーク用の書式を無意識に使用してしまい、思...
フェイスマーク自体を使用不可にしてしまうことで回避するこ...
フェイスマークの書式ひとつひとつについて有効、無効を変更...
$usefacemark = 1;←ここを変更する。
//
***ファイスマークルールを増やしたい [#pa8bb891]
***日時の閲覧時間置換ルールを無効にしたい [#ga671d02]
***日時の閲覧時置換ルールを変更したい [#v57df8db]
***更新時置換文字列を変更したい [#a79fbdd1]
***英語対応変更したい [#id901a36]
***他言語に対応させたい [#h6536ce1]
日本語、英語以外の言語に対応させたい場合委、言語設定を変...
言語指定ファイルは配布パッケージにja.Lng.phpとen.Lng.php...
例えば、韓国語に対応する場合、新たにkr.Lng.phpと用意した...
kr.Lng.phpは韓国語に対応した文字コードで作成し、各単語の...
//
***タイムゾーンを追加したい [#xa24f212]
Pukiwikiの対応するタイムゾーンを追加するにはpukiwiki.inc....
/////////////////////////////////////////////////
// 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の設定ファイルは、複数に分かれた構成となっていま...
アクセスされるWebブラウザごとの設定内容はdefault.phpとkei...
また、言語指定ごとに用意されてるメッセージを含む設定ファ...
日本語向けにja、英語向けにenとして設定されています。
***ユーザーエージェントごとに動作を変更したい [#q0b28284]
-変更箇所
/////////////////////////////////////////////////
// User-Agent settings
//
// If you want to ignore embedded browsers for rich-cont...
// remove (or comment-out) all 'keitai' settings.
//
// If you want to to ignore desktop-PC browsers for simp...
// copy keitai.ini.php to default.ini.php and customize ...
$agents = array(
// pattern: A regular-expression that matches device(bro...
// profile: A group of browsers
// Embedded browsers (Rich-clients for PukiWiki)
// Windows CE (Microsoft(R) Internet Explorer 5.5 for Wi...
// Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows C...
array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#',...
// ACCESS "NetFront" / "Compact NetFront" and thier OEM,...
// Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1...
// Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Rev...
// Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia...
array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]...
// Embedded browsers (Non-rich)
// Windows CE (the others)
// Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows ...
array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keita...
// ACCESS "NetFront" / "Compact NetFront" and thier OEM
// Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineS...
// Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002...
array('pattern'=>'#\b(NetFront)/([0-9\.]+)#', 'profile'=...
array('pattern'=>'#\b(CNF)/([0-9\.]+)#', 'profile'=>'kei...
array('pattern'=>'#\b(AveFront)/([0-9\.]+)#', 'profile'=...
array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#', 'profile'...
// NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOM...
// Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/...
// Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serX...
array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#', 'profile'=>'k...
// Vodafone's embedded browser
// Sample: "J-PHONE/2.0/J-T03" // 2.0は"ブラウザの"バー...
// Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/M...
array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#', 'profile'=>'...
// Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
// Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MM...
array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#', 'profil...
// Opera, dressing up as other embedded browsers
// Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4....
array('pattern'=>'#\b(?:DDIPOCKET|WILLCOM)\b.+\b(Opera) ...
// Planetweb http://www.planetweb.com/
// Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS ...
array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile...
// DreamPassport, Web browser for SEGA DreamCast
// Sample: "Mozilla/3.0 (DreamPassport/3.0)"
array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#', 'prof...
// Palm "Web Pro" http://www.palmone.com/us/support/acce...
// 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'=...
array('pattern'=>'#^(Xiino)/([0-9\.]+)#', 'profile'=>'ke...
// SHARP PDA Browser (SHARP Zaurus)
// Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#',...
// WebTV
array('pattern'=>'#^(WebTV)/([0-9\.]+)#', 'profile'=>'ke...
// Desktop-PC browsers
// Opera (for desktop PC, not embedded) -- See BugTrack/...
// 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...
array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile...
// MSIE: Microsoft Internet Explorer (or something disgu...
// Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows N...
array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#', 'profile'=>'...
// Mozilla Firefox
// NOTE: Keep this pattern above Mozilla
// Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-...
array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#', 'profile'...
// Loose default: Including something Mozilla
array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#', 'pro...
array('pattern'=>'#^#', 'profile'=>'default'), // Sentinel
);
}}
*** PukiWikiでアップロードファイルの容量を増やす方法につ...
-変更方法 [#hdbd0bb0]
pukiwikiの添付ファイルサイズの上限は、1MBに初期設定されて...
-変更方法
下は添付ファイルの容量を50MBに増やす方法です。
pukiwiki の設定 [#n91639c5]
pukiwiki側で添付ファイルサイズの上限を変更するには、attac...
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(defaul...
define("MAX_FILESIZE",1000000);
となっている行を
// max file size for upload on script of PukiWiki(defaul...
define("MAX_FILESIZE",50000000);
に変更します。
-PHP.iniの設定 [#s496c239]
一番上のディレクトリにphp.iniがあるのでその
memory_limit = 8M ; Maximum amount of memory a script ma...
となっている行を
memory_limit = 80M ; Maximum amount of memory a script m...
に変更します。さらに
; Maximum allowed size for uploaded files. upload_max...
; Maximum size of POST data that PHP will accept. pos...
となっている行を
; Maximum allowed size for uploaded iles. upload_max_...
; Maximum size of POST data that PHP will accept. pos...
に変更します。これで終わりです。
*** GoogleAnalyticsトラッキングコードの挿入 [#ka55cf81]
Googleのアクセス分析サービスGoogleAnalyticsのトラッキング...
skinフォルダの中にある「pukiwiki.skin.php」をテキストエデ...
?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[...
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date()...
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.paren...
})(window,document,'script','//www.google-analytics.com/...
ga('create', '************', 'auto');
ga('send', 'pageview');
/script>
!-- GoogleAnalytics? End -->
/head>
ga('create', '************', 'auto'); の************はそ...
*** 自動リンクを無効にする方法 [#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行目付に「...
※暗号化してる場合は「'ユーザー名' => '{x-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', ...
);
次に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.ph...
$adminpass をサーチし,現在の設定をコメントアウト.
$adminpass = '{x-php-md5}5f4dcc3b5aa765d61d8327deb882cf99';
と入力.
以上でパスワード設定完了です。そのまんまのパスワードにし...
*** ファイル添付時のパスワード認証を行わないようにしたい...
pukiwikiはXSS脆弱性対策としてデフォルトでファイルを添付す...
どうすればいいかは以下のURLに載っていました。
attach.inc.phpファイルの一部を書き換えます。
PLUGIN_ATTACH_UPLOAD_ADMIN_ONLYをTRUE→FALSE に書き換えま...
*** ヘッダーのページURLを短くする方法 [#wb0e8287]
デフォルトのページURL(header の標題の下にあるURL)は、エ...
defined('SKIN_DEFAULT_DISABLE_TOPICPATH'))
define('SKIN_DEFAULT_DISABLE_TOPICPATH',0); // 1, 0
*** ページタイトルの階層をそれぞれリンクにする。 [#z21cae...
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>';...
}
skinフォルダの「pukiwiki.skin.php」をテキストエディタで開...
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・添付ファイルを表示しない方法 [#me1...
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="smal...
の先頭に「<!--」最後に「-->」をつけてコメントアウトして非...
?php if(SKIN_DEFAULT_DISABLE_TOPICPATH) { ?>
!-- <a href="<?php echo $link['reload'] ?>"><span class="...
?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}1a1dc91c907325c69271ddf0c944bc...
//$adminpass = '{x-php-sha256}d74ff0ee8da3b9806b18c877dbf...
//$adminpass = '{CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/...
//$adminpass = '{MD5}Gh3JHJBzJcaScd3wyUS8cg=='; ...
//$adminpass = '{SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx'; ...
//$adminpass = '{SHA256}10/w7o2juYBrGMh32/KbveULW9jk2tejp...
*** ページタイトルの変更(ブラウザのタイトル) [#t5540fdf]
デフォルトの設定だとページのタイトルが「ページ名 - サイト...
skinフォルダの中にある「pukiwiki.skin.php」をテキストエデ...
変更前<title><?php echo $title ?> - <?php echo $page_titl...
変更後<title><?php echo $page_title ?> - <?php echo $titl...
//
***ページ内にある表の左寄せ [#yaf1a0d7]
skinフォルダの中にある「pukiwiki.css.php」をテキストエデ...
編集ファイル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」...
デフォルトだとサイズが80x80なので変更後の画像のサイズへ変更
skinフォルダの中にある「pukiwiki.skin.php」をテキストエデ...
97行目からのwidth="80" height="80を変更
ついでに代替テキストalt="[PukiWiki]とタイトル title="[Puk...
a href="<?php echo $link['top'] ?>"><img id="logo" src="...
$image['logo'] ?>" width="80" height="80" alt="[PukiWiki...
//
---------------------------------------------------------...
** 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]
ページを削除したタイミングでそのページのバックアップデー...
ただし、意図しないページ削除からページを修復することがで...
-変更箇所
/////////////////////////////////////////////////
// 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で行うことができます。標準のスキンに対応...
pukiwiki.css.phpは、ファイルの拡張子が示すとおりPHPで実装...
CSSを変更するだけであれば、PHPとして実装されている部分に...
背景色や文書全体の文字色を一律で変更するためにはCSS内のbo...
//
//
-----
<?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 chec...
// 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 (count...
if (! defined('PKWK_READONLY'))
define('PKWK_READONLY', 0); // 0 or 1
// PKWK_SAFE_MODE - Prohibits some unsafe(but compatible)...
if (! defined('PKWK_SAFE_MODE'))
define('PKWK_SAFE_MODE', 0);
// PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using in...
// Inline-image-tag for URIs may allow leakage of Wiki ...
// (in short, 'Web bug') or external malicious CGI (loo...
// 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...
// NOTE: Keep (page-name + attach-file-name) <= PKWK_QU...
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 ...
/////////////////////////////////////////////////
// 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 wi...
/////////////////////////////////////////////////
// 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/' ); // Lat...
define('DIFF_DIR', DATA_HOME . 'diff/' ); // Lat...
define('BACKUP_DIR', DATA_HOME . 'backup/' ); // Bac...
define('CACHE_DIR', DATA_HOME . 'cache/' ); // Som...
define('UPLOAD_DIR', DATA_HOME . 'attach/' ); // Att...
define('COUNTER_DIR', DATA_HOME . 'counter/' ); // Cou...
define('PLUGIN_DIR', DATA_HOME . 'plugin/' ); // Plu...
/////////////////////////////////////////////////
// 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/';
$rightbar_name = 'RightBar'; // RightBar
/////////////////////////////////////////////////
// Change default Document Type Definition
// Some web browser's bug, and / or Java apprets may need...
// Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_T...
//$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,...
// 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 administra...
$notimeupdate = 1;
/////////////////////////////////////////////////
// Page-reading feature settings
// (Automatically creating pronounce datas, for Kanji-inc...
// to show sorted page-list correctly)
// Enable page-reading feature by calling ChaSen or KAKAS...
// (1:Enable, 0:Disable)
$pagereading_enable = 0;
// Specify converter as ChaSen('chasen') or KAKASI('kakas...
$pagereading_kanji2kana_converter = 'none';
// Specify Kanji encoding to pass data between PukiWiki a...
$pagereading_kanji2kana_encoding = 'EUC'; // Default for ...
//$pagereading_kanji2kana_encoding = 'SJIS'; // Default f...
// Absolute path of the converter (ChaSen)
$pagereading_chasen_path = '/usr/local/bin/chasen';
//$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen...
// 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 conv...
$pagereading_config_page = ':config/PageReading';
// Page name of default pronouncing dictionary, used when...
$pagereading_config_dict = ':config/PageReading/dict';
/////////////////////////////////////////////////
// Authentication type
// AUTH_TYPE_NONE, AUTH_TYPE_FORM, AUTH_TYPE_BASIC, AUTH_...
// $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', ...
'hoge' => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx', ...
);
// Group definition
$auth_groups = array(
// Groupname => group members(users)
'valid-user' => '', // Reserved 'valid-user' group conta...
'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...
$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/sc...
),
*/
);
// 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/We...
$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 you...
// 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 "\...
$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) { r...
);
/////////////////////////////////////////////////
// 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.j...
$page_uri_handler = null; // default
// $page_uri_handler = new PukiWikiStandardPageURIHandler...
}}
//
終了行:
*[[chapter4 カスタマイズについて]] [#vb2f00b4]
ここでは、設定変更による動作の切り替えとデザインのカスタ...
---------------------------------------------------------...
#contents();
//
** 4-1 設定ファイルによる各種カスタマイズ [#b2a0ed54]
Pukiwikiを設置して使い慣れてくると、各機能の動作を細かく...
---------------------------------------------------------...
**設定ファイルの構成について [#obcdc19f]
pukiwikiの設定ファイルは、複数に分かれた構成ファイルとな...
アクセスされるwebブラウザごとの設定内容はdefalut.ini.php...
***読み取り専用にしたい [2025.03.17更新] [#i718683f]
Pukiwikiで作成したサイト2全体を読み取り専用で公開したい場...
様々な情報をPukiwikiにまとめた上でページ更新を停止した状...
読み取り専用を有効にすると、ナビゲーション部分に用意され...
また、URLでダイレクトに編集画面にアクセスしてもエラー表示...
なお、ページ単位で更新機能を無効化する場合は凍結機能を利...
// PKWK_READONLY - Prohibits editing and maintain via WWW
// NOTE: Counter-related functions will work now (coun...
if (! defined('PKWK_READONLY'))
define('PKWK_READONLY', 0); // 0 or 1 ここで1にする...
//
***画像をページ内で展開しないようにしたい[2025.03.18更新]...
一般的に解放しているPukiwikiでは、悪意のあるユーザーに不...
対処するのには、画像URLを画像としてページに表示する機能を...
画像URLのページ内表示を無効化するには、pukiwiki.ini.phpに...
これで、ページ内に記載された画像URLはURLのリンクとして表...
// PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using i...
// Inline-image-tag for URIs may allow leakage of Wiki...
// (in short, 'Web bug') or external malicious CGI (lo...
// 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);←こ...
//
***サイト名などを変更したい[2025.03.19更新] [#q31f719e]
設置したPukiwikiのページタイトルやフッタ部表示されるサイ...
このうちスクリプトURLを指定する変数$scriptは、初期状態で...
標準的にはURLが自動的にサーバーの設定より生成されますが、...
例えば、自宅サーバーでブロードバンドルーター越しにpukiwik...
ダイナミックDNSなどを利用し、ドメイン名を取得した上でその...
/////////////////////////////////////////////////
// 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';
//
***特別なページの名前を変更したい [#ea759828]
トップページとして指定されるFrontPageや更新ページ名一覧と...
特にトップページにある$defaultpage変数は、サイト運営にあ...
// Default page name
$defaultpage = 'FrontPage'; // Top / Default page
$whatsnew = 'RecentChanges'; // Modified page list
$whatsdeleted = 'RecentDeleted'; // Removeed page list
$interwiki = 'InterWikiName'; // Set InterWiki definit...
$aliaspage = 'AutoAliasName'; // Set AutoAlias definit...
$menubar = 'MenuBar'; // Menu
//
***TrackBackに対応したい [#ped2e8fa]
***検索エンジンになるべく掛からないようにしたい[2025.03.1...
Pukiwikiに含まれるすべてのページに対して検索エンジンの検...
スキンファイル直接カスタマイズする方法もありましが、$nofo...
/////////////////////////////////////////////////
// Always output "nofollow,noindex" attribute
$nofollow = 0; // 1 = Try hiding from search engines ←こ...
/////////////////////////////////////////////////
ただし、METAタグによる検索対象からの除外は検索エンジンご...
なお、ページごとにnofollowを指定したい場合には$nofollowプ...
//
***リンク参照先URLを調べたい [#hd8bbb05]
pukiwikiの任意のページに対して外部のサイトからリンクされ...
リンク元保存機能を有効にするには、pukiwiki.ini.phpの$ref...
$referer = 0;←ここを1にする。
//
***ページ名は自動リンクにしたい [#t5aed9aa]
pukiwikiには自動リンク機能があります。
ページ名をwikinameで記述すれば、自動的にページリンクとな...
$autolink変数にはページ内で自動的にリンクするページ名の最...
日本語文字は1文字2バイトで構成されているので、$autolinkを...
ページ名が該当する場合にはリンクに変換されます。
あまり小さい数字にすると短い名前のページが必要以上に自動...
/////////////////////////////////////////////////
// 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;←ここを変更する。
/////////////////////////////////////////////////
//
***ページ更新時のタイムスタンプを変更しない機能を無効にし...
***ページ名一覧で日本語インデックスを使いたい [#jd8a32aa]
//
***更新ページ名一覧に表示するページ数を変えたい[2025.03.2...
更新ページ一覧に表示するページ名件数を変更するには、$maxs...
/////////////////////////////////////////////////
// $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内部で使用されている日付や時刻の表示形式を指定す...
各アルファベットの意味は、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更新] ...
ページ更新の内容をメールで受け取りたい場合は、$notifyを1...
$notify_diff_onlyを0にすると、更新時のページの内容がその...
メール通知機能を動作させるためには、SMTPサーバーの指定や...
SMTPサーバーがPOP before SMTP形式の認証を必要とする場合は...
pop用のパスワードを設定ファイル内に記述する必要があるので...
メール通知機能はarticleプラグイン内にも独自で設定値を持っ...
// 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.i...
$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 "...
$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]
***ページリンクのタイトルにある更新後の経過時間を消したい...
//
***ページリンクのタイトル表示を消したい[2025.03.19更新] [...
wikinameやbracketnameとして表示されるリンク部分にマウスカ...
ページ名などのタイトル要素を消すには$link_compactに0を設...
リンクタイトル要素を非表示にすることでページのデータ量を...
■defalut.ini.php
$link_compact = 0;
//
***ユーザー定義の書式を追加 [#w1d685d9]
//
***フェイスマークを使用不可にしたい[2025.03.21更新] [#n40...
ページ内の書式として使用できるフェイスマークを使用不可に...
文中にフェイスマーク用の書式を無意識に使用してしまい、思...
フェイスマーク自体を使用不可にしてしまうことで回避するこ...
フェイスマークの書式ひとつひとつについて有効、無効を変更...
$usefacemark = 1;←ここを変更する。
//
***ファイスマークルールを増やしたい [#pa8bb891]
***日時の閲覧時間置換ルールを無効にしたい [#ga671d02]
***日時の閲覧時置換ルールを変更したい [#v57df8db]
***更新時置換文字列を変更したい [#a79fbdd1]
***英語対応変更したい [#id901a36]
***他言語に対応させたい [#h6536ce1]
日本語、英語以外の言語に対応させたい場合委、言語設定を変...
言語指定ファイルは配布パッケージにja.Lng.phpとen.Lng.php...
例えば、韓国語に対応する場合、新たにkr.Lng.phpと用意した...
kr.Lng.phpは韓国語に対応した文字コードで作成し、各単語の...
//
***タイムゾーンを追加したい [#xa24f212]
Pukiwikiの対応するタイムゾーンを追加するにはpukiwiki.inc....
/////////////////////////////////////////////////
// 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の設定ファイルは、複数に分かれた構成となっていま...
アクセスされるWebブラウザごとの設定内容はdefault.phpとkei...
また、言語指定ごとに用意されてるメッセージを含む設定ファ...
日本語向けにja、英語向けにenとして設定されています。
***ユーザーエージェントごとに動作を変更したい [#q0b28284]
-変更箇所
/////////////////////////////////////////////////
// User-Agent settings
//
// If you want to ignore embedded browsers for rich-cont...
// remove (or comment-out) all 'keitai' settings.
//
// If you want to to ignore desktop-PC browsers for simp...
// copy keitai.ini.php to default.ini.php and customize ...
$agents = array(
// pattern: A regular-expression that matches device(bro...
// profile: A group of browsers
// Embedded browsers (Rich-clients for PukiWiki)
// Windows CE (Microsoft(R) Internet Explorer 5.5 for Wi...
// Sample: "Mozilla/4.0 (compatible; MSIE 5.5; Windows C...
array('pattern'=>'#\b(?:MSIE [5-9]).*\b(Windows CE)\b#',...
// ACCESS "NetFront" / "Compact NetFront" and thier OEM,...
// Sample: "Mozilla/4.0 (PS2; PlayStation BB Navigator 1...
// Sample: "Mozilla/4.0 (PDA; PalmOS/sony/model crdb/Rev...
// Sample: "Mozilla/4.0 (PDA; SL-A300/1.0,Embedix/Qtopia...
array('pattern'=>'#^(?:Mozilla/4).*\b(NetFront)/([0-9\.]...
// Embedded browsers (Non-rich)
// Windows CE (the others)
// Sample: "Mozilla/2.0 (compatible; MSIE 3.02; Windows ...
array('pattern'=>'#\b(Windows CE)\b#', 'profile'=>'keita...
// ACCESS "NetFront" / "Compact NetFront" and thier OEM
// Sample: "Mozilla/3.0 (AveFront/2.6)" ("SUNTAC OnlineS...
// Sample: "Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002...
array('pattern'=>'#\b(NetFront)/([0-9\.]+)#', 'profile'=...
array('pattern'=>'#\b(CNF)/([0-9\.]+)#', 'profile'=>'kei...
array('pattern'=>'#\b(AveFront)/([0-9\.]+)#', 'profile'=...
array('pattern'=>'#\b(AVE-Front)/([0-9\.]+)#', 'profile'...
// NTT-DoCoMo, i-mode (embeded Compact NetFront) and FOM...
// Sample: "DoCoMo/1.0/F501i", "DoCoMo/1.0/N504i/c10/TB/...
// Sample: "DoCoMo/2.0 MST_v_SH2101V(c100;TB;W22H12;serX...
array('pattern'=>'#^(DoCoMo)/([0-9\.]+)#', 'profile'=>'k...
// Vodafone's embedded browser
// Sample: "J-PHONE/2.0/J-T03" // 2.0は"ブラウザの"バー...
// Sample: "J-PHONE/4.0/J-SH51/SNxxxx SH/0001a Profile/M...
array('pattern'=>'#^(J-PHONE)/([0-9\.]+)#', 'profile'=>'...
// Openwave(R) Mobile Browser (EZweb, WAP phone, etc)
// Sample: "OPWV-SDK/62K UP.Browser/6.2.0.5.136 (GUI) MM...
array('pattern'=>'#\b(UP\.Browser)/([0-9\.]+)#', 'profil...
// Opera, dressing up as other embedded browsers
// Sample: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.4....
array('pattern'=>'#\b(?:DDIPOCKET|WILLCOM)\b.+\b(Opera) ...
// Planetweb http://www.planetweb.com/
// Sample: "Mozilla/3.0 (Planetweb/v1.07 Build 141; SPS ...
array('pattern'=>'#\b(Planetweb)/v([0-9\.]+)#', 'profile...
// DreamPassport, Web browser for SEGA DreamCast
// Sample: "Mozilla/3.0 (DreamPassport/3.0)"
array('pattern'=>'#\b(DreamPassport)/([0-9\.]+)#', 'prof...
// Palm "Web Pro" http://www.palmone.com/us/support/acce...
// 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'=...
array('pattern'=>'#^(Xiino)/([0-9\.]+)#', 'profile'=>'ke...
// SHARP PDA Browser (SHARP Zaurus)
// Sample: "sharp pda browser/6.1[ja](MI-E1/1.0) "
array('pattern'=>'#^(sharp [a-z]+ browser)/([0-9\.]+)#',...
// WebTV
array('pattern'=>'#^(WebTV)/([0-9\.]+)#', 'profile'=>'ke...
// Desktop-PC browsers
// Opera (for desktop PC, not embedded) -- See BugTrack/...
// 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...
array('pattern'=>'#\b(Opera)[/ ]([0-9\.]+)\b#', 'profile...
// MSIE: Microsoft Internet Explorer (or something disgu...
// Sample: "Mozilla/4.0 (compatible; MSIE 6.0; Windows N...
array('pattern'=>'#\b(MSIE) ([0-9\.]+)\b#', 'profile'=>'...
// Mozilla Firefox
// NOTE: Keep this pattern above Mozilla
// Sample: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-...
array('pattern'=>'#\b(Firefox)/([0-9\.]+)\b#', 'profile'...
// Loose default: Including something Mozilla
array('pattern'=>'#^([a-zA-z0-9 ]+)/([0-9\.]+)\b#', 'pro...
array('pattern'=>'#^#', 'profile'=>'default'), // Sentinel
);
}}
*** PukiWikiでアップロードファイルの容量を増やす方法につ...
-変更方法 [#hdbd0bb0]
pukiwikiの添付ファイルサイズの上限は、1MBに初期設定されて...
-変更方法
下は添付ファイルの容量を50MBに増やす方法です。
pukiwiki の設定 [#n91639c5]
pukiwiki側で添付ファイルサイズの上限を変更するには、attac...
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(defaul...
define("MAX_FILESIZE",1000000);
となっている行を
// max file size for upload on script of PukiWiki(defaul...
define("MAX_FILESIZE",50000000);
に変更します。
-PHP.iniの設定 [#s496c239]
一番上のディレクトリにphp.iniがあるのでその
memory_limit = 8M ; Maximum amount of memory a script ma...
となっている行を
memory_limit = 80M ; Maximum amount of memory a script m...
に変更します。さらに
; Maximum allowed size for uploaded files. upload_max...
; Maximum size of POST data that PHP will accept. pos...
となっている行を
; Maximum allowed size for uploaded iles. upload_max_...
; Maximum size of POST data that PHP will accept. pos...
に変更します。これで終わりです。
*** GoogleAnalyticsトラッキングコードの挿入 [#ka55cf81]
Googleのアクセス分析サービスGoogleAnalyticsのトラッキング...
skinフォルダの中にある「pukiwiki.skin.php」をテキストエデ...
?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[...
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date()...
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.paren...
})(window,document,'script','//www.google-analytics.com/...
ga('create', '************', 'auto');
ga('send', 'pageview');
/script>
!-- GoogleAnalytics? End -->
/head>
ga('create', '************', 'auto'); の************はそ...
*** 自動リンクを無効にする方法 [#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行目付に「...
※暗号化してる場合は「'ユーザー名' => '{x-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', ...
);
次に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.ph...
$adminpass をサーチし,現在の設定をコメントアウト.
$adminpass = '{x-php-md5}5f4dcc3b5aa765d61d8327deb882cf99';
と入力.
以上でパスワード設定完了です。そのまんまのパスワードにし...
*** ファイル添付時のパスワード認証を行わないようにしたい...
pukiwikiはXSS脆弱性対策としてデフォルトでファイルを添付す...
どうすればいいかは以下のURLに載っていました。
attach.inc.phpファイルの一部を書き換えます。
PLUGIN_ATTACH_UPLOAD_ADMIN_ONLYをTRUE→FALSE に書き換えま...
*** ヘッダーのページURLを短くする方法 [#wb0e8287]
デフォルトのページURL(header の標題の下にあるURL)は、エ...
defined('SKIN_DEFAULT_DISABLE_TOPICPATH'))
define('SKIN_DEFAULT_DISABLE_TOPICPATH',0); // 1, 0
*** ページタイトルの階層をそれぞれリンクにする。 [#z21cae...
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>';...
}
skinフォルダの「pukiwiki.skin.php」をテキストエディタで開...
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・添付ファイルを表示しない方法 [#me1...
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="smal...
の先頭に「<!--」最後に「-->」をつけてコメントアウトして非...
?php if(SKIN_DEFAULT_DISABLE_TOPICPATH) { ?>
!-- <a href="<?php echo $link['reload'] ?>"><span class="...
?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}1a1dc91c907325c69271ddf0c944bc...
//$adminpass = '{x-php-sha256}d74ff0ee8da3b9806b18c877dbf...
//$adminpass = '{CRYPT}$1$AR.Gk94x$uCe8fUUGMfxAPH83psCZG/...
//$adminpass = '{MD5}Gh3JHJBzJcaScd3wyUS8cg=='; ...
//$adminpass = '{SMD5}o7lTdtHFJDqxFOVX09C8QnlmYmZnd2Qx'; ...
//$adminpass = '{SHA256}10/w7o2juYBrGMh32/KbveULW9jk2tejp...
*** ページタイトルの変更(ブラウザのタイトル) [#t5540fdf]
デフォルトの設定だとページのタイトルが「ページ名 - サイト...
skinフォルダの中にある「pukiwiki.skin.php」をテキストエデ...
変更前<title><?php echo $title ?> - <?php echo $page_titl...
変更後<title><?php echo $page_title ?> - <?php echo $titl...
//
***ページ内にある表の左寄せ [#yaf1a0d7]
skinフォルダの中にある「pukiwiki.css.php」をテキストエデ...
編集ファイル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」...
デフォルトだとサイズが80x80なので変更後の画像のサイズへ変更
skinフォルダの中にある「pukiwiki.skin.php」をテキストエデ...
97行目からのwidth="80" height="80を変更
ついでに代替テキストalt="[PukiWiki]とタイトル title="[Puk...
a href="<?php echo $link['top'] ?>"><img id="logo" src="...
$image['logo'] ?>" width="80" height="80" alt="[PukiWiki...
//
---------------------------------------------------------...
** 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]
ページを削除したタイミングでそのページのバックアップデー...
ただし、意図しないページ削除からページを修復することがで...
-変更箇所
/////////////////////////////////////////////////
// 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で行うことができます。標準のスキンに対応...
pukiwiki.css.phpは、ファイルの拡張子が示すとおりPHPで実装...
CSSを変更するだけであれば、PHPとして実装されている部分に...
背景色や文書全体の文字色を一律で変更するためにはCSS内のbo...
//
//
-----
<?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 chec...
// 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 (count...
if (! defined('PKWK_READONLY'))
define('PKWK_READONLY', 0); // 0 or 1
// PKWK_SAFE_MODE - Prohibits some unsafe(but compatible)...
if (! defined('PKWK_SAFE_MODE'))
define('PKWK_SAFE_MODE', 0);
// PKWK_DISABLE_INLINE_IMAGE_FROM_URI - Disallow using in...
// Inline-image-tag for URIs may allow leakage of Wiki ...
// (in short, 'Web bug') or external malicious CGI (loo...
// 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...
// NOTE: Keep (page-name + attach-file-name) <= PKWK_QU...
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 ...
/////////////////////////////////////////////////
// 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 wi...
/////////////////////////////////////////////////
// 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/' ); // Lat...
define('DIFF_DIR', DATA_HOME . 'diff/' ); // Lat...
define('BACKUP_DIR', DATA_HOME . 'backup/' ); // Bac...
define('CACHE_DIR', DATA_HOME . 'cache/' ); // Som...
define('UPLOAD_DIR', DATA_HOME . 'attach/' ); // Att...
define('COUNTER_DIR', DATA_HOME . 'counter/' ); // Cou...
define('PLUGIN_DIR', DATA_HOME . 'plugin/' ); // Plu...
/////////////////////////////////////////////////
// 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/';
$rightbar_name = 'RightBar'; // RightBar
/////////////////////////////////////////////////
// Change default Document Type Definition
// Some web browser's bug, and / or Java apprets may need...
// Some plugin (e.g. paint) set this PKWK_DTD_XHTML_1_0_T...
//$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,...
// 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 administra...
$notimeupdate = 1;
/////////////////////////////////////////////////
// Page-reading feature settings
// (Automatically creating pronounce datas, for Kanji-inc...
// to show sorted page-list correctly)
// Enable page-reading feature by calling ChaSen or KAKAS...
// (1:Enable, 0:Disable)
$pagereading_enable = 0;
// Specify converter as ChaSen('chasen') or KAKASI('kakas...
$pagereading_kanji2kana_converter = 'none';
// Specify Kanji encoding to pass data between PukiWiki a...
$pagereading_kanji2kana_encoding = 'EUC'; // Default for ...
//$pagereading_kanji2kana_encoding = 'SJIS'; // Default f...
// Absolute path of the converter (ChaSen)
$pagereading_chasen_path = '/usr/local/bin/chasen';
//$pagereading_chasen_path = 'c:\progra~1\chasen21\chasen...
// 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 conv...
$pagereading_config_page = ':config/PageReading';
// Page name of default pronouncing dictionary, used when...
$pagereading_config_dict = ':config/PageReading/dict';
/////////////////////////////////////////////////
// Authentication type
// AUTH_TYPE_NONE, AUTH_TYPE_FORM, AUTH_TYPE_BASIC, AUTH_...
// $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', ...
'hoge' => '{SMD5}OzJo/boHwM4q5R+g7LCOx2xGMkFKRVEx', ...
);
// Group definition
$auth_groups = array(
// Groupname => group members(users)
'valid-user' => '', // Reserved 'valid-user' group conta...
'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...
$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/sc...
),
*/
);
// 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/We...
$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 you...
// 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 "\...
$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) { r...
);
/////////////////////////////////////////////////
// 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.j...
$page_uri_handler = null; // default
// $page_uri_handler = new PukiWikiStandardPageURIHandler...
}}
//
ページ名: