Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[求助] Discuz X2.5 diy调用最新回复作者的方法

[复制链接]
老衲悟空 发表于 2013-11-9 17:13:59 | 显示全部楼层 |阅读模式
本帖最后由 老衲悟空 于 2013-11-26 00:25 编辑

Discuz X2.5 diy模块模板官方没有自带调用最后回复人的功能,网络上有很多朋友提问怎么实现这个功能,但是回答的人却少见或者很少能真正实现的,今天特意研究了下,下面把方法分享给大家。
一、打开source\class\block\forum\block_thread.php
1.查找
  1. 'lastpost' => array('name' => lang('blockclass', 'blockclass_thread_field_lastpost'), 'formtype' => 'date', 'datatype' => 'date'),
复制代码
在其下方添加代码
  1. 'lastposter' => array('name' => lang('blockclass', 'blockclass_thread_field_lastposter'), 'formtype' => 'text', 'datatype' => 'string'),
复制代码
2.查找
  1. 'lastpost' => $data['lastpost'],
复制代码
在其下方添加代码
  1. 'lastposter' => $data['lastposter'],
复制代码
二、打开source\language\lang_blockclass.php

查找
  1. 'blockclass_thread_field_lastpost' => '最后回复时间',
复制代码
在其下方添加代码
  1. 'blockclass_thread_field_lastposter' => '最后回复人',
复制代码
三、登录后台,工具->更新缓存->全部勾选->确定

四、diy->高级模式->编辑(对应模块)->模块模板->调用标签{lastposter}即可。
演示站点:http://www.ywmm8.com











回复

使用道具 举报

老袋鼠 发表于 2013-11-9 17:14:44 | 显示全部楼层
很不错的教程,而且很详细
回复

使用道具 举报

SEO北北 发表于 2013-11-9 17:22:11 | 显示全部楼层
不错  楼主是个好人
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-11-27 01:56 , Processed in 0.142190 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表