colour text in chat lvalair

Started on the old forum in September 2010 · view the original in the archive · old links redirect here

9 replies · 874 views · started 16 years ago · 1 min read

6 participants
LadyEnigma Developer · 71 posts #1

Hello everyone, I saw that some chat you can select a text color from a manu made especially to change color, can someone give me some ideas to make a menu like in my lavalair? I am not talking about using bbcode color, those already use them but are inconvenient for users, I would own a menu in chat room where with a simple click you select a color change from as long as nn menu color. thank who can help me 🙂

....silence please....

centi Developer · 159 posts #2

ahhhh gud idea... can u show me a demo!!! ill code

😳 .................................... http://photomag.lk/ .................................... 🤨

metulj Super moderator Principal · 1,726 posts #3

LadyEnigma wrote: Hello everyone, I saw that some chat you can select a text color from a manu made especially to change color, can someone give me some ideas to make a menu like in my lavalair? I am not talking about using bbcode color, those already use them but are inconvenient for users, I would own a menu in chat room where with a simple click you select a color change from as long as nn menu color. thank who can help me :)

under text box where users enters text... create simple select menu like

echo "<select name=\"color\">";
echo "<option value=\"#ff3300\">red</option>";
echo "<option value=\"#3399ff\">blue</option>";
echo "<option value=\"#00cc00\">green</option>";
echo "</select><br/>"; 

and under action where text get actually posted, add this

$color = $_POST["color"];

TIP: use WEB SAFE colors only that should do the job...

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

LadyEnigma Developer · 71 posts #4

centi i place a demo tomorrow to make you understand how I wanted:)

Added after 4 minutes:

metulj I like how it is with the tuoo code but doesn't work in my chat: (what I'm wrong? These are the tests that I made 1)

 echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
        addonline($uid,"Scrive un messaggio in chat","");
        echo "<form action=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
        echo "<p>Messaggio:<input name=\"message\" type=\"text\" maxlength=\"255\"/><br/>";
        echo "<select name=\"color\">";
echo "<option value=\"#ff3300\">red</option>";
echo "<option value=\"#3399ff\">blue</option>";
echo "<option value=\"#00cc00\">green</option>";
echo "</select><br/>";
        echo "<input type=\"Submit\" Name=\"sy2\" value=\"Scrivi\"></form><br/>";
      $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
       $color = $_POST["color"]; 
      $rname = $rooms[1];

and 2)

     echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
        addonline($uid,"Scrive un messaggio in chat","");
        echo "<form action=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
        echo "<p>Messaggio:<input name=\"message\" type=\"text\" maxlength=\"255\"/><br/>";
        echo "<select name=\"color\">";
echo "<option value=\"#ff3300\">red</option>";
echo "<option value=\"#3399ff\">blue</option>";
echo "<option value=\"#00cc00\">green</option>";
echo "</select><br/>";
        echo "<input type=\"Submit\" Name=\"sy2\" value=\"Scrivi\"></form><br/>";
       $color = $_POST["color"];
      $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); 
      $rname = $rooms[1];
        echo "<b>4 </b><a accesskey=\"4\" href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">Torna a $rname</a><br/>";

not appear line error or file error and I write, compare the color menu, I select them but unfortunately not becomes colored text, where I'm wrong? 🙁

....silence please....

metulj Super moderator Principal · 1,726 posts #5

LadyEnigma wrote: centi i place a demo tomorrow to make you understand how I wanted:)

Added after 4 minutes:

metulj I like how it is with the tuoo code but doesn't work in my chat: (what I'm wrong? These are the tests that I made 1)

 echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
        addonline($uid,"Scrive un messaggio in chat","");
        echo "<form action=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
        echo "<p>Messaggio:<input name=\"message\" type=\"text\" maxlength=\"255\"/><br/>";
        echo "<select name=\"color\">";
echo "<option value=\"#ff3300\">red</option>";
echo "<option value=\"#3399ff\">blue</option>";
echo "<option value=\"#00cc00\">green</option>";
echo "</select><br/>";
        echo "<input type=\"Submit\" Name=\"sy2\" value=\"Scrivi\"></form><br/>";
      $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
       $color = $_POST["color"]; 
      $rname = $rooms[1];

and 2)

     echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
        addonline($uid,"Scrive un messaggio in chat","");
        echo "<form action=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\" method=\"post\">";
        echo "<p>Messaggio:<input name=\"message\" type=\"text\" maxlength=\"255\"/><br/>";
        echo "<select name=\"color\">";
echo "<option value=\"#ff3300\">red</option>";
echo "<option value=\"#3399ff\">blue</option>";
echo "<option value=\"#00cc00\">green</option>";
echo "</select><br/>";
        echo "<input type=\"Submit\" Name=\"sy2\" value=\"Scrivi\"></form><br/>";
       $color = $_POST["color"];
      $rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'")); 
      $rname = $rooms[1];
        echo "<b>4 </b><a accesskey=\"4\" href=\"chat.php?sid=$sid&rid=$rid&rpw=$rpw\">Torna a $rname</a><br/>";

not appear line error or file error and I write, compare the color menu, I select them but unfortunately not becomes colored text, where I'm wrong? :(

wrongly placed select menu... and wrongly placed POST["color"]... read again my previous post and try again...

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

LadyEnigma Developer · 71 posts #6

centi this is a demo but I like a lot more menu that created metulj but I made several attempts and can't get it to work, can you show me where should I put it please?

....silence please....

Attachments: demotextcolor.jpg
i0nutzxp Developer · 150 posts #7

u can use bb color codes ..add them then on "say" action after <input name="message .. bla bla add

echo "<select name=\"color\">";
echo "<option value=\"red\">red</option>";
echo "<option value=\"blue\">blue</option>";
echo "<option value=\"green\">green</option>";
echo "</select><br/>"; 

after $message=$_POST["message"]; add

if(isset($_POST['color']))
 $message = "[color={$_POST['color']}]$message\[/color]";

i didnt tested it ...:D

<?php unlink('World/Europe/Romania.country'); ?>
LadyEnigma Developer · 71 posts #8

i0nutzxp your code work very well friend!! thank you so much 🙂

....silence please....

Leviathan73 Senior · 260 posts #10

the nokia n73 does not work, the page splits 🙁

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