Add smiles to forum, how?
|
|||
|
Rank: ? (60)
Member #: 22843 |
Thanks to the forum, as i have found this place so useful that i always love the site, please i want to create a forum with php and mysql so i want to add Smiles and all this Bold, italic, Code, Link, Quote and even more, can somebody help me out? if you knew a tutorial on it please tell me.
|
||
|
|||
|
|||
|
Rank: ? (767)
Member #: 11085 |
Emoticons are easy, just use the str_replace function to replace the emoticon symbols (ie: :)) with image tags. Other tags are a bit more complex, requiring the preg_replace function, which uses regex to match the pattern for the replace. A good manual to this can be found here and here.
Also, you will likely wish to cache the results so that you only have to process once.
- relpats_eht
|
||
|
|||
|
|||
|
Rank: ? (4821)
Member #: 3416 |
i store my forum posts in the database already converted to html. then if someone wants to edit their post, i convert it back to bbcode for them to edit. this made the most sense to me because a post is going to be viewed a LOT more often than edited.
the other option was to store both html and bbcode versions, but i thought the small hit to convert html back to bbcode for editing was better than storing everything twice.
my mind is like a steel trap! it only hangs on to the big stuff. visit my forums at track7.org
|
||
|
Please login or register to post a reply.