<?php
 /*
  * PukiWiki メニューバーにリストを表示するプラグイン
  *
  * @file leafmenulist.inc.php
  * original : menulist.inc.php,v 1.00 2005/05/06 12:00:00 diabah
  *
  * @copyright &copy; 2010 ioio GPL
  * @copyright &copy; 2005 diabah GPL
  * http://cubic9.com/PukiWiki/
  *
  */
 
 function plugin_leafmenulist_convert()
 {
 	global $vars;
 
 	$script = get_script_uri();
 	if (func_num_args()) {
 		$menuitems = func_get_args();
 	} else {
 		return '#menulist(): No menu items<br/>' . "\n";
 	}
 
 	$menutmp = '<ul>';
 	foreach ($menuitems as $s_page) {
 		$r_page = rawurlencode($s_page);
 		$arraypage = explode("/", $s_page);
 		$leafname = array_pop($arraypage);
 		unset($arraypage);
 		if (strpos($vars['page'], $s_page) === 0) {
 			$menutmp .= "<li class=\"menu_selected\">$s_page</li>";
 		} else {
 			//$menutmp .= "<li><a href=\"$script?$r_page\" title=\"$s_page\">$s_page</a></li>";
 			$menutmp .= '<li>' . make_pagelink($s_page, $leafname) . '</li>';
 		}
 	}
 	$menutmp .= '</ul>';
 
 	return $menutmp;
 }
 ?>


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Site admin: PukiWiki Development Team

PukiWiki 1.5.3+ © 2001-2020 PukiWiki Development Team. Powered by PHP 5.6.40-0+deb8u12. HTML convert time: 0.085 sec.

OSDN