1. $user_medal = C::t('common_member_medal')->fetch_all_by_uid($_G['uid']);
  2. foreach($user_medal as $k=>$value){
  3. $us_medal = reset(C::t('forum_medal')->fetch_all_by_id($value['medalid']));
  4. $user_medals[$k] = $us_medal;
  5. $user_medals[$k]['image'] = 'static/image/common/'.$us_medal['image'];
  6. }
仿制代码


模板循环代码:
  1. <!--{loop $user_medals $v}-->
  2. $v['....']
  3. <!--{/loop}-->
仿制代码

字典解说:


medalid smallint(6) unsigned NO 勋章id
name varchar(50) NO 勋章称号
available tinyint(1) 0 NO 是否启用
image varchar(255) NO 勋章图片
type tinyint(1) 0 NO 勋章类型
displayorder tinyint(3) 0 NO 勋章显现次序
description varchar(255) NO 勋章描绘
expiration smallint(6) unsigned 0 NO 勋章有效期
permission mediumtext NO 勋章取得条件表达式
credit tinyint(1) unsigned 0 NO 勋章购买运用积分
price mediumint(8) unsigned 0 NO 勋章价格

声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!

原文地址:Discuz调用用户勋章方法发布于2023-03-01 19:37:13

相关推荐