vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Search and Replace in post and user table (https://vborg.vbsupport.ru/showthread.php?t=44553)

the_sisko 10-12-2002 10:00 PM

Search and Replace in post and user table
 
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:
PHP Code:

makenavselect("Announcements");
//++++ 

and replace it with
PHP Code:

makenavselect("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

Quote:

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

Quote:

Originally Posted by CSS59
does it work for 3.0.3?

No. Must be ported.

Khashyar 04-16-2005 06:39 PM

Quote:

Originally Posted by jisung
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.


All times are GMT. The time now is 04:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01067 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete