* All rights reserved.
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* --> NOTICE <--
* This file is part of the core development branch, changing its contents will
* make you unable to use the automatic updates manager. Please refer to the
* documentation for further information about customizing Wootook.
*
*/
/**
*
* @deprecated
* @param unknown_type $string
*/
function bbcode($string) {
$pattern = array(
'/\\n/',
'/\\r/',
'/\[list\](.*?)\[\/list\]/ise',
'/\[b\](.*?)\[\/b\]/is',
'/\[strong\](.*?)\[\/strong\]/is',
'/\[i\](.*?)\[\/i\]/is',
'/\[u\](.*?)\[\/u\]/is',
'/\[s\](.*?)\[\/s\]/is',
'/\[del\](.*?)\[\/del\]/is',
'/\[url=(.*?)\](.*?)\[\/url\]/ise',
'/\[email=(.*?)\](.*?)\[\/email\]/is',
'/\[img](.*?)\[\/img\]/ise',
'/\[color=(.*?)\](.*?)\[\/color\]/is',
'/\[quote\](.*?)\[\/quote\]/ise',
'/\[code\](.*?)\[\/code\]/ise',
'#\[youtube\]([^\]]+)\[/youtube\]#',
'#\[dailymotion\]([^\]]+)\[/dailymotion\]#'
);
$replace = array(
'',
'',
'sList(\'\\1\')',
'\1',
'\1',
'\1',
'\1',
'\1',
'\1',
'urlfix($1,$2)',
'\2',
'imagefix(\'\\1\')',
'\2',
'sQuote(\'\1\')',
'sCode(\'\1\')',
'',
''
);
return preg_replace($pattern, $replace, nl2br(htmlspecialchars(stripslashes($string))));
}
function image($string)
{
//On va pas se casser le fion a lire les accents quand meme !!!!!!!
$string = str_replace("'", "'", $string);
//Emoticones.... COPIEZ COLLEZ CES LIGNES POUR RAJOUTER LES VOTRES !
$string = str_replace("Smile", "[img]../emoticones/Smile.png[/img]", $string);
$string = str_replace("cool", "[img]../emoticones/cool.png[/img]", $string);
$string = str_replace("grrr", "[img]../emoticones/grrr.png[/img]", $string);
$string = str_replace("love", "[img]../emoticones/love.png[/img]", $string);
$string = str_replace("msn", "[img]../emoticones/msn.png[/img]", $string);
$string = str_replace("Oo", "[img]../emoticones/Oo.png[/img]", $string);
$string = str_replace("perdu", "[img]../emoticones/perdu.png[/img]", $string);
$string = str_replace("wink", "[img]../emoticones/wink.png[/img]", $string);
$string = str_replace("wow", "[img]../emoticones/wow.png[/img]", $string);
return $string;
}
function sCode($string){
$pattern = '/\/s';
$string = preg_replace($pattern, '\3', $string);
return '