Discuz调用用户勋章方法
$user_medal = C::t('common_member_medal')->fetch_all_by_uid($_G['uid']);foreach($user_medal as $k=>$value){
$us_medal = reset(C::t('forum_medal')->fetch_all_by_id($value['medalid']));
$user_medals[$k] = $us_medal;
$user_medals[$k]['image'] = 'static/image/common/'.$us_medal['image'];
}
模板循环代码:
<!--{loop $user_medals $v}-->
$v['....']
<!--{/loop}-->
字典解释:
medalidsmallint(6) unsigned
NO是勋章id
namevarchar(50)
NO
勋章名称
availabletinyint(1)0NO
是否启用
imagevarchar(255)
NO
勋章图片
typetinyint(1)0NO
勋章类型
displayordertinyint(3)0NO
勋章显示顺序
descriptionvarchar(255)
NO
勋章描述
expirationsmallint(6) unsigned0NO
勋章有效期
permissionmediumtext
NO
勋章获得条件表达式
credittinyint(1) unsigned0NO
勋章购买使用积分
pricemediumint(8) unsigned0NO
勋章价格
页:
[1]