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 *


All times are GMT. The time now is 12:15 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.01220 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete