Thread: Add-On Releases - v3 Arcade - Games Arcade System for 3.6.0
View Single Post
  #2808  
Old 01-20-2008, 04:42 PM
skhms's Avatar
skhms skhms is offline
 
Join Date: Oct 2006
Location: Sweden
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Regarding v3 Arcade not supporting IBPro's v32 games...

Here is a plugin I did to add such support. See the attached file.

If you want a 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:
Import the attached 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!

OBS! I don't guarantee this work for every v32 game, I don't guarantee it will work at all actually.
But it is being used and seems to work... I just don't guarantee anything

/SK
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01346 seconds
  • Memory Usage 1,819KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete