This is just a tool I used in order to strip some bbcodes from a phpbb mysql dump. The main idea is to take advantage of ActiveRecord database connector to speed up processing.
-
Update the file config/database.yml if needed (point you development database to the phpbb mysql database)
-
In terminal, run ‘rails console’
-
Execute ‘User.sanitize_bb’
-
Execute ‘Post.sanitize_bb’
Note : Execute steps 3 and 4 several times (until you get the following message in the terminal ‘updated O users/posts’). Reason : bbcodes that are wrongly closed (e.g “[b] x [/b]” instead of “[b] x [/u]”)