Jump to content

Archived

This topic is now archived and is closed to further replies.

abdfahim

[SOLVED] quote and smilies in forum

Recommended Posts

Plz give me any code or help link from where I can get help in adding smilies and quote button in my forum.

Share this post


Link to post
Share on other sites
There is a two part tutorial on here which you may find useful:

http://www.phpfreaks.com/tutorials/107/0.php

http://www.phpfreaks.com/tutorials/123/0.php

Share this post


Link to post
Share on other sites
The tutorials of those links have everything except procedures for adding quote and smilies.

Share this post


Link to post
Share on other sites
Smilies are easy: just replace :-) or whatever with an image tag.

[code=php:0]str_replace(":-)", "<img src='happy.gif'>", $post_content);[/code]

Share this post


Link to post
Share on other sites
You can easily adapt the techniques in the BBCode tutorials on this site to work with quotes and smilies. The only things that changes is the tags that are replaced.

The code that works for:

[code][b]text[/b][/code]

will work the same for:

[code][quote]text[/quote][/code]

Experiment with the examples. Change things around. It's the best way to learn and improve your skills.

Good luck!  ;)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.