Select Color Text 4 Chat Wapdesire

Started on the old forum in July 2008 · view the original in the archive · old links redirect here

3 replies · 782 views · started 18 years ago · 1 min read

3 participants
mary Junior · 14 posts #1

I people. I have think...if anyone say how I can insert a select color write at wapdesire chat page.

😉

great to help

metulj Super moderator Principal · 1,726 posts #2

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ノ刀ノイリ!

mary Junior · 14 posts #3

but I wont create this automatic....user select color from drop menu and chat page all user view the color user have selct from menu..u can help me?

SpiderWap Lead · 622 posts #4
////////////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

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close