蓝雨 发表于 2011-1-24 20:53:35

X1.5论坛调用帖子里面增加【最后回复者】

1、找到文件 \source\class\block\forum\block_thread.php,第176行
   内容:01.'recommends' => array('name' => lang('blockclass', 'blockclass_thread_field_recommends'), 'formtype' => 'text', 'datatype' => 'int'),在这行代码下面插入一行新的代码,如下:01.'lastposter' => array('name' => lang('blockclass', 'blockclass_thread_field_lastposter'), 'formtype' => 'text', 'datatype' => 'string'),在这个文件中的第383行,找到
      内容:'monthviews' => $data['views']在这个代码后边加入符号“,”
      修改后的代码是'monthviews' => $data['views'],然后新起一行,插入下面代码:'lastposter' => ($data['lastposter'] ? $data['lastposter'] : '')2、找到文件\source\language\lang_blockclass.php, 在第62行下面新插入一行, 复制下面代码进去'blockclass_thread_field_lastposter' => '最后回复作者',后台>工具>更新缓存>,然后更新DIY模块分类缓存。


3、后台->门户-》增加“帖子模块”

模块名称:帖子列表+最后回复者(有序)

代码:<div class="module cl xl xl1">
<ol>

<li><em><ahref="home.php?mod=space&username={lastposter}"{target}>{lastposter}</a></em><a href="{url}" title="{title}"{target}>{title}</a></li>

</ol>
</div>
页: [1]
查看完整版本: X1.5论坛调用帖子里面增加【最后回复者】