How to modify Copyright statement for all DNN instances


Chris Hammond blogged a way to setup copyright statement for all pages on a DNN site from an Admin setting through the use of  SkinObject on a skin. You can read the blog at this link: http://www.dotnetnuke.com/Resources/Blogs/tabid/825/EntryId/2933/Updating-your-DotNetNuke-Copyright-Statement-for-2011-and-beyond.aspx

You can simply leave the Copyright setting blank from the Admin page, the DNN Framework will pick current year along with PortalTitle as your Copyright statement.

However, I have a need to update over 200 DNN sites on our server with my company  copyright statement: Here is a quick code snippet to do so:

 <code>

EXEC
 

 

 sp_MSForEachDB

 
 

 

 

‘ IF EXISTS (select 1 from [?].information_schema.tables wheretable_name=”PortalLocalization”)
begin

declare @sql_updateFooterText Nvarchar(2000)

SELECT @sql_updateFooterText = N” UPDATE [?].dbo.PortalLocalization SET FooterText=””Copyright 2011 by Marsh U.S. Consumer”””

–EXEC sp_executesql @sql_updateFooterText

print @sql_updateFooterText

end

 

 

</code>

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s