[問題]Complete banner (橫幅廣告) (Update 1.3.8)(已解決)
發表於 : 2006-04-01 02:40
問題外掛:Complete banner (橫幅廣告) (Update 1.3.8)
使用版本:PHPBB 2.0.19
網站位置:http://taywe.net/js/phpbb/ (橫幅廣告外掛暫時移除)
狀況描述:
小弟安裝完成Complete banner (橫幅廣告) (Update 1.3.8)後發現錯誤,搜尋文章後不見有人有此問題。
錯誤代碼如下:
一般錯誤
Couldn't get banners data
DEBUG MODE
SQL Error : 1146 Table 'brobbs.phpbb_banner' doesn't exist
SELECT DISTINCT banner_id, banner_name, banner_spot, banner_description, banner_forum, banner_type, banner_width, banner_height, banner_filter FROM phpbb_banner WHERE banner_active AND IF(banner_level_type,IF(banner_level_type=1,2<=banner_level,IF(banner_level_type=2,2>=banner_level,2<>banner_level)),banner_level=2) AND (banner_timetype=0 OR (( 0213 BETWEEN time_begin AND time_end) AND ((banner_timetype=2 OR (( 6 BETWEEN date_begin AND date_end) AND banner_timetype=4) OR (( 20060401 BETWEEN date_begin AND date_end) AND banner_timetype=6) )))) ORDER BY banner_spot,banner_weigth*SUBSTRING(RAND(),6,2) DESC
Line : 383
File : page_header.php
補充:原始檔案下載(含未加程式碼前的page_header.php)
按照Complete banner1.3.8說明安裝發現只要加入這一段程式碼就出現上述錯誤
其他補充:
安裝過的外掛:
討論版使用者在線圖例 [1.0.0]
計數器
Medal System 勳章系統 0.4.5
CashMOD 2.2.3a
重寄認證信
i-Stock Market 0.80
Gender 性別 1.2.6em
虛擬形象2.20
寵物系統MOD
人氣指數
使用風格:Skyblue
使用版本:PHPBB 2.0.19
網站位置:http://taywe.net/js/phpbb/ (橫幅廣告外掛暫時移除)
狀況描述:
小弟安裝完成Complete banner (橫幅廣告) (Update 1.3.8)後發現錯誤,搜尋文章後不見有人有此問題。
錯誤代碼如下:
一般錯誤
Couldn't get banners data
DEBUG MODE
SQL Error : 1146 Table 'brobbs.phpbb_banner' doesn't exist
SELECT DISTINCT banner_id, banner_name, banner_spot, banner_description, banner_forum, banner_type, banner_width, banner_height, banner_filter FROM phpbb_banner WHERE banner_active AND IF(banner_level_type,IF(banner_level_type=1,2<=banner_level,IF(banner_level_type=2,2>=banner_level,2<>banner_level)),banner_level=2) AND (banner_timetype=0 OR (( 0213 BETWEEN time_begin AND time_end) AND ((banner_timetype=2 OR (( 6 BETWEEN date_begin AND date_end) AND banner_timetype=4) OR (( 20060401 BETWEEN date_begin AND date_end) AND banner_timetype=6) )))) ORDER BY banner_spot,banner_weigth*SUBSTRING(RAND(),6,2) DESC
Line : 383
File : page_header.php
補充:原始檔案下載(含未加程式碼前的page_header.php)
按照Complete banner1.3.8說明安裝發現只要加入這一段程式碼就出現上述錯誤
代碼: 選擇全部
#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------------
#
//
// The following assigns all _common_ variables that may be used at any point
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Complete banner MOD
$time_now=time();
$hour_now=create_date('Hi',$time_now,$board_config['board_timezone']);
$date_now=create_date('Ymd',$time_now,$board_config['board_timezone']);
$week_now=create_date('w',$time_now,$board_config['board_timezone']);
$sql_level= ($userdata['user_id']==ANONYMOUS) ? ANONYMOUS : (($userdata['user_level']==ADMIN) ? MOD : (($userdata['user_level']==MOD) ? ADMIN : $userdata['user_level']));
$sql = "SELECT DISTINCT banner_id, banner_name, banner_spot, banner_description, banner_forum, banner_type, banner_width, banner_height, banner_filter FROM ".BANNERS_TABLE ."
WHERE banner_active
AND IF(banner_level_type,IF(banner_level_type=1,".intval($sql_level)."<=banner_level,IF(banner_level_type=2,".intval($sql_level).">=banner_level,".intval($sql_level)."<>banner_level)),banner_level=".intval($sql_level).")
AND (banner_timetype=0
OR (( $hour_now BETWEEN time_begin AND time_end) AND ((banner_timetype=2
OR (( $week_now BETWEEN date_begin AND date_end) AND banner_timetype=4)
OR (( $date_now BETWEEN date_begin AND date_end) AND banner_timetype=6)
)))) ORDER BY banner_spot,banner_weigth*SUBSTRING(RAND(),6,2) DESC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't get banners data", "", __LINE__, __FILE__, $sql);
}
$banners = array();
$i=0;
while ($banners[$i] = $db->sql_fetchrow($result))
{
$cookie_name = $board_config['cookie_name'] . '_b_' . $banners[$i]['banner_id'];
if ( !($HTTP_COOKIE_VARS[$cookie_name] && $banners[$i]['banner_filter']) )
{
$banner_spot=$banners[$i]['banner_spot'];
if ($banner_spot<>$last_spot AND ($banners[$i]['banner_forum']==$forum_id || empty($banners[$i]['banner_forum'])))
{
$banner_size = '';
$banner_size = ($banners[$i]['banner_width']<>'') ? ' width="'.$banners[$i]['banner_width'].'"' : '';
$banner_size .= ($banners[$i]['banner_height']<>'') ? ' height="'.$banners[$i]['banner_height'].'"' : ''; switch ($banners[$i]['banner_type'])
{
case 6 :
// swf file
$template->assign_vars(array('BANNER_'.$banner_spot.'_IMG' => '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="macromedia'.$i.'" '.$banner_size.' align="abscenter"><param name="allowScriptAccess" value="sameDomain" /><param name=movie value="'.$banners[$i]['banner_name'].'?clickTAG='.append_sid('redirect.'.$phpEx.'?banner_id='.$banners[$i]['banner_id']).'"><param name=quality value=high><embed src="'.$banners[$i]['banner_name'].'?clickTAG='.append_sid('redirect.'.$phpEx.'?banner_id='.$banners[$i]['banner_id']).'" quality=high name="macromedia'.$i.'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" autostart="true" /><noembed><a href="'.append_sid('redirect.'.$phpEx.'?banner_id='.$banners[$i]['banner_id']).'" target="_blank">'.$banners[$i]['banner_description'].'</a></noembed></object>'));
break;
case 4 :
// custom code
$template->assign_var('BANNER_'.$banner_spot.'_IMG', $banners[$i]['banner_name'] );
$template->assign_var('BANNER_'.$banner_spot.'_IMG', '<br />'.$banners[$i]['banner_name'].'<br />' );
break;
case 2 :
// Text link
$template->assign_var('BANNER_'.$banner_spot.'_IMG', '<a href="'.append_sid('redirect.'.$phpEx.'?banner_id='.$banners[$i]['banner_id']).'" target="_blank" alt="'.$banners[$i]['banner_description'].'" title="'.$banners[$i]['banner_description'].'">'.$banners[$i]['banner_name'].'</a>');
break;
case 0 :
default:
$template->assign_var('BANNER_'.$banner_spot.'_IMG', '<a href="'.append_sid('redirect.'.$phpEx.'?banner_id='.$banners[$i]['banner_id']).'" target="_blank"><img src="'.$banners[$i]['banner_name'].'" '.$banner_size.' border="0" alt="'.$banners[$i]['banner_description'].'" title="'.$banners[$i]['banner_description'].'" /></a>');
}
$banner_show_list.= ', '.$banners[$i]['banner_id'];
}
$last_spot = ($banners[$i]['banner_forum']==$forum_id || empty($banners[$i]['banner_forum'])) ? $banner_spot : $last_spot;
}
$i++;
}
// End add - Complete banner MOD
其他補充:
安裝過的外掛:
討論版使用者在線圖例 [1.0.0]
計數器
Medal System 勳章系統 0.4.5
CashMOD 2.2.3a
重寄認證信
i-Stock Market 0.80
Gender 性別 1.2.6em
虛擬形象2.20
寵物系統MOD
人氣指數
使用風格:Skyblue