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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[修改] DISCUZ 7.2 实名认证插件 实现贴内显示认证图标

[复制链接]
tuweifu 发表于 2012-3-16 19:15:30 | 显示全部楼层 |阅读模式
本帖最后由 tuweifu 于 2012-3-16 19:21 编辑

原插件发布地址:https://discuz.dismall.com/forum.php?mod=viewthread&tid=2559893

作者发布的截图中在帖子内容页用户名称旁边会显示认证图标,但是下载的安装后却没有。

这边应该是作者漏掉了一部分说明,安装后还需要通过修改一些文件实现名称旁边显示图标。

这边将修改方法发布一下(个人研究的方法,非作者提供,修改前请注意备份文件):

1、打开 \templates\default\viewthread_node.htm 文件(若使用的风格包中有此文件,则请打开风格文件夹中的)

搜索
  1. <a target="_blank" href="space.php?uid=$post['authorid']" style="margin-left: 20px; font-weight: 800">$post[author]</a>
复制代码
在其下一行增加以下代码
  1. {if $post[isreal]}
  2.      <a href="/authen/" target="_blank" title="已经实名认证"><img src="plugins/whatyourname/templates/image/smrz_yes.gif" align="absmiddle" /></a>
  3. {else}
  4.      <a href="/authen/" target="_blank" title="尚未实名认证"><img src="plugins/whatyourname/templates/image/smrz_no.gif" align="absmiddle" /></a>
  5. {/if}
复制代码
2、打开 /viewthread.php 文件

搜索
  1. $post['lastdate'] = gmdate($dateformat, $post['lastactivity'] + $timeoffset * 3600);
复制代码
在其下一行增加以下代码
  1. global $db, $tablepre;
  2. $post['isreal'] = $db->result_first("SELECT count(*) FROM {$tablepre}realname WHERE uid='$post[authorid]' AND pass=1");
复制代码
3、进入后台更新缓存,大功告成!




评分

1

查看全部评分

love536 发表于 2012-3-16 19:16:33 | 显示全部楼层
高,,,,用上了
回复

使用道具 举报

rryjz 发表于 2012-3-16 19:16:47 | 显示全部楼层
永远支持楼主,继续发好贴
回复

使用道具 举报

无效楼层,该帖已经被删除
hhahahala 发表于 2012-3-16 19:20:51 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

Quietly 发表于 2012-3-16 22:33:03 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

mengchuanjin 发表于 2012-3-20 12:07:06 | 显示全部楼层
回复

使用道具 举报

niuwoai 发表于 2012-3-20 12:29:38 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

niuwoai 发表于 2012-3-20 12:38:35 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

hhahahala 发表于 2012-3-20 12:44:07 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-18 23:20 , Processed in 0.106430 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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