InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Change Forum URL Expand / Collapse
Author
Message
Posted 12/06/2007 18:08:27
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Customers
Last Login: 23/10/2007 06:45:39
Posts: 30, Visits: 43
We just changed the name of our company and as a result our domain name changed.  I've got the forum running on the new URL, but all the avatars and images in signatures are still pointing to the old domain name.  Is there some way to update all of these?
Post #12924
Posted 13/06/2007 12:24:35
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Customers
Last Login: 23/10/2007 06:45:39
Posts: 30, Visits: 43
Figured out my own answer - Not sureif it's the best way to go (or even if it's good t-sql) but it seems to have worked.  I'm posting here just in case anyone else might be able to use it.

I ran the following script against my InstantForum_Users table:


declare
@test varchar(5000)
declare @OldName as varchar (50)
declare @NewName as varchar (50)
set @OldName = 'forum.olddomain.com'
set @NewName = 'forum.newdomain.com'

update InstantForum_Users
set @test = AvatarURL,
@test = replace ( @test, @OldName, @NewName),
AvatarURL = @test
where AvatarURL like '%' + @OldName + '%'

update InstantForum_Users
set @test = PhotoURL,
@test = replace ( @test, @OldName, @NewName),
PhotoURL = @test
where PhotoURL like '%' + @OldName + '%'

update InstantForum_Users
set @test = cast(PostSignature as varchar(5000)),
@test = replace ( @test, @OldName, @NewName),
PostSignature = @test
where PostSignature like '%' + @OldName + '%'

I also had to do something similar in the InstantForum_Messages table to handle forum posts referencing other posts in the forum.

Post #12930
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, Bare, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 5:48pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 12 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.