Topic: BBCode

I have made some small changes to the BBCode-interpreter. Added an extra tag that I used in a forum I converted from.

Works fine on new post, but some of the old posts also have this code. It seems like the formatting of the posts are cached - but not in the cache directory.

Is there a way to "re-parse" all of the posts?

Re: BBCode

All posts are parsed when displayed, there is no caching. Make sure the tags are all in the correct case?

Re: BBCode

Strange.

If I go to an "unformatted" post and click "edit" and then "submit" (without doing any editing), the problem is fixed. Unfortunately there are very many posts that needs to be clicked.

To me it seems like a kind of caching, but I am not sure, and have not been able figure it out by studying the db.

Re: BBCode

There's no caching being done, the only thing that is called is preparse_bbcode

Re: BBCode

I see the preparse_bbcode function, and I have modified that myself.

But is it being called every time someone views a post? Or just when someone posts?

I just double checked. I can definately see the old BBTags in the forum. Reloading does not change it. But if I go to "edit" and just submits it once again, it is parsed correctly.

Re: BBCode

preparse_bbcode is called before posts are added to the database.
So, lets say you create a list BBCode. If preparse turns [LIST] into [list], then any pre-existing posts with [LIST] might not be parsed properly (because do_bbcode is looking for [list], not [LIST])

Re: BBCode

Thanks. That makes perfect sense.

Then I guess there is no straight forward ways of fixing this (apart from doing a replace in the db or adding an uppercase version of the parser).

Thanks a lot for your help.