How to Bridge work with Smf arcade (maybe other mods) and sef urls

Started by niko, December 11, 2005, 10:32:41 AM

Previous topic - Next topic

cferd

Check that all your games belong to a category. If you see an empty () next to a game, that's an unnamed category and probably giving you the 'unedfined index: 1' error

Aravot

Do you have a link and test account.

I have the same setup as you except 'Arcade 1.3.0 beta' and it's working OK.

perplexed

Quote from: cferd on March 16, 2006, 05:21:06 PM
Check that all your games belong to a category. If you see an empty () next to a game, that's an unnamed category and probably giving you the 'unedfined index: 1' error


ok done that, all games have a category.  Still cant see the games though :(  Tried uninstalling and reinstalling the games, still cant see them, just an empty square where they *should be.



Quote from: aravotDo you have a link and test account.

I have the same setup as you except 'Arcade 1.3.0 beta' and it's working OK.

I have the site in maintenance mode just now  as I dont want members to log in and they keep trying.  So I dont really want to open it up just yet, is there another way you can help me?  IM maybe?

smf1.1 rc2 default theme
joomla 1.0.7 planetfall template
arcade 1.2.4b
smf.php edited with orstio's code
joomla index.php edited with the arcade code on previous page
sef published or unpublished (makes no difference)
forum wrapped or unwrapped (makes no difference)
I can edit games, upload games, delete games, search games BUT not play them

I'm a little confused by the code that goes in the smf.php which says something like 'download swf' I wondered if it should be 'play swf' as that seems to be what it wants to do?  If I click on 'play' next to a game, then I get http://mysite.com/index.php?option=com_smf&Itemid=46&action=arcade;sa=play;game=9 but where in the code does it instruct it to 'play'? and an empty box - colour varies between games - black box, white box, grey box lol

Maybe that's nothing, like I said, I dont know anything about coding, but this is driving me nuts

I also dont know why I have an index.php and an index2.php in joomla ???



Aravot

First let's make sure there is no firewall or something blocking .swf files at your end, go to my Site and see if you can play and submit games use test/test

perplexed

Quote from: Aravot on March 16, 2006, 06:03:08 PM
First let's make sure there is no firewall or something blocking .swf files at your end, go to my Site and see if you can play and submit games use test/test

yep no problems, I played pool on your site no probs. I can play games on other sites including smfarcade etc, and my testforum - which is not connected to joomla.  I can play on firefox and IE with no probs, everythings loads, works etc

Aravot

This is what I have done, nothing more no other code changes http://www.simplemachines.org/community/index.php?topic=49229.msg420986#msg420986 if you want PM me admin info and I'll have a look.

perplexed

Quote from: Aravot on March 16, 2006, 06:59:57 PM
This is what I have done, nothing more no other code changes http://www.simplemachines.org/community/index.php?topic=49229.msg420986#msg420986 if you want PM me admin info and I'll have a look.

I copied your code from above and replaced my index.php, no change, still doesnt work.  :(

So just to clarify:

you didnt put Orstio's codes in the smf.php?

Are there any added codes in any of the smfarcade files?

you have the SEF mambot switched to 'not published'?  you dont have to uninstall it do you?

do you know what index2.php does in joomla? since I have index.php and index2.php I thought maybe I should put the code there?

Aravot

Quote from: perplexed on March 16, 2006, 07:18:01 PM
I copied your code from above and replaced my index.php, no change, still doesnt work.  :(
Just to make sure the code has to go in Joomla/index.php

QuoteSo just to clarify:

you didnt put Orstio's codes in the smf.php?
No

QuoteAre there any added codes in any of the smfarcade files?
No

Quoteyou have the SEF mambot switched to 'not published'?  you dont have to uninstall it do you?
Correct, not published. Don't uninstall it.

Quotedo you know what index2.php does in joomla? since I have index.php and index2.php I thought maybe I should put the code there?
index2.php is for Joomla backend it should remain untouch.


cferd

QuoteI can play games on other sites including smfarcade etc, and my testforum - which is not connected to joomla.
So it appears to be J' related. You may want to check the .htaccess file to make sure you didn't leave something in it if SEF is off.


perplexed

Quote from: Aravot on March 16, 2006, 07:29:50 PM
Quote from: perplexed on March 16, 2006, 07:18:01 PM
I copied your code from above and replaced my index.php, no change, still doesnt work.  :(
Just to make sure the code has to go in Joomla/index.php

QuoteSo just to clarify:

you didnt put Orstio's codes in the smf.php?
No

QuoteAre there any added codes in any of the smfarcade files?
No

Quoteyou have the SEF mambot switched to 'not published'?  you dont have to uninstall it do you?
Correct, not published. Don't uninstall it.

Quotedo you know what index2.php does in joomla? since I have index.php and index2.php I thought maybe I should put the code there?
index2.php is for Joomla backend it should remain untouch.

ok I have made all those changes and it still doesnt load the games

I wonder if it would be possible for you to post your /sources/arcade.php file or check what is on line 1477, as that is the error I keep getting in my log:

When I click on a game to play it, here is the url that is displayed:

http://mysite.com/index.php?option=com_smf&Itemid=46&action=arcade;sa=play;game=18

forum error messages every time I try to play:

http://www.mysite.com/forum/index.php?action=arcade;sa=download;file=swf
8: Undefined index: arcade_info
File: /home/mysite/public_html/forum/Sources/Arcade.php
Line: 1477
   

I *think* line 1477 is the one marked in red:

Quote
}
   elseif($action == 'download')
   {

      if(!isset($_GET['file']))
      {
         die();
      }
      elseif($_GET['file'] == 'swf')
      {


         $info = $_SESSION['arcade_info']['game'];        

if(isset($info['game']))
         {

            $game = get_game_info($info['game']);

            redirectexit($modSettings['arcade_games_url']."/".$game['file']);

         }


that seems to be where the problem lies



perplexed

Quote from: cferd on March 16, 2006, 08:26:30 PM
QuoteI can play games on other sites including smfarcade etc, and my testforum - which is not connected to joomla.
So it appears to be J' related. You may want to check the .htaccess file to make sure you didn't leave something in it if SEF is off.

can you give me more explanation of what you mean?  sorry Im a novice with these things

Bigguy

Thanks to this I can finally open the arcade I think. For some reason when you submit scores it takes me to joomla, what did I forget this time, lol.

Quote from: Orstio on January 28, 2006, 01:31:09 PM
Alright, in your components/com_smf folder should be a file named smf.php.  Can you edit it?

Find this:

// Don't forget attachments
$buffer = str_replace($myurl . 'action=dlattach', $boardurl . '/' . basename($_SERVER['PHP_SELF']) . '?action=dlattach', $buffer);


and add this immediately after:

$buffer = str_replace($myurl . 'action=arcade;sa=download;file=swf', $boardurl . '/' . basename($_SERVER['PHP_SELF']) . '?action=arcade;sa=download;file=swf', $buffer);


dg

Quote from: Orstio on January 28, 2006, 01:31:09 PM
Alright, in your components/com_smf folder should be a file named smf.php.  Can you edit it?

Find this:

// Don't forget attachments
$buffer = str_replace($myurl . 'action=dlattach', $boardurl . '/' . basename($_SERVER['PHP_SELF']) . '?action=dlattach', $buffer);


and add this immediately after:

$buffer = str_replace($myurl . 'action=arcade;sa=download;file=swf', $boardurl . '/' . basename($_SERVER['PHP_SELF']) . '?action=arcade;sa=download;file=swf', $buffer);

I jsut wanted to say that this works great, and has helped alleviate some stress.

SMF 1.1 RC2
Arcade 1.2.4b
Joomla 1.0.8

Bigguy


Advertisement: