IF EXISTS (select * from dbo.sysobjects where id = object_id(N'{objectQualifier}DMX_Init') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
DROP TRIGGER {databaseOwner}{objectQualifier}DMX_Init
GO

CREATE TRIGGER {databaseOwner}{objectQualifier}DMX_Init
ON {databaseOwner}{objectQualifier}Portals
AFTER INSERT
AS

BEGIN

DECLARE @PortalID INT
SET @PortalId = (SELECT PortalID FROM INSERTED)

DECLARE @AdminRoleId INT
SET @AdminRoleId = (SELECT AdministratorRoleId FROM INSERTED)

DECLARE @RegRoleId INT
SET @RegRoleId = (SELECT RegisteredRoleId FROM INSERTED)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewCollection.ascx', Null, 'Collection', 'DesktopModules/Bring2mind/DMX/images/Collection.Gif', 'DesktopModules/Bring2mind/DMX/images/Collection.Big.Gif', 0, Null, 'Collection', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', Null, 'Command.Details', Null, Null, 0, Null, 'View Details', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Download', Null, 'Command.Download', Null, Null, 0, Null, 'Download Entry', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/EditEntry.ascx', Null, 'Command.Edit', Null, Null, 0, Null, 'Edit Entry', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/EditEntry.ascx', Null, 'Command.New', Null, Null, 0, Null, 'New Entry', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/Search.ascx', Null, 'Command.Search', Null, Null, 0, Null, 'Search', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewCategory.ascx', Null, 'Command.ViewCategory', Null, Null, 0, Null, 'View Category', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewCollection.ascx', Null, 'Command.ViewCollection', 'DesktopModules/Bring2mind/DMX/images/Collection.Gif', 'DesktopModules/Bring2mind/DMX/images/Collection.Big.Gif', 0, Null, 'Collection', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewSubscriptions.ascx', Null, 'Command.ViewSubscriptions', Null, Null, 0, Null, 'View Subscriptions', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'pdf', 'File.Adobe.Acrobat', 'DesktopModules/Bring2mind/DMX/images/File.Adobe.Acrobat.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Adobe.Acrobat.Big.Gif', 0, 'application/pdf', 'Adobe Portable Document Format', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'indd', 'File.Adobe.InDesign', 'DesktopModules/Bring2mind/DMX/images/File.Adobe.InDesign.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Adobe.InDesign.Big.Gif', 0, 'application/octet-stream', 'Adobe InDesign Document', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'psd', 'File.Adobe.Photoshop', 'DesktopModules/Bring2mind/DMX/images/File.Adobe.Photoshop.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Adobe.Photoshop.Big.Gif', 0, 'application/octet-stream', 'Adobe Photoshop Image', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'dwg', 'File.Autocad.Dwg', 'DesktopModules/Bring2mind/DMX/images/File.Dwg.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Dwg.Big.Gif', 0, 'application/acad', 'Autocad Drawing', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'avi', 'File.Avi', 'DesktopModules/Bring2mind/DMX/images/File.Avi.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Avi.Big.Gif', 0, 'video/x-msvideo', 'AVI Movie File', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'bmp', 'File.Bmp', 'DesktopModules/Bring2mind/DMX/images/File.Bmp.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Bmp.Big.Gif', 0, 'image/bmp', 'Windows Bitmap', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'dxf', 'File.Dxf', 'DesktopModules/Bring2mind/DMX/images/File.Dxf.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Dxf.Big.Gif', 0, 'application/dxf', 'Digital Exchange Format', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'emf', 'File.Emf', 'DesktopModules/Bring2mind/DMX/images/File.Emf.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Emf.Big.Gif', 0, 'application/octet-stream', 'Enhanced Metafile', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'eps', 'File.Eps', 'DesktopModules/Bring2mind/DMX/images/File.Eps.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Eps.Big.Gif', 0, 'application/postscript', 'Encapsulated Portscript', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'gif', 'File.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Gif.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Gif.Big.Gif', 0, 'image/gif', 'Gif Image', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'htm;html', 'File.Htm', 'DesktopModules/Bring2mind/DMX/images/File.Htm.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Htm.Big.Gif', 0, 'text/html', 'Html File', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'jpg;jpeg', 'File.Jpg', 'DesktopModules/Bring2mind/DMX/images/File.Jpg.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Jpg.Big.Gif', 0, 'image/jpeg', 'Jpeg Image', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'xls', 'File.Microsoft.Excel', 'DesktopModules/Bring2mind/DMX/images/File.Microsoft.Excel.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Microsoft.Excel.Big.Gif', 0, 'application/vnd.ms-excel', 'Excel Spreadsheet', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'xsn', 'File.Microsoft.Infopath', 'DesktopModules/Bring2mind/DMX/images/File.Microsoft.Infopath.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Microsoft.Infopath.Big.Gif', 0, 'application/octet-stream', 'Infopath Form', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'ppt', 'File.Microsoft.Powerpoint', 'DesktopModules/Bring2mind/DMX/images/File.Microsoft.Powerpoint.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Microsoft.Powerpoint.Big.Gif', 0, 'application/powerpoint', 'Powerpoint Presentation', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'doc', 'File.Microsoft.Word', 'DesktopModules/Bring2mind/DMX/images/File.Microsoft.Word.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Microsoft.Word.Big.Gif', 0, 'application/msword', 'Word Document', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'mpg;mpeg;mpe', 'File.Mpeg', 'DesktopModules/Bring2mind/DMX/images/File.Mpeg.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Mpeg.Big.Gif', 0, 'video/mpeg', 'Mpeg Movie', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'png', 'File.Png', 'DesktopModules/Bring2mind/DMX/images/File.Png.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Png.Big.Gif', 0, 'image/png', 'Portable Network Graphics', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'mov', 'File.Quicktime', 'DesktopModules/Bring2mind/DMX/images/File.Quicktime.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Quicktime.Big.Gif', 0, 'video/quicktime', 'Quicktime Movie', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'rar', 'File.Rar', 'DesktopModules/Bring2mind/DMX/images/File.Rar.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Rar.Big.Gif', 0, 'application/octet-stream', 'Rar archive', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'rtf', 'File.Rtf', 'DesktopModules/Bring2mind/DMX/images/File.Rtf.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Rtf.Big.Gif', 0, 'text/richtext', 'Rich Text File', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'svg', 'File.Svg', 'DesktopModules/Bring2mind/DMX/images/File.Svg.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Svg.Big.Gif', 0, 'application/svg', 'Standard Vector Graphics', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'tga', 'File.Targa', 'DesktopModules/Bring2mind/DMX/images/File.Targa.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Targa.Big.Gif', 0, 'image/targa', 'Targa Image', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'txt', 'File.Text', 'DesktopModules/Bring2mind/DMX/images/File.Text.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Text.Big.Gif', 0, 'text/plain', 'Text File', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'tif;tiff', 'File.Tiff', 'DesktopModules/Bring2mind/DMX/images/File.Tiff.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Tiff.Big.Gif', 0, 'image/tiff', 'Tiff Image', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'ttf', 'File.Ttf', 'DesktopModules/Bring2mind/DMX/images/File.Ttf.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Ttf.Big.Gif', 0, 'application/octet-stream', 'Truetype Font', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', Null, 'File.Unknown', 'DesktopModules/Bring2mind/DMX/images/File.Unknown.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Unknown.Big.Gif', 0, 'application/octet-stream', 'Unknown File Format', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'wav', 'File.Wav', 'DesktopModules/Bring2mind/DMX/images/File.Wav.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Wav.Big.Gif', 0, 'audio/x-wav', 'Wav Audio', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'wmf', 'File.Wmf', 'DesktopModules/Bring2mind/DMX/images/File.Wmf.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Wmf.Big.Gif', 0, 'application/octet-stream', 'Windows Metafile', @PortalId, 1, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', 'zip', 'File.Zip', 'DesktopModules/Bring2mind/DMX/images/File.Zip.Gif', 'DesktopModules/Bring2mind/DMX/images/File.Zip.Big.Gif', 0, 'application/zip', 'Zip archive', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Bring2mind/DMX/ViewDetails.ascx', Null, 'Hyperlink', 'DesktopModules/Bring2mind/DMX/images/Hyperlink.Gif', 'DesktopModules/Bring2mind/DMX/images/Hyperlink.Big.Gif', 0, Null, 'Hyperlink', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', '', '1', 'Navbutton.Collections', 'DesktopModules/Bring2mind/DMX/images/NB_Collections.gif', 'DesktopModules/Bring2mind/DMX/App_LocalResources/SharedResources', 0, Null, 'Collections', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Command=Core.ViewCategory', '2', 'Navbutton.Categories', 'DesktopModules/Bring2mind/DMX/images/NB_Categories.gif', 'DesktopModules/Bring2mind/DMX/App_LocalResources/SharedResources', 0, Null, 'Categories', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES ('-1;', 'Core', 'Command=Core.Search', '3', 'Navbutton.Search', 'DesktopModules/Bring2mind/DMX/images/NB_Search.gif', 'DesktopModules/Bring2mind/DMX/App_LocalResources/SharedResources', 0, Null, 'Search', @PortalId, 0, Null)

INSERT INTO {databaseOwner}{objectQualifier}DMX_Extensions ([AccessRights], [Addon], [ControlToLoad], [Custom], [ExtensionKey], [Icon16], [Icon32], [IsPrivate], [MimeType], [Name], [PortalId], [ViewByDefault], [EntryTypes])
VALUES (CAST(@RegRoleId AS NVARCHAR(200))+';', 'Core', 'Command=Core.ViewSubscriptions', '4', 'Navbutton.MySubscriptions', 'DesktopModules/Bring2mind/DMX/images/NB_MySubscriptions.gif', 'DesktopModules/Bring2mind/DMX/App_LocalResources/SharedResources', 0, Null, 'MySubscriptions', @PortalId, 0, Null)

END

GO

DELETE FROM {databaseOwner}{objectQualifier}DMX_Extensions
WHERE Addon='Core'
AND ExtensionKey='Command.Batch.BulkDelete'
GO

