PDA

View Full Version : Replace Text/Impex Issue


prisoner 24601
Thu 1st May '08, 2:29am
Jake Bunce sent me this way.

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.

Jerry
Thu 1st May '08, 4:14pm
I have just updated the phpBB3 parsed to deal with the new url tags.

prisoner 24601
Thu 1st May '08, 4:28pm
I just created a new database, downloaded a new copy of vBulletin 3.7 and installed, downloaded a new copy of IMPEX (1.8.9) and installed and ran the whole shebang.

Same problem.

By "phpbb 3 parsed" you mean the files in impex\systems\phpbb3, yes?

Jerry
Thu 1st May '08, 5:30pm
Ah I see it now, it's semi colons between the uid and the url, as well as colons.

Updating it now.

prisoner 24601
Thu 1st May '08, 6:12pm
Very shiny. That seems to have worked.

Thank you very much.