Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Search and Replace in post and user table Details »»
Search and Replace in post and user table
Version: 1.00, by the_sisko the_sisko is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 10-12-2002 Last Update: Never Installs: 17
Supported
 

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!!!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-24-2003, 12:33 AM
ScruffyDeluxe's Avatar
ScruffyDeluxe ScruffyDeluxe is offline
 
Join Date: Feb 2002
Location: Merseyside
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whao~ this is quality. :classic:
Reply With Quote
  #13  
Old 03-22-2003, 10:27 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #14  
Old 07-12-2003, 10:10 AM
SemperFidelis SemperFidelis is offline
 
Join Date: May 2002
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Outstanding
Youve got no idea how much time and effort you have saved me

Thankyou very much.
Reply With Quote
  #15  
Old 08-16-2003, 09:39 PM
SloppyGoat's Avatar
SloppyGoat SloppyGoat is offline
 
Join Date: Feb 2002
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #16  
Old 04-14-2004, 12:58 PM
jisung jisung is offline
 
Join Date: Dec 2001
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't work with 2.2.8. Any way to make it work in 2.2.8?
Reply With Quote
  #17  
Old 01-17-2005, 11:33 PM
CSS59 CSS59 is offline
 
Join Date: Oct 2004
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does it work for 3.0.3?
Reply With Quote
  #18  
Old 01-17-2005, 11:39 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CSS59
does it work for 3.0.3?
No. Must be ported.
Reply With Quote
  #19  
Old 04-16-2005, 06:39 PM
Khashyar Khashyar is offline
 
Join Date: Jan 2003
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #20  
Old 08-15-2005, 07:42 PM
jdennis jdennis is offline
 
Join Date: Nov 2003
Location: NC
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:05 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04795 seconds
  • Memory Usage 2,288KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete