How to set up a textarea that accepts tags like [CODE] , [IMG]

Reply

Join Date: Jun 2008
Posts: 65
Reputation: vijaysoft1 is an unknown quantity at this point 
Solved Threads: 0
vijaysoft1's Avatar
vijaysoft1 vijaysoft1 is offline Offline
Junior Poster in Training

How to set up a textarea that accepts tags like [CODE] , [IMG]

 
0
  #1
Aug 31st, 2009
How to set up a textarea that accepts tags like

" [IMG] , [QUOTE] , [CODE] "

using php
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 72
Reputation: hireaprogrammer is an unknown quantity at this point 
Solved Threads: 1
hireaprogrammer's Avatar
hireaprogrammer hireaprogrammer is offline Offline
Junior Poster in Training

Re: How to set up a textarea that accepts tags like [CODE] , [IMG]

 
0
  #2
Aug 31st, 2009
You can do if you know V bulletin Forum Programming ..it is ready made code available in it ..that's part of Text area editor that's called Forum editor ..I hope that's help you ...Thank you .
hire-phpdeveloper.com
Start from $3.99 Per Hour
Yahoo IM :hirephpdeveloper
Web Development with php | Hire a dedicated php developer |Hire indian Php developer
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: How to set up a textarea that accepts tags like [CODE] , [IMG]

 
0
  #3
Aug 31st, 2009
Use google and search for bbcode classes.
Google is your friend.

Use [code] tags.

If you have found a solution to your problem, please mark the thread as SOLVED.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,092
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 137
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster

Re: How to set up a textarea that accepts tags like [CODE] , [IMG]

 
-1
  #4
Aug 31st, 2009
Judging by your other thread, you're building a text editor for something like a forum/blog.

http://www.phpclasses.org/browse/package/951.html is a good lightweight class. However you need to register/login to download.

It has a mistake though, change line 2 from:

  1. require_once('bbcode.php');

to:

  1. require_once('bbcode.inc.php');
Last edited by ardav; Aug 31st, 2009 at 1:51 pm.
If you don't reply to your own thread or you can't find the solved link - you're off my Christmas list - permanently! Bah humbug!
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,540
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 137
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Posting Virtuoso

Re: How to set up a textarea that accepts tags like [CODE] , [IMG]

 
0
  #5
Sep 1st, 2009
Originally Posted by kkeith29 View Post
Use google and search for bbcode classes.
Why use classes when one long line of preg_replace will do the job. Using preg_replace once for the job will do the job better then what any class will ever do.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*`
My favourite PC. - Oopy Doopy Do 2U2!
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: How to set up a textarea that accepts tags like [CODE] , [IMG]

 
0
  #6
Sep 1st, 2009
Classes give more functionality and flexibility. They just make it easier to add specialized tags without having to deal with editing regular expressions, which can be a pain in the a**.

preg_replace is just fine, I just didn't suggest it because I wouldn't use a regex.
Last edited by kkeith29; Sep 1st, 2009 at 2:06 am.
Google is your friend.

Use [code] tags.

If you have found a solution to your problem, please mark the thread as SOLVED.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,092
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 137
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster

Re: How to set up a textarea that accepts tags like [CODE] , [IMG]

 
-1
  #7
Sep 1st, 2009
preg_replace gives me the cr[e]ep$.
If you don't reply to your own thread or you can't find the solved link - you're off my Christmas list - permanently! Bah humbug!
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 1,540
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 137
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Posting Virtuoso

Re: How to set up a textarea that accepts tags like [CODE] , [IMG]

 
0
  #8
Sep 1st, 2009
Originally Posted by ardav View Post
preg_replace gives me the cr[e]ep$.
Well I find preg_reglace and regex to be fun, easy but almost useless.
Try not to bump 10 year old threads as it can be really annoying.
http://syntax.cwarn23.net/
Smilies: ^_* +_+ v_v -_- *~*`
My favourite PC. - Oopy Doopy Do 2U2!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum


Views: 253 | Replies: 7
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC