Select Color Text 4 Chat Wapdesire
Started on the old forum in July 2008 · view the original in the archive · old links redirect here
I people. I have think...if anyone say how I can insert a select color write at wapdesire chat page.
😉
great to help
you can use color BB code for example for XHTML only
open core.php
find this function
function getbbcode($text, $sid="")
and add this line into function
$text = preg_replace("/\[color=(.*?)\](.*?)\[\/color\]/i","<font color=\"\\1\">\\2</font>", $text);
usage
[ color=red ]text here will be displayed in red[ / color ]
p.s. when you use color code.. use it without spaces! i've only made spaces so you can see usage
It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!
////////////Place on your start page lol
echo "<select name=\"color\">\n";
echo "<option value=\"white\">White</option>\n";
echo "<option value=\"black\">Black</option>\n";
echo "<option value=\"blue\">Blue</option>\n";
echo "<option value=\"yellow\">Yellow</option>\n";
echo "</select>\n";
//Place this on your pages according to get or post
$color=$_GET['color'];
// Or
$color=$_POST['color'];
///////////////Example query to insert the message...
mysql_query("INSERT INTO `chat` (
`chatname` ,
`message` ,
`timestamp`
)
VALUES (
'".$name."', '".$message."', ".time()." );");
Heres a small example that i came up with now and quickly wrote an example, you could do it in mutch better ways but i hope this could give you some ideas... enjoy lol