News:

Join the Facebook Fan Page.

Main Menu

SMF Arcade

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

Previous topic - Next topic

TheListener

Quote from: Jessica. on April 08, 2012, 08:10:05 PM
some of the games seem to be missing images....

Any errors in your error log?

Theme used? Check the default theme.

XHIBIT911

Ive browsed probably 20 or 30 of this threads pages (randomly) and even searched but cant find an answer to my question.
Where can I find an award mod for the SMF arcade that shows in members forum profiles as well as a block that shows top games played like a leaderboard for my forums ?

Here's what I'm running.

SMF 2.0.2 Forum

PortaMx 1.45 Portal

Alb0

Can we no longer register on the site? I've received the confirmation email, although when clicked, it sends me to a page that's not found. Need this to download some content on the site :(

NanoSector

Quote from: Alb0 on April 14, 2012, 06:05:57 AM
Can we no longer register on the site? I've received the confirmation email, although when clicked, it sends me to a page that's not found. Need this to download some content on the site :(
What site?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."


NanoSector

What if you squeeze "/forum" after "smfarcade.info" in the confirmation URL?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Alb0

Quote from: Yoshi2889 on April 14, 2012, 07:32:17 AM
What if you squeeze "/forum" after "smfarcade.info" in the confirmation URL?

That did the trick, thank you!

lurkalot

Quote from: Alb0 on April 14, 2012, 06:05:57 AM

Need this to download some content on the site :(


Doubt it will help tbh, downloads and attachments aren't working at the moment. ;)

GarfieldP

does this work for 2.0.2?

TheListener

Hi Odie er I mean Garfield.

;D

The arcade does work on 2.0.2

Another site you can visit for smf and arcade related bits n bobs is www.askusaquestion.net


GarfieldP

Quote from: Old Fossil on April 24, 2012, 05:31:46 PM
Hi Odie er I mean Garfield.

;D

The arcade does work on 2.0.2

Another site you can visit for smf and arcade related bits n bobs is www.askusaquestion.net


;D thanks Fossil!
Now that I have confirmation, could anyone possibly know why it says I cannot install it?  (says its "incompatible with my version of smf" etc...)
I believe I have no smf_arcade database tables and I have not previously installed it.

TheListener

Which version of the mod?

Also have a look at the mod emulate link in my signature.

GarfieldP

I emulated it, and then had to modify some of the pages myself because of SP installed.  Works, games installed.

Biology Forums

I know this probably has been asked before, but how do you make a flash game submit its score to the database?

nend

Flash is capable of sending POST information. Just like any other script, get your information and post it to a url. In this case you can just send it to index.php from flash. You shouldn't need to add the whole url, ;)

I think you need "score" and some sort of internal id for SMF arcade, it has been a while don't remember what the other key was called. It is listed on the SMF Arcade site though.

rivrunnr1

I spent about 3 hours on this already and hopefully someone can help me. First of all, if someone could point me to older install packages of SMF Arcade, I would VERY much appreciate it. I need to download SMF Arcade 2.0.12. I can only find the newest install package. Maybe I am just a tard.

Here is the situation:
The previous owner of the site tried to remove the arcade, but did it incorrectly. I believe he just deleted the arcade file in the root directory instead of uninstalling it. Now, when I try to uninstall the arcade 2.0.12, I get an error that says "An Error Has Occurred! Unable to find package file!". I think this is because he removed the files. Now I am stuck and cannot remove the package. I figure that if I can replace the package and put it back on the file directory, then the package might be able to be uninstalled. Maybe I am wrong, but that's what I want to try. I can't find the old version package file though!

If anyone can help me, I would appreciate it. Thanks!

Theoderic

Thanx for this system :)

dooie

I am running SMF version 2.0.2 and I am having an install issue with SMF Arcade 2.5 RC1 using the emulator for SMF 2.0 RC3. The code that needs to be found by the install process are not completely the same as what it is looking for. Could someone who knows what they are doing take a look for me and see if there is a manual workaround? I tried but ended up with errors in the Modification Settings in Admin panel. Any help would be greatly appreciated.

Cheers.

61.    Execute Modification    ./index.php    Test failed

      1.    Add Before    ./index.php    Test failed


Code: (Find) [Select]

elseif (empty($_REQUEST['action']))


Code: (Add Before) [Select]

// Check for arcade actions
// IBPArcade v2.x.x Games support
elseif (isset($_REQUEST['act']) && strtolower($_REQUEST['act']) == 'arcade')
{
$_REQUEST['action'] = 'arcade';

if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'newscore')
$_REQUEST['sa'] = 'ibpsubmit2';

require_once($sourcedir . '/Arcade.php');
return 'Arcade';
}
// IBPArcade v3.x.x Games support
elseif (isset($_REQUEST['autocom']) && $_REQUEST['autocom'] == 'arcade')
{
$_REQUEST['action'] = 'arcade';

if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'savescore')
$_REQUEST['sa'] = 'ibpsubmit3';
elseif (isset($_REQUEST['do']) && $_REQUEST['do'] == 'verifyscore')
$_REQUEST['sa'] = 'ibpverify';

require_once($sourcedir . '/Arcade.php');
return 'Arcade';
}
elseif (isset($_REQUEST['play']) && !isset($_REQUEST['game']))
{
$_REQUEST['game'] = $_REQUEST['play'];
unset($_REQUEST['play']);
$_REQUEST['sa'] = 'play';

require_once($sourcedir . '/Arcade.php');
return 'Arcade';
}


      2.    Add After    ./index.php    Test successful

