PDA

View Full Version : HTML -> BBCode Tags Without Changing The HTML Tags


santino
01-10-2004, 09:04 PM
Using a vb3 hack I have a forum that is full of news stories that contain HTML tags, they display on to my front page and are interpreted there correctly (don't have anything right now that parses and shows bbcode correctly on the front page so I need html.)

Recently I have learned first hand how dangerous it is to allow HTML tags in your forum :(

When I disable HTML, anyone going into the vB forum area reading these posts now sees the original news story with inactivate html tags strewn about and it looks ugly and almost impossible to read.

Is there any hack/mod/method that I could use that would allow me to:

1. Disable HTML on my vBulletin forum
2. Have vB3 interpret specific HTML tags as BBcode tags without changing them (i.e. if I use < b >, vb3 would see this as [ b ] and use that in posting to the forum form that users display - but HTML tags would still be in tact in the DB so that my main page interprets them and posts them correctly).
3. Continue to use HTML in news posts now, with step 2 converting those specific tags, like < b >, < i >, < u >, < a >, and < img >, being the only tags recognized going forward by the forum for displaying them in bbcode instead.

Sorry if my post is confusing. Does this exist already? Would it be easy to do?

-Joshua

Xenon
01-10-2004, 10:56 PM
No it doesn't exist already.

Yes it is doable and shouldn't be that hard if i see this correctly
(just a little edit to parse_bbcode, some preg_replaces)

But i would suppose, you should use the vb-parsing function on your newspage as well.
Most portals do this, as it's not that hard :)