第一步:打开"/include/extend.func.php",该方法适用于5.7版本,其他版本如果没有这个文件 就添加在 /include/common.func.php 中。 |
然后在最下面加入一个函数,代码如下: |
|
// 在plus目录调用 风格目录中的模版 |
function pasterTempletDiy($path) |
{ |
require_once(DEDEINC."/arc.partview.class.php"); |
global $cfg_basedir,$cfg_templets_dir; |
$tmpfile = $cfg_basedir.$cfg_templets_dir."/".$path;//模版文件的路径 |
$dtp = new PartView(); |
$dtp->SetTemplet($tmpfile); |
$dtp->Display(); |
} |
|
第二步,打开留言本的模版文件,默认的是/templets/plus/guestbook.htm |
|
用以下代码替换原因的调用头部代码,加在<head>标签下面即可 |