ページへ戻る

− Links

 印刷 

Ver 0.7.4 (ページ名読みをDBに格納) :: XOOPS マニア

xpwiki:xpWiki開発日記/2006-11-29


Tag: Reading[4] 読み[5] DB化[6] 基本設計[7]
2006 11月 29 (水)
 

Ver 0.7.4 (ページ名読みをDBに格納) anchor.png[8] Edit [9]

ページ名の読みを、pginfo DB に格納するようにしました。

DBフィールドを追加したのでモジュールアップデートを実行してください。

オリジナルの PukiWiki[10] は、1つのWikiページにすべてのページの読みを保存するようになっているのですが、これだと、ページ数が増えた時のパフォーマンス低下が避けられないことと、メンテナンス性に問題があるので、DBに格納するようにしました。

さらに、ページ名読み ⇒ ページ頭文字読み に変更しました。

例えば「メモ/色々/下書き」というページ名の場合「メ/イ/シ」となります。

一覧で日本語ページの読みを反映したい場合は、pukiwiki[10].ini.php での以下の設定項目を適切に設定してください。ただし「$root->pagereading_config_page」は、意味を持ちません。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/////////////////////////////////////////////////
// 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)
$root->pagereading_enable = 0;
 
// Specify converter as ChaSen('chasen') or KAKASI('kakasi') or None('none')
$root->pagereading_kanji2kana_converter = 'none';
 
// Specify Kanji encoding to pass data between PukiWiki[10] and the converter
$root->pagereading_kanji2kana_encoding = 'EUC'; // Default for Unix
//$root->pagereading_kanji2kana_encoding = 'SJIS'; // Default for Windows
 
// Absolute path of the converter (ChaSen)
$root->pagereading_chasen_path = '/usr/local/bin/chasen';
//$root->pagereading_chasen_path = 'c:\progra~1\chasen21\chasen.exe';
 
// Absolute path of the converter (KAKASI)
$root->pagereading_kakasi_path = '/usr/local/bin/kakasi';
//$root->pagereading_kakasi_path = 'c:\kakasi\bin\kakasi.exe';
 
// Page name contains pronounce data (written by the converter)
$root->pagereading_config_page = ':config​/PageReading[11]';
 
// Page name of default pronouncing dictionary, used when converter = 'none'
$root->pagereading_config_dict = ':config​/PageReading​/dict[12]';
Page Top

コメント anchor.png[13] Edit [14]




Last-modified: 2006-11-29 (水) 22:20:58 (JST) (7266d) by nao-pon