Jump to content


Photo

[SOLVED] quote and smilies in forum


  • Please log in to reply
5 replies to this topic

#1 abdfahim

abdfahim
  • Members
  • PipPipPip
  • Abd Fahim
  • 535 posts

Posted 16 August 2006 - 06:52 AM

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

#2 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 16 August 2006 - 07:09 AM

Hint... "bbcode"

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#3 GingerRobot

GingerRobot
  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 16 August 2006 - 07:41 AM

There is a two part tutorial on here which you may find useful:

http://www.phpfreaks...rials/107/0.php

http://www.phpfreaks...rials/123/0.php

#4 abdfahim

abdfahim
  • Members
  • PipPipPip
  • Abd Fahim
  • 535 posts

Posted 17 August 2006 - 03:43 AM

The tutorials of those links have everything except procedures for adding quote and smilies.

#5 Jeremysr

Jeremysr
  • Members
  • PipPipPip
  • Advanced Member
  • 199 posts
  • LocationSaskatchewan, Canada

Posted 17 August 2006 - 03:45 AM

Smilies are easy: just replace :-) or whatever with an image tag.

str_replace(":-)", "<img src='happy.gif'>", $post_content);


#6 HeyRay2

HeyRay2
  • Members
  • PipPipPip
  • Advanced Member
  • 223 posts

Posted 17 August 2006 - 03:49 AM

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:

[b]text[/b]

will work the same for:

[quote]text[/quote]

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

Good luck!  ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users