ecshop qq登录显示qq头像和昵称
ALTER TABLE `ecs_users` ADD `nick_img` VARCHAR( 255 ) NOT NULL ,
ADD `nick_name` VARCHAR( 255 ) NOT NULL ;
首先在ecshop中添加这两个字段
2.
找到
user_clips.dwt中的
{$info.username}
修改为
{$info.nick_name}
和<img src=”{$info.nick_img}” />
找到user.php中de
$smarty->assign(‘info’, get_user_default($user_id));
修改为
$sql = “SELECT nick_img,nick_name FROM ” .$GLOBALS['ecs']->table(‘users’). ” WHERE user_id = ‘$user_id’”;
$rows = $GLOBALS['db']->getRow($sql);
$info = get_user_default($user_id);
$info['nick_name'] = $rows['nick_name'];
$info['nick_img'] = $rows['nick_img'];
$smarty->assign(‘info’, $info);
即可
赞 (0)