::NoName Magazine 无名杂志 » Project Parasy » 如何在其他頁面上顯示用戶的頭像?
本主题共有 4 条回复 | 回到顶部
#3 - 2008-11-17 20:39
respiration
地球
找到解決方法 大家可以試試 BY [url=mixga.com]MIX[/url]
include/common.inc.php文件找
換成
include/common.inc.php文件找
CODE:
@include DISCUZ_ROOT.'./parasy/ParasyInit.php';
?>
?>
換成
CODE:
if($allowavatar || $allownickname)
{
$query = $db->query("SELECT mf.nickname, mf.avatar, mf.avatarwidth, mf.avatarheight, m.gender, m.groupid FROM {$tablepre}memberfields mf, {$tablepre}members m WHERE m.uid='$discuz_uid' AND mf.uid=m.uid");
$member = $db->fetch_array($query);
} else
{
$member = array('nickname' => '', 'avatar' => '');
}
$avatarm = avRESIZE($member[avatar]);
@include DISCUZ_ROOT.'./parasy/ParasyInit.php';
?>
{
$query = $db->query("SELECT mf.nickname, mf.avatar, mf.avatarwidth, mf.avatarheight, m.gender, m.groupid FROM {$tablepre}memberfields mf, {$tablepre}members m WHERE m.uid='$discuz_uid' AND mf.uid=m.uid");
$member = $db->fetch_array($query);
} else
{
$member = array('nickname' => '', 'avatar' => '');
}
$avatarm = avRESIZE($member[avatar]);
@include DISCUZ_ROOT.'./parasy/ParasyInit.php';
?>
#4 - 2008-11-18 07:43
Sai
桂林
CODE:
if($allowavatar || $allownickname)
{
$query = $db->query("SELECT mf.nickname, mf.avatar, mf.avatarwidth, mf.avatarheight, m.gender, m.groupid FROM {$tablepre}memberfields mf, {$tablepre}members m WHERE m.uid='$discuz_uid' AND mf.uid=m.uid");
$member = $db->fetch_array($query);
} else
{
$member = array('nickname' => '', 'avatar' => '');
}
{
$query = $db->query("SELECT mf.nickname, mf.avatar, mf.avatarwidth, mf.avatarheight, m.gender, m.groupid FROM {$tablepre}memberfields mf, {$tablepre}members m WHERE m.uid='$discuz_uid' AND mf.uid=m.uid");
$member = $db->fetch_array($query);
} else
{
$member = array('nickname' => '', 'avatar' => '');
}
放到/parasy/ParasyInit.php里面会比较好(方便代码管理)