10/16/07

Modules

A module is a pluggable user interface component that processes requests and generates dynamic content. This definition is similar to that of an ASP.NET page, with the exception that a module can appear only on an ASP.NET page, and a page may contain any number of module "instances."


DotNetNuke needs to perform a number of steps to process a page request. The following steps execute during the initialization of the page and work to dynamically load modules at runtime. The dynamically created modules are then capable of handling their own life cycle including events such as initialization, load, and render.

Step 1: Page Configuration Retrieval

The first step is to retrieve the modules for the requested page. The retrieval step comprises a number of important pieces of information, such as the modules that appear on the page, the section of the page on which they will appear (known as content panes), and, finally, the security roles associated with each module.

Step 2: Security Audit

The second step is to make some decisions about the security information retrieved in the previous step. By examining the current user roles (whether a registered user or anonymous) and the view roles associated with each module, you can form a list of "authorized" modules for the current page.

Step 3: Content Injection

The third (and final) step is to inject the "authorized" modules dynamically into the corresponding content panes of the page. After all of the modules have been loaded, each module is then able to execute its own series of events and render content.

Module

As mentioned previously, a portal is a web-based application that processes requests and generates dynamic content. Each module produces its own piece of markup (known as a fragment) and together with the skin's markup shows a complete document.

Because each module produces its own markup, it can be viewed as a tiny application within a larger application. Usually, users interact with the content produced by each module by clicking links or submitting forms that are then processed by the portal system and the command passed to the corresponding module.

Module Container

The decorations surrounding a module are known as a module container. Through this container, a user is able to interact with the module and perform actions such as minimizing, maximizing, and more advanced features (if the user has edit privileges on that module).

User Content Modules

Announcements Module
The Announcements module enables you to create short articles for your visitors and even to expire the older articles as the content becomes obsolete. This module provides an easy-to-use interface for keeping your content fresh and rotated. You can use the module to display news releases or a collection of related articles, or merely as a teaser to other content in your portal.

You'll now add an Announcements module to your base installation and see exactly how this module works. Start by opening your web browser to the application and logging in with the administrator account to add the module to your page. Then you will add some content to your module instance.

Note: You do not have to be the administrator to accomplish this task. You could set up a role with edit permission to your page and offload this task to another individual in your organization. This is made possible by the roles-based security the application employs to control access to content and administration.

Module Settings Options

Option

Description

Module Title

The module's title.

Permissions

Set which roles will have access to edit the content in your module. Several options are available for controlling the security of the module's content. A special option is the Inherit View Permissions from Page check box, which allows the security settings specified at the page level to secure your module.

Display Module On All Pages

Define a module that will appear on all pages within your portal. This can be useful when you're defining advertising or navigation-type modules that you need to display to your users regardless of the page they are visiting.

Header

Define content to display above your module's content.

Footer

Define content to display under your module's content.

Start Date

The date you want the content to start displaying to your users. This can be useful for planning content that you want to appear only after a certain date.

End Date

Specify when outdated content should expire.

Page Settings Options

Option

Description

Icon

Enhance the display of your module by adding an image to the left of the title. The file you use must reside in one of the areas defined in your File Manager area.

Alignment

Specify the alignment of your module in the pane.

Color

Specify the background color of the content that appears in this module.

Border

Specify a border width for your content in the module.

Visibility

DotNetNuke exposes methods to allow your users to expand and collapse content to save real estate. The Visibility options enable you to define the default behavior of the module and whether you want users to be able to hide or display the module's content.

Display Title

Display or hide the module's title.

Allow Print

Enables you to expose the print module action, which displays a print icon users can select to print the module's content in a print-friendly format.

Allow Syndicate

Enables you to expose your module's content in an XML format, which allows other web authors to consume and display your content on another web site.

Module Container

Set the container to use for the module's display in the portal.

Cache Time

DotNetNuke uses caching to increase the performance of the application. This setting enables you to set the number of seconds the module should remain cached in memory.

Set As Default Settings

Use this module's settings as the default for all the modules you add to your portal.

Apply To All Modules

This is a time-saver if you decide you want the default behavior of all modules to be different from your original settings. You can apply the settings to one module and push those settings to all instances of modules in the portal.

Move To Page

Enables you to move this module instance to another page in the portal.

Note


Edit Announcements Options
Option Description
Title The title that describes the individual announcement. By default, the date the announcement is created is appended to the title you define here. If you do not want this date to appear to your users, uncheck the Add Date check box.

