I'll recapitulate and make a couple corrections because vBulletin is actually changing what I type:
=========
This may be basic, but I'm a n00b.
I recently installed vBulletin 3.7. Shiny. I then IMPEX'd a phpBB 3.0 forum.
However, after IMPEXing, vBulletin nastily added text in some places. Particularly to links. So, all the links people posted are now in the form of ...
[url=http://server.com;randomletters]Link[/url;randomletters]
I'd like to run an SQL query to find and replace ...
;randomletters]
with just ...
]
(At least for this example. I've also got other text mishaps.)
I have found a bit of SQL code in another thread ...
UPDATE post
SET pagetext = REPLACE(pagetext,'OLD TEXT','NEW TEXT')
But this would only replace specific fulltext, not a random snippet where the only constants are ";" at the beginning and "]" at the end, like I'm wanting.
I'm sure there are a few variables that I could use to change 'OLD TEXT' and 'NEW TEXT', but I'm a n00b and my Google-Fu is lacking for this.
Thanks in advance!
===========
I looked at this further with phpMyAdmin.
Actual example of what's being added in the SQL code is my screenshot. I can't write it because vBulletin and phpBB changes it if I actually type it in a post.
If you type "&# 58;" without the space in vBulletin or phpBB (like in a post), you get ":". G'head and try it and hit preview. Magic!
See the "&# 58;" (space added)? The eight characters after this (14vj0iuv, in this example) and before the left bracket (]) are random. The "&# 58;" (space added) characters are only visable in the SQL -- but are consistent on all links.
It's also not happening for all links. I dunno why. However, I do think that if I can find a way to do a global search and replace in SQL for those "&# 58;random]" (space added) with "]" I'd be fine.
Comment