62.    Execute Modification    ./Sources/ManageSettings.php    Test failed

      1.    Add Before    ./Sources/ManageSettings.php    Test failed

Code: (Find) [Select]

);

// Are we getting info for the help section.


Code: (Add Before) [Select]

// arcade = arcade (makes sense, right?)
'arcade' => array(
'url' => 'action=admin;area=arcade',
'settings' => array(
'arcadeEnabled' => 1,
),
),



These are my forum PHP files. The code in the files to be modified that is having the errors is included...

./index.php

<?php

/**
 * Simple Machines Forum (SMF)
 *
 * @package SMF
 * @author Simple Machines http://www.simplemachines.org
 * @copyright 2011 Simple Machines
 * @license http://www.simplemachines.org/about/smf/license.php BSD
 *
 * @version 2.0.2
 */

/* This, as you have probably guessed, is the crux on which SMF functions.
Everything should start here, so all the setup and security is done
properly.  The most interesting part of this file is the action array in
the smf_main() function.  It is formatted as so:

'action-in-url' => array('Source-File.php', 'FunctionToCall'),

Then, you can access the FunctionToCall() function from Source-File.php
with the URL index.php?action=action-in-url.  Relatively simple, no?
*/

$forum_version 'SMF 2.0.2';

// Get everything started up...
define('SMF'1);
if (
function_exists('set_magic_quotes_runtime'))
@set_magic_quotes_runtime(0);
error_reporting(defined('E_STRICT') ? E_ALL E_STRICT E_ALL);
$time_start microtime();

// This makes it so headers can be sent!
ob_start();

// Do some cleaning, just in case.
foreach (array('db_character_set''cachedir') as $variable)
if (isset($GLOBALS[$variable]))
unset($GLOBALS[$variable], $GLOBALS[$variable]);

// Load the settings...
require_once(dirname(__FILE__) . '/Settings.php');

// Make absolutely sure the cache directory is defined.
if ((empty($cachedir) || !file_exists($cachedir)) && file_exists($boarddir '/cache'))
$cachedir $boarddir '/cache';

// And important includes.
require_once($sourcedir '/QueryString.php');
require_once(
$sourcedir '/Subs.php');
require_once(
$sourcedir '/Errors.php');
require_once(
$sourcedir '/Load.php');
require_once(
$sourcedir '/Security.php');
if (
file_exists($sourcedir '/LoadAds.php'))
require_once($sourcedir '/LoadAds.php');

// Using an pre-PHP 5.1 version?
if (@version_compare(PHP_VERSION'5.1') == -1)
require_once($sourcedir '/Subs-Compat.php');

// If $maintenance is set specifically to 2, then we're upgrading or something.
if (!empty($maintenance) && $maintenance == 2)
db_fatal_error();

// Create a variable to store some SMF specific functions in.
$smcFunc = array();

// Initate the database connection and define some database functions to use.
loadDatabase();

// Load the settings from the settings table, and perform operations like optimizing.
reloadSettings();
// Clean the request variables, add slashes, etc.
cleanRequest();
$context = array();

// Seed the random generator.
if (empty($modSettings['rand_seed']) || mt_rand(1250) == 69)
smf_seed_generator();

// Before we get carried away, are we doing a scheduled task? If so save CPU cycles by jumping out!
if (isset($_GET['scheduled']))
{
require_once($sourcedir '/ScheduledTasks.php');
AutoTask();
}

// Check if compressed output is enabled, supported, and not already being done.
if (!empty($modSettings['enableCompressedOutput']) && !headers_sent())
{
// If zlib is being used, turn off output compression.
if (@ini_get('zlib.output_compression') == '1' || @ini_get('output_handler') == 'ob_gzhandler' || @version_compare(PHP_VERSION'4.2.0') == -1)
$modSettings['enableCompressedOutput'] = '0';
else
{
ob_end_clean();
ob_start('ob_gzhandler');
}
}

// Register an error handler.
set_error_handler('error_handler');

// Start the session. (assuming it hasn't already been.)
loadSession();

// Determine if this is using WAP, WAP2, or imode.  Technically, we should check that wap comes before application/xhtml or text/html, but this doesn't work in practice as much as it should.
if (isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']))
unset($_SESSION['nowap']);
elseif (isset(
$_REQUEST['nowap']))
$_SESSION['nowap'] = true;
elseif (!isset(
$_SESSION['nowap']))
{
if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false)
$_REQUEST['wap2'] = 1;
elseif (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false)
{
if (strpos($_SERVER['HTTP_USER_AGENT'], 'DoCoMo/') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'portalmmm/') !== false)
$_REQUEST['imode'] = 1;
else
$_REQUEST['wap'] = 1;
}
}

if (!
defined('WIRELESS'))
define('WIRELESS', isset($_REQUEST['wap']) || isset($_REQUEST['wap2']) || isset($_REQUEST['imode']));

// Some settings and headers are different for wireless protocols.
if (WIRELESS)
{
define('WIRELESS_PROTOCOL', isset($_REQUEST['wap']) ? 'wap' : (isset($_REQUEST['wap2']) ? 'wap2' : (isset($_REQUEST['imode']) ? 'imode' '')));

// Some cellphones can't handle output compression...
$modSettings['enableCompressedOutput'] = '0';
// !!! Do we want these hard coded?
$modSettings['defaultMaxMessages'] = 5;
$modSettings['defaultMaxTopics'] = 9;

// Wireless protocol header.
if (WIRELESS_PROTOCOL == 'wap')
header('Content-Type: text/vnd.wap.wml');
}

// Restore post data if we are revalidating OpenID.
if (isset($_GET['openid_restore_post']) && !empty($_SESSION['openid']['saved_data'][$_GET['openid_restore_post']]['post']) && empty($_POST))
{
$_POST $_SESSION['openid']['saved_data'][$_GET['openid_restore_post']]['post'];
unset($_SESSION['openid']['saved_data'][$_GET['openid_restore_post']]);
}

// What function shall we execute? (done like this for memory's sake.)
call_user_func(smf_main());

// Call obExit specially; we're coming from the main area ;).
obExit(nullnulltrue);

