Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCustom functionality on module install?Custom functionality on module install?
Previous
 
Next
New Post
7/2/2010 8:57 AM
 
Hi,

Can anyone tell me if it's possible to subscribe to an event or callback that is fired when a module is installed? I want to create a user profile property for use by the module, and the best time to do it would be on successful installation.

Similarly, it would be good to be able to remove the definition when the module is uninstalled.

Any help appreciated.


Paul Taylor
Dotcom Software Solutions Ltd
DotNetNuke, ASP.NET and SQL Server Development
 
New Post
7/2/2010 9:27 AM
 
Paul, are you using the 3.0 or 5.0 manifest version format? In 5 there is the EventQueue but I am not sure this is going to do what you need to do. 

Another option, especially since Profile properties are portal specific, is to check for it's existence in your module on page load/init. Then, if it doesn't exist create it on the fly and then add the returned profile property definition ID (or something, maybe true/false) to your module settings. This will allow you to avoid having to check on subsequent requests again since you can just check the module settings to see if it already exists for that portal (and module settings are already stored in cache regardless of you adding this to it or not). Then, to clear it out on uninstall you can just add some logic to your uninstall.SqlDataProvider to delete it then (but be careful here, you don't want to delete valid properties). 


Chris Paterra

Get direct answers to your questions in the Community Exchange.
 
New Post
7/6/2010 4:51 AM
 
Hi Chris,

Thanks for your reply. I'm going to be using both manifest formats to cover DNN4 and 5.

Are profile properties always portal specific? I noticed that some have a null PortalID in the table.

In any case, I think your suggestion is the way forward. However, I don't think it will be possible to identify the profile property definition with enough certainty in Uninstall.SqlDataProvider, so will probably just have to leave the data there on uninstall.


Paul Taylor
Dotcom Software Solutions Ltd
DotNetNuke, ASP.NET and SQL Server Development
 
New Post
7/6/2010 4:56 AM
 
The ones that have a null portalid are the original properties that are strongly typed in the code (country, postalcode, firstname, etc.). You should notice that each portal also has their own copy of these. So to answer your question, yes they are portal specific. 

Chris Paterra

Get direct answers to your questions in the Community Exchange.
 
New Post
7/16/2010 4:43 AM
 
Thanks Chris, that's good to know!


Paul Taylor
Dotcom Software Solutions Ltd
DotNetNuke, ASP.NET and SQL Server Development
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesCustom functionality on module install?Custom functionality on module install?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out