############################################################## 
## MOD Title: Sudoku
## 
## MOD Author: majorflam < majorflam@majormod.com > (Garry Hughes) http://www.majormod.com
## 
## MOD Description: This is a version of the popular numbers puzzle for your phpbb forum. 
##                  Each user plays their own grids, and a points system is involved. 
##                  Users gain more points if they make less mistakes. 
##                  A leaderboard is kept, showing who is the best at the puzzle.
## 
## Traduction: reef_01 < piratesdelcaribe@gmail.com > ( reef ) http://www.piratesdelcaribe.com.ar/foro/portal.php 
##  
## MOD Version: 1.0.6
## 
## Installation Level: Easy
## 
## Installation Time: 10 Minutes
##       
## Files To Edit:  includes/constants.php 
##                 includes/page_header.php
##                 language/lang_english/lang_main.php
##                 templates/subSilver/overall_header.tpl
##                 templates/subSilver/subSilver.cfg
##                 viewonline.php
## 
## Included Files: includes/functions_sudoku.php
##			 images/sudoku.gif
##                 language/lang_english/lang_sudoku.php
##		   	 templates/subSilver/images/lang_english/1_given.gif
##		   	 templates/subSilver/images/lang_english/2_given.gif
##		   	 templates/subSilver/images/lang_english/3_given.gif
##		   	 templates/subSilver/images/lang_english/4_given.gif
##		   	 templates/subSilver/images/lang_english/5_given.gif
##		   	 templates/subSilver/images/lang_english/6_given.gif
##		   	 templates/subSilver/images/lang_english/7_given.gif
##		   	 templates/subSilver/images/lang_english/8_given.gif
##		   	 templates/subSilver/images/lang_english/9_given.gif
##			 templates/subSilver/images/lang_english/1_ran.gif
##		   	 templates/subSilver/images/lang_english/2_ran.gif
##		   	 templates/subSilver/images/lang_english/3_ran.gif
##		   	 templates/subSilver/images/lang_english/4_ran.gif
##		   	 templates/subSilver/images/lang_english/5_ran.gif
##		   	 templates/subSilver/images/lang_english/6_ran.gif
##		   	 templates/subSilver/images/lang_english/7_ran.gif
##		   	 templates/subSilver/images/lang_english/8_ran.gif
##		   	 templates/subSilver/images/lang_english/9_ran.gif
##		   	 templates/subSilver/images/lang_english/11_given.gif
##		   	 templates/subSilver/images/lang_english/12_given.gif
##		   	 templates/subSilver/images/lang_english/13_given.gif
##		   	 templates/subSilver/images/lang_english/14_given.gif
##		   	 templates/subSilver/images/lang_english/15_given.gif
##		   	 templates/subSilver/images/lang_english/16_given.gif
##		   	 templates/subSilver/images/lang_english/17_given.gif
##		   	 templates/subSilver/images/lang_english/18_given.gif
##		   	 templates/subSilver/images/lang_english/19_given.gif
##		   	 templates/subSilver/images/lang_english/sudoku_blank.gif
##		   	 templates/subSilver/sudoku.tpl
##     	    	 sudoku.php
##      	   	 db_update.php
## 
############################################################## 
## For Security Purposes, Please Check: http://www.majormod.com/viewtopic.php?t=170 for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum.
############################################################## 
## Author Notes: 
## 
############################################################## 
## MOD History:
##	version 1.0.6: Tested on phpbb 2.0.19
##	version 1.0.6: Compatibilty with multiple solution Sudoku's added
##	version 1.0.5: Free version now feature frozen - a premium version will follow, which will incur a small cost
##	version 1.0.5: Admin can now reset the game
##	version 1.0.4: Players can now "buy" a number if they are stuck in the game
##	version 1.0.4: Added Admin Tools - Resynchronisation of user stats
##	version 1.0.4: Added online stats for game players
##	version 1.0.3: Game count bug resolved
##	version 1.0.3: Game Pack bug resolved
##	version 1.0.3: Stats system re-written to ease load on Database.
##	version 1.0.2: Javascript number selection added ( Javascript by DTTBV - mechakoopa@gmail.com )
##	version 1.0.2: Leaderboard now displaying properly.
##	version 1.0.1: Tested on phpbb 2.0.18  
##    Version 1.0.0: Initial Release 
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ COPY ]------------------------------------------ 
# 

	root/includes/functions_sudoku.php
	root/images/sudoku.gif
	root/language/lang_english/lang_sudoku.php
	root/templates/subSilver/images/lang_english/1_given.gif
	root/templates/subSilver/images/lang_english/2_given.gif
	root/templates/subSilver/images/lang_english/3_given.gif
	root/templates/subSilver/images/lang_english/4_given.gif
	root/templates/subSilver/images/lang_english/5_given.gif
	root/templates/subSilver/images/lang_english/6_given.gif
	root/templates/subSilver/images/lang_english/7_given.gif
	root/templates/subSilver/images/lang_english/8_given.gif
	root/templates/subSilver/images/lang_english/9_given.gif
	root/templates/subSilver/images/lang_english/1_ran.gif
	root/templates/subSilver/images/lang_english/2_ran.gif
	root/templates/subSilver/images/lang_english/3_ran.gif
	root/templates/subSilver/images/lang_english/4_ran.gif
	root/templates/subSilver/images/lang_english/5_ran.gif
	root/templates/subSilver/images/lang_english/6_ran.gif
	root/templates/subSilver/images/lang_english/7_ran.gif
	root/templates/subSilver/images/lang_english/8_ran.gif
	root/templates/subSilver/images/lang_english/9_ran.gif
	root/templates/subSilver/images/lang_english/11_given.gif
	root/templates/subSilver/images/lang_english/12_given.gif
	root/templates/subSilver/images/lang_english/13_given.gif
	root/templates/subSilver/images/lang_english/14_given.gif
	root/templates/subSilver/images/lang_english/15_given.gif
	root/templates/subSilver/images/lang_english/16_given.gif
	root/templates/subSilver/images/lang_english/17_given.gif
	root/templates/subSilver/images/lang_english/18_given.gif
	root/templates/subSilver/images/lang_english/19_given.gif
	root/templates/subSilver/images/lang_english/sudoku_blank.gif
	root/templates/subSilver/sudoku.tpl
	root/sudoku.php
	root/db_update.php

############################################################## 
## Author Notes: The update script db_update.php should be called from a browser by
##		 a site administrator in order to make the database changes automatically.
##		 The script should then be deleted.
##############################################################

# 
#-----[ OPEN ]------------------------------------------ 
# 

admin/index.php

# 
#-----[ FIND ]------------------------------------------ 
# 

						case PAGE_FAQ:
							$location = $lang['Viewing_FAQ'];
							$location_url = "index.$phpEx?pane=right";
							break;
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

						// sudoku mod
						case PAGE_SUDOKU:
							$location = $lang['Sudoku'];
							$location_url = "sudoku.$phpEx";
							break;
						// end sudoku mod
# 
#-----[ FIND ]------------------------------------------ 
# 

					case PAGE_FAQ:
						$location = $lang['Viewing_FAQ'];
						$location_url = "index.$phpEx?pane=right";
						break;
#-----[ AFTER, ADD ]------------------------------------------ 
#

					// sudoku mod
					case PAGE_SUDOKU:
						$location = $lang['Sudoku'];
						$location_url = "sudoku.$phpEx";
						break;

# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/constants.php

# 
#-----[ FIND ]------------------------------------------ 
# 

define('PAGE_GROUPCP', -11);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

// sudoku mod
define('PAGE_SUDOKU', -1700);
// end sudoku mod

# 
#-----[ FIND ]------------------------------------------ 
# 

?>

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#

// sudoku mod
define('SUDOKU_STARTS',  $table_prefix.'sudoku_starts');
define('SUDOKU_SOLUTIONS',  $table_prefix.'sudoku_solutions');
define('SUDOKU_USERS',  $table_prefix.'sudoku_users');
define('SUDOKU_STATS',  $table_prefix.'sudoku_stats');
define('SUDOKU_SESSIONS',  $table_prefix.'sudoku_sessions');
// end sudoku mod

# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/page_header.php

