|
|
| Author |
Message |
SweetAdder
New User
Joined: 10 May 2008
Posts: 4
Location: altoona pa
|
Posted: May 10th 2008, 12:25 pm Post subject: SQL Error : 1146 Table |
|
|
New At This !
Could not query database.
DEBUG MODE
SQL Error : 1146 Table 'plumgreek_mike.phpbb2_banners' doesn't exist
SELECT * FROM phpbb2_banners ORDER BY banner_id ASC
Line : 189
File : admin_linkb.php
#################################################################
## Mod Title: Banner Exchange
## Mod Version: 1.2.2
## Author: Woody (woody@scoobler.com)
## Description:
## This mod adds a banner to the botom of the page. Banner exchange is popular so this
## mod will allow you to add banners from the admin section. Each banner will be
## displayed at the bottom of each page (or where you want it) and when displayed can
## be clicked to take the user to the banners linked site.
##
## Installation Level: easy
## Installation Time: 5
## Files To Edit: 2
##
## templates\xxxxxxxx\overall_footer.tpl,
## includes\page_tail.php
##
## Included Files:
##
## admin_linkb.php,
## baners_list_body.tpl,
## baners_edit_body.tpl,
## bannerSQL.php
##
##
##
#################################################################
## This MOD is released under the GPL License.
## Intellectual Property is retained by the MOD Author(s) listed above
#################################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
#################################################################
##
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ EDIT ]------------------------------------------
#
Open the bannerSQL.php file and complete the database variables:
$dbhost = 'localhost'; // Host point, normally 'localhost'
$dbusername = 'user'; // The database user name.
$dbpassword = 'pass'; // The database password.
$dbname = 'dbname'; // The database name.
Save the file.
#
#-----[ COPY ]------------------------------------------
#
phpbb2\bannerSQL.php
#
#-----[ RUN ]------------------------------------------
#
http://www.mydomain.com/phpbb2/bannerSQL.php
#
#-----[ DELETE ]------------------------------------------
#
http://www.mydomain.com/phpbb2/bannerSQL.php
#
#-----[ COPY ]------------------------------------------
#
phpBB2\admin\admin_linkb.php
#
#
#-----[ COPY ]------------------------------------------
#
phpBB2\templates\subSilver\admin\baners_edit_body.tpl
#
#
#-----[ COPY ]------------------------------------------
#
phpBB2\templates\subSilver\admin\baners_list_body.tpl
#
################################################################################
################################################################################
################################################################################
CHOICE ONE: Banner In the tail of the page......................................
################################################################################
################################################################################
################################################################################
#-----[ OPEN ]------------------------------------------
#
# templates\xxxxxxx\overall_footer.tpl
#
#-----[ FIND ]------------------------------------------
#
<!--
We request you retain the full copyright notice below including the link to www.phpbb.com.
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
<tr>
<td width="100%" align=center>{BANNER}</td>
</tr>
</TABLE>
#
#-----[ OPEN ]------------------------------------------
#
# includes\page_tail.php
#
#-----[ FIND ]------------------------------------------
#
//
// Show the overall footer.
//
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// BEGIN BANNER EXCHANGE
//
################################################################################
# Choose a random banner from the database
$sql = "SELECT * FROM phpbb2_banners ORDER BY RAND();";
# Run the above Query
$result = mysql_query($sql);
# End of querying
################################################################################
# Give the variables the data if the SQL query worked
if ($result){
$row = mysql_fetch_array($result);
$imglink = $row["banner_link"];
$imgwww = $row["banner_www"];
$imagedesc = $row["banner_description"];}
# If it failed give it some default values so it doesnt display a broken picture
else{
$imglink = ("http://www.phpbb.com/images/mainlogo.gif");
$imgwww = ("http://www.phpbb.com");
$imagedesc = ("phpBB Official Web Site");}
# End of variable setting
################################################################################
# Put all the data into one variable to be used by the board (make life easy
$banner = "<a title='".$imagedesc."' href='".$imgwww."'><img src='".$imglink."'></a>";
# End of variable setting!
################################################################################
//
// END BANNER EXCHANGE
//
#
#-----[ FIND ]------------------------------------------
#
'ADMIN_LINK' => $admin_link)
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
'BANNER' => $banner,
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
################################################################################
################################################################################
################################################################################
CHOICE TWO: Banner In the header of the page....................................
################################################################################
################################################################################
################################################################################
#-----[ OPEN ]------------------------------------------
#
# templates\xxxxxxx\overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu"><img src="templates/Cobalt/images/icon_mini_profile.gif" width="12" height="11" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a> <a href="{U_PRIVATEMSGS}" class="mainmenu"><img src="templates/Cobalt/images/icon_mini_message.gif" width="11" height="11" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a> <a href="{U_LOGIN_LOGOUT}" class="mainmenu"><img src="templates/Cobalt/images/icon_mini_login.gif" width="11" height="11" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a> </span></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td width="100%" align=center>{BANNER}</td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
# includes\page_header.php
#
#-----[ FIND ]------------------------------------------
#
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
$template->assign_vars(array(
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// BEGIN BANNER EXCHANGE
//
################################################################################
# Choose a random banner from the database
$sql = "SELECT * FROM phpbb2_banners ORDER BY RAND();";
# Run the above Query
$result = mysql_query($sql);
# End of querying
################################################################################
# Give the variables the data if the SQL query worked
if ($result){
$row = mysql_fetch_array($result);
$imglink = $row["banner_link"];
$imgwww = $row["banner_www"];
$imagedesc = $row["banner_description"];}
# If it failed give it some default values so it doesnt display a broken picture
else{
$imglink = ("http://www.phpbb.com/images/mainlogo.gif");
$imgwww = ("http://www.phpbb.com");
$imagedesc = ("phpBB Official Web Site");}
# End of variable setting
################################################################################
# Put all the data into one variable to be used by the board (make life easy
$banner = "<a title='".$imagedesc."' href='".$imgwww."'><img src='".$imglink."'></a>";
# End of variable setting!
################################################################################
//
// END BANNER EXCHANGE
//
#
#-----[ FIND ]------------------------------------------
#
'U_LOGIN_LOGOUT' => append_sid($u_login_logout),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'BANNER' => $banner,
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
I did it All !!
Can You Help Me PHPHACK.COM
Thank You
http://sweetadder.com/forum/ |
|
| Back to top |
|
 |
Triumvirate
Support Team

Joined: 25 Sep 2003
Posts: 5080
Location: New York, USA
|
Posted: May 10th 2008, 6:35 pm Post subject: |
|
|
Did you run the bannersql.php file? Normally that errors means the SQL queries were not run. _________________ MMO Gaming |
|
| Back to top |
|
 |
SweetAdder
New User
Joined: 10 May 2008
Posts: 4
Location: altoona pa
|
Posted: May 10th 2008, 10:11 pm Post subject: |
|
|
Yes I Run It _________________ <a><img> </a> |
|
| Back to top |
|
 |
Triumvirate
Support Team

Joined: 25 Sep 2003
Posts: 5080
Location: New York, USA
|
Posted: May 11th 2008, 1:41 pm Post subject: |
|
|
Is the prefix of your database phpbb2_ or phpbb_. It looks like that query is looking for the prefix phpbb2_ but the default is phpbb_, did you change the default or is that incorrect? _________________ MMO Gaming |
|
| Back to top |
|
 |
SweetAdder
New User
Joined: 10 May 2008
Posts: 4
Location: altoona pa
|
Posted: May 14th 2008, 10:15 pm Post subject: |
|
|
Got it thank you
Sweetadder.com/forum _________________ <a><img> </a> |
|
| Back to top |
|
 |
|