bestbuildpc: Forums
 

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Converting Arcade Games module
 
 
Post new topic   Reply to topic    bestbuildpc Forum Index -> RavenNuke -> Modules
View previous topic :: View next topic  
Author Message
bestbuildpc
Site Admin
Site Admin


Joined: Jun 30, 2012
Posts: 213
Location: NL

PostPosted: Tue Oct 01, 2013 1:34    Post subject: Converting Arcade Games module Reply with quote

I decided to convert an old version module from Nuken which is still running properly on my website and it is validated 100% as well. I am gonna convert it for a better performance and fast loading to work on RavenNuke 2.5. I think the way it should be with all modules.

OLD MODULE

Code:
<?php

/************************************************************************/
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if(!defined('MODULE_FILE')) {
  header('Location: ../../index.php');
  die();
}

//comment out define('INDEX_FILE', true); if you dont want right blocks
define('INDEX_FILE', true);
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
{
OpenTable();
echo "<center>";
echo "<br />Free Games<br /><br />";
echo "<a href=\"modules/$module_name/flash/adrenoid.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Adrenoid\" src=\"modules/$module_name/images/adrenoid.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/8ball.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"8Ball\" src=\"modules/$module_name/images/8ball.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/asteroids.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Asteroids\" src=\"modules/$module_name/images/asteroids.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/gulliup.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Gulliup\" src=\"modules/$module_name/images/gulliup.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/gapssolitaire.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Gapssolitaire\" src=\"modules/$module_name/images/gapssolitaire.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/pacmanadv.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Pacmanadv\" src=\"modules/$module_name/images/pccman.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/twinsdeluxe.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Twinsdeluxe\" src=\"modules/$module_name/images/twinsdeluxe.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/junglefruits.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Junglefruits\" src=\"modules/$module_name/images/junglefruits.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/robochess.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Robochess\" src=\"modules/$module_name/images/robochess.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/oceanbubble.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Oceanbubble\" src=\"modules/$module_name/images/oceanbubble.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/pipelineremixed.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Pipelineremixed\" src=\"modules/$module_name/images/pipelineremixed.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/lineup.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Lineup\" src=\"modules/$module_name/images/lineup.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/abbyssdefence.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Abbyssdefence\" src=\"modules/$module_name/images/abbyssdefence.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/swuffle.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Swuffle\" src=\"modules/$module_name/images/swuffle.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/junglerumble.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Junglerumble\" src=\"modules/$module_name/images/junglerumble.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/flyingegg.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Flyingegg\" src=\"modules/$module_name/images/flyingegg.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/cubicon.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Cubicon\" src=\"modules/$module_name/images/cubicon.gif\" /></a>\n";
echo "<a href=\"modules/$module_name/flash/brainmachine.swf\" onclick=\"window.open (this.href, 'child', 'height=500,width=600'); return false\"><img alt=\"Brainmachine\" src=\"modules/$module_name/images/brainmachine.gif\" /></a>\n";
echo "</center>";
CloseTable();
}
include("footer.php");


NEW MODULE CONVERTED

Code:
<?php

/************************************************************************/
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
if (!defined('MODULE_FILE')) die('You can\'t access this file directly...');
if (!defined('PHP_EOL')) define('PHP_EOL', strtoupper(substr(PHP_OS,0,3) == 'WIN') ? "\r\n" : "\n");
$index = 0;
if (!defined('INDEX_FILE')) define('INDEX_FILE', true); // Set to FALSE to hide right blocks
if (defined('INDEX_FILE') AND INDEX_FILE === true) {
   // auto set right blocks for pre patch 3.1 compatibility
   $index = 1;
}

require_once 'mainfile.php';
$module_name = basename(dirname(__FILE__));
include_once 'header.php';
{
OpenTable();
echo '<center>' , PHP_EOL
   , '<br />Free Games<br /><br />' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/adrenoid.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Adrenoid" src="modules/' , $module_name , '/images/adrenoid.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/8ball.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="8Ball" src="modules/' , $module_name , '/images/8ball.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/asteroids.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Asteroids" src="modules/' , $module_name , '/images/asteroids.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/gulliup.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Gulliup" src="modules/' , $module_name , '/images/gulliup.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/gapssolitaire.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Gapssolitaire" src="modules/' , $module_name , '/images/gapssolitaire.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/pacmanadv.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Pacmanadv" src="modules/' , $module_name , '/images/pccman.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/twinsdeluxe.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Twinsdeluxe" src="modules/' , $module_name , '/images/twinsdeluxe.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/junglefruits.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Junglefruits" src="modules/' , $module_name , '/images/junglefruits.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/robochess.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Robochess" src="modules/' , $module_name , '/images/robochess.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/oceanbubble.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Oceanbubble" src="modules/' , $module_name , '/images/oceanbubble.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/pipelineremixed.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Pipelineremixed" src="modules/' , $module_name , '/images/pipelineremixed.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/lineup.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Lineup" src="modules/' , $module_name , '/images/lineup.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/abbyssdefence.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Abbyssdefence" src="modules/' , $module_name , '/images/abbyssdefence.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/swuffle.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Swuffle" src="modules/' , $module_name , '/images/swuffle.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/junglerumble.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Junglerumble" src="modules/' , $module_name , '/images/junglerumble.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/flyingegg.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Flyingegg" src="modules/' , $module_name , '/images/flyingegg.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/cubicon.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Cubicon" src="modules/' , $module_name , '/images/cubicon.gif" /></a>' , PHP_EOL
   , '<a href="modules/' , $module_name , '/flash/brainmachine.swf" onclick="window.open (this.href, child, height=500,width=600); return false"><img alt="Brainmachine" src="modules/' , $module_name , '/images/brainmachine.gif" /></a>' , PHP_EOL
   , '</center>' , PHP_EOL;
CloseTable();
}
include_once 'footer.php';
  
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic    bestbuildpc Forum Index -> RavenNuke -> Modules All times are GMT + 2 Hours
 
 Page 1 of 1

 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001-2008 phpBB Group
 
Forums ©