Your browser may not support display of this image.

Description The content for your announcement. This module uses the FreeTextBox (FTB) control to make it easier for users to format the display of the text. If this particular announcement does not require rich text formatting functionality, you can use the text box option, which dynamically removes the instance of FTB and enables you to use only a text box for this function.
Link Specify a location where users can obtain more information about the announcement. Enabling this option creates a link at the end of your announcement that, when clicked by the user, allows navigation to the link you define. The default option is to not provide a link (None). If you select the URL option, the location control changes to a text box, allowing you to specify an external URL. If you select the Page or File option, the Location control changes to a drop-down list, which enables you to select the page or file where the additional information resides. Additional options allow you to further customize the link to capture the number of times an article is clicked, who clicked it, and a choice to open it in a new window.

Expires Set a date when the content should expire and no longer be viewable by your users.
View Order By default, announcements are displayed in ascending order according to their creation date. The View Order option enables you to define the order in which you want announcements to appear.

Banner Module

The Banner module provides a method of offering advertisements in the DotNetNuke application. Administering this module is a little different from any of the other base modules because this module works in conjunction with the Vendors module, which is an administrator-only module. Banners can be controlled from the Host level or Portal level, and the Host or SuperUser account controls this behavior.

Probably the first thing you will notice when you add this module to a page is that you see only a Banner Options action and not an Add New Action option, like the other modules display. This is because the banners will need to be added from either the Admin Vendors page or from the Host Vendors page. This is one of the functions that makes DotNetNuke a viable host platform, because you can offer free or inexpensive portals for your users and then recuperate your hosting costs by offering advertising on the individual portals in your DotNetNuke installation.

Edit Banner Options
Option Description
Banner Source Selecting one of these radio buttons enables you to specify whether the vendor banners shown in this module should originate from the host or from the portal.
Banner Type The type of banner that should be shown in this module. Banner types include Banner, MicroButton, Button, Block, Skyscraper, Text, and Script. Selecting a specific type means the vendor must have that type assigned to its account or the module won't show that vendor's advertisements.
Banner Group Enables you to associate a group of banners in the administrator vendor's module, such as the Site Banner group. Entering the banner group here enables you to group the same types of banners.
Banner Count Defines the number of times a banner will display to the users.
Orientation Enables you to display the banner either vertically or horizontally. The type of banner you chose usually dictates which option you should select.
Border Width Defines the width of the border.
Border Color Sets the border color.
Row Height Sets a row height for your banner.
Row Width Sets a row width for your banner.

Contacts Module

Almost every web site, regardless of content area, needs a method to provide information to contact the site's owners and employees. This is the purpose of the Contacts module. You can add your contact information and provide an easy-to-use interface for updating it to maintain current information. You can create an entire company directory from this module or display contact information for only a few individuals. The types of information you can display include the name, employee role, e-mail address, and telephone numbers for the individuals listed.

Discussions Module

The Discussions module is a lightweight forum module your users can use to share information. It isn't designed to be a full-fledged forum platform, but it will work for light forum activities you may need to offer on your web site. This module uses the same settings as the previous modules have used, so there's no need to cover those activities again.

Documents Module

The Documents module enables you to upload files to your portal and offer those files to your users for download. This is a fairly useful module because you will likely need to offer examples or additional information in the form of Word documents or other types of files to your users. The types of files you can use with this module are controlled by the file type settings under the Host Settings page. By default, DotNetNuke allows the following extensions:

.jpg .png .txt

.jpeg .doc .xml

.jpe .xls .xsl

.gif .ppt .css

.bmp .pdf .zip

If you require additional file types not allowed by default, you will need to add the extension under the Host Settings page in the File Upload Extensions field. If you are going to allow your users to upload files, you should be careful as to the types of files allowed because users may introduce viruses or other undesirable files into your portal file system. The application offers no default protection in this area, so diligence is needed to protect the integrity of the system.

Events Module

The Events module enables you to announce upcoming events to your users.

FAQs Module

You can use the FAQs (Frequently Asked Questions) module to answer questions users may have about your web site or products. It is one of the simpler modules in DotNetNuke, but it's also one of the more powerful ones because it can save you many hours of replying to e-mails. The interface for adding a new FAQ is quite simple and warrants little discussion. Basically, you enter a question you want to provide an answer for and then enter the answer. The module enables you to use the Rich Text editor to format your questions and answers in a way that is easy for your users to understand and to convey the intended message.

