--------------------------------------------------
VArcade 3.0
PHP-Fusion v 7.0 --->
Author: Domi
Some code is re-used from Ausimods, Thank you!
Some code is re-used from Rene, Thank you!
Some code is re-used from Nick Jones, Thank you!
--------------------------------------------------

DESCRIPTION
-----------
A clean & nice Arcade system for your site.

WHATS IN THE BOX?
-----------------

First of all a big thank you to (no particular order) 
Ausimods, Rene, and of course Digitanium (Nick) , KEFF (did i miss anyone?)

Ausimods for enableing the scoreing systems & techniques used to collect scores from games.
We actually support 3 methods, IPB,PHPBB,ARCADE V2.
Rene who have done so many good mods to the Arcade, iam sorry he is no longer active!
So in contribution to Rene who said we could continue his work if we wanted.
We now use the following that is produced by him, altho some have been re-written.
Digitanium for haveing tons of good snipets all over his PHP-Fusion system ready to use! ;)
KEFF for introducing AGPL system to PHP-Fusion.

1 The sound system 
2 The index system 
3 The Personal Favorites system
4 The PM on Hi-score system (altho i think he got the code idea from me? hehe)
5 The kings system.
6 The neat total hi-scores from a player system.

Whats in the VArcade box >>>

 * Supporting 4 scoring methods, IPB, PHPBB2, vbProArcade,IPB v32 
 * Automated tournament system that saves highscores & displays latest tournaments with winners.
 * Automated game size detection for games with new embedding routines.
 * Dynamic zoomability, (users can resize the game window in realtime).
 * Ads/info pre-loader that can be displayed before each game.
 * Users have their own personal favourite system & easy access & manageing from the Arcade index.
 * Users can send neat game tips to friends.
 * Users can report nonfunctional games.
 * Users Comment every game (uses Fusions comment table type (G).
 * Users can click on a Hi-Score holders name in a game to see all existing Hi-scores.
 * Reversed scoreing feature, (Yes, it works!).
 * Hi-scores will be sent as a message to a member when their Hi-score is beaten and a neat sound is played when you take the Hi-score.
 * A new PHP-Fusion style listings when browsing games with options from settings.
 * Fast Ajax search function that will list hits just as they would be shown in category browsing.
 * Games can be turned Off / On when testing and evaluating, they will be found in the Parked area in the admin section.
 * Fusions own group access system can be applied to individual games and/or to whole categories. If a game that is public is listed in a category that have custom group status it will not work either.
 * Administrators have an easy & quick admin access for the games when browsing, which wont re-load page or relocate you when new values is beeing saved.
 * Game size can be shown in the top right corner.
 * Ajax 5 star voting system.
 * Quick jump category selection bar in top right corner.
 * Randomize game function, for people who just can t decide!
 * Allow or disallow guests to play, with nice redirects to make them register or to keep playing anonymous.
 * Allow gamers to either play in popup or embedded mode.
 * User gold support (pay to play).
 * Keep alive function (Players who play will stay online)
 * Almost all user & automated features are optional, everything can be On or Off very easy via the settings page.
 * Games mega center panel
 * Games events panel
 * When upgrading you can run a simple upgrade script if you want to keep records & stats from your old Arcade.

- And much more !!

UPGRADING FROM v2.1
---------
To upgrade go to admin > infusions > varcade > settings click the link below update settings button.
Wanto upgrade your old arcade to VArcade ?, this version only covers upgrade from VArcade 2.1, please download version 2.1 first for earlier upgrades.

USAGE
-----
Admin:
1. Go to Administration > System admin, click the "infusions" icon.
2. Makesure activegames.php & switcher.swf is in your index/news.php folder if you use the center panel and have playing now activated.
3. To add games, simply have them in your varcade/games/upload folder & images in the /thumb folder & name them the same, then use the autoloader, 3 games is with this pack!
4. To edit a game, select, edit and save
5. VArcade will probably work just fine on its own, but you can via the settings section adjust some settings - such as:
use of popups
Auto detection of game size
Tournaments on or off etc.
To switch ad content of preloader look in varcade/google.php.

If you have issues with side bar content overlapping or beeing overlapped or just need smaller sidebar and larger content.
10% / 90% works on high resolutions 20%/80% are for fixed resolutions around 1000px;

open arcade.php
Find :
echo '<div style="width:20%;float:left;">';
And find 
echo '<div style="width:80%;float:left;">';

If you still are not happy just disable the ingame options from your varcade settings section.


UNINSTALLATION
--------------
1. Go to Infusion Management, uninstall "VArcade".
2. Deactivate/delete any used panels.
-----------------------------------------

-=[ 3.0 Changelog ]=-

Added a new costumized pagenav when browsing games.
Added a border and a background color to the game thumbs when browsing.
Added a preloader function for ads, it will detect game size and place as overlay in the middle.
Added a dynamic ingame zoomability, so game sizes is never an issue anymore.
Added a new menu system. It comes in two styles Black / Silver.
Fixed a issue that could cause the side panels to compress while playing a game.
Fixed a Proarcade issue that could cause some games to not score.
Fixed a missing Div issue, thank you GameAction for reporting.
Added a stacking function that replaces the body onload events for the keep alive system that will work with per default and no need to modify fusion core files.
Fixed a bug in search wich still showed no.records even with a short search.
Added some styled message boxes in search.
Fixed a issue where tournaments would also show in index.php even when they are off.
Fixed a style issue where tournaments in index.php would show above opentable and go out of place.
Fixed popup setting, you now have three options,- Yes - No - Selectable (will show icon when browsing games to have them played in a new window) 
Fixed so you now can test submited error reports from admin interface once more.
Added vertical sharethis functions
Made some changes to voteing routines, removed php openenings and endings.
Added a lights on / off function,now users can adjust the size, then hit lights off and the game will be like in popup mode.
Replaced options icons.
Added more share functions from browsing section.
Added v32 scoreing support.
Added a Scrolling off / on function, some games will not focus flashbix in IE so we may need to disable the input from arrows and keys for the browser. This way the game can still be controlled and the site stays still while people play.
Guests are now allowed to view a games score ladder.
The new pagenav are now also active in favourites section.
Removed /Rewritten some fallback(); left overs from V6 version.
You can no longer access hiscore.php with no values
You can no longer access player_hiscore.php with no values
The new pagenav are now also active in player_hiscore section.
Guests.php have got class button to its links
gameover.php have got class button to its links
various subsections now also show the menu selection. (hiscore.php/player_hiscore.php/gameover.php etc)
Fixed a bunch of extra security checks and notices.
ProArcade should now score at all times!
rewritten alot of $ variables to $_GET/$_POST/$_REQUEST so i have now removed the superglobal check script from functions.php, admin remain in "V6 format but V7 working" for now.
In game options got a new tbl2 class with rounded header. it inherits tbl2 from your theme but rounds the top.
Converted all ".$db_prefix."varcade_games to V7 standard with pre-defined tables (".VA_GAMES." etc)
Fixed a rpc.php seek 0 rows bug.
converted all isNum to isnum
Removed the background color that was added earlier, changed tbl2>tbl made the border 1px.
Added double checks in game admin for usergold to avoid notices.
Fixed a bunch of notices in admin sections
When you autoload games you also get to set a default cost for games incase you later on wish to have a pay to play system.
Added a redirection to the Pick a new tournament selection so you instantly can see the new tournament that was selected.
Added a bunch of new locale, you can find it under v3.0 in locale files.
Added a bunch of new settings, go to admin > infusions > varcade > settings.
Added a upgrade script from 2.1 , if you need to update from earlier versions, download and install v 2.1 first and follow them instructions.
To upgrade go to admin > infusions > varcade > settings click the link below update settings button.


Complete rewrite of index.php makeing it W3C valid aswell as optimized.
varcade/index.php is now W3C valid.
varcade_center_panel is now W3C valid.
varcade_events_panel is now W3C valid. 
varcade_best_panel is now W3C valid.
varcade/arcade.php is now W3C valid.
Change log 2.1 :

VArcade is currently beeing tested hard so naturaly it can result in some holes and they get reported when found.
Fixed a XXS issue reported by Nepster , Thank you!
Fixed a voteing/reset injection issue reported by ignas2526, Thank you!


Change log 2.0 :
Changed a alignment in index wich could cause it to stretch out of screen sometimes. (Thank you MrX2003)
Fixed an issue with comments (Thank you SiteMaster)
Added a nice litle mod that was provided from SiteMaster that forces users to post a small description of the error when they report bad games, Thank you.
Fixed a security issue reported by DJ Szabcsa , Thank you!
Fixed a XXS issue reported by Nepster , Thank you!
Fixed a voteing/reset injection issue reported by ignas2526, Thank you!

Change log 1.9 :
Fixed/hidden some notices, fixed some general issues in scoreing and with $gets in gameover.
Added the new UG3 support provided by startglowone.
Added security checks, thank you to slaughter.
Fixed some voteing security checks, added so noone can vote above 5 or less than 1 , added a double check to IPs so sent IP matches the actual IP used, thank you to you that tried to hack it ofc with little success since it was no real security hole, just a way to vote bigger or smaller numbers anonymous.
updated provided locales, ty everyone !

Change log 1.8 :
Fixed some notices, fixed some general issues in scoreing and with $gets in gameover.
Added the new UG3 support provided by startglowone.
Reduced the rating system to a smaller size to match 1024 fixed resulution themes.
Updated provided locales, ty everyone !


Change log 1.7 :
Added a add to favourite option to game options in gameover.
Added native UG2 / UG3 support (Thank you Starglowone)
Fixed a potentional issue with div based themes and relatedbar in Firefox.
Fixed so PMs wont be sent if you take the first hi-score, earlier they where sent to user 0 as a beated hi-score, thank you aulophobia.
Pimped the centerpage, new layout and a neat youtube style flash showing active games.

Change log 1.6 :
Added express installation of flash feature to auto upgrade flash to 9 series, requires flash > 6 to work.
Added a url & Download Flash Player link if you dont have flash version over 6 or at all. 
Fixed the issue where no subjects would be sent in Tournament PMs. (thank you wolfcore)
Fixed a issue where gold system & ratings on together would move stars way right. (thank you poet)
Added a score cleaning procedure, we dont need to save scores that dont make top 25 list. (If you currently have big individual score entrys they will slowly be cleaned for every new score submitted until they are down to 25 top scores, we only delete 1 score (lowest or highest depending on reversed or not) each time a score is submitted thats is above 25 count).
Added the BoxOver script to VArcade center panel, displaying Title, icon & Hi-score holder.
Added path to banner instead of useing sitebanner, primarly for the tip a friend system (thank you dusk).
Added a extra tracking feature for what game is beeing played and what type of users is playing (guests/members) it can have some nice future possibilites like gamers online etc, works pretty much like fusions online users system,except this is ajax driven & will keep users & games alive aslong as they are playing without reloading page , wich btw took me quite a while to get the function to work so enjoy it!
2 new tables was required. 
Added locales under 
//Settings
//misc
Fixed so all VArcade related scores,comments & ratings is deleted on game deletion. (thank you wolfcore)
Added an image error check for centerpage / listings / related, /img/arcade.gif is now default image if no image is found.
Changed some http_post_vars / get_vars to _post / _get. (thank you slaughter)
Added some various scoreing security.
Fixed an issue where some games would take a nasty orange backgound color (thank you aulophobia)
Reversed scoreing is now working properly.
Guests can nolonger try to score in tournaments, even tho the score cleaning procedure took care of that.
Parked games will not be counted in main index anymore (thank you dusk).
Parked & Error tagged games will now start in popup mode when test is initated by admin.
Add German locales (Thank you slaughter)


Change log 1.5 :
We will nolonger count parked games in the totals.
Fixed the play again button.
Games that was picked for Tournament will no longer be locked in Tournament mode when tournaments is turned off.
Fixed some lose locales
Added a instant click create points table if turned on & required tables dont exist. (translators check //settings)
Changed layout so comments / tip a friend / ratings now can be turned off individualy ingames , made a side panel wich is optional.
Added related games bar, (will random 5 games from current category), optional
Added 
$locale['VARC324'] ="There is no parked or lose games to be found";
Under //parked above 325.
re added localization to error section in score files, i some how lost it.
Added
$locale['VARC324'] ="There is no parked or lose games to be found";
$locale['VARC162'] = "Related games";
Added some more locales to //settings.
Fixed a locale mixup issue in admin/errors, (remove error tag was listed twice where one should be delete the game).


Change log 1.4 :

Fixed a quick edit problem where the numbers would be set to blank instead of 0s wich screwed auto detection override.
Fixed the issues where sides would include even in popup mode from clicking name or score in games.
Fixed so guest play settings dosent only apply in popup mode!
Changed the way favourites read its content vs game table so titels wont mather.
Fixed the arcade_center_panel centering problem with Firefox. (Thank you Matonor).
Including the events panel
Fixed so the gameover.php links properly when in popup mode.
Fixed player_hiscore pageination will work properly when in popup mode.
Added support for user gold, if Gold system is on & guests is allowed to play, the games will work anyway for the guests.
Added Onlinestatus function, (will keep players online when they play games) (optional).
Added Rateings, comments, tip a friend options from ingame, this will only work if all 3 of these is activated due to layout.
Fixed access issues with random.php, it now actually look for access & game status.
Fixed a redirect of users when they try to access a game they do not have access to so they know what happens,
Added a autodetection of members_bewerb infusion to this where they can apply to your user groups.
If the infusion dont exist we simply link to the standard contact form.
Added a nice Admin icon, make sure you copy it to the administration/images.
Added top rated games section to center panel
Added Dutch locale (Thank you dusk)


Change log 1.3

Updated missing locales (Thank you helmuth)
Changed the path back to uploads/, point taken, (Thank you Starglowone).
(Dont worry just copy all files rename "games" folder to "uploads" and youre done).
Fixed so users will play in popup mode if option is on when Hi-score beated PM is sent.
Fixed so scores beated in tournaments also cleared lower scores & send PM properly.
Fixed the issue where no guest play option enabled also would kick out members.
Added Italan language, (Thank you GameAction, Ps check //MISC)

Change log 1.2

Notices for Tournament locales fixed.
Fixed special char problems with certain servers in the search.
Fixed a locale issue in admin where hi-score date was listed twice.
Fixed the path issue with Tournament center panel.
Added Danish locale, (thank you helmuth).
Added a quick game search function in administration.


Change log 1.1
Its now possible to set individual width & height on games even with automatic size detection on, because some games are just to small or simply to big.

For it to work we need to run this in a costume page, 
(only do this if you run automatic detetion).
[code]
<?php
$result = dbquery("UPDATE ".$db_prefix."varcade_games SET width='0'"); 
$result = dbquery("UPDATE ".$db_prefix."varcade_games SET height='0'");
?>
[/code]
Once this is run, everything with a value will be read so individual games can get its own values. (
Fixed a admin bug where lastplayed & hiscore would reset on edit saves.




