我發現當我要移除選擇的時候~出現:
代碼: 選擇全部
Fatal error: Call to undefined function: from() in /hd2/home/lushinan/_www_/bucket.php on line 242
還有~我裝上去以後進入列表時會出現跟大大那邊版面不太一樣說~
大大的版面:
我的像這樣:
是我哪裡弄錯了呢?
版主: 版主管理群
新增的時候有出現嗎?lushinan 寫:我發現當我要移除選擇的時候~出現:代碼: 選擇全部
Fatal error: Call to undefined function: from() in /hd2/home/lushinan/_www_/bucket.php on line 242
應該是這一段\rlushinan 寫:還有~我裝上去以後進入列表時會出現跟大大那邊版面不太一樣說~
新增的時候出現一大排的字說...(我忘了把他複製下來.. )atthis 寫:lushinan 寫:我發現當我要移除選擇的時候~出現:代碼: 選擇全部
Fatal error: Call to undefined function: from() in /hd2/home/lushinan/_www_/bucket.php on line 242
atthis 寫:新增的時候有出現嗎?
如果沒有,移除的應該也不會有
代碼: 選擇全部
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
代碼: 選擇全部
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->use_template("bucket_warning",(file_exists($phpbb_root_path . "language/lang_" . $bucket_info['user_lang'] . "/email/bucket_warning.tpl"))?$bucket_info['user_lang'] : "");
$emailer->email_address($bucket_info['user_email']);
$emailer->set_subject($lang['Bucket_warning']);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'FORUM_NAME' => $forum_name,
'WARNED_POSTER' => $username,
'WARNER' => $userdata['username'],
'BUCKET_REASON' => $bucket_reason,
'BUCKET_DAY' => $bucket_day,
'BUCKET_START' => create_date($board_config['default_dateformat'], $bucket_start, $board_config['board_timezone']),
'BUCKET_TIME' => create_date($board_config['default_dateformat'], $bucket_time, $board_config['board_timezone']),
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "
", "--
" . $board_config['board_email_sig']) : '',
'POST_URL' => $bucket_post
));
$emailer->send();
$emailer->reset();
代碼: 選擇全部
$bucket_sql = "SELECT username, user_email, user_lang FROM " . USERS_TABLE . " WHERE user_id=" . $users[$i];
if ( !($result = $db->sql_query($bucket_sql)) )
{
message_die(GENERAL_ERROR, "Could not get user information", $lang['Error'], __LINE__, __FILE__, $bucket_sql);
}
$bucket_info = $db->sql_fetchrow($result);
$emailer = new emailer($board_config['smtp_delivery']);
$emailer->from($board_config['board_email']);
$emailer->replyto($board_config['board_email']);
$emailer->use_template("bucket_reactive",(file_exists($phpbb_root_path . "language/lang_" . $bucket_info['user_lang'] . "/email/bucket_reactive.tpl"))?$bucket_info['user_lang'] : "");
$emailer->email_address($bucket_info['user_email']);
$emailer->set_subject($lang['Bucket_reactive']);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'FORUM_NAME' => $forum_name,
'WARNED_POSTER' => $bucket_info['username'],
'WARNER' => $userdata['username'],
'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "
", "--
" . $board_config['board_email_sig']) : ''
));
$emailer->send();
$emailer->reset();
代碼: 選擇全部
CREATE TABLE phpbb_bucket (
user_id MEDIUMINT(8) NOT NULL,
forum_id TINYINT(2) UNSIGNED NOT NULL,
username VARCHAR(25) NOT NULL,
warner_id MEDIUMINT(8) NOT NULL,
warner VARCHAR(25) NOT NULL,
bucket_reason VARCHAR(255) NOT NULL,
bucket_post VARCHAR(255) NOT NULL,
bucket_day TINYINT(2) UNSIGNED NOT NULL,
bucket_start INT(11) NOT NULL,
bucket_time INT(11) NOT NULL
);
代碼: 選擇全部
Could not add user to bucket
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near '1071828555,1071828555)' at line 1
INSERT phpbb_bucket VALUES (12,18,'12',3,'lu-shinan','test','',,1071828555,1071828555)
Line : 189
File : /hd2/home/lushinan/_www_/bucket.php
我剛剛試了一下,應該是因為你沒有輸入"禁言天數" 所致\rlushinan 寫:這是我拿一個會員來測試的~呵呵~
錯誤碼如下:代碼: 選擇全部
Could not add user to bucket DEBUG MODE SQL Error : 1064 You have an error in your SQL syntax near '1071828555,1071828555)' at line 1 INSERT phpbb_bucket VALUES (12,18,'12',3,'lu-shinan','test','',,1071828555,1071828555) Line : 189 File : /hd2/home/lushinan/_www_/bucket.php
代碼: 選擇全部
$bucket_day = ( isset($HTTP_POST_VARS['bucket_day']) ) ? htmlspecialchars($HTTP_POST_VARS['bucket_day']) : '';
代碼: 選擇全部
$bucket_day = ( !empty($HTTP_POST_VARS['bucket_day']) ) ? htmlspecialchars($HTTP_POST_VARS['bucket_day']) : '[color=red]30[/color]';
代碼: 選擇全部
#
#-----[ 複製 ]------------------------------------------
#
bucket.php to bucket.php
templates/subSilver/bucket_body.tpl to templates/subSilver/bucket_body.tpl
#
#-----[ 開啟 ]-------------------------------------------------
#
language/lang_chinese_traditional_taiwan/lang_main.php
#
#-----[ 尋找 ]-------------------------------------------------
#
//End_Bucket_Mod
#
#-----[ 之前加上 ]-------------------------------------------------
#
$lang['Empty_bucketday'] = '請輸入禁言天數';
$lang['Username_error'] = '查無此人, 請檢查您輸入的會員名是否有誤';
#
#-----[ 儲存/關閉 所有檔案 ]------------------------------------------
#
# 請享用
有人當白老鼠比較容易試出bug囉~ 嘻嘻~atthis 寫:
我剛剛試了一下,應該是因為你沒有輸入"禁言天數" 所致\r
打開bucket.php
尋找\r替換成代碼: 選擇全部
$bucket_day = ( isset($HTTP_POST_VARS['bucket_day']) ) ? htmlspecialchars($HTTP_POST_VARS['bucket_day']) : '';
其中紅色的地方你可以改成你想要的數字,如果沒有輸入天數的話\r代碼: 選擇全部
$bucket_day = ( !empty($HTTP_POST_VARS['bucket_day']) ) ? htmlspecialchars($HTTP_POST_VARS['bucket_day']) : '[color=red]30[/color]';
會自動設成預設值(這裡設的是30天)
你發信那個部分解決了嗎??
第一次寫mod 到處都是紕漏,你真是可憐的白老鼠