Public ReadOnly Property ModuleActions() As DotNetNuke.Entities.Modules.Actions.ModuleActionCollection Implements DotNetNuke.Entities.Modules.IActionable.ModuleActions
Get
' 1. Add a menu item to the actions menu
Dim Actions As New DotNetNuke.Entities.Modules.Actions.ModuleActionCollection
Actions.Add(GetNextActionID, _
"Check for Updates", _
"", _
"", _
"", _
GetCheckUpdatesURL("your module name"), _
False, _
DotNetNuke.Security.SecurityAccessLevel.Host, _
True, _
True)
Return Actions
End Get
End Property
Private Function GetCheckUpdatesURL(ByVal SourceModuleName As String) As String
' 2. This function figures out whether you already have DNN Update installed,
' if not, it redirects the user to the dnnupdate website
Dim objTab As DotNetNuke.Entities.Tabs.TabInfo
With New DotNetNuke.Entities.Tabs.TabController
objTab = .GetTabByName("DNN Update", DotNetNuke.Common.Utilities.Null.NullInteger)
End With
If objTab Is Nothing Then
' direct to www.dnnupdate.com
Return "http://www.dnnupdate.com/module-intro.content?module=" & _
SourceModuleName
Else
Return objTab.FullUrl & IIf(objTab.FullUrl.IndexOf("?") >= 0, "&", "?") & _
"module=" & SourceModuleName
End If
End Function