// The main controlling function.
function smf_main()
{
global $modSettings$settings$user_info$board$topic$board_info$maintenance$sourcedir;

// Special case: session keep-alive, output a transparent pixel.
if (isset($_GET['action']) && $_GET['action'] == 'keepalive')
{
header('Content-Type: image/gif');
die("\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3B");
}

// Load the user's cookie (or set as guest) and load their settings.
loadUserSettings();

// Load the current board's information.
loadBoard();

// Load the current user's permissions.
loadPermissions();

// Attachments don't require the entire theme to be loaded.
if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'dlattach' && (!empty($modSettings['allow_guestAccess']) && $user_info['is_guest']))
detectBrowser();
// Load the current theme.  (note that ?theme=1 will also work, may be used for guest theming.)
else
loadTheme();

// Check if the user should be disallowed access.

// Load all the ads up
if (function_exists("loadAds"))
loadAds();
is_not_banned();

// If we are in a topic and don't have permission to approve it then duck out now.
if (!empty($topic) && empty($board_info['cur_topic_approved']) && !allowedTo('approve_posts') && ($user_info['id'] != $board_info['cur_topic_starter'] || $user_info['is_guest']))
fatal_lang_error('not_a_topic'false);

// Do some logging, unless this is an attachment, avatar, toggle of editor buttons, theme option, XML feed etc.
if (empty($_REQUEST['action']) || !in_array($_REQUEST['action'], array('dlattach''findmember''jseditor''jsoption''requestmembers''smstats''.xml''xmlhttp''verificationcode''viewquery''viewsmfile')))
{
// Log this user as online.
writeLog();

// Track forum statistics and hits...?
if (!empty($modSettings['hitStats']))
trackStats(array('hits' => '+'));
}

// Is the forum in maintenance mode? (doesn't apply to administrators.)
if (!empty($maintenance) && !allowedTo('admin_forum'))
{
// You can only login.... otherwise, you're getting the "maintenance mode" display.
if (isset($_REQUEST['action']) && ($_REQUEST['action'] == 'login2' || $_REQUEST['action'] == 'logout'))
{
require_once($sourcedir '/LogInOut.php');
return $_REQUEST['action'] == 'login2' 'Login2' 'Logout';
}
// Don't even try it, sonny.
else
{
require_once($sourcedir '/Subs-Auth.php');
return 'InMaintenance';
}
}
// If guest access is off, a guest can only do one of the very few following actions.
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa''login''login2''register''register2''reminder''activate''help''smstats''mailq''verificationcode''openidreturn''notCaptcha'))))
{
require_once($sourcedir '/Subs-Auth.php');
return 'KickGuest';
}
elseif (empty($_REQUEST['action']) && empty($_REQUEST['ajax_request']))
{
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
require_once($sourcedir '/BoardIndex.php');
return 'BoardIndex';
}
// Topic is empty, and action is empty.... MessageIndex!
elseif (empty($topic))
{
require_once($sourcedir '/MessageIndex.php');
return 'MessageIndex';
}
// Board is not empty... topic is not empty... action is empty.. Display!
else
{
require_once($sourcedir '/Display.php');
return 'Display';
}
}

//-- Labradoodle-360; Menu Editor Lite
elseif (!empty($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == 'menu_children')
{
require_once($sourcedir '/menu_source/resources/ajax.php');
http_request_children();
}
// End Labradoodle-360; Menu Editor Lite --//

// Here's the monstrous $_REQUEST['action'] array - $_REQUEST['action'] => array($file, $function).
$actionArray = array(
'activate' => array('Register.php''Activate'),
'admin' => array('Admin.php''AdminMain'),
'ads' => array('Ads.php''Ads'),
'announce' => array('Post.php''AnnounceTopic'),
'attachapprove' => array('ManageAttachments.php''ApproveAttach'),
'buddy' => array('Subs-Members.php''BuddyListToggle'),
'calendar' => array('Calendar.php''CalendarMain'),
'clock' => array('Calendar.php''clock'),
'collapse' => array('BoardIndex.php''CollapseCategory'),
'coppa' => array('Register.php''CoppaForm'),
'credits' => array('Who.php''Credits'),
'deletemsg' => array('RemoveTopic.php''DeleteMessage'),
'display' => array('Display.php''Display'),
'dlattach' => array('Display.php''Download'),
'editpoll' => array('Poll.php''EditPoll'),
'editpoll2' => array('Poll.php''EditPoll2'),
'emailuser' => array('SendTopic.php''EmailUser'),
'findmember' => array('Subs-Auth.php''JSMembers'),
'groups' => array('Groups.php''Groups'),
'help' => array('Help.php''ShowHelp'),
'helpadmin' => array('Help.php''ShowAdminHelp'),
'im' => array('PersonalMessage.php''MessageMain'),
'jseditor' => array('Subs-Editor.php''EditorMain'),
'jsmodify' => array('Post.php''JavaScriptModify'),
'jsoption' => array('Themes.php''SetJavaScript'),
'lock' => array('LockTopic.php''LockTopic'),
'lockvoting' => array('Poll.php''LockVoting'),
'login' => array('LogInOut.php''Login'),
'login2' => array('LogInOut.php''Login2'),
'logout' => array('LogInOut.php''Logout'),
'markasread' => array('Subs-Boards.php''MarkRead'),
'mergetopics' => array('SplitTopics.php''MergeTopics'),
'mlist' => array('Memberlist.php''Memberlist'),
'moderate' => array('ModerationCenter.php''ModerationMain'),
'modifycat' => array('ManageBoards.php''ModifyCat'),
'modifykarma' => array('Karma.php''ModifyKarma'),
'movetopic' => array('MoveTopic.php''MoveTopic'),
'movetopic2' => array('MoveTopic.php''MoveTopic2'),
'notCaptcha' => array('Register.php''notCaptcha_img'),
'notify' => array('Notify.php''Notify'),
'notifyboard' => array('Notify.php''BoardNotify'),
'openidreturn' => array('Subs-OpenID.php''smf_openID_return'),
'pm' => array('PersonalMessage.php''MessageMain'),
'post' => array('Post.php''Post'),
'post2' => array('Post.php''Post2'),
'printpage' => array('Printpage.php''PrintTopic'),
'profile' => array('Profile.php''ModifyProfile'),
'quotefast' => array('Post.php''QuoteFast'),
'quickmod' => array('MessageIndex.php''QuickModeration'),
'quickmod2' => array('Display.php''QuickInTopicModeration'),
'recent' => array('Recent.php''RecentPosts'),
'register' => array('Register.php''Register'),
'register2' => array('Register.php''Register2'),
'reminder' => array('Reminder.php''RemindMe'),
'removepoll' => array('Poll.php''RemovePoll'),
'removetopic2' => array('RemoveTopic.php''RemoveTopic2'),
'reporttm' => array('SendTopic.php''ReportToModerator'),
'requestmembers' => array('Subs-Auth.php''RequestMembers'),
'restoretopic' => array('RemoveTopic.php''RestoreTopic'),
'search' => array('Search.php''PlushSearch1'),
'search2' => array('Search.php''PlushSearch2'),
'sendtopic' => array('SendTopic.php''EmailUser'),
'smstats' => array('Stats.php''SMStats'),
'suggest' => array('Subs-Editor.php''AutoSuggestHandler'),
'spellcheck' => array('Subs-Post.php''SpellCheck'),
'splittopics' => array('SplitTopics.php''SplitTopics'),
'stats' => array('Stats.php''DisplayStats'),
'sticky' => array('LockTopic.php''Sticky'),
'theme' => array('Themes.php''ThemesMain'),
'trackip' => array('Profile-View.php''trackIP'),
'trader' => array('Trader2.php''tradermain'),

'about:mozilla' => array('Karma.php''BookOfUnknown'),
'about:unknown' => array('Karma.php''BookOfUnknown'),
'unread' => array('Recent.php''UnreadTopics'),
'unreadreplies' => array('Recent.php''UnreadTopics'),
'verificationcode' => array('Register.php''VerificationCode'),
'viewprofile' => array('Profile.php''ModifyProfile'),
'vote' => array('Poll.php''Vote'),
'viewquery' => array('ViewQuery.php''ViewQuery'),
'viewsmfile' => array('Admin.php''DisplayAdminFile'),
'who' => array('Who.php''Who'),
'.xml' => array('News.php''ShowXmlFeed'),
'xmlhttp' => array('Xml.php''XMLhttpMain'),
);

// Allow modifying $actionArray easily.
call_integration_hook('integrate_actions', array(&$actionArray));

// Get the function and file to include - if it's not there, do the board index.
if (!isset($_REQUEST['action']) || !isset($actionArray[$_REQUEST['action']]))
{
// Catch the action with the theme?
if (!empty($settings['catch_action']))
{
require_once($sourcedir '/Themes.php');
return 'WrapAction';
}

// Fall through to the board index then...
require_once($sourcedir '/BoardIndex.php');
return 'BoardIndex';
}

// Otherwise, it was set - so let's go to that action.
require_once($sourcedir '/' $actionArray[$_REQUEST['action']][0]);
return $actionArray[$_REQUEST['action']][1];
}

