Is there some way I can strip color tags before an import?

Jesepi

Well-known member
Changing over to a new color style, but I am worried about how posts will look as we are going from a darker background to a very light one.

Is there a query or something I could run on the posts table to remove all font= and color= tags?
 
You will be able to remove the closing tags easily enough as they will all be the same. e.g. [/font], [/color].

For the opening tags however you will either need a different query for each specific font and color, which could be a lot depending on how many different ones there are.
Or you can use regex to catch them all with one string.

FWIW, I did exactly the same with my phpBB forum, removing redundant BB Code before importing.
 
Sorry for the late response.

And yes some sort of regex would more than likely be needed, as this forum has been in place for many years and there are several fonts/colors that have been used. Reverting everything to just the default font, while preserving the basic bold/italic/underline formatting, would probably offer the safest path to a new forum/color style in terms of readability when going back through posts made before the migration.

Would you happen to know where I could find an example of something to accomplish this?

Or is anyone reading this that is able to make a query to run on the posts table to accomplish what I'm going for?
 
Top Bottom