KinoWiki/Hack/tDiaryのテーマを使う



概要

KinoWiki2ではtDiaryのテーマが使えなくなってしまったので 簡単に使えるようにハックします。((本家取り込みきぼん。))

本体コードの編集

hideableの中のrenderer.inc.phpを編集します。 <code> Index: renderer.inc.php =================================================================== RCS file: /cvsroot/kinowiki/kino2/hideable/renderer.inc.php,v retrieving revision 1.3 diff -r1.3 renderer.inc.php 121c121,129 < $this->smarty->display(SKINFILE);

$theme_skin_path = THEME_DIR . $this->theme . '/' . $this->theme . '.tpl.htm'; if ( file_exists($theme_skin_path) ){ $this->smarty->template_dir = dirname($theme_skin_path); $this->smarty->display( basename($theme_skin_path) ); } else { $this->smarty->display(SKINFILE); }

126c134 < ?> \ No newline at end of file

?>

</code>

themeファイルの作成

KinoWiki1に同梱されているテーマファイル((kinowiki/system/skin/以下))にあるもので、使いたいものを選んでKinoWiki2のテーマディレクトリ((kino2/theme/以下))にコピーする。この時、KinoWiki1のテーマフォルダの中に

kinowiki/system/skin/kinowiki.tpl.htm

テーマ名.tpl.htm

にして入れる。

例えば、gray2というテーマをKinoWiki2で利用する場合、

cp -R kinowiki/system/skin/gray2 kino2/theme/gray2
cp kinowiki/system/skin/kinowiki.tpl.htm kino2/theme/gray2/gray2.tpl.htm

とする。

次に、gray2.tpl.htmの中にある

{showpage page="SideBar"}

{$command.sidebar}

にしてください。

これでindex.phpのTHEMEをgray2にするか、テーマプラグインを利用することでtDiaryのテーマが利用できるようになります。

問題点

referrerなど、KinoWiki1にはない機能があるのでそのあたりを表示できるようにkinowiki.tpl.htmを編集する必要がある。

トップページ
新規作成
編集
履歴
ページ一覧

Recent changes

2010-07-29 2010-07-27 2010-07-25 2010-07-23 2010-07-16 2010-07-13 2010-07-12 2010-07-09 2010-07-08 2010-07-04 2010-07-02 2010-06-22 2010-06-20

Link