Introduction to DotNetNuke:

The current version is 5.x

It was written in Vb.net

But the custom module can be written in...
15.   Survey
   16.   Wiki
   17.   Blog
   18.   FAQs
   19.   Help
   20.   Links
   21.   Media
   22.   Repository
   ...
4. Apart from that there is a setting for each module to perform some more tasks.


There are three types of users provide...
Apart from LiveID, OpenID authentication providers Active Directory,CardSpace comes in Custom
installation mode.

Note: Ma...
In the next screen browse the zip file and click on “Install New Module” link.

Then all the files in the module are extra...
In “Page Functions” click on “Add”.

See the below picture.



Give some name to Page Name, Page Title fields.

Select “No...
Stay in your newly created page.

Now in the control panel which is at the top select “Add New Module” radio button.

Sele...
Select the page ‘Test’ in “Parent Page” dropdown. So Menu12 comes under ‘Test’ tab.And click on
update link.

Add SubMenu:...
Don’t forget to check ‘Include in Menu’ checkbox.

Finally it looks like the below:




There is no limitation on the crea...
Issue:




Limitation: If no .o f tabs increases then Admin, Host won’t appear and the newly added ones also.
There is no ...
Select “Links” in Module dropdown.

Select “LeftPane” in Pane dropdown.

Click on Add link.

In the left side “Links” modu...
Repeat the same for right side pane too as per the requirement.

Creating New User:

Admin -> User Accounts



Adding New ...
How to develop our own custom module:

Environment: Visual Studio 2005 vb.net

                       SqlServer 2005

    ...
Then double click ‘DotNetNuke.sln’ to open the visual studio solution.

It has this projects structure.




Locate the fil...
In browser open http://localhost/dnn4Source/install/install.aspx

It shows typical and custom installation modes.
With Typical installation only some default modules like Links, HTML comes. LiveID, OpenID
authentication providers comes....
Click Next.

Select SqlServer 2000/2005. Give database name. Give credentials. Give dnn4(say) for Object Qualifier.
It hel...
Then click Next.
Then Click Next. Configure host . Remember the host username and password.
Click Next

Default modules are HTML and Links




Click Next

Apart from LiveID,OpenID authentication providers Active Di...
Click Next




Click Next
Click Next.



Configure portal administration . Remember the portal administrator username and password.
Click Next
Install DotNetNuke_04.09.00_StarterKit.vsi starter kit which creates the following templates in Visual
Studio editor.

   ...
Observe the App_Code folder in “http://localhost/dnn4Source/” folder.

It has created ‘ModuleName’ folder having DataProvi...
Read the help page given after adding the module.

It instructs to rename /App_Code/ModuleName to /App_Code/SampleModule, ...
Switch back to ‘dnn4Source’ Visual Studio solution. Open 01.00.00.SqlDataProvider file under
DesktopModules/SampleModule u...
GO


/** Create Stored Procedures **/


create procedure
{databaseOwner}{objectQualifier}YourCompany_GetSampleModules
    ...
/*****     for {databaseOwner} and {objectQualifier} *****/

databaseOwner is generally dbo

objectQualifier is Dnn4 which...
Here

operation_name is Add,Delete,Get,Update (it creates for all CRUD operations)

Module_Name is SampleModule

In this c...
Then click on “Import Manifest” link.

Then it should appear in “Module” drop down in Control Panel.

Select “Add New Modu...
This completes the custom module development.

Check the table (Dnn4_YourCompany_SampleModule) structure in database




I...
References:
1.DotNetNuke mirrors:

http://sourceforge.net/project/showfiles.php?group_id=77052&package_id=77939

2.Upgrade...
Upcoming SlideShare
Loading in …5
×

DotNetNuke

4,345 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,345
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
96
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

