IB Pro v32 Arcade Game Compatibility for v3 Arcade

Discussion in 'SK vBulletin Modifications' started by sk, Jan 23, 2008.

  1. sk

    sk Moderator

    IB Pro v32 Arcade Game Compatibility for v3 Arcade

    This hack / modification is to add support in v3 Arcade for the many v32 IB Pro games that are out there.
    Note v3 Arcade v1.0.9 and above has built in support for this. Use only on earlier versions.

    OBS! I don't guarantee this work for every v32 game.
    And you should also know that this is simplified solution and it doesn't implement all the so called security features with the v32 games.
    It is pretty much the same security as v3 arcade games though.

    Download the plugin here - iB_Pro_v32_Arcade_Game_Compatibility.zip

    To get full support with an improved 'iB "Pro" Arcade - Mass Game Import' function you also has to edit the arcadeadmin.php file.
    This improvement also copies the gamedata folder in the tar package.
    Note that the empty file v32game.txt is not copied (nor an empty index.html, if there are any).
    This doesn't matter if you use my plugin since that file isn't checked anyway.

    How to do it:
    Download the zip packages above.
    Import the file 'iB Pro v32 Arcade Game Compatibility.xml' as a plugin.
    (Via "Plugin & Products" > "Download / Upload Plugins" > "Import Plugin Definitions XML File" in your Admin CP.)

    Create the folder "arcade" in the forum root.
    Create the folder "gamedata" in the newly created "arcade" folder and CHMOD it to 777.

    Edit the file admincp/arcadeadmin.php
    Warning! Copy the original arcadeadmin.php first, just in case...
    You are doing this at your own risk. This will copy and delete files on your server. Don't blame me if anything goes wrong.

    FIND:
    PHP:
            @unlink($image_path '/' $thisgame['shortname'] . '1.gif'); 
            @
    unlink($image_path '/' $thisgame['shortname'] . '2.gif'); 
            @
    unlink($game_path '/' $thisgame['shortname'] . '.swf'); 
    BELOW IT ADD:
    PHP:
    // Addition for uninstalling IBPro v32 games! 
    // Tries to delete the game folder in arcade/gamedata/  
    // 2007-10-28 /SK
            
    foreach( glob('arcade/gamedata/' $thisgame['shortname'] . '/*.*') as $sk_fn)
            {
                @
    unlink$sk_fn );
            }
            
    rmdir'arcade/gamedata/' $thisgame['shortname'] );
    // End. Addition för uninstalling IBPro v32 games

    FIND:
    PHP:
            if (substr($filenamestrlen($filename)-44) == '.tar'
            { 
                
    $gametar = new tar
                if (
    $gametar->openTAR($vbulletin->GPC['filepath'] . '/' $filename)) 
                {
                   foreach (
    $gametar->files as $key => $val)
                   {
    BELOW IT ADD:
    PHP:
    // Addition for installing IBPro v32 games! 
    // If there is a folder called gamedata in the tar it will copy all files in there to the forumroot/arcade/gamedata folder 
    // 2007-10-28 /SK 
                        
    if( ($startpathpos strpos$val['name'], 'gamedata/')) !== false 
                        {     
                            
    $newpath $real_path '/../../arcade/gamedata'
                            
    $startpathpos += 9;
                            while( (
    $endpathpos strpos$val['name'], '/'$startpathpos )) != )
                            {
                                
    $newpath .= '/' substr$val['name'], $startpathpos$endpathpos $startpathpos );
                                @
    mkdir($newpath 0777);
     
                                
    $startpathpos $endpathpos 1;
                            }
     
                            
    $newfile $newpath '/' substr$val['name'], $startpathpos );
     
                            if (
    $handle fopen($newfile"wb") )
                            {
                                
    fputs($handle$val['file'], strlen($val['file']));
                                
    fclose($handle);
                            }
                        }
    // End. Addition för installing IBPro v32 games
    Done!

    /SK
     
    Last edited: May 2, 2009
  2. pepel13

    pepel13 New Member

    First, I would like to Thanks you for this modification. Greatly appreciated

    Though, i've got a problem with it. When i try to install a game (Destination Earth) who has a gamedata in it, it gaves me this error:

    (Mysite)/arcade/gamedata/dearthsm/Thumbs.db) [function.fopen]: failed to open stream: No such file or directory in /admincp/arcadeadmin.php on line 797

    fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid is 4441 is not allowed to access....(My site)... owned by uid 2001 in /admincp/arcadeadmin.php on line 797

    and that , 4 times, the numbers of files that need to go in the gamedata folder.

    ... Hope you'll find what my problem is.. I already chmod all folders ,arcade folder and arcade/gamedata to 0777.. but that didn't resolve it
     
    Last edited by a moderator: Jul 3, 2008
  3. sk

    sk Moderator

    I think that is a PHP settings problem.
    In php.init there is a setting called safe_mode that needs to be set to off.

    /SK
     
  4. pepel13

    pepel13 New Member

    Hi Sk,

    Could you tell me where I can find php.init please

    Thanks.
     
    Last edited by a moderator: Jul 3, 2008
  5. sk

    sk Moderator

    php.init is a server setting. So you must have access to your server if want to change it.

    Easiest way to see the path to php.init (and to see if safe_mode is actually on).
    In your vBulletin admincp, select Maintenance -> View PHP info
    There you will see all the settings.

    If you don't have access to the server you will need to ask your host to turn it off.
    I am afraid I don't have any other solution anyway.

    /SK
     
  6. pepel13

    pepel13 New Member

    Thanks a lot Sk.

    It says that safe_mode is On and I don't think I have access to the server. I'm going to ask the host if they could turn it off. (cross fingers)

    Thanks again Sk for your help !
     
  7. kimrur

    kimrur New Member

    :yes: Thanks worked good
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice