##############################################################
## MOD Title: Allow bbCode & Smilies In Forum Description 
## MOD Author: battye < cricketmx@hotmail.com > http://forums.cricketmx.com
## MOD Author: achaab < achaab@hotmail.fr > http://www.phpbb.biz
##
## MOD Description: Permet de mettre des bbcodes et des smilies dans la description des forums
##
## MOD Version: 1.0.3
##
## Installation Level: Easy
## Installation Time: 5 Minutes
##
## Files To Edit: admin/admin_forums.php
##				  includes/bbcode.php
##				  index.php
##
## Included Files: N/A
##
## 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/
############################################################## 
##
## Informations : Ce mod a t test et remit en page par l'equipe mod de phpBB.biz
##
##                Vous en trouverez la derniere version a cette adresse :
##                http://forum.phpbb.biz/viewtopic.php?p=6697941
##
##                Le support se trouve a cette adresse :
##                http://forum.phpbb.biz/viewtopic.php?p=6697942
##
##############################################################  
## Author Notes: N/A
##############################################################
## MOD History:
##						 2005-31-03 - Version 1.0.0
##      - First Release, it's pretty good 8)
## 						 2005-01-04 - Version 1.0.1
##      - Fixed MOD Templating error
## 						 2005-06-04 - Version 1.0.2
##      - Added IN-LINE to *.mod file
##						 2005-27-11
##		- Ajout des smilies dans le panneau admin
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
############################################################## 

#
#-----[ OPEN ]------------------------------------------
#
index.php

# 
#-----[ FIND ]------------------------------------------ 
#
include($phpbb_root_path . 'common.'.$phpEx);
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
# 
#-----[ FIND ]------------------------------------------ 
#
								'FORUM_DESC' => $forum_data[$j]['forum_desc'],
# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
								'FORUM_DESC' => smilies_pass(bbencode_second_pass($forum_data[$j]['forum_desc'], '')),
#
#-----[ OPEN ]-------------------
#

includes/bbcode.php

#
#-----[ FIND ]-------------------
#
		for ($i = 0; $i < count($smilies); $i++)
		{
			$orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
			$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
		}
#
#-----[ REPLACE WITH ]-------------------
#
		for ($i = 0; $i < count($smilies); $i++)
		{
			if ( defined('IN_ADMIN') )
			{
				$orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
				$repl[] = '<img src="../'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
			}
			else
			{
				$orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/";
				$repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
			}
		}
# 
#-----[ OPEN ]------------------------------------------ 
#

admin/admin_forums.php

#-----[ FIND]------------------------------------------ 
#
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
# 
#-----[ FIND ]------------------------------------------ 
#
			$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc
#
#-----[ IN-LINE FIND ]------------------------------------------
# 
str_replace("\'", "''", $HTTP_POST_VARS['forumdesc'])
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
# 
str_replace("\'", "''", bbencode_first_pass($HTTP_POST_VARS['forumdesc'], $uid)) 
# 
#-----[ FIND ]------------------------------------------ 
#
$sql = "UPDATE " . FORUMS_TABLE . "	
#
#-----[ IN-LINE FIND ]------------------------------------------
# 
str_replace("\'", "''", $HTTP_POST_VARS['forumdesc'])
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
# 
str_replace("\'", "''", bbencode_first_pass($HTTP_POST_VARS['forumdesc'], $uid)) 
# 
#-----[ FIND ]------------------------------------------ 
#
					'FORUM_DESC' => $forum_rows[$j]['forum_desc'],
# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
 					'FORUM_DESC' => bbencode_second_pass($forum_rows[$j]['forum_desc'], ''),
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 