DotNetNuke

  1. 1. Introduction to DotNetNuke: The current version is 5.x It was written in Vb.net But the custom module can be written in any .Net supported language ie C# also. It has builtin support for SqlServer provider but has to extend custom provider for supporting other databases. DotNetNuke has good support for Server Operating systems. But can be installed in XP too. Different DotNetNuke Versions: DotNetNuke 3.x was built on .Net framework 1.1 and DotNetNuke 4.x was built on .Net framework 2.0 1. DotNetNuke 3.x – 4.2 supports .Net framework 1.1 2. DotNetNuke 4.6 – 4.4 supports .Net framework 2.0 3. DotNetNuke 4.09 – 5.1(current) supports .Net framework 3.5 DotNetNuke supports Silverlight Ajax Web 2.0 concepts From DotNetNuke market place we can buy third party modules for cheaper rates. Even so many free modules are available. DotNetNuke Feature list: 1. Adsense 2. Documents 3. Feedback 4. HTML 5. Map 6. NewsFeeds 7. Store 8. UsersOnline 9. Announcements 10. Events 11. Forum 12. IFrame 13. MarketShare 14. Reports
  2. 2. 15. Survey 16. Wiki 17. Blog 18. FAQs 19. Help 20. Links 21. Media 22. Repository 23. User Defined Table 24. XML Benefits: It’s open source It was built on .Net framework. Large community support and good support from the DotNetNuke portal guys. Gets response within 1 business day for our queries in DotNetNuke forums. It is very active. Continual stable version releases. Including new features in all the releases. Large number of custom modules (both free and commercial) available in DotNetNuke Market Place. At reasonable prices we can get best modules. Lets say www.bring2mind.net and from http://www.marketplace.DotNetNuke.com we can get Tagging, Content & Publishing module, Document versioning. Our expertise benefits we have more expertise on .Net. It will help us in using the existing resources effectively instead of learning a new language. High Level Approach: How to extend DotNetNuke? 1. Existing modules (out of the box custom installation0 2. Free modules available in internet 3. Paid modules available in DotNetNuke Market Place 4. Custom module development DotNetNuke Control Panel enables us to perform the below actions 1. Page Functions like adding pages, import ,export functionalities , 2. Add New module , Add Existing module and 3. Common tasks like user, roles, files, site configuration tasks.
  3. 3. 4. Apart from that there is a setting for each module to perform some more tasks. There are three types of users provided by DotNetNuke. 1. Host User for adding custom modules either a third party module or our own developed module. 2. Portal Admin user for performing tasks like Add new modules on the site and giving permissions to the relevant users. 3. General users who are registered on the site who have very less permissions. From sourceforge.net we can download DotNetNuke. http://sourceforge.net/project/showfiles.php?group_id=77052&package_id=77939 Installation & Configuration: For installation we have to download install.zip file For upgrade download upgrade.zip file. For custom development download source.zip file and install starter kit. Install starter kit it installs DotNetNuke templates in Visual Studio. Here we are extracting install.zip file into a folder by name ‘dnn4install’. Create empty database in SqlServer. Right click on the folder ‘dnn4install’ and select properties. In Security tab add “Network” and “Network Service” and give full permissions to both for Windows Server 2003. For Windows Server 2000 select “AspNet” in security tab. Open the web.config file and change the connectionstring and appsettings to point to the database. Type inetmgr in RUN. Right click on Default WebSite and create New Virtual Directory say dnn4install’. In browser open http://localhost/dnn4install/install/install.aspx It shows typical and custom installation modes. With Typical installation only some default modules like Links, HTML comes. LiveID, OpenID authentication providers comes. Select custom installation mode so that wiki, blogs, forums etc in-built modules are seen in DotNetNuke. With “Auto” installation mode: It bypasses the wizard completely.
  4. 4. Apart from LiveID, OpenID authentication providers Active Directory,CardSpace comes in Custom installation mode. Note: May face problem if Active Directory authentication mode was selected. Configure host user and portal administration. Remember the portal administrator username and password. Working with DotNetNuke: Adding custom third party modules: Login with Host credentials Click on Host -> Module Definitions In the screen click on “Install New Module” link
  5. 5. In the next screen browse the zip file and click on “Install New Module” link. Then all the files in the module are extracted and installed automatically. “Installation Successful” message appears at the end. Create a new tab: See the “control panel”. Select “Edit” mode.
  6. 6. In “Page Functions” click on “Add”. See the below picture. Give some name to Page Name, Page Title fields. Select “None Specified” for “Parent Page” if there is no parent page for the newly added one or select a page from the dropdown list if it has parent page. Check the checkbox “Include in Menu” Give the required permissions for the users. And click on “Update” link.
  7. 7. Stay in your newly created page. Now in the control panel which is at the top select “Add New Module” radio button. Select the newly added module in the “Module” dropdown list. Select “Pane”, “Insert” and “Align” as per your requirements and click on “Add” link. The new module appears in the page. Create Menu: Click on Add link in Page Functions in Control Panel. Give Menu12 for ‘Page Name’ and ‘Page Title’.
  8. 8. Select the page ‘Test’ in “Parent Page” dropdown. So Menu12 comes under ‘Test’ tab.And click on update link. Add SubMenu: Click on Add link in Page Functions in Control Panel. Give ‘Sub Menu1’ for ‘Page Name’ and ‘Page Title’. Select the page ‘Menu12’ in “Parent Page” dropdown. So ‘Sub Menu1’ comes under ‘Menu12’ menu.
  9. 9. Don’t forget to check ‘Include in Menu’ checkbox. Finally it looks like the below: There is no limitation on the creation of submenus. But the user interface gets disturbed as shown in the screens below.
  10. 10. Issue: Limitation: If no .o f tabs increases then Admin, Host won’t appear and the newly added ones also. There is no restriction on the no. of tabs creation but one can display 8 tabs (including Host, Admin tabs). Add Leftside , Right side links : Select “Add New Module” from Control Panel.
  11. 11. Select “Links” in Module dropdown. Select “LeftPane” in Pane dropdown. Click on Add link. In the left side “Links” module appears. Click on “Add Link”. Give Menu1 for Title. Select”Page” in LinkType. Select “Menu1” from the “Select A Web Page From Your Site” drop down. Give description and click on update. Again click on “Add link” and repeat the process. And the final output looks like this:
  12. 12. Repeat the same for right side pane too as per the requirement. Creating New User: Admin -> User Accounts Adding New Skins: Host-> Skins How to hide a menu: Click on the menu. Admin -> Pages It will display list of existing pages. Click on Settings in Actions at the right side. Then in the new screen check the checkbox “Include in Menu” How to go to market place: Common Tasks in Control Panel Click on Solutions
  13. 13. How to develop our own custom module: Environment: Visual Studio 2005 vb.net SqlServer 2005 IIS DotNetNuke 4.09 version Here we are extracting ‘DotNetNuke_04.09.00_Source.zip’ file into a folder by name ‘dnn4Source’. Note that ‘website’ folder present in ‘dnn4Source’’. Create empty database ‘Dnn4Source_DB’ in SqlServer. Right click on the folder ‘dnn4Source’and select properties. In Security tab add “Network” and “Network Service” and give full permissions to both for Windows Server 2003. For Windows Server 2000 select “AspNet” in security tab. Type inetmgr in RUN. Expand Web Sites. Right click on Default WebSite. Select New -> Virtual Directory Give Virtual Directory Alias name as ‘dnn4Source ‘and browse dnn4Sourcewebsite folder for path. Note: create virtual directory for website in the above step. Open DotNetNuke.sln file in notepad. First two lines are like this: Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project(quot;{E24C65DC-7377-472B-9ABA-BC803B73C61A}quot;) = quot;http://localhost/DotNetNuke_Maintenance/quot;, quot;http://localhost/DotNetNuke_Maintenancequot;, quot;{79D3BA0F-F76F-4A84-AE7F-C6A01EC247F9}quot; Just change the virtual directory name from “DotNetNuke_Maintenance” to “dnn4Source”. Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project(quot;{E24C65DC-7377-472B-9ABA-BC803B73C61A}quot;) = quot;http://localhost/ dnn4Source /quot;, quot;http://localhost/ dnn4Source quot;, quot;{79D3BA0F- F76F-4A84-AE7F-C6A01EC247F9}quot; Save it.
  14. 14. Then double click ‘DotNetNuke.sln’ to open the visual studio solution. It has this projects structure. Locate the file release.config (under http://localhost/dnn4Source ) and rename to web.config. Open the web.config file. Default web.config file looks like the below. Change Connectionstring tag and appSettings tag to point to the new database settings. Use SQL Server 2000/2005 in both Connection String and App Settings tags.
  15. 15. In browser open http://localhost/dnn4Source/install/install.aspx It shows typical and custom installation modes.
  16. 16. With Typical installation only some default modules like Links, HTML comes. LiveID, OpenID authentication providers comes. Select custom installation mode so that wiki,blogs,forums etc in-built modules are seen in DotNetNuke. With “Auto” installation mode: It bypasses the wizard completely. Select Next. Select “Test Permission”. “Your site passed the permissions check” should appear.
  17. 17. Click Next. Select SqlServer 2000/2005. Give database name. Give credentials. Give dnn4(say) for Object Qualifier. It helps in identifying the custom tables and sps of DotNetNuke. Their names starts with this dnn4. Click “Test Database Connection”. “Connection Success” message should appear.
  18. 18. Then click Next.
  19. 19. Then Click Next. Configure host . Remember the host username and password.
  20. 20. Click Next Default modules are HTML and Links Click Next Apart from LiveID,OpenID authentication providers Active Directory, CardSpace comes in Custom installation mode. But facing problem when selecting Active Directory authentication mode.
  21. 21. Click Next Click Next
  22. 22. Click Next. Configure portal administration . Remember the portal administrator username and password.
  23. 23. Click Next
  24. 24. Install DotNetNuke_04.09.00_StarterKit.vsi starter kit which creates the following templates in Visual Studio editor. DotNetNuke Dynamic Module DotNetNuke Simple Dynamic Module DotNetNuke Skin. Open ‘dnn4Source’ solution. AssemblyInfo.vb and Global.asax.vb files present under “App_Code” in “http://localhost/dnn4Source/” folder. Right click on http://localhost/dnn4Source/ in the solution explorer and Select “Add New Item”. Select “DotNetNuke Dynamic Module” template and Visual Basic as the language. Give “SampleModule” for Name. Click Add. “SampleModule” is the module name for the DotNetNuke site.
  25. 25. Observe the App_Code folder in “http://localhost/dnn4Source/” folder. It has created ‘ModuleName’ folder having DataProvider.vb, SampleModuleController.vb,SampleModuleInfo.vb and SqlDataProvider.vb files. It means it has created business logic layer and database logic layer files. DataProvider.vb and SqlDataProvider.vb files are for database logic layer. SampleModuleController.vb and SampleModuleInfo.vb files are for business logic layer. One more change is Under ‘DeskTopModules’ folder it has created “ModuleName’ folder which contains App_LocalResources,Documentation, EditSampleModule.ascx, Settings.ascs,ViewSampleModule.ascx ,01.00.00.SqlDataProvider and SampleModule.dnn.It means presentation layer files are created automatically by the DotNetNuke portal engine. 01.00.00.SqlDataProvider file contains the queries to create tables and stored procedures. SampleModule.dnn file is required to add this module into DotNetNuke.
  26. 26. Read the help page given after adding the module. It instructs to rename /App_Code/ModuleName to /App_Code/SampleModule, and rename /DesktopModules/ModuleName to /DesktopModules/ SampleModule. Right click on ‘ModuleName’ of App_Code and DesktopModules in the Solutions Explorer and rename them to ‘SampleModule’. Build the solution. It should build successfully. Set http://localhost/dnn4Source/ as the start up project and default.aspx as startup page. Run it. DotNetNuke website comes up. Login with host credentials. Click on Host -> SQL
  27. 27. Switch back to ‘dnn4Source’ Visual Studio solution. Open 01.00.00.SqlDataProvider file under DesktopModules/SampleModule under http://localhost/dnn4Source/ and copy the content of 01.00.00.SqlDataProvider file. Switch back to the DotNetNuke website and paste the script into the window, check the quot;Run as Scriptquot; box and click EXECUTE. if not exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}YourCompany_SampleModule]') and OBJECTPROPERTY(id, N'IsTable') = 1) BEGIN CREATE TABLE {databaseOwner}[{objectQualifier}YourCompany_SampleModule] ( [ModuleID] [int] NOT NULL, [ItemID] [int] NOT NULL IDENTITY(1, 1), [Content] [ntext] NOT NULL, [CreatedByUser] [int] NOT NULL, [CreatedDate] [datetime] NOT NULL ) ALTER TABLE {databaseOwner}[{objectQualifier}YourCompany_SampleModule] ADD CONSTRAINT [PK_{objectQualifier}YourCompany_SampleModule] PRIMARY KEY CLUSTERED ([ItemID]) CREATE NONCLUSTERED INDEX [IX_{objectQualifier}YourCompany_SampleModule] ON {databaseOwner}[{objectQualifier}YourCompany_SampleModule] ([ModuleID]) ALTER TABLE {databaseOwner}[{objectQualifier}YourCompany_SampleModule] WITH NOCHECK ADD CONSTRAINT [FK_{objectQualifier}YourCompany_SampleModule_{objectQualifier}Modules] FOREIGN KEY ([ModuleID]) REFERENCES {databaseOwner}[{objectQualifier}Modules] ([ModuleID]) ON DELETE CASCADE NOT FOR REPLICATION END GO /** Drop Existing Stored Procedures **/ if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}YourCompany_GetSampleModules]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure {databaseOwner}{objectQualifier}YourCompany_GetSampleModules
  28. 28. GO /** Create Stored Procedures **/ create procedure {databaseOwner}{objectQualifier}YourCompany_GetSampleModules @ModuleId int as select ModuleId, ItemId, Content, CreatedByUser, CreatedDate from {objectQualifier}YourCompany_SampleModule with (nolock) left outer join {objectQualifier}Users on {objectQualifier}YourCompany_SampleModule.CreatedByUser = {objectQualifier}Users.UserId where ModuleId = @ModuleId GO Observe the bold statements. They are meant for creating tables and stored procedures in the backend. It creates tables and stored procedures in the backend. Note: To manually execute this script you must *****/ /***** perform a search and replace operation *****/
  29. 29. /***** for {databaseOwner} and {objectQualifier} *****/ databaseOwner is generally dbo objectQualifier is Dnn4 which was created during installation of dnn4source It follows this naming convention: CREATE TABLE {databaseOwner}[{objectQualifier}YourCompany_SampleModule] It creates Dnn4_YourCompany_SampleModule table in db. 5 Stored procedures like this pattern: create procedure {databaseOwner}{objectQualifier}YourCompany_{operation_name}{Module_Name}
  30. 30. Here operation_name is Add,Delete,Get,Update (it creates for all CRUD operations) Module_Name is SampleModule In this case: Dnn4_YourCompany_AddSampleModule Dnn4_YourCompany_DeleteSampleModule Dnn4_YourCompany_GetSampleModule Dnn4_YourCompany_GetSampleModules Dnn4_YourCompany_UpdateSampleModule Now click on Host -> Module Definitions. Down: Click on “Import Module Definitions” link. In the “Import Module Definition” screen select “SampleModule.dnn” in Manifest drop down.
  31. 31. Then click on “Import Manifest” link. Then it should appear in “Module” drop down in Control Panel. Select “Add New Module” radio button and select the “SampleModule” from Module drop down and select a pane and click on Add to a page. If any error is coming like this: Then check the database whether the tables and stored procedures are created or not. If there are no errors then click on “Add Content” link in the newly added module. After adding the content in the module the final output appears as below:
  32. 32. This completes the custom module development. Check the table (Dnn4_YourCompany_SampleModule) structure in database It has one column for adding the content. Now append some more columns in the db and execute the generated script “01.00.00.SqlDataProvider” in SqlServer or DotNetNuke (Host->SQL) site. Do the corresponding changes in business logic, domain logic and presentation layers files which are DataProvider.vb and SqlDataProvider.vb files are for database logic layer. SampleModuleController.vb and SampleModuleInfo.vb files are for business logic layer. Under ‘DeskTopModules’ folder it has created “ModuleName’ folder which contains App_LocalResources,Documentation, EditSampleModule.ascx, Settings.ascx and ViewSampleModule.ascx files. It means presentation layer files.
  33. 33. References: 1.DotNetNuke mirrors: http://sourceforge.net/project/showfiles.php?group_id=77052&package_id=77939 2.Upgrade DotNetNuke 3x to 4x: http://www.mitchelsellers.com/blogs/articletype/articleview/articleid/106/upgrading-dnn-3x-to-dnn-4x.aspx 3.Videos: http://www.dnncreative.com/Tutorials/DNNTutorialsforCoreModules/BlogModule/tabid/308/Default.aspx Todd Davis: Videos on module development http://www.dotnetnuke.com/Default.aspx?tabid=810 4.Module programming: http://dnnsecrets.wordpress.com/2008/01/19/create-a-helloworld-dotnetnuke-module-in-6-easy-steps/ http://www.dnncreative.com/Tutorials/DNNTutorialsforCoreModules/BlogModule/tabid/308/Default.aspx http://www.dotnetnuke.com/tabid/795/Default.aspx 4.For sending new post to DotNetNuke Forums: http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/108/scope/threads/Default.aspx 5.DotNetNuke module development for beginners: http://www.codeproject.com/KB/custom-controls/Creating_A_DNNModule.aspx 6. Workflow: http://www.codeplex.com/workflow 7.Other References: http://www.dnncreative.com http://dotnetnuke.com

×