discuz 论坛DIY增加{lastposter}最后回复者以及{forumicon}版块图标调用解读

需要修改两个文件:
source/language/lang_blockclass.php
source/class/block/forum/block_thread.php


一、source/language/lang_blockclass.php

查找:

'blockclass_thread_field_lastpost' => '最后回复时间',

在其后添加:

'blockclass_thread_field_lastposter' => '最后回复者',


二、source/class/block/forum/block_thread.php

1.查找:

'lastpost' => array('name' => lang('blockclass', 'blockclass_thread_field_lastpost'),

在其后添加:

'lastposter' => array('name' => lang('blockclass', 'blockclass_thread_field_author'), 'formtype' => 'text', 'datatype' => 'string'),


2.查找:

'lastpost' => $data['lastpost'],


在其后添加:

'lastposter' => $data['lastposter'],

------------------------------------------------------------------------------------------------------------------------------
下面说说如何调用版块图标

一、source/language/lang_blockclass.php 文件

查找 

'blockclass_thread_field_forumname' => '版块名称',

在其后添加:

'blockclass_thread_field_forumicon' => '版块图标',

二、source/class/block/forum/block_thread.php

1、查找 

'forumname' => array('name' => lang('blockclass', 'blockclass_thread_field_forumname'), 'formtype' => 'text', 'datatype' => 'string'),

在其后添加:

'forumicon' => array('name' => lang('blockclass', 'blockclass_thread_field_forumicon'), 'formtype' => 'text', 'datatype' => 'string'),

2、查找 
$listtids[] = $data['tid'];

在其后添加:

$foruminfo = C::t('forum_forum')->fetch_info_by_fid($data['fid']);//add by L 2012/11/1

3、查找 
'forumname' => $_G['cache']['forums'][$data['fid']]['name'],

在其后添加:

'forumicon' => $foruminfo['icon'],

------------------------------------------------------------------------------------------------------------------------------

修改后上传覆盖相应源文件,更新DIY缓存,即可见效果!(新手务必做好备份)



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值