Php dokuwiki-从模板中绕过核心或模板函数

Php dokuwiki-从模板中绕过核心或模板函数,php,dokuwiki,Php,Dokuwiki,我想绕过核心和插件函数来定制它们。 我没有成功地从模板做它 我尝试在我的tpl_functions.php中添加如下内容: if (!function_exists('html_buildlist')) { function html_buildlist($data,$class,$func,$lifunc='html_li_default',$forcewrapper=false){ // etc. } } 我的第一个想法是检查页面是否已被访问,然后定制indexmenu插件

我想绕过核心和插件函数来定制它们。 我没有成功地从模板做它

我尝试在我的tpl_functions.php中添加如下内容:

if (!function_exists('html_buildlist')) {
  function html_buildlist($data,$class,$func,$lifunc='html_li_default',$forcewrapper=false){
   // etc.
  }
}
我的第一个想法是检查页面是否已被访问,然后定制indexmenu插件

例如,我使用此函数检查是否已访问某个页面:

function wt__pagevisited($id){

  if ($id == null) {
    global $INFO;
    $id = $INFO['id'];
  }

  // get cookie session info
  $crumbs = isset($_SESSION[DOKU_COOKIE]['bc']) ? $_SESSION[DOKU_COOKIE]['bc'] : array();

  // check ID into breadcrumb
   if( array_key_exists($id,$crumbs) ) {
    return true;
  }

  return false;

}
任何帮助都将不胜感激。 先谢谢你


Jean baptiste

你所问的与DokuWiki无关。您希望替换PHP函数。如果没有某些PHP扩展的帮助,这是不可能的。有关更多信息,请参阅。

谢谢Andreas的回答。我理解你的回答。我正在考虑一种绕过文件系统的方法,正如我们可以在一些cms中找到的那样:模板中的file-a.php绕过插件中的file-a.php绕过核心中的file-a.php。因此,为了定制插件(indexmenu和bookcreator,我想重新考虑一下它的显示方式),您是否建议将插件作为最佳方式进行破解?