在用户登录后的页面右上角用户信息区域显示用户的勋章图标。 这里只是提供代码,未作页面没化。 组件名称:全局 右上角 用户名后 显示勋章 组件变量:global_usernav_extra1@yz_medals 手机嵌入:否 组件类型:文字(string) 模板内容: [yuzhehook:code_getresult_fread_after] $this->medalidstr = ''; $medals = getuserprofile('medals'); if ($medals){ if (!isset($_G['cache']['medals'])){ loadcache('medals'); } foreach($arrmedals = explode("\t", $medals) as $key => $medalid) { $this->medalidstr .= '<img src="static/image/common/'.$_G['cache']['medals'][$medalid]['image'].'" class="vm" style="height:20px;" title="'.$_G['cache']['medals'][$medalid]['name'].'"> '; } } [/yuzhehook:code_getresult_fread_after]{echo $this->medalidstr;} |
插件介绍:雨哲超强嵌入点 插件是一款平台插件,通过后台添加在前台显示(基于模板的hook位置)指定内容的功能。
GMT+8, 2024-5-20 16:09 , Processed in 0.056925 second(s), 9 queries , Xcache On.
Powered by Discuz! X3.2
© 2001-2013 Comsenz Inc.