Hi;
I got Thales as stats-serv and, however, some guys loves putting Colors in theire topic.
now, how do I get these Color-codes into HTML-colors; like str_replace(<code>,<html-thing>,$topic) in PHP; but it doesn't work...
maybe coz my OS uses for the "Box" before the num. other ASCII-codes than PHP does :/
Thanks for your help
How do I get IRC-Colors in HTML ones ?
Moderator: Supporters
Re: How do I get IRC-Colors in HTML ones ?
http://www.invictachat.net/format.inc.phps is the PHP code I use.
Simply use:
Then you can use:
where $topic is the topic string with the formatting codes in it, $maxlength is the maximum topic length (excluding formatting codes) and $dourl is a "true" or "false" value meaning whether or not to make URL's (beginning "http://", "https://", "ftp://" and "irc://") into links. Both $maxlength and $dourl are optional but to use $dourl you need to specify a $maxlength (-1 for unlimited)
Simply use:
Code: Select all
include_once("file.name.with.function.in.php");
Code: Select all
topic_format_html($topic, $maxlength, $dourl);
Your IP:
Your Country:
Your Country:
Re: How do I get IRC-Colors in HTML ones ?
Your script is great, nice work. Only one thing. Some folks like to use those colorful bars which really aren't text and if they have those, then nothing shows at all for the topic. Any solution to this?
T.I.A.
T.I.A.
Re: How do I get IRC-Colors in HTML ones ?
Could you show me an example please and if possible somehow send me a text file containing a topic as you describe so I have an example to work with?
Your IP:
Your Country:
Your Country: