Points Mod errors...weird ones too

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Points Mod errors...weird ones too
wolf
CZ Active Member
usa.gif indiana.gif
Occupation: Student; Flash, HTML, PHP developer
Age: 34
Gender: Male
Status: Offline
Joined: Jul 25, 2003
0.02 posts per day
Posts: 168
Points: 10,417
AIM Address Yahoo Messenger MSN Messenger 
Edit: Ok...Seems I didnt install the SQL into the database...so i try running the included install and it just sits there looking at me...as if nothing was there to read off of. Can i have the SQL so i can manually insert it into the DB...that is if anyone has it?
Here is the mod_install.php file included:
<?php
/***************************************************************************
*                               mod_install.php
*                            -------------------
*   begin                : Sunday, April 14, 2002
*   copyright            : (C) 2002 Bulletin Board Mods
*   email                : [ Register or login to view links on this board. ]
*
*   $Id: mod_install.php,v 1.1.1 2002/05/29 12:59:59 explosive Exp $
*
*
***************************************************************************/

/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/

define('IN_PHPBB', true);
//$phpbb_root_path='./';
include($phpbb_root_path.'extension.inc');
include($phpbb_root_path.'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $nukeuser);
init_userprefs($userdata);
//
// End session management
//

if( !$userdata['session_logged_in'] )
{
   header('Location: ' . append_sid("login.$phpEx?redirect=mod_install.$phpEx", true));
}

if( $userdata['user_level'] != ADMIN )
{
   message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}

if( !strstr($dbms, "mysql") )
{
    if( !isset($bypass) )
    {
        $message = 'This mod has only been tested on MySQL and may only work on MySQL.<br />';
        $message .= 'Click <a href="mod_install.php?bypass=true">here</a> to install anyways.';
        message_die(GENERAL_MESSAGE, $message);
    }
}

$sql = array();
$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD user_points mediumint(8) UNSIGNED NOT NULL";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " VALUES ('points_reply', '1')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " VALUES ('points_topic', '2')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " VALUES ('points_post', '1')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " VALUES ('points_donate', '1')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " VALUES ('points_name', 'Points')";

$sql_count = count($sql);

echo "<html>\n";
echo "<body>\n";

for($i = 0; $i < $sql_count; $i++)
{
   echo "Running :: " . $sql[$i];
   flush();

   if ( !$db->sql_query($sql[$i]) )
   {
      $errored = true;
      $error = $db->sql_error();
      echo " -> <b>FAILED</b> ---> <u>" . $error['message'] . "</u><br /><br />\n\n";
   }
   else
   {
      echo " -> <b>COMPLETED</b><br /><br />\n\n";
   }
}

if( $errored )
{
    $message = "Some of the querys have failed, contact me so I can fix the errors.";
}
else
{
    $message = "The table have been edited successfully. You can now delete this file. To undo any changes run the mod_uninstall.php file.";
}

echo "\n<br />\n<b>COMPLETE!</b><br />\n";
echo $message . "<br />\n";
echo "</body>\n";
echo "</html>\n";
exit();

?>




_________________
[ Register or login to view links on this board.]
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum