View Full Version : mass change text at all posts
dimitris
11-15-2005, 05:45 PM
well, i need a hack that it make a mass change at the users posts one word to another.
I mean, a hack which i will give a word , like dady, and it changes as "Mamy" at all the post. This hack is like chensorship (there is NOT advansed censorship for 3.5.x yet), but for now a mass change text hack will be ok.
It will be usefull for some old bbcode word, or some old hacks from 3.0.x
Maybe this change can be and from db. I can find the order to find all the post which has a specific word from a db, and is:
SELECT `pagetext` FROM `post` WHERE `pagetext` LIKE '%dady%'
......but i dont know what must to do to change all the inside at posts text "dady".
Thx for your time
stonyarc
11-15-2005, 08:01 PM
well, i need a hack that it make a mass change at the users posts one word to another.
I mean, a hack which i will give a word , like dady, and it changes as "Mamy" at all the post. This hack is like chensorship (there is NOT advansed censorship for 3.5.x yet), but for now a mass change text hack will be ok.
It will be usefull for some old bbcode word, or some old hacks from 3.0.x
Maybe this change can be and from db. I can find the order to find all the post which has a specific word from a db, and is:
SELECT `pagetext` FROM `post` WHERE `pagetext` LIKE '%dady%'
......but i dont know what must to do to change all the inside at posts text "dady".
Thx for your time
You'll need a custom script to make this work. Huge loop select / change / update / close times XXXX
Is this something you need 1 time or does it need to be structural?
One time the performance isn't that important so you could fix it with a simple
$textstring = str_replace( 'mammy','daddy ', $textstring );
in a loop and directly update
Marco van Herwaarden
11-16-2005, 04:54 AM
update post set pagetext = replace(pagetext, 'old', 'new') WHERE pagetext LIKE '%old%';
The above query will work. Make sure to backup your database before trying.
If you use post caching, you might also need to empty your post_parsed table.
dimitris
11-18-2005, 03:35 PM
Works MarkoH64
Thx a lot :)
Wayne Luke
11-18-2005, 03:52 PM
well, i need a hack that it make a mass change at the users posts one word to another.
I mean, a hack which i will give a word , like dady, and it changes as "Mamy" at all the post. This hack is like chensorship (there is NOT advansed censorship for 3.5.x yet), but for now a mass change text hack will be ok.
It will be usefull for some old bbcode word, or some old hacks from 3.0.x
Maybe this change can be and from db. I can find the order to find all the post which has a specific word from a db, and is:
SELECT `pagetext` FROM `post` WHERE `pagetext` LIKE '%dady%'
......but i dont know what must to do to change all the inside at posts text "dady".
Thx for your time
Use replacement variables...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.