vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Need change static URL in posts after move server (https://vborg.vbsupport.ru/showthread.php?t=67948)

mixer66 08-03-2004 12:10 PM

Need change static URL in posts after move server
 
Hi,

Hope some1 can help us with the change of 660 static URL's in posts inside the mysql database after move from server and also change of the vbulletin root locatie. For example :

http://www.eurovan2.com/modules/vbulletin/upload/......... ( old situation )
http://www.eurovan2.com/forum/........... (new situation )

So exactly need a forumular to change /modules/vbulletin/upload/ to /forum/ inside the posts so all the old threads can be looked in on the new server. I hope some1 can help us out with this problem, because we'r not really sql guru's.

Many thanks

Xenon 08-03-2004 12:19 PM

Actually very simple:

[SQL]UPDATE post SET pagetext = REPLACE (pagetext, '/modules/vbulletin/upload', '/forum')[/sql]

remember always do a backup before running such queries :)

Andreas 08-03-2004 12:23 PM

[sql]UPDATE post SET pagetext = REPLACE(pagetext, 'http://www.eurovan2.com/modules/vbulletin/upload/', 'http://www.eurovan2.com/forum/')[/sql]

You might also want to reset pre-parsed posts:
[sql]TRUNCATE post_parsed[/sql]

mixer66 08-03-2004 01:14 PM

Hi,


Many thanks for all help, this sql query worked perfectly many many thanks.
:up:

Xenon 08-03-2004 05:27 PM

you're welcome Gerd :)

CarCdr 08-03-2004 05:42 PM

I had to do this some time ago when we moved the site. I have never understood why the default behaviour is not to use special relative URL's for self-referencing links -- links to the current home URL. Self-referencing links would be stored relative, with a [homeurl] prefix (or whatever) and be expanded when the post is retrieved.

Natch 08-03-2004 05:58 PM

Even more so I have wondered why post content is not parsed to see if it is local contact and if so to make links open in the same window, and to open in a new window if the content is heading offsite ...

CarCdr 08-03-2004 06:15 PM

Bugs me too. The behavior you suggest is more like other forum software. (One exception I do not mind is attachment fetching.)


All times are GMT. The time now is 12:43 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.01243 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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