how to obtain topic text free of bbcodes?

Discussion forum for MOD Writers regarding MOD Development.
Locked
BiboBB
Registered User
Posts: 106
Joined: Thu Dec 13, 2007 7:34 pm

how to obtain topic text free of bbcodes?

Post by BiboBB »

hi every1
am lookin for the simplest way to obtain topic text without any bbcodes (except for links and images)??

ps: i wanna use it in a script outside the forum, but the topic will be read from the forum's database..
ty..

BiboBB
Registered User
Posts: 106
Joined: Thu Dec 13, 2007 7:34 pm

Re: how to obtain topic text free of bbcodes?

Post by BiboBB »

any1 can help?!

User avatar
3Di
Former Team Member
Posts: 14987
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: how to obtain topic text free of bbcodes?

Post by 3Di »

A regexp maybe?
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

BiboBB
Registered User
Posts: 106
Joined: Thu Dec 13, 2007 7:34 pm

Re: how to obtain topic text free of bbcodes?

Post by BiboBB »

details plz?!

Blitze
Registered User
Posts: 394
Joined: Tue Nov 29, 2005 5:06 pm

Re: how to obtain topic text free of bbcodes?

Post by Blitze »

You can use phpbb3's strip_bbcode function in includes/functions_content.php but I think it will remove links and images as well. Perhaps, use regex, as suggested, to manually parse any links and images before using the strip_bbcode function. Just a thought ...
My Extensions: phpBB SiteMaker

Locked

Return to “[3.0.x] MOD Writers Discussion”