2008-11-16 12:25
respiration
如何在其他頁面上顯示用戶的頭像?
參考memcp_profile.htm的第44行 引用出
[code]<img src="$bbsdir/$avatarm" class="portrait" />[/code]
但在其他頁面加上這個時 頭像卻不能正常顯示...有人知道如何解決嗎?
2008-11-16 15:52
respiration
反而在modify.nnm頁面則可以顯示...
2008-11-17 16:52
kinway
当然啦不是任何页面都能这样直接调用头像的。
2008-11-17 20:39
respiration
找到解決方法 大家可以試試 BY [url=mixga.com]MIX[/url]
include/common.inc.php文件找
[code]@include DISCUZ_ROOT.'./parasy/ParasyInit.php';
?>[/code]
換成
[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';
?>[/code]
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' => '');
}[/code]
放到/parasy/ParasyInit.php里面会比较好(方便代码管理)
页:
[1]
Powered by Discuz! Archiver 5.5.0
© 2001-2006 Comsenz Inc.