To use a system wide personalisation - instead of using the moduleid of your active module.
You can instead use the moduleid of the "Site Settings" module.
Dim objModules As New Entities.Modules.ModuleController
Dim myModuleId As Integer = objModules.GetModuleByDefinition(PortalId, "Site Settings").ModuleID
DotNetNuke.Services.Personalization.Personalization.SetProfile(myModuleId .ToString, "Voted", True)
Note however - that you need to be a little careful with the naming of your personalisation items since you are technically using another module to hang your settings off - and as such other modules may also be trying to utilise the same storage name space.
The best bet is to add some sort of "unique" prefix = so instead of "Voted" maybe "aham_Voted" this will ensure that your GLOBAL personalisation settings remain unique.
SO to set:
DotNetNuke.Services.Personalization.Personalization.SetProfile(myModuleId .ToString, "aham_Voted", True)
and to get:
If Not DotNetNuke.Services.Personalization.Personalization.GetProfile(myModuleId .ToString, "aham_Voted") Is Nothing Then
Return CType(DotNetNuke.Services.Personalization.Personalization.GetProfile(myModuleId .ToString, "aham_Voted"), Boolean)
Else
Return False
End If
Westa