杰奇jieqi用户评论vip图标显示效果代码 原创
include_once( $jieqiModules['article']['path']."/class/article.php" );
include_once( JIEQI_ROOT_PATH."/class/users.php" );
$users_handler =& jieqiusershandler::getinstance( "JieqiUsersHandler" );
第二步读取回复用户的id,主要用户判断用户是否为vip用户
针对于 杰奇1.4版本
一般我们需要修改位于
代码如下:
/modules/article/articleinfo.php
我们找到
$reviewrows[$k]['userid'] = $v->getvar( "userid" );
下面增加这段代码
$jieqiUsers = $users_handler->get( $reviewrows[$k]['userid'] );
//用于加载用户id读取因为此页中对于用户的读取信息没有加
$reviewrows[$k]['isvip']= $jieqiUsers->getvar( "isvip", "n" ) ;
$reviewrows[$k]['posterid'] = $v->getvar( "posterid" );
$jieqiUsers = $users_handler->get($reviewrows[$k]['posterid']);
//var_dump($jieqiUsers);
$reviewrows[$k]['isvip']= $jieqiUsers->getvar( "isvip", "n" ) ;
第三步
在/modules/article/templates/articleinfo.html中需要显示vip图标的地方添加
代码如下:
{?if $reviewrows[i].isvip==1?}<img src="/images/dxy/vipicon.gif" />{?/if?}
即可