# 
#-----[ FIND ]------------------------------------------ 
# 

	'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#

	// sudoku mod
	'L_SUDOKU' => $lang['Sudoku'],
	'U_SUDOKU' => append_sid('sudoku.'.$phpEx),
	// end sudoku mod

# 
#-----[ OPEN ]------------------------------------------ 
# 

language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------ 
#

?>

#
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

// sudoku Mod
$lang['Sudoku'] = 'Sudoku';
// End sudoku Mod

# 
#-----[ OPEN ]------------------------------------------ 
# 

templates/subSilver/overall_header.tpl

#
#-----[ FIND ]------------------------------------------ 
# 

<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_PROFILE}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a>&nbsp;&nbsp;

#
#-----[ AFTER, ADD ]------------------------------------------ 
# 

<a href="{U_SUDOKU}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_SUDOKU}" hspace="3" />{L_SUDOKU}</a>&nbsp; &nbsp;

# 
#-----[ OPEN ]------------------------------------------ 
# 

templates/subSilver/subSilver.cfg

#
#-----[ FIND ]------------------------------------------ 
# 

?>

#
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

// sudoku mod
$images['sudoku_x'] = "$current_template_images/{LANG}/sudoku_blank.gif";
$images['sudoku_1'] = "$current_template_images/{LANG}/1_given.gif";
$images['sudoku_2'] = "$current_template_images/{LANG}/2_given.gif";
$images['sudoku_3'] = "$current_template_images/{LANG}/3_given.gif";
$images['sudoku_4'] = "$current_template_images/{LANG}/4_given.gif";
$images['sudoku_5'] = "$current_template_images/{LANG}/5_given.gif";
$images['sudoku_6'] = "$current_template_images/{LANG}/6_given.gif";
$images['sudoku_7'] = "$current_template_images/{LANG}/7_given.gif";
$images['sudoku_8'] = "$current_template_images/{LANG}/8_given.gif";
$images['sudoku_9'] = "$current_template_images/{LANG}/9_given.gif";
$images['sudoku_11'] = "$current_template_images/{LANG}/11_given.gif";
$images['sudoku_12'] = "$current_template_images/{LANG}/12_given.gif";
$images['sudoku_13'] = "$current_template_images/{LANG}/13_given.gif";
$images['sudoku_14'] = "$current_template_images/{LANG}/14_given.gif";
$images['sudoku_15'] = "$current_template_images/{LANG}/15_given.gif";
$images['sudoku_16'] = "$current_template_images/{LANG}/16_given.gif";
$images['sudoku_17'] = "$current_template_images/{LANG}/17_given.gif";
$images['sudoku_18'] = "$current_template_images/{LANG}/18_given.gif";
$images['sudoku_19'] = "$current_template_images/{LANG}/19_given.gif";
$images['sudoku_21'] = "$current_template_images/{LANG}/1_ran.gif";
$images['sudoku_22'] = "$current_template_images/{LANG}/2_ran.gif";
$images['sudoku_23'] = "$current_template_images/{LANG}/3_ran.gif";
$images['sudoku_24'] = "$current_template_images/{LANG}/4_ran.gif";
$images['sudoku_25'] = "$current_template_images/{LANG}/5_ran.gif";
$images['sudoku_26'] = "$current_template_images/{LANG}/6_ran.gif";
$images['sudoku_27'] = "$current_template_images/{LANG}/7_ran.gif";
$images['sudoku_28'] = "$current_template_images/{LANG}/8_ran.gif";
$images['sudoku_29'] = "$current_template_images/{LANG}/9_ran.gif";
// end sudoku mod 

# 
#-----[ OPEN ]------------------------------------------ 
#

viewonline.php

#
#-----[ FIND ]------------------------------------------ 
#


				case PAGE_FAQ:
					$location = $lang['Viewing_FAQ'];
					$location_url = "faq.$phpEx";
					break;
#
#-----[ AFTER, ADD ]------------------------------------------ 
# 
				// sudoku mod
				case PAGE_SUDOKU:
					$location = $lang['Sudoku'];
					$location_url = "sudoku.$phpEx";
					break;
				// end sudoku mod

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
