Exploding Garrmondo Weiner Interactive Swiss Army Penis

Exploding Garrmondo Weiner Interactive Swiss Army Penis (http://www.gamingforce.org/forums/index.php)
-   Help Desk (http://www.gamingforce.org/forums/forumdisplay.php?f=36)
-   -   vBulletin Question (Something I Saw Here) (http://www.gamingforce.org/forums/showthread.php?t=33661)

Diversion Aug 4, 2008 03:42 PM

vBulletin Question (Something I Saw Here)
 
I'm asking this here because googled failed and I know I saw this done here at one point :)

A forum I'm running is being moved to a different domain, and instead of starting fresh, I'm keeping members and posts. Now I know I can update the database through phpMyAdmin to switch all instances of the url to the new one, but is it possible within the admin panel for any future instances of the URL posted to automatically be changed to the new one?

Thanks in advance!

Bigblah Aug 4, 2008 03:49 PM

AdminCP -> Plugins & Products -> Add New Plugin

Hook Location: postbit_display_complete
Title: (whatever you want)
Code:
Code:

$this->post['message'] = str_replace("old url","new url",$this->post['message']);
Remember to activate it when you save.


Alternatively you can find the hook for post presave processing and swap the url there, so that the change gets saved to the database whenever a post is submitted.

Diversion Aug 4, 2008 03:59 PM

Thank you very much (that was quick): I assume this'll work if people post in any of the editors? (Quick Reply, Full Reply) :)

Bigblah Aug 4, 2008 10:03 PM

postbit_display_complete fires whenever a post is displayed. As long as people write the old url, when the post is viewed they'll see the new one. Although whenever they edit their post they'll still see the old url, so if you want that changed you'll need to find the hook just before the post is saved (which will trigger whether it's quick or full reply).


All times are GMT -5. The time now is 12:55 AM.

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