这部分不只修改模板部分,还要修改程序文件,也就是说该方法经过程序版本升级等后便失效,谨慎修改!

模板里虽然评论和留言调用的样式是一样的,但这里我们要分开进行修改:
1.评论部分:
打开inc/boblog_class_run.php

找到282行在后面添加

$page



即:

global $mbcon, $section_body, $permission, $adminlist, $userdetail, $config, $categories, $weather, $t, $section_bodys, $lnc, $nowtime, $flset, $page;



再找到354行后面添加一个

'louceng'=>($page-1)*$mbcon['replyperpage']+$i+1

"



$output_single=$t->set('comment', array('replier'=>$replier, 'replierip'=>$replierip, 'replytime'=>$replytime,'addadminreply'=>$addadminreply,'deladminreply'=>$deladminreply,'editadminreply'=>$editadminreply,'delreply'=>$delreply,'blockreply'=>$blockreply,'replycontent'=>$replycontent,'ifadminreplied'=>$ifadminreplied,'adminrepliershow'=>$adminrepliershow,'adminreplycontent'=>$adminreplycontent,'commentid'=>"com_{$eachreply['repid']}", 'adminreplybody'=>$adminreplybody, 'replieremail'=>$replieremail, 'replierhomepage'=>$replierhomepage, 'oddorcouplecss'=>$oddorcouplecss, 'louceng'=>($page-1)*$mbcon['replyperpage']+$i+1));



然后在模板elements.php文件里调用{louceng}标签即可

==================================================================

2.留言板部分:
打开inc/boblog_class_run.php

找到384行添加

$page



即:

global $mbcon, $section_body, $permission, $adminlist, $userdetail, $config, $categories, $weather, $t, $section_bodys, $lnc, $nowtime, $flset, $page;



再找到454行添加

'louceng'=>($page-1)*$mbcon['messageperpage']+$i+1



即:

$output_single=$t->set('comment', array('replier'=>$replier, 'replierip'=>$replierip, 'replytime'=>$replytime,'addadminreply'=>$addadminreply,'deladminreply'=>$deladminreply,'editadminreply'=>$editadminreply,'delreply'=>$delreply,'blockreply'=>$blockreply,'replycontent'=>$replycontent,'ifadminreplied'=>$ifadminreplied, 'adminrepliershow'=>$adminrepliershow,'adminreplycontent'=>$adminreplycontent,'commentid'=>"com_{$eachreply['repid']}", 'adminreplybody'=>$adminreplybody, 'replieremail'=>$replieremail, 'replierhomepage'=>$replierhomepage, 'oddorcouplecss'=>$oddorcouplecss,'louceng'=>($page-1)*$mbcon['messageperpage']+$i+1));




注意:以上评论和留言部分代码基本相同但不尽相同,所以请勿偷懒!

Tags:bo-blog, 代码修改, 留言, 评论