'smiley', ':-)' => 'smiley', ':(' => 'smiley-sad', ':-(' => 'smiley-sad', ':D' => 'smiley-lol', ';-)' => 'smiley-wink', ';)' => 'smiley-wink', ':o' => 'smiley-surprise', ':-o' => 'smiley-surprise', '8-)' => 'smiley-cool', '8)' => 'smiley-cool', ':|' => 'smiley-neutral', ':-|' => 'smiley-neutral', ":'(" => 'smiley-cry', ":'-(" => 'smiley-cry', ":p" => 'smiley-razz', ":-p" => 'smiley-razz', ":s" => 'smiley-confuse', ":-s" => 'smiley-confuse', ":x" => 'smiley-mad', ":-x" => 'smiley-mad', ); // Set to 1 if you want to disable smileys (default: 0) define('DISABLE_SMILEYS','0'); // Set to 1 if you want to disable auto linking (default: 0) define('DISABLE_LINKING','0'); // Set banned words here $bannedWords = array("nastyword","nastyword1","nastyword2","nastyword3","nastyword4"); // Path to config.php of vBulletin include_once "../includes/config.php"; ///////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////// include_once "JSON.php"; error_reporting(E_ALL); ini_set('display_errors','Off'); ini_set('log_errors', 'On'); ini_set('error_log', 'error.log'); // Comment this next line if you using a common session from another Php file session_name("cometchat"); session_start(); function stripSlashesDeep($value) { $value = is_array($value) ? array_map('stripSlashesDeep', $value) : stripslashes($value); return $value; } if ( get_magic_quotes_gpc() ) { $_GET = stripSlashesDeep($_GET ); $_POST = stripSlashesDeep($_POST ); $_COOKIE = stripSlashesDeep($_COOKIE); } $dbh = mysql_connect($config['MasterServer']['servername'].':'.$config['MasterServer']['port'],$config['MasterServer']['username'],$config['MasterServer']['password']); mysql_selectdb($config['Database']['dbname'],$dbh); // mysql_set_charset('latin5'); define('TABLE_PREFIX', trim($config['Database']['tableprefix'])); $userid = 0; if (!empty($_COOKIE['bbsessionhash'])) { $sql = ("select userid from ".TABLE_PREFIX."session where sessionhash = '".mysql_real_escape_string($_COOKIE['bbsessionhash'])."'"); $query = mysql_query($sql); $session = mysql_fetch_array($query); $userid = $session['userid']; }