|
|
|
Junior 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?
|
|
|
|
|
Junior 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.
|
|
|
|