--- html_org.php	2016-01-29 14:13:26.891925900 +0900
 +++ html.php	2016-01-29 17:37:32.153289100 +0900
 @@ -180,12 +180,15 @@ function edit_form($page, $postdata, $di
  
  	if($load_template_func && $b_template) {
  		$pages  = array();
 -		foreach(get_existpages() as $_page) {
 -			if ($_page == $whatsnew || check_non_list($_page))
 -				continue;
 +//		foreach(get_existpages() as $_page) {
 +		foreach (get_source(':config/Templates') as $_templates) {
 +			if (! preg_match('#\-\s+?\[\[(.+)\]\].*#', $_templates, $m)) continue;
 +			$_page = str_replace('./',':config/Templates/',$m[1]);
 +//			if ($_page == $whatsnew || check_non_list($_page)) continue;
 +			if (! is_page($_page)) continue;
  			$s_page = htmlsc($_page);
  			$pages[$_page] = '   <option value="' . $s_page . '">' .
 -				$s_page . '</option>';
 +				str_replace(':config/Templates/','#',$s_page) . '</option>';
  		}
  		ksort($pages, SORT_STRING);
  		$s_pages  = join("\n", $pages);

-----
lib/html.phpを改造。
[:config/Templates]に
 -[[template_page]]
形式でページを追加。&br;
さらに[:config/Templates/]以下のページを追加すると':config/Templates/'を'#'に置換。

- 既知のバグ等
- 既知のバグ等&br;
../ (一つ上へ)やエイリアス名 (>)を使うと正しく解釈されない。

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Site admin: PukiWiki Development Team

PukiWiki 1.5.4+ © 2001-2022 PukiWiki Development Team. Powered by PHP 8.2.12. HTML convert time: 0.058 sec.

SourceForge