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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0IUpgradeable and UpgradeModule method simply explainedIUpgradeable and UpgradeModule method simply explained
Previous
 
Next
New Post
9/19/2007 11:49 AM
 

Hi all

I am looking for a simple explanation of what this is all about. It is not described in Michael Washington's otherwise excellent Module Developoment documentation. It is mentioned but not explained in Professional DotNetNuke 4 chapter 8 page 282. And the blog posts I have found all seem to assume that you understand it.

So could someone please point me in the right direction or explain it here.

kind regards

Geoffrey

 

 


Geoffrey Morton-Haworth www.yalaworld.net
 
New Post
9/19/2007 3:41 PM
 


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
9/19/2007 9:44 PM
 

Hi Michael

Thank you for a fast response.

Yes, I had seen this blog but what I am looking for is a worked example, like you gave us for IPortable, IActionable and I Searchable in your Module Developer's manual. Maybe it is all so trivial thet there is nothing to say about it but from my point of ignorance I don't know what code to put where and why.

Can you point me to a good model in one of the core modules, perhaps?

Kind regards

Geoffrey

 

 


Geoffrey Morton-Haworth www.yalaworld.net
 
New Post
9/21/2007 10:17 AM
 

Hi Michael
Let me try and asks this question more clearly. I have searched again for this in the documentation.

I understand that:-

"Another thing that happens when you install a module is that it fires the "UpgradeModule" method if the module implements the IUpgradeable interface.

Public Interface IUpgradeable
  Function UpgradeModule(ByVal Version As String) As String
End Interface

In fact this method will be called once after any sql script has been executed and it will be passed the version number of the current script. So you have to code your upgrade logic knowing that this method can be called multiple times. This is usually done testing for the Version parameter on a "select case" statement."

What I am looking for is an example of the sort of code that might go into the UpgradeModule function from one of the core modules or projects, perhaps?

Finally, a small detail, having added the interface into my controller class how to I get the ModuleDefinitions check box to now show that I have implemented IUpgradeable? Clicking Update doesn't seen to do it.

Perhaps there is a hole in the documentation for Module Developers here that you could plug?

Kind regards


Geoffrey Morton-Haworth www.yalaworld.net
 
New Post
9/21/2007 1:42 PM
 

Geoffrey,

IUpgradeable is suggested not to be used, Joe Brinkman explains why here.  If that doesn't deter you, you'll be looking for something like this (from the Blog module):

        Public Function UpgradeModule(ByVal Version As String) As String Implements Entities.Modules.IUpgradeable.UpgradeModule
            Dim message As String

            Select Case Version
                Case "03.01.20"         ' first version as DotNetNuke sub project
                    message = message & " In Custom Upgrade Version " & Version & " - "
                    Dim _CustomUpgrade As New CustomUpgrade
                    message += _CustomUpgrade.UpgradeNewBlog()
                    message += " - " & _CustomUpgrade.UpgradeForumBlog()
            End Select
            Return message

        End Function


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0IUpgradeable and UpgradeModule method simply explainedIUpgradeable and UpgradeModule method simply explained


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