Hi,
I'm building some modules and want to use a SQL Script to create the module definitions etc. for DNN 5.0.1
I've modified a previous script I used for 4.x. Could someone please just check that I've included all that is needed.
After I run this script from within DNN I notice that I have to restart the application from Host Settings.
Cheers, Colin
-- --------------------------------------------------
-- Add Module Package
-- --------------------------------------------------
DECLARE @PortalID [int]
SET @PortalID = NULL
EXEC {databaseOwner}[{objectQualifier}AddPackage]
@PortalID,
@Name = N'CS_AnnouncementManager',
@FriendlyName = N'CS Announcements',
@Description = N'',
@PackageType = N'Module',
@Version = N'1.0.0',
@License = N'',
@Manifest = N'',
@Owner = N'',
@Organization = N'',
@Url = N'',
@Email = N'',
@ReleaseNotes = N'',
@IsSystemPackage = 0,
@CreatedByUserID= -1
-- --------------------------------------------------
-- Add Desktop Module
-- --------------------------------------------------
DECLARE @PackageId [int]
SELECT
@PackageId = PackageId
FROM
{databaseOwner}[{objectQualifier}Packages]
WHERE
(Name = 'CS_AnnouncementManager')
EXEC {databaseOwner}[{objectQualifier}AddDesktopModule]
@PackageID,
@ModuleName = N'CS_AnnouncementManager',
@FolderName = N'Caslar/Modules/Announcements',
@FriendlyName = N'CS Announcements',
@Description = NULL,
@Version = N'01.00.00',
@IsPremium = 0,
@IsAdmin = 0,
@BusinessController = "Caslar.Modules.AnnouncementManager.Components.BusinessController, Caslar.Modules.AnnouncementManager.Components",
@SupportedFeatures = 3,
@CompatibleVersions = NULL,
@Dependencies = NULL,
@Permissions = NULL,
@CreatedByUserID = -1
-- --------------------------------------------------
-- Add Module To Portal
-- --------------------------------------------------
SET @PortalID = 0
DECLARE @DesktopModuleId [int]
SELECT
@DesktopModuleId = DesktopModuleId
FROM
{databaseOwner}[{objectQualifier}DesktopModules]
WHERE
(ModuleName = 'CS_AnnouncementManager')
EXEC {databaseOwner}[{objectQualifier}AddPortalDesktopModule]
@PortalID,
@DesktopModuleId,
@CreatedByUserID = -1
-- --------------------------------------------------
-- Add Module Definition
-- --------------------------------------------------
EXEC {databaseOwner}[{objectQualifier}AddModuleDefinition]
@DesktopModuleId,
@FriendlyName = N'CS Announcements',
@DefaultCacheTime = 0,
@CreatedByUserID = -1
-- --------------------------------------------------
-- Add Module Controls
-- --------------------------------------------------
DECLARE @ModuleDefID [int]
SELECT
@ModuleDefID = ModuleDefID
FROM
{databaseOwner}[{objectQualifier}ModuleDefinitions]
WHERE
(FriendlyName = 'CS Announcements')
EXEC {databaseOwner}[{objectQualifier}AddModuleControl]
@ModuleDefID,
@ControlKey = NULL,
@ControlTitle = NULL,
@ControlSrc = N'DesktopModules/Caslar/Modules/Announcements/ViewAnnouncements.ascx',
@IconFile = NULL,
@ControlType = 0,
@ViewOrder = NULL,
@HelpUrl = NULL,
@SupportsPartialRendering = 0,
@CreatedByUserID = -1
EXEC {databaseOwner}[{objectQualifier}AddModuleControl]
@ModuleDefID,
@ControlKey = 'AnnouncementEditor',
@ControlTitle = 'Announcement Editor',
@ControlSrc = N'DesktopModules/Caslar/Modules/Announcements/Admin/AnnouncementEditor.ascx',
@IconFile = NULL,
@ControlType = 1,
@ViewOrder = NULL,
@HelpUrl = NULL,
@SupportsPartialRendering = 0,
@CreatedByUserID = -1
EXEC {databaseOwner}[{objectQualifier}AddModuleControl]
@ModuleDefID,
@ControlKey = 'AnnouncementList',
@ControlTitle = 'Announcement List',
@ControlSrc = N'DesktopModules/Caslar/Modules/Announcements/Admin/AnnouncementList.ascx',
@IconFile = NULL,
@ControlType = 1,
@ViewOrder = NULL,
@HelpUrl = NULL,
@SupportsPartialRendering = 0,
@CreatedByUserID = -1
EXEC {databaseOwner}[{objectQualifier}AddModuleControl]
@ModuleDefID,
@ControlKey = 'TemplateEditor',
@ControlTitle = 'Template Editor',
@ControlSrc = N'DesktopModules/Caslar/Modules/Announcements/Admin/TemplateEditor.ascx',
@IconFile = NULL,
@ControlType = 1,
@ViewOrder = NULL,
@HelpUrl = NULL,
@SupportsPartialRendering = 0,
@CreatedByUserID = -1
EXEC {databaseOwner}[{objectQualifier}AddModuleControl]
@ModuleDefID,
@ControlKey = 'OptionsEditor',
@ControlTitle = 'Options Editor',
@ControlSrc = N'DesktopModules/Caslar/Modules/Announcements/Admin/OptionsEditor.ascx',
@IconFile = NULL,
@ControlType = 1,
@ViewOrder = NULL,
@HelpUrl = NULL,
@SupportsPartialRendering = 0,
@CreatedByUserID = -1