News:

Wondering if this will always be free?  See why free is better.

Main Menu

SMF Arcade

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

Previous topic - Next topic

Steve

Thanks. Your first option sounds best. Appreciate it.
Please do not PM me for support.

Steve

Just wanted to let you know I used your first option and it worked like a charm. Thanks!  ;D
Please do not PM me for support.

Chen Zhen

I'm glad it worked.
Another option for people might be to use .htaccess to adjust those values I previously posted.

I was thinking of attempting to compress/minify all the arcade files for the next stable release but I'm being asked to add quite a bit more to the mod so I doubt it will stop this from happening.
SMF doesn't seem to be designed with a chunk upload nor a resumable upload sub-routine (yet) which would allow for larger files notwithstanding PHP limits.
However the Arcade uses a chunk upload (option) for its game upload/installs since many of the HTML5 games have large file sizes.

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Diego Andrés

Quote from: Chen Zhen on March 25, 2022, 07:38:28 PMI was thinking of attempting to compress/minify all the arcade files for the next stable release but I'm being asked to add quite a bit more to the mod so I doubt it will stop this from happening.

That'd be very good for js and css files that aren't being edited anymore or are unlikely to get new edits.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Grammy

I have a question, please.   :)

I have a fresh install of 2.1.2 and no mods other than I've just installed SMF Arcade 2.6.9.3 (compatible).  I've only installed one game just to test it.  It plays fine and tries to save my score but that's where the issue is.  My forum is mydomain.com/forum but when it's time to save the score, it redirects to mydomain.com?act=Arcade&do=newscore  (so back to the main domain, not to the forum directory).  I've checked and the paths are all correct.  This seems to be the only issue, while kicking the tires on the arcade (that saving the score redirects back to the main domain).  These are the paths/urls and they are pretty much identical to the forum's images, smilies, etc., with the exception of the actual directory name:

URL to games:  https://mydomain.com/forum/Games
Path to games directory:  /services/webpages/f/a/mydomain.com/public/forum/Games
URL to external ruffle zip archive:  https://web-develop.ca/index.php?action=downloads;area=stable_smf_arcade;file=87;download

Could you guys point me in the right direction to sort why saving the score is redirecting outside my forum's directory and to the main domain url?

Thanks!   :)

Chen Zhen


@Grammy:

It's the JavaScript save function in some of the games that doesn't take into account a forum residing in a sub-directory. I've brought up the issue in the past with people that put their save code/function in the IBP HTML5 Arcade games but they didn't seem to understand what I meant by testing for various forum parent/child directory path scenarios.

As a result there are thousands of games that will behave like that.
Your solution is to adjust your server config or add a server config file in the "mydomain.com" path.

For example, if you use apache create a .htaccess file located in the actual server path for "mydomain.com". This will be the parent path of "forum".
.htaccess possible contents:
RewriteEngine on
RewriteCond %{QUERY_STRING} act=Arcade
RewriteCond %{REQUEST_URI} !forum
RewriteRule (.*) https://%{HTTP_HOST}/forum/$1 [NC,L]


My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Grammy

Quote from: Chen Zhen on August 07, 2022, 01:52:29 AMRewriteEngine on
RewriteCond %{QUERY_STRING} act=Arcade
RewriteCond %{REQUEST_URI} !forum
RewriteRule (.*) https://%{HTTP_HOST}/forum/$1 [NC,L]



Thanks so much, Chen Zhen, that sorted it!   :)

Steve

Is that something we should all do?
Please do not PM me for support.

Chen Zhen

@Steve:

No, this is just something for people that have their forum in a sub-directory off of the actual URL.
What people should be doing is have their DNS and nameserver point to a proper destination without the sub-directory.
You can configure your Apache (or whatever HTTP Server software) to use a directory of choosing on your OS but it shouldn't really be used in the URL.
I'll work on something in the JavaScript/HTML5 that attempts to have the window.location.hostname include any sub-directories for the games contained within the canvas but for now this solution will work.

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Steve

Please do not PM me for support.

Chen Zhen


Updated to version 2.6.9.4.
This version includes important bug fixes and changes.
The WebDev download section link is in my signature.
 

My SMF Mods & Plug-Ins

WebDev


"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Steve

Thank you for that. :)
Please do not PM me for support.

Advertisement: