View previous topic :: View next topic |
Author |
Message |
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
Posted: Thu Sep 04, 2008 2:51 pm Post subject: BBCode in PHP |
|
|
Hello,
I currently have BBCode support on my forums, however the BBCode engine I wrote uses str_ireplace for most of the handling.
for example:
(url=http://www.www.com)Title(/url)
Translates:
and
It works okay and all, but the normal (url)TITLE(/url) tag won't work, using a close square bracket gets translated to '>
For example:
I will type something [inside of brackets]
translates to:
I will type something [inside of brackets'>
______________
So, what I'm looking for is a little help on how it would be coded the proper way, like Abyss's URL rewrite code.
How can I make it so
[url=[A-z0-9]+][A-z0-9]+[/url]
will translate to a normal uri?
Thanks tons in advance,
Toasty _________________ Audit the secure configuration of your server headers! |
|
Back to top |
|
|
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
|
Back to top |
|
|
NuccatheWarrior -
Joined: 18 Oct 2007 Posts: 82
|
Posted: Wed Sep 17, 2008 5:14 pm Post subject: |
|
|
Use an image within in the url bbcode for phpbb. Its better off with an image than words. For the url bbcode it just gives it self a title as it is linked in the forums _________________ Site Administrator of Nucca The Warrior's Website
http://nuccathewarrior.kicks-ass.org |
|
Back to top |
|
|
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
Posted: Wed Sep 17, 2008 6:12 pm Post subject: |
|
|
phpBB is the reason I wrote my own forum system, because I think phpBB is more of a waste of time, and displays a strong lack of concern about a site, than writing your own. Plus, the support sucks epicly.
I suppose I'll be on my own, thought there were more PHP programmers here... _________________ Audit the secure configuration of your server headers! |
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Fri Sep 19, 2008 5:02 am Post subject: |
|
|
There are lots of PHP programmers here. The problem is most of them come here for help or for information, not to help others. Str_replace() doesn't really work well for this type of bbcode, and I don't know regular expressions. _________________ -Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
|
Back to top |
|
|
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
Posted: Fri Oct 17, 2008 2:19 pm Post subject: |
|
|
Sorry for the late response.
Thank you for the links, looks like I can use the first one the most, the second link looks similar to what I'm using already.
-Toasty _________________ Audit the secure configuration of your server headers! |
|
Back to top |
|
|
|