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

lurkalot

Quote from: -Sas- on April 05, 2016, 03:00:57 PM
No problem.... It isn't working now, so there's no use of our games and stuf this way hihi  ;D. I will make a double back up from my database first :P

You're welcome. :)

Grammy

#5101
256 pages and I can't find a search result within this topic for "increase filesize"! 

I have 2.5 RC3 in 2.0.11 default and I see that the maximum total filesize for game uploads is 8 MB.  I have a game that is just over that so, of course, it doesn't upload.  I guess I could unpack it and manually install it but I really don't like to bypass package managers, installers, uploaders, etc., unless it's a last resort.  Is there anywhere in the arcade files that I could increase the upload filesize limit?  I can locate things like "post_max_size" and "arcade_upload" in the files, but I can't see the actual limits. 

I would like to change it from 8 MB to 10 MB.

Thanks!  :)


EDIT:  I'm getting 2 errors for this block of code in the ManageGames.php file:

function ManageGamesUpload2()
{
global $scripturl, $txt, $modSettings, $context, $sourcedir, $smcFunc;

foreach ($_FILES['attachment']['tmp_name'] as $n => $dummy)
{
if ($_FILES['attachment']['name'][$n] == '')
continue;


Error 1:  2: Invalid argument supplied for foreach()
Error 2:  8: Undefined index: attachment


But all games have uploaded well until I realized this one is bigger than 8 MB.  Then the error appeared.   ???

Shambles

Quote from: Grammy
... I can't see the actual limits. 

I would like to change it from 8 MB to 10 MB.

The value 8M is being retrieved from your php.ini file (see function ini_get() in the code just above the snippet you posted).

Either change the php.ini file (not recommended) or amend the code in ManageGames.php as follows:

Code (Find) Select
function ManageGamesUpload()
{
global $scripturl, $txt, $modSettings, $context, $sourcedir, $smcFunc;

if (!is_writable($modSettings['gamesDirectory']) && !chmod($modSettings['gamesDirectory'], 0777))
fatal_lang_error('arcade_not_writable', false, array($modSettings['gamesDirectory']));

$context['post_max_size'] = return_bytes(ini_get('post_max_size')) / 1048576;

// Template
$context['sub_template'] = 'manage_games_upload';
}


Code (Replace) Select
function ManageGamesUpload()
{
global $scripturl, $txt, $modSettings, $context, $sourcedir, $smcFunc;

if (!is_writable($modSettings['gamesDirectory']) && !chmod($modSettings['gamesDirectory'], 0777))
fatal_lang_error('arcade_not_writable', false, array($modSettings['gamesDirectory']));

$context['post_max_size'] = return_bytes('2048M') / 1048576;

// Template
$context['sub_template'] = 'manage_games_upload';
}

Grammy

Oh that's perfect, Shambles; thanks so much!    :)

andy12gr

I have a site with arcade games with SMF 1.1.20 but all games i cant play from smartphone. Why?
http://hellenicwave.net

d3vcho

Maybe because the games aren't compatible with smartphones.
"Greeting Death as an old friend, they departed this life as equals"

Kindred

most of the games are flash games....   most smart phones don't support flash (and apple devices never will)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vbgamer45

Yes, and flash is starting to get phased out in browsers too. Was thinking about having an HTML5 based arcade. A little more complicated as html5 games have a lot of support files and would require modifications to the games to track highscores and prevent cheating
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

andy12gr

Thanks to all.
Is easy to change the code to play in smartphone?

Arantor

No, since every game has to be rewritten from scratch.

andy12gr


Grammy

Quote from: andy12gr on August 21, 2016, 11:48:36 AM
I have a site with arcade games with SMF 1.1.20 but all games i cant play from smartphone. Why?
http://hellenicwave.net

I'm able to play the arcade's flash games on my iPad and iPhone using the Photon browser.   :)

Arantor

Given that Flash is being phased out of desktop browsers soon, now is the time to start replacing everything with HTML5.

Biology Forums

Does that mean the games are created using html 5? If so, is there a way to convert flash files to html5?

Arantor

No, it means they will need to be rewritten from scratch.

There have been many attempts at a Flash converter over the years but none of them were ever reliable.

Thing is, this has been on the cards since Steve Jobs' letter on why Flash was banned on iDevices.

andy12gr

I test the Photon browser but i take a message as i must enable the javascript?

Grammy

Quote from: andy12gr on August 23, 2016, 10:58:55 PM
I test the Photon browser but i take a message as i must enable the javascript?


When you open the Photon browser to a site, there a little icon in the top right that looks like a lightning bolt.  You have to click that in order for your flash to load. 

If it works for you, enjoy it while you can.  Looks like we'll have to either let our arcade go or hope for new compatible HTML5 games.  As I'm no game coder, that's all I can do... wait.   :-\

Encouraged to see vbgamer45 mention his thoughts concerning an HTML5 arcade.  Maybe that will lead to a nice solution.   :)

jersnet

Cannot install anyone to help me

d3vcho

What error do you receive?
"Greeting Death as an old friend, they departed this life as equals"

dstaker

Can someone please tell me, will this work for my forum 2.0.14 ?

Advertisement: