Article

An Article on DotNetNuke

Published On: 07-07-2009

We have used Microsoft Visual Studio 2008 to create a Dotnetnuke web application.

To create a DotNetNuke Web project in Visual Studio


Step 1.

  1. Start Visual Studio 2008.
  2. On the File menu, point to New, and then click Web Site.
  3. New Web Site dialog box appears as following screen, in the Project Type Templates, select Dotnetnuke Web application framework:-

  4. Specify the location where you want to store and type the application Name.
  5. Finally click OK.


Step 2.

  1. You will find the source file as following:-


  2. Set as start install.aspx page and run the application. You will find the following screen.



  3. Click on the link and find dotnetnuke home page.


    If your site was installed automatically, a couple of default user accounts were created which allow you to access the various site management features offered by the application. In this case, please take note of the following user account information:


Administrator Login:

Username: admin

Password: dnnadmin

 

* The Administrator account is a privileged user account which allows you to manage various aspects of your site. Once you login as the Administrator, an Admin menu option will be visible in the site navigation. Please note that the first time you login to the site using this account, you will be prompted to enter a new password for security purposes.

Host Login:

Username: host

Password: dnnhost

 

* The Host account is a highly privileged user account which allows you to manage various aspects of your hosting environment. Once you login as the Host, a Host menu option will be visible in the site navigation. Please note that the first time you login to the site using this account, you will be prompted to enter a new password for security purposes.

We have login as host to create pages for the application.

Create a New Page (Basic)
The simplest way to add a new page to your website is to use the Add button in the Page Functions area of the Control Panel (at the top of the page).

Step by Step
1. Click the Add button on the Control Panel. The next page you see will allow you to specify Settings for the new Page you are about to create.

2. Put your cursor in the Page Name field and type a name for your Page. This will be what visitors see in your websites Menu.

 

Your website Menu before adding the page.
Your website Menu after adding the page.

3. Put your cursor in the Page Title field and type a title for your Page. This will be what visitors see in the titlebar of their web browser when they visit your new Page.

4. Select who can look at your Page and who can change its settings. Administrators (like you) can always see your page and make changes to its Settings. But you can choose who else can see it or change it. If your new page will have private information on it, you may want only visitors who have logged in to your website to be able to see it. Check the boxes for who should be able View (see) or Edit (change settings) for your new page. (An “Unauthenticated User” is a website visitor that has not logged in).

5. Select where on the Menu your Page should be listed. By default, your new page will appear on the menu just like the “Home” page. If you would like for it to appear in a dropdown menu, you can select the page you would like for it to appear beneath.

6. When you have finished with these steps, scroll to the bottom of the page and click Update to save your changes!

 

Create forum page

If you are running on a version of DotNetNuke that was released AFTER the 4.4.3 version of the forums was released you should have the forum module available in your “Available Modules” section of the module definition page. To see if you have the proper version prepared for installation simply follow the below steps.

1. Login as your host users
2. Look at dropdown list, if you find here installed module.

3. If forum is not available in the dropdown, then you need to install there. Select “Module Definitions” from the “host” menu. Under the Available Modules section you should see “Forum similar to the following:

 

4. Check the box next to “Forum”
5. Click “Install Selected Modules”
6. After a few moments you will be returned to the “Module Definitions” page and you should see the Forum module listed.

Configuration

The first part of the configuration of the forum module is very simple. We started by creating a new page that is available for all users called “Forum”, and then We added the forum module to my content pane using the standard DotNetNuke administration practices. This resulted in a view similar to the following.

 

Create Groups/Forums

Now its time to create some Groups and Forums for your website visitors to participate in.

1. Select Manage Forum from the Module Actions Menu.

2. Place your cursor in the Add New Group field. Type a name for a group of forum topics and click the Add button.

3. Click the Expand button next to your new Group. Then place your cursor in the Forum List field and type a name for a new Forum topic. Click the Add button to create the new forum.

4. Once your forum has been added, click the Forum Home button at the bottom of the Module to return to the main view. This is how your updated module would look to a website visitor after adding a couple of additional Groups and Forums.

To start things off We will explain what the six icons at the top of the page are used for.

Moderate – Using this link you can access the moderation queue for your forum.

Admin – Using this link you can access the administration options of the forum, we will discuss these in a few moments.

My Settings – Using this link you can access your personal settings including e-mail notifications and signatures; this is available to all users.

My Posts – Using this link you can access all posts that you have created; this is available to all users.

Search – Using this link you can access the search functionality of the forum; this is available to all users.

Forum Home – Using this link you can quickly get back to your forum home page.

By default the forum is created with one group “Discussions” and one forum “General” to modify the default forum configuration we will use the “Admin” link to access the forum administration, this will take you to the following page, we will discuss the basics of each section below.

 

 


Create Survey

The Survey module allows visitors to participate in a survey and possibly See the tabulated results.

 

 

Installing a Module

To better understand how DotNetNuke and modules work, you can examine the installation and configuration of the Survey module. First you obtain an installation file. You can obtain the installation file for the Survey module from the Survey project page on DotNetNuke.com.

When you download the file you can see that it is in the form of a ".zip" file.

When you open up the ".zip" file you can see that it contains all the elements it needs as well as a ".dnn" configuration file.

Upload the Survey Module

While logged into the DotNetNuke installation as the Host account, select Module Definitions from the Host menu.

Then select Install New Module.

 

From the Install Module page, navigate to the ".zip" file that you downloaded and click the Save File link.

The module will upload...

 

When you view the installed modules list (Host > Module Definitions), you will now see the Survey module.


Next you will create a page to place the module on. On the Administrator control panel, click the Add link under the Page Functions section.

Enter details for the page, ensuring that All Users are selected under the View Page column. When you have entered the information, click the Update link.

 

 

 

Next, from the Administrator control panel, select Survey from the Module drop-down list and click the Add link.

 

The Survey Module will now appear.

Click the Add Question link to configure the module. This link and the functionality that follows is the result of the code contained in the ".zip" package. The preceding functionality is provided by the DotNetNuke Framework.

Create a question and click the Update button.

 

The module will now display.

 

 

A Look into the DotNetNuke Module Definition
When you go to Host > Module Definitions and click on the Survey module
definition, you can see that there are 3 user controls configured at the bottom of the Module definition:
DesktopModules/Survey/Survey.ascx
DesktopModules/Survey/EditSurvey.ascx
DesktopModules/Survey/Settings.ascx

If you look at the DesktopModules/Survey directory that was created when you uploaded the Survey module you can see the user controls (and all the other module elements) reside in that directory.

Survey Setting

 

 

Moving the Module :

The Module Actions Menu is available on virtually any module Container. We'll use the menu commands to change the position of two Text/HTML modules on a page.
1. Hover the mouse over the Module Actions Menu and scroll down to the Move menu item. The Move To commands are always present and may be different for another Skin. There is one Move To command for each Pane on the skin.

The Move commands vary depending upon the location of the module. Since the example is at the bottom of a column, there is no option to move down (only up).

2. Select the Menu item that identifies where the Module should be moved to.

The Drag & Drop functionality is available on virtually any module where a Title is visible. We'll use Drag & Drop to change the position of two Text/HTML modules on a page.

1. Left click and hold the mouse down over the Title of a Module. You'll notice the module develop an outline around it. This outline indicates the module is ready to be "dragged" to a new location.

2. Keeping the left mouse button down, drag the Module over another Pane. As you pass over the other pane it will highlight, indicating the module may be "dropped" in this new location.

3. Release the mouse button when the desired Pane is highlighted. The Page will refresh and the Module will be in its new location.

 

Move Module to Another Page
Moving a Module from one Page to another must be done from the Module Settings page.

1. Hover the mouse over the Module Actions Menu and scroll down to the Settings menu item. Alternatively, many Containers display an icon for the Module Settings which can simply click.

 

  OR

2. On the Module Settings page, scroll down to the Advanced Settings section.

3. Select a Page from the Move To Page dropdown to move the Module to.

 

4. Click Update at the bottom of the Module Settings page to move the Module to the new page (and save any other changes).


Delete a Module:
When a Module is no longer needed there are two ways it can be deleted.
1. Hover the mouse over the Module Actions Menu and scroll down to the Delete menu item and left click.

 

 2. Click OK to confirm Delete of the Module.

 

Securing a Module-Giving Permission:

1. Click the Module Settings icon or select Settings from the Module Actions menu for the "Registration Required" message (we're going to make this Module viewable ONLY to users who are NOT logged in). It's the one in the Top Pane.

Check Unauthenticated Users for View Module permission. Uncheck any other groups (note that Administrators always have View Module permission).

Click Update at the bottom of the Page to save your changes.

2. Now click the Module Settings icon or select Settings from the Module Actions menu for the each of the other modules (we're going to make these Modules viewable ONLY to users who ARE logged in). You'll need to do this for each module on your page that you wish to secure for Registered Users only.

Check Registered Users for View Module permissions. Uncheck any others.

Click Update at the bottom of the Page to save your changes.


Create News

Login as your host users

Click on install Additional Module

 

8. Check the box next to “News feed”
9. Click “Install Selected Modules”

 

 

We started by creating a new page that is available for all users called “News”, and then We added the New feed module to my content pane using the standard DotNetNuke administration practices.

 

Enter the News URL In the news feed source.
Click Update at the bottom of the Page to save your changes.