以增加帖子作者用户组和用户组名称颜色为例
找到
'id' => array('name' => lang('blockclass', 'blockclass_field_id'), 'formtype' => 'text', 'datatype' => 'int'),
复制代码
其下增加
'grouptitle' => array('name' => "用户组", 'formtype' => 'text', 'datatype' => 'string'), 'groupcolor' => array('name' => "用户组头衔颜色", 'formtype' => 'text', 'datatype' => 'string'), |
找到
if($style['getsummary']) { $threadtids[$data['posttableid']][] = $data['tid']; } |
其下增加
$sql_groupid = "select groupid from ".DB::table("common_member")." where uid=".$data['authorid']; $rea = DB::fetch_first($sql_groupid); $sql_grouptitle = "select grouptitle,color from ".DB::table("common_usergroup")." where groupid=".$rea['groupid']; $reb = DB::fetch_first($sql_grouptitle); |
找到
'monthviews' => $data['views']
复制代码
其上面增加
'
grouptitle' => $reb['grouptitle'], 'groupcolor' => $reb['color'], |
这样就改完了,后台——工具——更新缓存——3个全选——更新。
好了,去看看diy里是不是和我的一样:
{grouptitle}和{groupcolor}和其他字段一样用法,不需要啰嗦了。
注意!!!
此修改增加了中文,请注意文件编码,错误编码会导致diy失效。