PDA

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


the_sisko
12 Oct 2002, 23:42
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
12 Oct 2002, 23:44
Sreenshot

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

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

Dean C
13 Oct 2002, 13:26
im a bit confused as to what this does...?

FleaBag
13 Oct 2002, 15:17
This is cool for updating redundant smilie code. :D

Streicher
13 Oct 2002, 15:33
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
13 Oct 2002, 17:03
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
13 Oct 2002, 18:59
Cool:)

Satan

MalaK_3araby
15 Oct 2002, 20:33
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
24 Jan 2003, 01:33
Whao~ this is quality. :classic:

Boofo
22 Mar 2003, 11:27
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
12 Jul 2003, 11:10
Outstanding
Youve got no idea how much time and effort you have saved me

Thankyou very much.
:)

SloppyGoat
16 Aug 2003, 22:39
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
14 Apr 2004, 13:58
Doesn't work with 2.2.8. Any way to make it work in 2.2.8?

CSS59
18 Jan 2005, 00:33
does it work for 3.0.3?

Andreas
18 Jan 2005, 00:39
does it work for 3.0.3?
No. Must be ported.

Khashyar
16 Apr 2005, 19:39
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
15 Aug 2005, 20:42
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.