Buying I need a programmer who can help add smileys to my message board

Discussion in 'Programming' started by starscream, Sep 7, 2009.

  1. #1
    I need a programmer who can help add smileys to my message board. It is not a forum board so keep that in mind.

    Right now, the message board allows only text so if I typed in : ) , it will display : )

    I want it so when the person types in : ) , it will display :) (smiley face gif) in their message.

    And if they typed in : ( , it will display :( (sad face gif), etc....

    At the same time, if the user is too lazy to type in the ascii code of the smiley, I want an option of the smileys displayed underneath the message box so the user can just select the smiley face they want to use and it will display the smiley pic in their message (exactly the way Digital Point has theirs setup).

    The message board file is below. Can what I want be done without the need to modify the database? Is there a quick easy way of doing this by modifying the file below. Please message me or post in this thread if you can help me. Thanks in advance


    <?
    include("../headers.php");


    if(!$session[id]){ header("Location: index.php"); }

    if($send == yes){

    if(!$message){ $attempt=msg; }
    elseif(fetch("SELECT id FROM $tab[contact] WHERE player='$pid' AND contact='$session[id]' AND status='4';")){ $attempt=ignore; }
    else{
    $session['online']=$time;
    mysql_query("UPDATE $tab[player] SET messages=messages+1, reset='1' WHERE id='$pid';");
    mysql_query("UPDATE $tab[player] SET online='$session[online]' WHERE id='$session[id]';");

    $message=filter($message);

    mysql_query("INSERT INTO $tab[mail] (src,dest,msg,time,type) VALUES ('$session[id]','$pid','$message','$time',0);");
    $attempt=success;
    $showbox=no;
    }
    }

    $player = mysql_fetch_array(mysql_query("SELECT name FROM $tab[player] WHERE id='$pid';"));

    gameheader("messenging $player[name]");
    ?>
    <form method="post" action="message.php?pid=<?=$pid?>&return=<?=$return?>">
    <?if($attempt==ignore){?><b><font color="#FFCC00">This kingdom has you on his ignore list, message not sent!</font></b><br><?}?>
    <?if($attempt==msg){?><b><font color="#FFCC00">You cannot send a blank message</font></b><br><?}?>
    <?if($attempt==success){?><br><br>message sent to <a href="player.php?pid=<?=$pid?>"><?=$player['name']?></a> (<font color="white">#<?=$pid?></font>)<br><br><a href="<?=$return?>">click here to go back</a><br><?}?>

    <?if($showbox != no){?>
    <br>send message to <a href="player.php?pid=<?=$pid?>"><?=$player['name']?></a> (<font color="white">#<?=$pid?></font>)
    <table align="center" width="60%">
    <tr>
    <td align="center">
    <textarea class="input" cols="57" rows="6" name="message" onKeyDown="limitText(this.form.message,this.form.countdown,500);" onKeyUp="limitText(this.form.message,this.form.countdown,500);"></textarea>
    <br>You have <input readonly type="text" name="countdown" size="1" value="500" style="border: 0;background-color: #000000;color: #FFFFFF;font-size:10pt;">characters left. <input type="hidden" name="send" value="yes"><input class="button" type="submit" value="send message">
    </td>
    </tr>
    </table>
    </form>
    <?}?>
    <br>

    <br>
    <?=bar()?>
    <br>
    <?
     
    starscream, Sep 7, 2009 IP
  2. Scoding

    Scoding Well-Known Member

    Messages:
    1,091
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    155
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Wouldn't installing WUSIWYG editor help? It has built in smileys?


    It's also free and not that hard to install?


    Saulius
    http://scoding.com
     
    Scoding, Sep 7, 2009 IP
  3. austin-G

    austin-G Peon

    Messages:
    435
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    I could do both things for you. Send me a PM.
     
    austin-G, Sep 7, 2009 IP
  4. starscream

    starscream Peon

    Messages:
    305
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    I assume that this can be done with Javascript? Or am I wrong?

    Something else which I hoped that can be added easily is along with the smileys is to add the ability to bold words or italic words, link pictures to the message, etc...

    Would this be hard to do?
     
    starscream, Sep 7, 2009 IP