But i added a few things to chat.php and MySql, but seem to have an issue with URL links and Smilies in the chat,they will not post properly unless i add a text character in the message first.
The font color holds just fine and all bbcodes work fine also.
Maybe you can have a look,as usual i suck at coding
I will just post the changes i made.
Thanks
Mark
I will PM you the FTP info that may make it easier.
DB:
Code: Select all
chat.php find:ALTER TABLE `phpbb_users` ADD `chat_font_color` INT( 11 ) NOT NULL DEFAULT '0' AFTER `user_colour`;
Code: Select all
add before:generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);
Code: Select all
// Font Color
$color_code = $user->data['chat_font_color'];
$color_hex = dechex ("$color_code");
while (strlen("$color_hex") < 6)
{
$color_hex = '0' . $color_hex;
}
$new_message = $message;
$font = strrpos($new_message, "color=#");
if(!$font)
{
$message = '[color=#' . $color_hex . ']' . $new_message . '[/color]';
}
else
{
$message_long = strlen($message);
$message_start = strpos($message,"#")+1;
$message_end = strpos($message,"]");
$message_erased = ($message_long - $message_end);
$color_code = substr ($message,$message_start,-$message_erased);
$color_dec = hexdec ("$color_code");
$sql = 'UPDATE ' . USERS_TABLE . " SET chat_font_color = " . $color_dec . " WHERE user_id = {$user->data['user_id']}";
$db->sql_query($sql);
} // End Font Color