我的頭像放置在如下的目錄中共有四組
/phpBB2/images/avatars/gallery/photograph-1
/phpBB2/images/avatars/gallery/photograph-2
/phpBB2/images/avatars/gallery/photograph-3
/phpBB2/images/avatars/gallery/photograph-4
並且權限設定了777(我現在是臨機操作應該跟權限無關)
情況是這樣:
個人資料中 , 點選 "系統相簿" , 進入到了系統相簿中 photograph-1 這組 , 有正常看到頭像有出現 ,
但是前面出現跟很多人類似卻不完全相同的訊息 , 而我的訊息是這樣 :
在此一並附上 usercp_avatar.php on line 257Warning: Missing argument 35 for display_avatar_gallery() in c:\appserv\www\phpbb2\includes\usercp_avatar.php on line 257
代碼: 選擇全部
$avatar_sql = ( $mode == 'editprofile' ) ? ", user_avatar = '$new_filename', user_avatar_type = " . USER_AVATAR_UPLOAD : "'$new_filename', " . USER_AVATAR_UPLOAD;
}
else
{
$l_avatar_size = sprintf($lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']);
$error = true;
$error_msg = ( !empty($error_msg) ) ? $error_msg . '<br />' . $l_avatar_size : $l_avatar_size;
}
return $avatar_sql;
}
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$allow_mass_pm, &$popup_pm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)
{
global $board_config, $db, $template, $lang, $images, $theme;
global $phpbb_root_path, $phpEx;
$dir = @opendir($board_config['avatar_gallery_path']);
$avatar_images = array();
while( $file = @readdir($dir) )
{
if( $file != '.' && $file != '..' && !is_file($board_config['avatar_gallery_path'] . '/' . $file) && !is_link($board_config['avatar_gallery_path'] . '/' . $file) )
{
$sub_dir = @opendir($board_config['avatar_gallery_path'] . '/' . $file);
$avatar_row_count = 0;
$avatar_col_count = 0;
while( $sub_file = @readdir($sub_dir) )
{
if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) )
{
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file;
$avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));
$avatar_col_count++;如果我執行 "選擇種類 : photograph-2 " 這組頭項按 "GO",則跳回個人資料設定頁面 , 然後在頁面前會出現沒有人提過的狀況 , 我截了一張圖放在某站相簿 , 請參考
http://tw.pg.photos.yahoo.com/ph/qmissy ... pg&.src=ph內容出現 "您必須確實填寫標示有*的項目" 這樣的訊息\r
再換執行 "選擇種類 : photograph-3 " 這組頭項按 "GO",就改出現 photograph-1 同樣 'usercp_avatar.php on line 257" 的錯誤訊息 , 頭像能正常看得到.
再換執行 "選擇種類: photograph-4 " 這組頭項按 "GO",又改出現同 "選擇種類: photograph-2 "又是"您必須確實填寫標示有*的項目"
可以請大家幫我看看我的 usercp_avatar.php 代碼中是出了什麼錯誤嗎?
(我安裝了一些 MOD 現在才發現錯誤,以我之力已經沒法判斷是哪一個修改造成的了...慘)
還有..."您必須確實填寫標示有*的項目" 這是什麼意思啊....
在此含淚感謝先.......
補充一點剛剛在研究兩個檔案中的差異\r
在 usercp_avatar.php 中代碼如下 :
代碼: 選擇全部
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$allow_mass_pm, &$popup_pm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)代碼: 選擇全部
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);會不會寫太長啊.....

