Select the search type
  • Site
  • Web
Search
You are here:  Company/News

Blog2mind

SQL Script to move stuff from your web pages (Html boxes) to your Blog

This script will move stuff from a DNN HTML module to a DNN Blog module. I needed it just now and I jot it down here so as not to forget it and if it helps you ... well so much the better.

1. Find the module you want to import. Note the ModuleID (click settings and you see the 'mid' in the querystring of your browser)

2. Find the Blog ID you want it to go (in your blog go to Blog Settings and note the BlogID in the querystring)

3. Run the following code in Host > SQL replacing the variables with their corresponding values:

INSERT INTO {objectQualifier}Blog_Entries
(BlogID, Title, Entry, AddedDate, Published, [Description], AllowComments, DisplayCopyright, Permalink)
SELECT @BlogID, 'Title', h.DesktopHtml, h.CreatedDate, 1, 'Descr', 1, 0, ''
FROM {objectQualifier}HtmlText h
WHERE h.ModuleId=@ModuleID

4. Go to your blog and edit the newly created entries. Note that (1) you might need to get a refresh of the module from cache and (2) your blog entry is at the date the HTML module was last edited.

 

Archive