Mot nya höjderSK Home-made Software
 

Go Back   SK Home-made Software > SK Home-made Software > SK vBulletin Modifications > Discontinued Modifications

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old January 23rd, 2008, 23:14
sk's Avatar
sk sk is offline
Super Moderator
Space Invaders Champion, The Donnas Puzzle Champion, Snakeman Steve Champion, Parachute Panic Champion, Triangles Champion, Space Snake Champion
 
Join Date: May 2005
Location: Uppsala, Sweden
Posts: 75
Default IB Pro v32 Arcade Game Compatibility for v3 Arcade

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 Code:
        @unlink($image_path '/' $thisgame['shortname'] . '1.gif'); 
        @
unlink($image_path '/' $thisgame['shortname'] . '2.gif'); 
        @
unlink($game_path '/' $thisgame['shortname'] . '.swf'); 
BELOW IT ADD:
PHP Code:
// 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 Code:
        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 Code:
// 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
__________________
Mot nya höjder

Last edited by sk; May 2nd, 2009 at 20:55.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:14.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

All the programs found on these pages comes without any warranty or support, and you are using them at your own risk.
But if you have problems, questions or any comments about it, feel free to send me an email - sk@sk-software.com
Copyright 1999-2010, Sören Klasson