帝国cms修改上一篇下一篇样式的方法

帝国cms程序中修改上一篇下一篇样式的方法:
一:打开文件夹 e /class/functions.php
二:查找上一篇或者下一篇
三:在修改的部分,$infonext 那里修改,把源代码的上下篇代码放到对应放进去 ,
    如下:
    $infonext=”<a href=/'”.$nexttitleurl.”/’>”.$next_r[title].”</a>”; 
    对应修改原来的代码
    如:$infonext=”<li><a href=/'”.$nexttitleurl.”/’>”.$next_r[title].”</a></li>”;
四:上一篇也是同样这样更改保存就可以了。

完整示例:

//下一篇
    if(strstr($newstemptext,'[!--info.next--]'))
    {
    $infonext='<?php
    $next_r=$empire->fetch1("select isurl,titleurl,classid,id,title from {$dbtbpre}ecms_".$class_r[$ecms_gr[classid]][tbname]." where id>$ecms_gr[id] and classid=/'$ecms_gr[classid]/' order by id limit 1");
        if(empty($next_r[id]))
        {$infonext="<a href=/'".$grclassurl."/' rel=/'next/'><span class=/'meta-nav/'><span class=/'post-nav/'>下一篇&nbsp;&gt;</span><br/>没有了</span></a>";}
            (没有了这段,是到了最后一篇的时候提示, 把源代码放到那个位置 ,标签改个地址的就可以后面的自由写)
        else
        {
            $nexttitleurl=sys_ReturnBqTitleLink($next_r);
            $infonext="<a href=/'".$nexttitleurl."/' rel=/'next/'><span class=/'meta-nav/'><span class=/'post-nav/'>下一篇&nbsp;&gt;</span><br/>".$next_r[title]."</span></a>";
        }
    echo $infonext;
    ?>';
    $newstempstr=str_replace('[!--info.next--]',$infonext,$newstempstr);
本文链接:https://www.dnwfb.com/867.html,转载请注明出处。
0

评论0

没有账号? 注册  忘记密码?