?>


The ManageSettings.php file is too large to post so I have cut the snipet of code where the error is being found with a little extra on each side.
./Sources/ManageSettings.php

// Anyone who would like to add a core feature?
call_integration_hook('integrate_core_features', array(&$core_features));

// Are we getting info for the help section.
if ($return_config)
{
$return_data = array();
foreach ($core_features as $id => $data)
$return_data[] = array('switch', isset($data['title']) ? $data['title'] : $txt['core_settings_item_' . $id]);
return $return_data;
}

loadGeneralSettingParameters();

// Are we saving?
if (isset($_POST['save']))


Any help would be greatly appreciated!

Cheers.

jan.van.gent

Quote from: PocketChange on December 19, 2011, 07:14:57 PM
Quote from: T3CHN0 on November 14, 2011, 06:42:17 PM
I don't know if this will help you nor do I remember where I downloaded it from
but I use this one, It's been updated from the one in this thread and works
well on my 2.0.1. you might have to emulate it? I can't remember.
was 2 months ago when I installed it.
Cheers

I installed this updated MOD on my test site, and all went well, working good!  The problem is that when I tried to install on my actual site (which is a mirror), I get an error that says that the Package directory permissions are not writable, which they are!

I read elsewhere, that I needed to add a /temp folder to the Packages directory, which I did.  This got me past the 1st error, but then I get a fatal error as below....

Fatal error: require() [function.require]: Failed opening required '/home/......./public_html/forum/Packages/temp/arcadeinstall/Database.php' (include_path='.:/usr/local/lib/php') in /home/......./public_html/forum/Sources/Packages.php on line 938

I extracted the "arcadeinstall" folder from the zip archive, and uploaded to the /temp directory.  It contained the Database.php as in the error above.

I then tried to install again, and everything seemed to go smooth, and said install successful!  HOWEVER...  Nothing installed, and there are no signs of the MOD files anywhere, but when I look at installed MODs, it shows that it is installed!  I cannot do an uninstall, because there are no files to uninstall, so get Test-Failed for all files....

Any Ideas, Please?

I'm having the exact same problem. Did you found a solution yet?

It works like a charm on my test forum, but i get the error you have on my real site.

Timshel

Where did you guys get the games from?

I just installed the SMF Arcade 2.5 on my 2.0.2 forum but I don't have any game. Besides, I went to smfarcade.net [nofollow] but even there the attached game seemed to disappear...

Help :(

Advertisement: