Ingenious
Well-known member
I'm trying to tidy up some very old posts over 10 years old, which were converted from Ikonboard to vB to Xenforo, but appear to contain HTML. So, the HTML appears in the actual post as plain text. Some of this is simple replace, like the </font> and <table> tags, plus some of the smilies (which were saved in the database as IMG BBCode). I can just find and remove these.
But some have the equivalent of wildcards, so wondering what to do, example:
The color being different with various posts.
I need to replace <font color=*> with ' ' (nothing).
The other one is the exotic smilies. I can do a simple search/replace, for example, find:
With:
But for the remainder (all the odd smilies not covered by the basic ones in XF), I need to do the equivalent of finding and removing:
I guess I can run an update/replace MySQL command for the static ones via PHPMyAdmin but what about the wildcard ones? Any scripts out there which can do this for me? Alternatively, I can use Kier's post search/replace add-on, but I'd need someone to advise on the PCRE expressions to use please for the two examples above, as it's all Greek to me
But some have the equivalent of wildcards, so wondering what to do, example:
Code:
<font color='#F660AB'>
The color being different with various posts.
I need to replace <font color=*> with ' ' (nothing).
The other one is the exotic smilies. I can do a simple search/replace, for example, find:
Code:
[IMG]http://www.my-forum-url/iB_html/non-cgi/emoticons/smile.gif[/IMG]
With:
Code:
:)
But for the remainder (all the odd smilies not covered by the basic ones in XF), I need to do the equivalent of finding and removing:
Code:
[IMG]http://www.my-forum-url/iB_html/non-cgi/emoticons/*[/IMG]
I guess I can run an update/replace MySQL command for the static ones via PHPMyAdmin but what about the wildcard ones? Any scripts out there which can do this for me? Alternatively, I can use Kier's post search/replace add-on, but I'd need someone to advise on the PCRE expressions to use please for the two examples above, as it's all Greek to me