How these smilies are added to our posts ?

The_Small_k

The_Small_k

@the-small-k Oct 24, 2024
hello friend's
I am not a professional web designer but after having some read about html and css i decided to give a try to it.So i need some help from your side.
I want to create a text editor like what we see on posting a post on CE.i have done with most of them like bold,italic,fonts,font-size,link,images....etc etc.But my creation stops on smilies.
Anybody have idea how these smilies are working.....?
.
I mean we just add ": )" and an smiles are pasted in out post.No extension is required !!
😐😐😲😡

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jun 28, 2011

    Hey dude, have you heard of Regular Expressions??? The smilies in the post are stored as :) only inside the database. 😀

    While rendering the HTML from the database, the PHP Application, either Wordpress or phpBB or vBulletin searches for a set of strings like :), ;), etc and converts them into <img src="" />. 😀 It is a simple Regular Expression or String Replace function happening on the server side, while rendering the pages. Hope this clears... 😀
  • The_Small_k

    The_Small_k

    @the-small-k Jun 30, 2011

    Do you want to say that smilies are put into the database using blob ?
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jun 30, 2011

    No buddy... It is there in a folder. I said smilies, which we input as text are stored in the MySQL...
  • The_Small_k

    The_Small_k

    @the-small-k Jul 1, 2011

    Yeh i got it !!
    Thank you praveen !!
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Jul 1, 2011

    Welcome Small K! 😀