slot machine sql install

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   slot machine sql install
reddog
CZ Super Newbie
 Codezwiz Site Donator
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
how can i get the sql for the slot machine mod to install, i placed the slot_install.php in the correct directory, but whenever i try to run it from the browser, i get "cant access this file directly". and i am logged in as admin. is there a another sql file that i can load right into the database directly through phpmyadmin? thanks any advise would be great !!



Back to top Reply with quote
#2   re: slot machine sql install
DaveTomneyUK
CZ Active Member
uk.gif
Occupation: PC Technician
Age: 50
Gender: Male
Website:
Status: Offline
Joined: Oct 23, 2003
0.03 posts per day
Posts: 201
Points: 23,202
AIM Address Yahoo Messenger  
look inside your install file for something like this :


if (!is_admin($admin)) {
echo "cant access this file directly";
      }


dont forget to delete the install fiel after you installed it.


Back to top Reply with quote
#3   re: slot machine sql install
reddog
CZ Super Newbie
 Codezwiz Site Donator
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
do i just delete the above posted? or just take out the "cant access this file directly"?



Back to top Reply with quote
#4   re: slot machine sql install
DaveTomneyUK
CZ Active Member
uk.gif
Occupation: PC Technician
Age: 50
Gender: Male
Website:
Status: Offline
Joined: Oct 23, 2003
0.03 posts per day
Posts: 201
Points: 23,202
AIM Address Yahoo Messenger  
take out all the part that as that in it it'll start with if and end with }



Back to top Reply with quote
#5   re: slot machine sql install
reddog
CZ Super Newbie
 Codezwiz Site Donator
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
Davey--- sorry it took me a bit to get back to this, i did remove the above mentioned lines, but im getting errors when i try to run the sql from the browser. the slot machine set up rather easily, but the sql is being a pain. anyways, here are the errors im getting, maybe you can make heads or tails of it, cause i dont have a clue.

Warning: main(modules/Forums/extension.inc): failed to open stream: No such file or directory in /home/gruntzco/public_html/modules/Forums/slot_install.php on line 12

Warning: main(): Failed opening 'modules/Forums/extension.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gruntzco/public_html/modules/Forums/slot_install.php on line 12

Warning: main(modules/Forums/common.): failed to open stream: No such file or directory in /home/gruntzco/public_html/modules/Forums/slot_install.php on line 13

Warning: main(): Failed opening 'modules/Forums/common.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gruntzco/public_html/modules/Forums/slot_install.php on line 13

Warning: main(modules/Forums/nukebb.php): failed to open stream: No such file or directory in /home/gruntzco/public_html/modules/Forums/slot_install.php on line 14

Fatal error: main(): Failed opening required 'modules/Forums/nukebb.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gruntzco/public_html/modules/Forums/slot_install.php on line 14


Thank you !!!



Back to top Reply with quote
#6   
aUsTiN
CZ Active Member
usa.gif georgia.gif
Age: 41
Gender: Male
Website:
Status: Offline
Joined: Sep 09, 2003
0.02 posts per day
Posts: 142
Points: 57
  MSN Messenger 

INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_playprice', '2');
INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_apple', '15');
INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_banana', '20');
INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_orange', '25');
INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_starfruit', '30');
INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_onoff', 'on');
INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_minorprize', '5');
INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_given', '0');
INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_taken', '0');
INSERT INTO nuke_bbconfig (config_name, config_value) values ('slot_played', '0');



Back to top Reply with quote
#7   re: slot machine sql install
reddog
CZ Super Newbie
 Codezwiz Site Donator
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
austin----> thanks for posting back, im pretty green when it comes to coding, in fact im real green, but shouldnt there be a "CREATE TABLE" in the above sql, im only asking because the sql_install.php file that comes with the slot mod is also missing this line. Like i said, im pretty green icon_mrgreen.gif at this and perhaps there is a reason, but all of the sql files ive seen has that line in it. I would attempt the line myself, but i dont know the rest of the line that would go along with it the "CREATE TABLE". heres the sql_install.php take a peek !!

<?php
/***************************************************************************
*                             slot_install.php
*                            -------------------
*   Version              : 1.0
***************************************************************************/



define('IN_PHPBB', true);
$phpbb_root_path = 'modules/Forums/';
include($phpbb_root_path.'extension.inc');
include($phpbb_root_path.'common.'.$phpEx);
require("modules/Forums/nukebb.php");
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX, $nukeuser);
init_userprefs($userdata);
//
// End session management
//


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


$sql = array();
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_playprice', '2')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_apple', '15')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_banana', '20')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_orange', '25')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_starfruit', '30')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_onoff', 'on')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_minorprize', '5')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_given', '0')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_taken', '0')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) values ('slot_played', '0')";

$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.";
}

echo "\n<br />\n<b>Finished!</b><br />\n";
echo $message . "<br />\n";
echo "</body>\n";
echo "</html>\n";
exit();
include( 'includes/page_tail.php');

?>



Back to top Reply with quote
#8   
aUsTiN
CZ Active Member
usa.gif georgia.gif
Age: 41
Gender: Male
Website:
Status: Offline
Joined: Sep 09, 2003
0.02 posts per day
Posts: 142
Points: 57
  MSN Messenger 
No, this does not create a table, the only time it will are for mods that require its own table to function. If you use what i pasted & plus it into your phpMyAdmin or similar, you'll be set.



Back to top Reply with quote
#9   re: slot machine sql install
reddog
CZ Super Newbie
 Codezwiz Site Donator
usa.gif illinois.gif
Age: 56
Gender: Male
Fav. Sports Team: Da Bears
Website:
Status: Offline
Joined: Dec 27, 2003
0.01 posts per day
Posts: 86
Points: 12,465
  MSN Messenger ICQ Number
dude, i can be so braindead some times, i was looking at what you posted. and thinking where the bathtub do i put this? do i just query it into nuke.......nope, thats what made me think it needed a table. then i was looking at it again, then all of a sudden...."nuke_bbconfig" slapped me in the face, i know where to put it now......thanks austin, slot is workin now !!



Back to top Reply with quote
#10   re: slot machine sql install
free
CZ Newbie
free has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jun 13, 2004
0.00 posts per day
Posts: 4
Points: 356
   
Don't you have this module for Splatt_Forums or Standalone module, instead of phpBB?
I know many people use Splatt due to nice design.



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