The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
A Query to perform a text substitution
Greetings,
I am asking this question here after I didn't get any response on vbulletin.com. There's probably more general MySQL/Programming knowledge here anyway. THE PROBLEM: I need to do a global substitution on unique text in the POST table's PAGETEXT field. More specifically I need to substitute Code:
[img]http://onedomain.com/.... for [img]http://anotherdomain.com/... MORE DETAILS: The reason I need to do this is that vb3 handles [img] tags differently than vb2.x. Before, if no domain was specified, the [img] links became relative paths. Now if no link is specified, it just prints out the bbcode with no link. Many thanks, Matt |
#2
|
||||
|
||||
I did this recently: this query structure will help [SQL]UPDATE table SET field = replace(field, 'searchtext', 'replacetext'); [/SQL]
BACK UP YOUR DATABASE FIRST OF COURSE. |
#3
|
|||
|
|||
Thanks Natch. I did get a response from another kind gentleman over on Vbulletin.com that had the identical suggestion. I also used it to remove some nasty nbsp; things that were left in there.
Sort of electronic high colonics (maybe semicolon-ics)? Regards, Matt |
#4
|
||||
|
||||
is code for a non-breaking space - you can daisy-chain them together to space out text, to ensure that a exact number of spaces will appear in a location in an HTML page. Normally if you put a lof od spaces, the HTML renderer will only render one.
NP - glad to help out |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|