##############################################################
## MOD Title: Simple Subforums MOD
## MOD Author: pentapenguin < pentapenguin@bluebottle.com > (Jeremy Conley) http://www.pentapenguin.com
## MOD Author: CyberAlien <n/a> (Vjacheslav Trushkin) http://www.phpbbstyles.com
## MOD Description: This MOD is a simple subforums MOD that doesn't include any extras and makes only
## one small database change. It supports only one level deep subforums that should be enough for most forums.
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 1 Minute
##
## Files To Edit: 1
## viewtopic.php
##
## Included Files: 1
## contrib/admin/xs_simple_subforums.cfg
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
## This is an update from version 1.0.0 to 1.0.1
##############################################################
## MOD History:
##	2005-12-11 - Version 1.0.1
##		- Fixed security bug
##	
##	2005-10-30 - Version 1.0.0
##		- Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################


#
#-----[ COPY ]------------------------------------------
#
copy contrib/admin/xs_simple_subforums.cfg to admin/xs_simple_subforums.cfg


#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php


#
#-----[ FIND ]------------------------------------------
#
		$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', $highlight_match) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
	

#
#-----[ REPLACE WITH ]------------------------------------------
#
		$message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
	

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