有的小伙伴在做模板的时候,制作了用户登录模块,但是帝国CMS并没有提供当前用户登录后的头像显示标签,那么就要改造一下了!附图如下:

帝国CMS如何在

修改步骤:

打开e/data/template/loginiframetemp.txt   

$r=$empire->fetch1("select ".$user_userid.",".$user_username.",".$user_group.",".$user_userfen.",".$user_money.",".$user_userdate.",".$user_havemsg.",".$user_checked." from ".$user_tablename." where ".$user_userid."='$myuserid' and ".$user_rnd."='$myrnd' limit 1");

下面 添加

$m=$empire->fetch1("select userpic from {$user_tbpre}enewsmemberadd where userid='$myuserid' limit 1");
$userpic=$m['userpic']?$m['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';

这样就可以了!然后:

在JS调用登陆模板中使用<?=$userpic?>调用会员头像!

觉得上面的内容有用吗?快来点个赞吧!

点赞() 我要打赏

温馨提示 : 本站内容来自会员投稿以及互联网,所有源码及教程均为作者总结编辑,请大家在使用过程中提前做好备份,以免发生无法预知的错误,源码类教程请勿直接用于生产环境!

 可能感兴趣的文章

1 2 3 4 5