News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF Arcade

Started by niko, October 01, 2004, 02:45:55 PM

Previous topic - Next topic

qbproger

that's the same edit as above that caused different errors

DemonicInfluence

One is in Arcade template. Other is in Arcade2....

qbproger

the edit you told me for arcade2 is the same one as before... the one that causes different errors.

DemonicInfluence

I dunno then. Sorry, I had the error too on my board and I fixed it. I frogot how  :(

qbproger

I figured it out... with some php knowledge  :D

This is the address of where I show how to fix the error.
hxxp:smfgames.com/forum/index.php?topic=1322.0 [nonactive]

There is only one more problem now... and i'm looking at the source code, i don't see what could be causing this one...
On every game page is says:
Champion: Array...

I think it has something to do with this line in Arcade.php:
$game_info .= "<b>{$txt['arcade_7']}</b>: {$context['arcade']['top10'][0]['member']}<br /><b>{$txt['arcade_1']}</b>: {$context['arcade']['top10'][0]['score']}<br />";

I'm going to add some debugging code, and see if i can figure it out... we'll see i guess...

DemonicInfluence

$game_info .= "<b>{$txt['arcade_7']}</b>: {$context['arcade']['top10'][0]['member']['realName']}<br /><b>{$txt['arcade_1']}</b>: {$context['arcade']['top10'][0]['score']}<br />";

That's the edit I had. :)

DemonicInfluence

Err... the game thumbnails for the champs don't display... I have Search engine friendly urls. When i turn that off, the thumbnails reappear. So, how do I make it able to display...

Evolution-8

Quote from: Orbit45244 on July 28, 2005, 09:47:58 AM
With SMF 1.0.5, when installing SMFArcade 1.2.1, I get this error when viewing posts:

QuoteDatabase Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: (censored for security)\Sources\Display.php
Line: 567

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.5, whereas your database is at version SMF 1.0.2. It is recommended that you execute the latest version of upgrade.php.

I also get an error when going into the "Games" section in the Admin CP.  It says:
Quote
Database Error
Table '(censored for security).smf_games_category' doesn't exist
File: (censored for security)\Sources\ArcadeAdmin.php
Line: 135

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.5, whereas your database is at version SMF 1.0.2. It is recommended that you execute the latest version of upgrade.php.

Can anyone help me?

So, how do you fix that?  I need to know, my forum is down until that is fixed.

scrawl

could someone explain a little more about where and what code to put into my games so they work with the high score system?

cheers.

scrawl

Quote from: Evolution-8 on August 03, 2005, 02:32:41 AM
Quote from: Orbit45244 on July 28, 2005, 09:47:58 AM
With SMF 1.0.5, when installing SMFArcade 1.2.1, I get this error when viewing posts:

QuoteDatabase Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: (censored for security)\Sources\Display.php
Line: 567

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.5, whereas your database is at version SMF 1.0.2. It is recommended that you execute the latest version of upgrade.php.

I also get an error when going into the "Games" section in the Admin CP.  It says:
Quote
Database Error
Table '(censored for security).smf_games_category' doesn't exist
File: (censored for security)\Sources\ArcadeAdmin.php
Line: 135

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.5, whereas your database is at version SMF 1.0.2. It is recommended that you execute the latest version of upgrade.php.

Can anyone help me?

So, how do you fix that?  I need to know, my forum is down until that is fixed.

i had this problem as well so i uninstalled the files that had been installed then installed 1.0.3 it works fine on SMF 1.5. but i couldn't get the latest version to work at all. but i don't know that much maybe someone can offer an explanation

tentronik

Try changing the version number inside the xml before you install.
You have to unpack/repack therefor.

Evolution-8

Quote from: scrawl on August 03, 2005, 02:51:02 AM
Quote from: Evolution-8 on August 03, 2005, 02:32:41 AM
Quote from: Orbit45244 on July 28, 2005, 09:47:58 AM
With SMF 1.0.5, when installing SMFArcade 1.2.1, I get this error when viewing posts:

QuoteDatabase Error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: (censored for security)\Sources\Display.php
Line: 567

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.5, whereas your database is at version SMF 1.0.2. It is recommended that you execute the latest version of upgrade.php.

I also get an error when going into the "Games" section in the Admin CP.  It says:
Quote
Database Error
Table '(censored for security).smf_games_category' doesn't exist
File: (censored for security)\Sources\ArcadeAdmin.php
Line: 135

Note: It appears that your database may require an upgrade. Your forum files are currently at version SMF 1.0.5, whereas your database is at version SMF 1.0.2. It is recommended that you execute the latest version of upgrade.php.

Can anyone help me?

So, how do you fix that?  I need to know, my forum is down until that is fixed.

i had this problem as well so i uninstalled the files that had been installed then installed 1.0.3 it works fine on SMF 1.5. but i couldn't get the latest version to work at all. but i don't know that much maybe someone can offer an explanation

I am not going to reinstall everthing and use 1.0.3

scrawl

that's cool bro settle down i was just offering some advice i didn't say you had to take it.

trenchteam

Quote from: WhyMan on April 24, 2005, 05:20:23 PM
HI there,

Anyone seen this error b4? 8: Undefined index: version
File: /home/compfree/public_html/forum/Themes/default/languages/Arcade.english.php (eval?)
Line: 421
Looked at the Arcade.english.php and this is what i get at line 421? $txt['arcade_185'] = "Click here to join";Now for some reason only admins can see & play the games.. Global mods & users get An Error Has Occurred!
You arent allowed to view arcade, sorry!
heh i'm pretty sure i've got the permissions right, any input or resolve would be greatly appreciated ;)

Cheers..  8)


Im getting this now too.  Im not sure why only admins have acess and users do not. :-[

DemonicInfluence

Go to regular users and check the permissions. Also the admin arcade has the enable arcade thing. make sure its enabled.

trenchteam

for some odd reason the managepermissions.php file was not modded..  So I manually added

This
'arcade' => array( /* Lisätty */
'view_arcade' => false,
'play_arcade' => false,
'submit_score' => false,
'challenge_send' => false,
'challenge_view' => false,
)


after this:

Quote'profile' => array(
            'profile_view' => true,
            'profile_identity' => true,
            'profile_extra' => true,
            'profile_title' => true,
            'profile_remove' => true,
            'profile_remote_avatar' => false,
         ),

I was able to grant permission again.  What is strange was I was running the arcade for the longest time without ever having permission options. Then just today, it required it. At least its working now.  thanks for the suggestion though.

Phoenixoverlord

#1156
I'm having trouble with this mod in SMF 1.0.5. It's bridged with Orstio's 3.19 bridge to Mambo.

I've installed it manually as it didn't want to install anything at all. But I've read the readme and applied all modifications. I get the menu and can enable it for the normal users as well, but I can't install any games.

I've uploaded invaders.swf to the Games dir and it's in the drop down box, but when I press the install button, I get logged out of the forum and nothing happens. I also get a whole bunch of errors:

Undefined variable: latest
File: /home/flaming/public_html/smftest/Sources/Arcade2.php
Line: 400

Undefined index: admin_arcade
File: /home/flaming/public_html/smftest/Themes/default/languages/Arcade.english.php (eval?)
Line: 12

Undefined index: version
File: /home/flaming/public_html/smftest/Themes/default/languages/Arcade.english.php (eval?)
Line: 421

Undefined index: admin_games2
File: /home/flaming/public_html/smftest/Themes/default/languages/Arcade.english.php (eval?)
Line: 118

Also, I've tried downloading the games from smfgames.com but I've only been able to unzip spaceinvaders. All the others give errors. And uploading the zip doesn't work either.


EDIT: ok the game install isn't running smoothly yet, but I know what's going wrong. I've replaced all instances of ?action=arcade or =arcadeadmin with ?option=com_smf&Itemid=26&action=whatever. Just need to find this install line...

probinson77

#1157
When you install games, you should go directly to your forum, not through the bridge.  So for example, you would go to sitename.com/smf_install_dir/index.php and then login to the admin from there to install games.

As for the other problem, I posted a solution to making the Arcade work with the Mambo bridge on the smfgames website a while back, but I figured it would nice to have it here too.  Basically, you need to modify only one file, your MAMBO index.php file, and put this code at the top of the file right after the opening <? before anything else:

/////////////////// Code added for SMF-Arcade Redirects ///////////////////////////
if($_GET['option'] != 'com_smf') {
parse_str(preg_replace('/&(\w+)(&|$)/', '&$1=$2', strtr($_SERVER['QUERY_STRING'], ';', '&')), $_GET);
if($_GET['action'] == 'arcade') {
$do_arcade = true;
}
}
if($do_arcade == true) {
define("SMF_ARCADE_PATH", "http://your_site_name/index.php?option=com_smf&Itemid=36&action=arcade");
if($_GET['search'] == 'Search') { // Search Function
header("Location: ".SMF_ARCADE_PATH."&name={$_GET['name']}&order={$_GET['order']}&search=Search");
}
?>
<html>
<head>
<script type="text/javascript">
function form_redirect() {
document.form1.submit(); //Code to pass POST variables to arcade
}
</script>
</head>
<body>
<form name="form1" action="<? echo SMF_ARCADE_PATH;
if($_GET['sa'] == 'challenge') { // Send challenge
echo ';sa=challenge;send';
}
if($_GET['sa'] == 'tournament' && isset($_GET['join'])) { //Join tournament
echo ";sa=tournament;id={$_GET['id']};join";
}
if($_GET['sa'] == 'tournament' && $_GET['new'] == 2) { // New tournament(2)
echo ';sa=tournament;new=2';
}
if($_GET['sa'] == 'tournament' && $_GET['new'] == 3) { // New tournament(3)
echo ';sa=tournament;new=3';
}
?>" method="POST">
<? if($_POST['do'] == 'comment') { ?>  <!-- Post comment with score -->
<input type="hidden" name="do" value="<? echo $_POST['do']; ?>">
<input type="hidden" name="time" value="<? echo $_POST['time']; ?>">
<input type="hidden" name="game" value="<? echo $_POST['game']; ?>">
<input type="hidden" name="comment" value="<? echo $_POST['comment']; ?>">
<? } elseif($_GET['sa'] == 'challenge') { ?> <!-- Submit a challenge -->
<input type="hidden" name="to" value="<? echo $_POST['to']; ?>">
<input type="hidden" name="game" value="<? echo $_POST['game']; ?>">
<input type="hidden" name="message" value="<? echo $_POST['message']; ?>">
<? } elseif($_GET['sa'] == 'tournament' && isset($_GET['join'])) { ?> <!-- Join a tournament -->
<input type="hidden" name="pass" value="<? echo $_POST['pass']; ?>">
<? } elseif($_GET['sa'] == 'tournament' && $_GET['new'] == 2) { ?> <!-- New tournament(2) -->
<input type="hidden" name="name" value="<? echo $_POST['name']; ?>">
<input type="hidden" name="rounds" value="<? echo $_POST['rounds']; ?>">
<input type="hidden" name="round2" value="<? echo $_POST['round2']; ?>">
<input type="hidden" name="player" value="<? echo $_POST['player']; ?>">
<input type="hidden" name="player2" value="<? echo $_POST['player2']; ?>">
<input type="hidden" name="pass" value="<? echo $_POST['pass']; ?>">
<input type="hidden" name="type" value="<? echo $_POST['type']; ?>">
<input type="hidden" name="teams" value="<? echo $_POST['teams']; ?>">
<input type="hidden" name="teams2" value="<? echo $_POST['teams2']; ?>">
<? } elseif($_GET['sa'] == 'tournament' && $_GET['new'] == 3) { ?> <!-- New tournament(3) -->
<input type="hidden" name="data" value="<? echo htmlentities($_POST['data']); ?>">
<input type="hidden" name="game[]" value="<? echo $_POST['game[]']; ?>">
<input type="hidden" name="team[]" value="<? echo $_POST['team[]']; ?>">
<? } else { ?> <!-- Submit score -->
<input type="hidden" name="game" value="<? echo $_POST['game']; ?>">
<input type="hidden" name="score" value="<? echo $_POST['score']; ?>">
<? } ?>
</form>
<script type="text/javascript">
form_redirect();
</script>
</body>
</html>
<?
}
else {


...and then at the bottom of your mambo index.php right before the ?> You must put a closing }.  That should do it.  I've been using this hack for about 2 months now and it works like a charm.

DemonicInfluence

Quote from: Phoenixoverlord on August 05, 2005, 07:12:30 AM
I'm having trouble with this mod in SMF 1.0.5. It's bridged with Orstio's 3.19 bridge to Mambo.

I've installed it manually as it didn't want to install anything at all. But I've read the readme and applied all modifications. I get the menu and can enable it for the normal users as well, but I can't install any games.

I've uploaded invaders.swf to the Games dir and it's in the drop down box, but when I press the install button, I get logged out of the forum and nothing happens. I also get a whole bunch of errors:

Undefined variable: latest
File: /home/flaming/public_html/smftest/Sources/Arcade2.php
Line: 400

Undefined index: admin_arcade
File: /home/flaming/public_html/smftest/Themes/default/languages/Arcade.english.php (eval?)
Line: 12

Undefined index: version
File: /home/flaming/public_html/smftest/Themes/default/languages/Arcade.english.php (eval?)
Line: 421

Undefined index: admin_games2
File: /home/flaming/public_html/smftest/Themes/default/languages/Arcade.english.php (eval?)
Line: 118

Also, I've tried downloading the games from smfgames.com but I've only been able to unzip spaceinvaders. All the others give errors. And uploading the zip doesn't work either.


EDIT: ok the game install isn't running smoothly yet, but I know what's going wrong. I've replaced all instances of ?action=arcade or =arcadeadmin with ?option=com_smf&Itemid=26&action=whatever. Just need to find this install line...

did u run arcade_sql? This is how, www.yoursite.com/arcade_sql.php . Replace the yoursite.com with your sites adress...

DemonicInfluence

Quote from: Libo on August 02, 2005, 09:16:55 PM
Err... the game thumbnails for the champs don't display... I have Search engine friendly urls. When i turn that off, the thumbnails reappear. So, how do I make it able to display...

So, can anyone fix this problem? to make the thumbnails appear?

Advertisement: