XF 1.3 Stripping old coding from posts

Disciple of Nagash

Active member
Hi,

I have finally installed XF on my live forum. However I have noticed that there are some tags / code that are in posts, that are no longer supported.

Example: [mod] [/mod]

Plus there are some from images that were inserted previous ([image=54545])

Is there a simple way to strip these from my posts?

Cheers
 
We had a bunch of leftover code and created a notice requesting people report posts with visible code. Offered some items as a bounty and that encouraged some to go hunt it down for us.
 
I still havent found an answer to edit hundreds of thousands of posts. The add and replace tool is a excellent tool for a small to medium forum but what can a large forum owner do to solve this? There has to be a way.
 
I still havent found an answer to edit hundreds of thousands of posts. The add and replace tool is a excellent tool for a small to medium forum but what can a large forum owner do to solve this? There has to be a way.

Im in the process of doing this right now and here is an overview of what I have done.

I downloaded RegEx Magic and used it to build the regular expressions for the BB code I wanted to remove. There is a bit of a learning curve, but once you get a hang of it, you should be able to remove just about everything. RegEx magic will produce PHP specif regular expressions.

Now to do the actual stripping of the BB code, I extedend this addon, which is essentially an extension of the XF import system. Just replace the VBSEO select with a XF_POST select.

upload_2014-6-28_23-10-57.webp

Then add all your regex statements

upload_2014-6-28_23-13-7.webp



Finally, update the XF_POST table
upload_2014-6-28_23-15-14.webp

This addon will not time out and can run unattended for hours.

RegEx is a fine art and will take lots of practice to perfect. Before updating the XF_POST table, I created a temp table with columns for the original message, and columns for each regex I used, which allowed me to perfect it.

This is very tedious, can be frustrating and should only be attempted by someone who has some php skills and a development environment with a working debugger.

I cant release this as an addon as its specif to my version of php, plus it imports other stuff and it was quickly hacked together.
 
Top Bottom