PDA

View Full Version : Search and Replace in post and user table


the_sisko
10-12-2002, 10:00 PM
This hack do a simple search and replace over your post table (pagetext column) and user table (signature column).

I needed to run a search and replace on an old URL we were using and find the replace query for it and put a little frontend around it.

Please feel free to add your comments on this.

Its tested on a vB 2.2.5 with about ~2000 user and ~410000 posts.


If you like to add it to your admin CP open index.php and find:makenavselect("Announcements");
//++++and replace it withmakenavselect("Announcements");
//++++
makenavoption("Start","replace_in_posts.php?action=modify");
makenavselect("Search and Replace");
//++++

Upload the attached file to your /admin/ folder.

THIS HACKS DOES A SEARCH AND REPLACE OVER YOUR POST AND USER TABLE!!! DON'T USE THIS HACK IF YOU DON'T HAVE A BACKUP OF YOUR DATABASE! I'M NOT RESPONSIBLE FOR ANY DAMAGE YOU PUT TO YOUR DATABASE BY USING THIS HACK!!!

the_sisko
10-12-2002, 10:44 PM
Sreenshot

Xenon
10-13-2002, 09:32 AM
not bad sisko, i'm sure many users can use this

Floris
10-13-2002, 12:17 PM
I know I certainly want this. Thank you! Will use it later tonight..

Dean C
10-13-2002, 12:26 PM
im a bit confused as to what this does...?

FleaBag
10-13-2002, 02:17 PM
This is cool for updating redundant smilie code. :D

Streicher
10-13-2002, 02:33 PM
Originally posted by Mist
im a bit confused as to what this does...?

This hack does a Search & Replace through your post table. For example you want to replace the word "infopop" with "vBulletin" in all the postings in your forum, you simply can use this hack. It works also with parts of URL's. You need only seconds for it.

I love it.

The Ghost
10-13-2002, 04:03 PM
I searched so long for this hack! We've imported Posts from a DCForum, so we have a many bad urls........

thx thx thx! Great Hack!!

Chris M
10-13-2002, 05:59 PM
Cool:)

Satan

MalaK_3araby
10-15-2002, 07:33 PM
the_Sisko

I have always wanted this .. i need to do mass Find/Replace for tags that i used once but not any more ..

a BIG Thank You ..

* installs *

ScruffyDeluxe
01-24-2003, 12:33 AM
Whao~ this is quality. :classic:

Boofo
03-22-2003, 10:27 AM
Does this hack do an "Are you sure?" before it does anything? It might be nice to have that in case you change you mind before doing something. ;)

SemperFidelis
07-12-2003, 10:10 AM
Outstanding
Youve got no idea how much time and effort you have saved me

Thankyou very much.
:)

SloppyGoat
08-16-2003, 09:39 PM
This is exactly what I was just looking for! I just changed domain names, and there's tons of threads with links to other threads that need to be changed. Thanks!

jisung
04-14-2004, 12:58 PM
Doesn't work with 2.2.8. Any way to make it work in 2.2.8?

CSS59
01-17-2005, 11:33 PM
does it work for 3.0.3?

Andreas
01-17-2005, 11:39 PM
does it work for 3.0.3?
No. Must be ported.

Khashyar
04-16-2005, 06:39 PM
Doesn't work with 2.2.8. Any way to make it work in 2.2.8?

Hi guys...

Sounds like a wonderful hack.....

Does anyone know if it works with 2.3.x versions of VB?

Thanks,

Khashyar

jdennis
08-15-2005, 07:42 PM
Very nice! Works on vb 2.3.2 for me (with all the security patches).

Btw, I altered the query slightly to only search and replace within one forum... I have it commented out and the hack as published installed, but I can toggle to only do a particular forum (didn't update the interface, that'd be a nice addition) pretty quickly if needed.