Feedback Module

The Feedback module offers you a mechanism for allowing users to contact you without exposing your e-mail address to the many spam bots that regularly scan the Internet. The module does not have an Add function like the other modules because the purpose of the module does not require that functionality. Basically, users are adding feedback when they send you e-mails. The module contains some settings to control its display to users and to specify the address to which the e-mails are sent. Prior to version 3 of the portal, the only option was to send these requests to the administrator account. Now you can change this behavior. One thing to be aware of is that this module relies on the mail server settings on the Host Settings page to function properly. Ensure that you have successfully added your mail server and tested the settings before attempting to utilize this module's functionality. You also have the option of setting the width and rows of the Feedback module to control its display

IFrame Module

The IFrame module enables you to display web pages from other web sites in your portal. When you set the page, the module should display and add an IFrame tag to your page and load the remote site into the frame. One of the main uses for this module mentioned in the DotNetNuke forums is to utilize legacy applications that were created with ASP or some other dynamic language that must still be used for some functionality. This enables companies to take advantage of the benefits of DotNetNuke while still using other functionality of previous applications. This usually is a short-term fix — as companies become more familiar with DotNetNuke module development, they can convert their legacy applications to fully compliant DotNetNuke modules to take advantage of full integration with DotNetNuke roles and user control functions.

Image Module

As its name suggests, the Image module offers an easy way to add images to your portal. The module enables you to add an image to a page where it would not make sense to have a skin element and you do not require the capability to link to another site from the image. The image you display can reside either in your portal file system or on an external resource.

Links Module

The Links module is likely one of the most used modules in DotNetNuke installations — it probably is only used less than the Text/HTML and Announcements modules. As its name suggests, this module enables you to add links to enable users to navigate to other areas of your site or to remote web sites.

You have several options for controlling the behavior and view of the Links module. The Control Type radio buttons enable you to define whether the link list displays as a drop-down list or a normal, databound list. You also have the option of controlling the orientation of the list with the List Display Format option. The last option, Display Info Link, enables you to show users a short description of the web page to which the link navigates, which is useful because it allows some additional keywords to be associated with the link.

The text you enter in the Title field is what users will see as the link. As with other modules, the Link Settings offer options for linking to an external resource, a page on your site, or an internal file in your module, and the audit controls let you track your visitors' behavior. The Description field contains the text you would enter if you selected the Display Info Link option. The View Order option enables you to specify the order in which your links are displayed.

News Feeds (RSS) Module

The News Feeds (RSS) module enables you to consume RSS content from another resource and display it to your users. Many web sites offer syndicated feeds that you can consume and display relevant content for your portal, some of which are free and some of which require a fee to consume. With the News Feeds (RSS) module, you can use both types of feeds and display the information according to your feed style sheet

The News Feed Source is the location of the source you want to consume. You also have the option of specifying the style sheet to use with the feed. Most news feeds provide a style sheet designed specifically for their feed, or you can specify your own style sheet. In addition, some feeds require you to present credentials authorizing access to their content before you can consume a feed. The Domain\username and Password text boxes are where you enter this type of authentication information.

Text/HTML Module

The Text/HTML module — "HTML mod" for short — is probably one of the most-used DotNetNuke modules. It enables you to format your content with the easy-to-use FreeTextBox editor and also allows a large amount of content to be displayed. This module also fits with what most webmasters need for their content display. You have the option of using the editor or, if you're a hard-core HTML programmer, you can type in your HTML directly without relying on the controls rendering your markup. The Text/HTML module's interface is straightforward and includes only two controls.

The first option is where you will enter your content to be displayed in the module, and the second is a search summary. The DotNetNuke search functions are capable of indexing all the content in this module. The type of content entered in this module may become quite large, so the Core Team felt it would be pertinent to allow a mechanism for the module administrator to add a summary of the content for the search engine to use. This accomplishes two functions. First, it enables you to provide the gist of the content that will be displayed to users when they search for similar content and, second, it helps with the performance of the search engine because there is no need to index all the content that may appear in this type of module.

User Defined Table Module


The User Defined Table is a catch-all type of module that enables you to define your own data type and display that information to users in an organized manner.

XML/XSL Module

The XML/XSL module enables you to display XML data from an external data source in your portal according to the accompanying XSL transformation file. It further increases the type of data you can display in your portal and is limited only by the XML technology and your imagination.

No comments: