News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF Arcade

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

Previous topic - Next topic

Fiery

Humm, I did the same thing and it works... Copy the coding for the whole page and ill take a look



Quote from: littleone on July 24, 2005, 09:16:48 AM
Quote from: oldmanwolf on July 22, 2005, 03:54:55 AM
Quote from: pmp6nl on July 22, 2005, 02:44:49 AM
No you can run 1.2.1 on SMF 1.0.5.  I got it working, then I started to get the

Fatal error: Call to undefined function: parse_bbc() in /home/***/public_html/forums/Sources/Arcade2.php on line 280

Like [Unknown] said, the function parse_bbc() doesn't exist in 1.0.x...  The function in 1.0.x is doUBBC()...  Since that function doesn't exist, that's why you get the error.  You may be able to fix it by changing parse_bbc to doUBBC, but 1.1.3 runs just fine, and doesn't give any errors when trying to record a high score (my installation ran perfectly until I tried to record a score, then I got the same error you did)...

Try changing that function, and let us know how it works...  There's a few folks over on the smfgames forum that are having this issue as well, and if there's a simple fix, that would be ideal, you know?

I gave this a try.  On line 280 and then 284 I changed the parse_bbc to doUBBC, but now I get this error:

Parse error: parse error, unexpected T_FUNCTION in /home/xxxxxx/public_html/xxxxxxxxxx/Sources/Arcade2.php on line 305


Fiery

uninstall, reinstall run update... then what does it say?

If it doesnt work, go with older version

Quote from: Libo on July 28, 2005, 12:12:30 PM
I get this error message when I visit the arcade home:

Quote8: Undefined index: member
File: /home/u1/libo/html/Themes/default/languages/Arcade.english.php (eval?)
Line: 220

And this one when i submit scores:

Quote8: Undefined index: member
File: /home/u1/libo/html/Sources/Arcade.php
Line: 434

and sometimes this

Quote8: Undefined index: memberid
File: /home/u1/libo/html/Sources/Arcade2.php
Line: 454

Fiery

Is there a way to set it up where 1 post = 5 credits to play games?????

trenchteam

^ that would actually be cool as hell!

Togster

Hi, I have the arcade working well on 1.1 Beta 3, it is excellent, I just get pages and pages of messages in the Error log when anyone visits and plays the arcade, it works, but creates an error log entry, they are as follows:-

http://www.monopolysquad.co.uk/CED/index.php?topic=1843.0
Apply Filter: Only show the errors with the same message
8: Undefined variable: game
File: /home/monopoly/public_html/CED/Sources/Display.php
Line: 675

-------------------------------------------------

http://www.monopolysquad.co.uk/CED/index.php?topic=1843.0
Apply Filter: Only show the errors with the same message
8: Undefined variable: i
File: /home/monopoly/public_html/CED/Sources/Display.php
Line: 672

-------------------------------------------------

672   $context['arcade']['games'][$i]['thumbnail'] = ""; // No thumbnail for default
673
674   foreach($ext as $ex){
675 if(file_exists($modSettings['arcade_games_dir']."/".$game['game'].".".$ex)){
676 $context['arcade']['games'][$i]['thumbnail'] = $modSettings['arcade_games_url']."/".$game['game'].".".$ex;
677 break;
678 }
679   }


any ideas?? help greatly appreciated :)

Fiery

I have that problem also.. I have 75 pages of errors.. in 1.5 days



Quote from: Togster on July 30, 2005, 10:35:30 AM
Hi, I have the arcade working well on 1.1 Beta 3, it is excellent, I just get pages and pages of messages in the Error log when anyone visits and plays the arcade, it works, but creates an error log entry, they are as follows:-

http://www.monopolysquad.co.uk/CED/index.php?topic=1843.0
Apply Filter: Only show the errors with the same message
8: Undefined variable: game
File: /home/monopoly/public_html/CED/Sources/Display.php
Line: 675

-------------------------------------------------

http://www.monopolysquad.co.uk/CED/index.php?topic=1843.0
Apply Filter: Only show the errors with the same message
8: Undefined variable: i
File: /home/monopoly/public_html/CED/Sources/Display.php
Line: 672

-------------------------------------------------

672   $context['arcade']['games'][$i]['thumbnail'] = ""; // No thumbnail for default
673
674   foreach($ext as $ex){
675 if(file_exists($modSettings['arcade_games_dir']."/".$game['game'].".".$ex)){
676 $context['arcade']['games'][$i]['thumbnail'] = $modSettings['arcade_games_url']."/".$game['game'].".".$ex;
677 break;
678 }
679   }


any ideas?? help greatly appreciated :)

DemonicInfluence

use this code instead of the normal code:

/* Arcade thingy */
$arcade_champ = array();
$req = db_query("SELECT * FROM {$db_prefix}games_champ, {$db_prefix}games
WHERE {$db_prefix}games_champ.game={$db_prefix}games.game",__FILE__,__LINE__);
while ($rivi = mysql_fetch_assoc($req))
{
if(!empty($rivi['game']) && !empty($rivi['member']))
$arcade_champ[$rivi['member']][$rivi['game']] = $rivi;

if(file_exists("./Games/{$rivi['game']}.gif")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.gif";
}
elseif(file_exists("./Games/{$rivi['game']}.GIF")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.GIF";
}
elseif(file_exists("./Games/{$rivi['game']}.png")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.png";
}
elseif(file_exists("./Games/{$rivi['game']}.PNG")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.PNG";
}
elseif(file_exists("./Games/{$rivi['game']}.jpg")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.jpg";
}
elseif(file_exists("./Games/{$rivi['game']}.JPG")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.JPG";
}
else{
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "";
}

}
loadLanguage('Arcade'); // We need strings from Arcade language file
$context['arcade']['champions'] = $arcade_champ;


I got it from www.smfgame.com very useful.

Togster

Quote from: Libo on July 31, 2005, 09:40:02 AM
use this code instead of the normal code:

/* Arcade thingy */
$arcade_champ = array();
$req = db_query("SELECT * FROM {$db_prefix}games_champ, {$db_prefix}games
WHERE {$db_prefix}games_champ.game={$db_prefix}games.game",__FILE__,__LINE__);
while ($rivi = mysql_fetch_assoc($req))
{
if(!empty($rivi['game']) && !empty($rivi['member']))
$arcade_champ[$rivi['member']][$rivi['game']] = $rivi;

if(file_exists("./Games/{$rivi['game']}.gif")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.gif";
}
elseif(file_exists("./Games/{$rivi['game']}.GIF")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.GIF";
}
elseif(file_exists("./Games/{$rivi['game']}.png")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.png";
}
elseif(file_exists("./Games/{$rivi['game']}.PNG")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.PNG";
}
elseif(file_exists("./Games/{$rivi['game']}.jpg")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.jpg";
}
elseif(file_exists("./Games/{$rivi['game']}.JPG")){
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "Games/{$rivi['game']}.JPG";
}
else{
$arcade_champ[$rivi['member']][$rivi['game']]['thumbnail'] = "";
}

}
loadLanguage('Arcade'); // We need strings from Arcade language file
$context['arcade']['champions'] = $arcade_champ;


I got it from www.smfgame.com [nofollow] very useful.


Works!! thanks :)

flowerweb

#1128
I don't want to appear champions arcade under the avatar, buta i would like to appear under the signature, like signature whit a line separator.
Moreover I wanted that if a user is champion in several games, that came shown without to go to head for every game.
What code i have to edit?

DemonicInfluence

Quote from: flowerweb on July 31, 2005, 12:54:58 PM
I don't want to appear champions arcade under the avatar, buta i would like to appear under the signature, like signature whit a line separator.
Moreover I wanted that if a user is champion in several games, that came shown without to go to head for every game.
What code i have to edit?

Edit the display.template.php . Delete the original code...

edit is for display.template.php so that your champion icons show in a row under your forum signature.

replace:

  // Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">', $message['member']['signature'], '</div>';

with the following:

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">', $message['member']['signature'], '</div><hr />';
if(@is_array($context['arcade']['champions'][ $message['member']['id'] ])){
$i = 0;

echo "SmfArcade Champion&nbsp;";
foreach($context['arcade']['champions'][ $message['member']['id'] ] as $tmp){
//print_r($tmp);
if($tmp['thumbnail'] != ''){

// echo '
// <img src="', $tmp['thumbnail'], '" alt="" width="20">',$tmp['name'],' ', $txt['arcade_136'],'
';

echo '<a href="', $scripturl, '?action=arcade;do=play;game=',$tmp['id'],'" ><img border="0" src="', $tmp['thumbnail'], '" alt="', $tmp['name'] ,'" width="20" height="20"></a>&nbsp;';

}
}
}

Got it from smfgames. I dont know what you mean by that came shown without to go to head for every game

snork13

Quote from: littleone on July 24, 2005, 09:16:48 AM
Quote from: oldmanwolf on July 22, 2005, 03:54:55 AM
Quote from: pmp6nl on July 22, 2005, 02:44:49 AM
No you can run 1.2.1 on SMF 1.0.5.  I got it working, then I started to get the

Fatal error: Call to undefined function: parse_bbc() in /home/***/public_html/forums/Sources/Arcade2.php on line 280

Like [Unknown] said, the function parse_bbc() doesn't exist in 1.0.x...  The function in 1.0.x is doUBBC()...  Since that function doesn't exist, that's why you get the error.  You may be able to fix it by changing parse_bbc to doUBBC, but 1.1.3 runs just fine, and doesn't give any errors when trying to record a high score (my installation ran perfectly until I tried to record a score, then I got the same error you did)...

Try changing that function, and let us know how it works...  There's a few folks over on the smfgames forum that are having this issue as well, and if there's a simple fix, that would be ideal, you know?

I gave this a try.  On line 280 and then 284 I changed the parse_bbc to doUBBC, but now I get this error:

Parse error: parse error, unexpected T_FUNCTION in /home/xxxxxx/public_html/xxxxxxxxxx/Sources/Arcade2.php on line 305


it work for me ..change those to lines with version 1.05

thanks
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

flowerweb

Quote from: Libo on July 31, 2005, 02:40:02 PM
Quote from: flowerweb on July 31, 2005, 12:54:58 PM
I don't want to appear champions arcade under the avatar, buta i would like to appear under the signature, like signature whit a line separator.
Moreover I wanted that if a user is champion in several games, that came shown without to go to head for every game.
What code i have to edit?

Edit the display.template.php . Delete the original code...

edit is for display.template.php so that your champion icons show in a row under your forum signature.

replace:

  // Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">', $message['member']['signature'], '</div>';

with the following:

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">', $message['member']['signature'], '</div><hr />';
if(@is_array($context['arcade']['champions'][ $message['member']['id'] ])){
$i = 0;

echo "SmfArcade Champion&nbsp;";
foreach($context['arcade']['champions'][ $message['member']['id'] ] as $tmp){
//print_r($tmp);
if($tmp['thumbnail'] != ''){

// echo '
// <img src="', $tmp['thumbnail'], '" alt="" width="20">',$tmp['name'],' ', $txt['arcade_136'],'
';

echo '<a href="', $scripturl, '?action=arcade;do=play;game=',$tmp['id'],'" ><img border="0" src="', $tmp['thumbnail'], '" alt="', $tmp['name'] ,'" width="20" height="20"></a>&nbsp;';

}
}
}

Got it from smfgames. I dont know what you mean by that came shown without to go to head for every game

Ok thanks very very much Libo.
I mean to show games in which the user is champion in a row and not in much row.

azuregenesis

got it working on 1.0.5 :) thanks!

now to redo this to fit my other themes...

xD

qbproger

i keep getting this error in my error log:

8: Undefined index: memberid
File: /home/qbproger/public_html/forums/Sources/Arcade2.php
Line: 454

DemonicInfluence

#1134
define memberid in arcade2.php

On line 454 for a unmodified Arcade2.php

change this:

$x = "INSERT INTO {$db_prefix}games_champ SET member='{$top[0]['memberid']}', game='{$arr['game']}', stime='{$top[0]['time']}'";

Into this:

  $x = "INSERT INTO {$db_prefix}games_champ SET member='{$top[0]['member']}', game='{$arr['game']}', stime='{$top[0]['time']}'";

qbproger

why does my arcade panel look like this:

Arcade panel
Game listing
Admin
Challenges
Tournaments
Statistics
No Actions
Flatout
Champion: Array
Score: 376


The part that has me confused is:
Champion: Array

DemonicInfluence

I had that too. Do this to fix:

In Arcade.template.php in Themes/default

Find:
echo "<td><a href=\"$scripturl?action=profile;u={$tmp['member']}\">{$user_profile[$tmp['member']]['realName']}</a></td><td width=\"100\"><img src=\"" . $settings['images_url'] . '/bar.gif" width="' . $tmp['precent'] . "\" height=\"15\" alt=\"".$tmp['precent']."%\" border=\"0\" /></td><td>{$tmp['cnt']}</td>";

Replace with this:
echo "<td><a href=\"$scripturl?action=profile;u={$tmp['member']}\">{$user_profile[$tmp['member']]['realName']}</a></td><td width=\"100\"><img src=\"" . $settings['images_url'] . '/bar.gif" width="' . $tmp['precent'] . "\" height=\"15\" alt=\"".$tmp['precent']."%\" border=\"0\" /></td><td>{$tmp['cnt']}</td>";

qbproger

when i changed that top line, now i get 2 new errors:

8: Undefined offset: 0
File: /home/qbproger/public_html/forums/Sources/Arcade2.php
Line: 454

and this one:

8: Undefined variable: GET_
File: /home/qbproger/public_html/forums/Sources/ArcadeAdmin.php
Line: 572

qbproger

ok... i don't think the line you said is where the problem lies... as it started 2 more errors.  i think it's somewhere in here

if(isset($user_profile[$score['member']]))
{
$top10[$i]['member'] = $user_profile[$score['member']];
}
else
{
$top10[$i]['memberid'] = $score['member'];
}

DemonicInfluence

It isn't sorry... Try this:

Arcade2.php

Find:
          $x = "INSERT INTO {$db_prefix}games_champ SET member='{$top[0]['memberid']}', game='{$arr['game']}', stime='{$top[0]['time']}'";

Replace:
$x = "INSERT INTO {$db_prefix}games_champ SET member='{$top[0]['member']}', game='{$arr['game']}', stime='{$top[0]['time']}'";

This SHould work now.

Advertisement: