PDA

View Full Version : BB Code Filter Function?


miner2049er
02-19-2006, 04:12 AM
Before I start to write my own, does anybody know of the existence of a function to strip out all the text between BB code tags?

This is for a "latest posts" display, that prints the first dozen or so words of a post. For example running this through it:

Actually, Saturday night I was with friends at the El Compadre restaurant in Hollywood, on Sunset. I just had drinks, but they had the best salsa I have tasted for years - a good level of spiciness! Very nice place also.Oh yea...El Compadre...chips and salsa....it's about the best thing

would return:

Oh yea...El Compadre...chips and salsa....it's about the best thing

Thanks in advance for any replies,

Miner2049er.

miner2049er
02-20-2006, 06:37 AM
Hmm, no replies so far. Let me try and word it a different way - I want to grab the first dozen or so words from a post that a person typed in, and nothing inside quote or image tags etc.

Can anybody assist, before I fire up the PHP editor?

Have a good week, Miner2049er.

UPDATE: Problem mostly solved, code found. Check out:

http://www.vbulletin.com/forum/showthread.php?t=176027