本方法是基于最新版程序0321版本的修改,修改前请确认网站程序为0321版本。
效果图:
修改方法:
1.source\module\forum\forum_viewthread.php
搜索代码
- $query = DB::query("SELECT m.uid, m.username, m.groupid, m.adminid, m.regdate, m.credits, m.email, m.status AS memberstatus,
- ms.lastactivity, ms.lastactivity, ms.invisible AS authorinvisible,
- mc.*, mp.gender, mp.site, mp.icq, mp.qq, mp.yahoo, mp.msn, mp.taobao, mp.alipay,
- mf.medals, mf.sightml AS signature, mf.customstatus $fieldsadd
- FROM ".DB::table('common_member')." m
- LEFT JOIN ".DB::table('common_member_field_forum')." mf USING(uid)
- LEFT JOIN ".DB::table('common_member_status')." ms USING(uid)
- LEFT JOIN ".DB::table('common_member_count')." mc USING(uid)
- LEFT JOIN ".DB::table('common_member_profile')." mp USING(uid)
- $verifyadd
- WHERE m.uid IN (".dimplode(array_keys($postusers)).")");
复制代码 改为- //Don edit start
- $query = DB::query("SELECT m.uid, m.username, m.groupid, m.adminid, m.regdate, m.credits, m.email, m.status AS memberstatus,
- ms.lastactivity, ms.lastactivity, ms.invisible AS authorinvisible,
- mc.*, mp.gender, mp.site, mp.icq, mp.qq, mp.yahoo, mp.msn, mp.taobao, mp.alipay,
- mf.medals, mf.sightml AS signature, mf.customstatus,mf.groups $fieldsadd
- FROM ".DB::table('common_member')." m
- LEFT JOIN ".DB::table('common_member_field_forum')." mf USING(uid)
- LEFT JOIN ".DB::table('common_member_status')." ms USING(uid)
- LEFT JOIN ".DB::table('common_member_count')." mc USING(uid)
- LEFT JOIN ".DB::table('common_member_profile')." mp USING(uid)
- $verifyadd
- WHERE m.uid IN (".dimplode(array_keys($postusers)).")");
- //Don edit end
复制代码
搜索代码
- $_G['forum_firstpid'] = intval($_G['forum_firstpid']);
复制代码 在这句代码下面添加下面的代码
- //Don edit start
- $post['groups'] = unserialize($post['groups']);
- $post['groups'] = is_array($post['groups']['groups']) ? count($post['groups']['groups']) : 0;
- //Don edit end
复制代码
搜索代码
- case 'albums': $v = '<a href="home.php?mod=space&uid='.$post['uid'].'&do=album&view=me&from=space" target="_blank">'.$post['albums'].'</a>';break;
复制代码 在这句代码下面添加下面的代码
- //Don edit start
- case 'groups': $v = $post['groups'];break;
- //Don edit end
复制代码
2.source\admincp\admincp_setting.php
搜索代码
- 'albums' => $lang['setting_styles_viewthread_userinfo_albums'],
复制代码 在这句代码下面添加下面的代码
- //Don edit start
- 'groups' => $lang['setting_styles_viewthread_userinfo_groups'],
- //Don edit end
复制代码
3.source\language\lang_admincp.php
搜索代码
- 'setting_styles_viewthread_userinfo_albums' => '相册',
复制代码 在这句代码下面添加下面的代码
- //Don edit start
- 'setting_styles_viewthread_userinfo_groups' => '群组',
- //Don edit end
复制代码
4.source\language\lang_space.php
搜索代码
- 'viewthread_userinfo_blogs' => '日志',
复制代码 在这句代码下面添加下面的代码
- //Don edit start
- 'viewthread_userinfo_groups' => '群组',
- //Don edit end
复制代码
修改完成后,进入后台->界面->界面设置->帖子内容页,在下面的设置用户信息显示的位置里就可以找到群组的选项了,进行相应的设置即可,如图。
|