Professional DotNetNuke ASP.NET Portals wrox phần 5 doc

45 244 0
Professional DotNetNuke ASP.NET Portals wrox phần 5 doc

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Skins You should recall from earlier in this chapter that the only difference between working with skins from the Admin menu and working with skins from the Host menu is the target location of the upload, which determines availability to other Portal Administrators. For additional information on skins and skinning, see Chapters 4 and 13, respectively. Summary In this chapter you learned just about everything there is to know about administering a collection of portals, their environment, and runtime features as the Host (or SuperUser) of a DotNetNuke installa- tion. Key Host functions that you should understand include ❑ Host Settings ❑ Portals ❑ Module Definitions ❑ File Managers ❑ Vendors ❑ SQL ❑ Schedule ❑ Languages ❑ Search Admin ❑ Lists ❑ SuperUsers Accounts ❑ Skins You should have some understanding of which Portal Administrator–level functions contain Host con- figurable settings. These Portal Admin functions include ❑ Site Settings ❑ Skins ❑ Log Viewer You should understand the location and relevance of the Host Root directory (\Portals\_default) versus the Portal Root directory (\Portals\<portalid>), and know that Host default settings are used to create individual portals, but that changing them has no effect on existing portals. Your SuperUser powers should now be fully enabled and you should be prepared to assume leadership of your very own DotNetNuke “Justice League” (cape and super hero sidekick not included). 150 Chapter 5 09_595636 ch05.qxd 5/10/05 9:57 PM Page 150 Modules Now that you are familiar with the Host and Administration capabilities available within DotNetNuke, this chapter looks at a concept familiar to most portals — 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 only appear on an ASP.NET page, and that page can contain any number of module “instances.” Modules are also defined by another important characteristic known as its type. The module type governs what functionality it provides. DotNetNuke provides a number of modules out of the box; these modules range from FAQs and Announcements to Documents. You can even author your own modules that provide alternate functionality. By the end of the chapter, you should have a good understanding of the architecture surrounding modules and how they relate to the DotNetNuke Portal System. This chapter also discusses the practical aspects regarding modules such as management and installation, and provides an intro- duction to each of the modules included within DotNetNuke. Module Architecture This section explains the concepts of a portal, page, module container, and the module itself. A walkthrough of how a page is constructed is also presented. Portal As discussed in earlier chapters, a portal can be defined as a web-based application that provides content aggregation from different sources and hosts the presentation layer (modules) of informa- tion systems. 10_595636 ch06.qxd 5/10/05 10:01 PM Page 151 Figure 6-1 depicts a portal’s basic architecture. To help explain the diagram, DotNetNuke needs to per- form a number of steps in order to process a page request. The following steps execute during the initial- ization of the page. This event occurs at initialization so that modules can handle their own life cycle and process events such as initialization, load, and render. Figure 6-1 First Step 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. Second Step 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 associ- ated with each module, a list of “authorized” modules is formed for the current page. Third Step The third (and final) step is to dynamically inject the “authorized” modules into the corresponding con- tent panes of the page. Once each of the modules has been loaded, each module is then able to execute its own series of events and render content. HTTP HTML Portal Engine Portal Skin Content Pane Modules Content Pane Modules Conent Pane Modules 152 Chapter 6 10_595636 ch06.qxd 5/10/05 10:01 PM Page 152 Page Figure 6-2 depicts the basic portal page components. The page itself represents a complete markup docu- ment consisting of a number of “content panes,” and in each content pane a number of modules. In addition to the modules, a page also consists of navigation areas and site banners. To learn more about how to customize the look of these other areas, see Chapter 13. Figure 6-2 Each module consists of a title, decorations, and the content produced by the module. The decorations can include buttons, links, and a hover menu that can change the module’s state or perform functional- ity specific to that module. 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. 153 Modules 10_595636 ch06.qxd 5/10/05 10:01 PM Page 153 Because each module produces its own markup, they can be viewed as tiny applications within a larger application. Usually, users interact with the content produced by each module by clicking links or sub- mitting forms that are then processed by the portal system, and the actions are passed to the correct module. Module Container The decorations surrounding a module is known as the module container. Through this container, a user is able to interact with the module and perform such actions as minimize/maximize or more advanced features (if the user has edit privileges on that module). Figure 6-3 shows the module container of a “links” module when logged in as a user with edit access. The diagram shows a number of items, such as the hover menu with a list of administration options (discussed later in this chapter), the title of the module, and the minimize/maximize option. Figure 6-3 154 Chapter 6 10_595636 ch06.qxd 5/10/05 10:01 PM Page 154 Types of Modules Now that you are familiar with the concepts surrounding modules, this section examines the 15 user con- tent modules that are bundled with DotNetNuke. Another four modules exist that are not really content modules, so we will not discuss the Search or User Account Management modules that you can utilize in your portal pages. We list each module and include a brief description. Before starting, however, let’s discuss the core team’s policy surrounding bundled modules. The aim of the core team has not been to include every new module within the core, but to provide an extensible and rich platform. By concentrating on the core platform, third parties have an opportunity to build upon the functionality that is missing within the bundled modules. However, that being said, the bun- dled modules are designed to meet the majority of needs. Announcements Module The Announcements module allows you to create short articles for your visitors and even allows you 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 as a method of displaying news releases, a collection of related articles, or merely as a teaser to other content in your portal. You will 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. We should note here that you do not have to be the administrator in order to accomplish this task. If you wanted, you could set up a role with edit permission to your page and offload this task to another indi- vidual in your organization. This is made possible by the roles-based security the application employs to control access to content and administration. First, add the module on your page. You use the Add Module function as shown in Figure 6-4 to accom- plish this task. This process will be the same for every type of module you add. For clarity, we are including the exact steps you will need to take to add the Announcements module, but as we discuss the other modules available we will just cover the specifics related to the particular module. Look at Figure 6-4 to begin this process. Figure 6-4 When you log in to your portal and navigate to a page where the user has edit privileges, you will see the control panel shown in Figure 6-4. You may remember from earlier in the chapter that we used this interface to add a new page to our portal using the page functions. You are now going to use the module section of this interface to add your Announcements module. This is the interface you will use to add any module to your portal pages. As in the page function section, the titles of the available functions are self-documenting. The Module drop-down control lists all the types of modules you have installed in 155 Modules 10_595636 ch06.qxd 5/10/05 10:01 PM Page 155 your DotNetNuke instance and you will be able to select any available module type from the list. One thing new to version 3 is the ability to add an existing module instance with content to a page. If you select the Add Existing Module radio button, the content of the Module DDL will change to reflect instances of other modules you have already added elsewhere in your portal instance. Assume you have a navigation module you need to show only on certain pages to enable navigation to deeper content areas of your site, but you do not want to show on all pages of the portal. This function allows you to easily duplicate your navigation for only the pages for which you need the functionality to be available. The Module control enables you to specify the pane where you want the module to appear and how you need the module aligned inside that pane, with the Pane and Align DDL controls, respectively. Notice that you can also specify the title for the module instance as you add the instance. The preceding direc- tions do not apply only to the Announcements module; they apply to any module you add to a page. Now that you understand all the functions available, take a look at Figure 6-5, add the Announcements module, and set the settings of your module instance. Figure 6-5 156 Chapter 6 10_595636 ch06.qxd 5/10/05 10:01 PM Page 156 You’ve now added your announcements instance and navigated to the settings for your module. You will notice the Module Settings control looks familiar to the Page Settings control used earlier in the chapter. This is by design because it decreases the learning curve associated with managing the applica- tion. Notice that this control utilizes the same type of field-level help available in the Page Settings con- trol, which allows you to get a description of the type of content the application expects for this module instance. Table 6-1 describes these associated settings. Table 6-1: Announcements: Basic and Advanced Module Settings Setting Description Module Title As the name suggests, this is the title for your module. Permissions This is where you set which roles will have access to edit the content in your module. As you can see, several options are available for controlling the security of the module’s content. Display Module Enabling this check box allows you to define a module that will appear On All Pages on all pages within your portal. This is very useful when defining adver- tising or navigation-type modules you need to display to your users regardless of the page they are visiting. Header Here you can define content to display above your module’s content. Footer Here you can define content to display below your module’s content. Start Date This is the date you want the content to start displaying to your users. This is very useful for planning content that you only need to appear after a certain date. End Date This setting allows you to expire content that is no longer current. These settings options are pretty much concurrent across all instances of the various modules. Notice the Page Settings panel below the Modules Settings panel. This is where we set our container for the Links module earlier in this chapter. Figure 6-6 shows the panel for the Page Settings of our module, and Table 6-2 explains each of these functions for this area. Note that although this may appear exactly like the Page Settings covered in Chapter 3, there are some differences and these settings have some unique settings just for our current module instance. Figure 6-6 illustrates page settings you will see in the base modules throughout the application. 157 Modules 10_595636 ch06.qxd 5/10/05 10:01 PM Page 157 Figure 6-6 Table 6-2 lists each of these settings. You will encounter this section throughout the modules in the application. Table 6-2: Module Page Settings Panel Setting Description Icon This is an interesting function that you can use to enhance the dis- play of your module. Setting an icon for your module replaces the title with an image. The file you use for this must reside in one of the areas defined in your file manager area. To set the image you use the File Location and File Name DDLs to specify the file’s location. Alignment This setting allows you to specify the alignment of your module in the pane. Color This setting allows you to specify the background color of the con- tent that appears in this module. Border This setting allows you to specify a border width for your content in the module. 158 Chapter 6 10_595636 ch06.qxd 5/10/05 10:01 PM Page 158 Visibility DotNetNuke exposes methods to allow your users to expand and collapse content to save real estate. These options allow you to define the default visibility behavior of the module and whether you want the users to be able to hide or display the module’s content. Display Title This check box enables you to display or hide the module’s title from the users. Allow Print This function allows you to expose the print module action, which displays a print icon your users can select to print the module’s con- tent in a print-friendly format. Allow Syndicate This function allows 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 Here you can set the container to use for the module’s display in the portal. Cache Time DotNetNuke utilizes caching to increase the performance of the application. Here you can set the number of seconds you would like for this module to remain cached in memory. Set As Default Settings This setting allows you to utilize 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 than your original settings. You can apply the settings to one module and push those settings out to all instances of modules in the portal. Move To Page This setting allows you to move this module instance to another page in the portal. The settings listed in this section are implemented from the base module settings class, so this informa- tion is pertinent to all modules that inherit the classes, and it is a programming requirement that mod- ules inherit the class. This means that you will have the above functionality no matter which module you are working with, whether it’s a base module or another third-party module you have obtained from one of the many module developers. Now that you have your module settings updated, you can go ahead and add a couple of announcements for your users. Figure 6-7 illustrates the view the Announcements module will now contain as a result of your changes to the settings. Figure 6-7 159 Modules 10_595636 ch06.qxd 5/10/05 10:01 PM Page 159 [...]... 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 from offering advertising on the individual portals in your DotNetNuke installation Exactly how to add these is covered in the next two chapters, which discuss the... provide this functionality to your users Several other full-fledged forum modules are available for DotNetNuke Some of these are free and some require a small license fee Refer to the DotNetNuke web site if you require a more robust forum system for your portal 163 Chapter 6 Figure 6-11 Documents Module The Documents module allows you to offer files that your users can download from your site This is a... 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 is controlled by the file type settings under the Host Settings page By default, DotNetNuke will allow the following extensions: ❑ ❑ jpeg ❑ jpe ❑ gif ❑ bmp ❑ png ❑ doc ❑ xls ❑ ppt ❑ pdf ❑ 164 jpg txt Modules ❑ xml ❑ xsl ❑ css ❑ zip If... not included in the Documents module You will also notice that like the Announcements module, the Documents module allows the tracking of your users’ actions so you will be able to determine the content that your users are most interested in receiving The Category field offers you the ability to logically group the files in this module This category will be displayed as part of the Documents module so... 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 allows companies to take advantage of the benefits of DotNetNuke while still utilizing other functionality they had in previous applications This is usually a short-term fix people employ As they become more familiar with DotNetNuke. .. within your portal, you can add new modules to your DotNetNuke installation As discussed earlier, DotNetNuke is an extensible platform; that is, it allows you to install third-party modules into your portal environment This section walks you through the steps of uploading a new module; in particular, it uses the Survey module that comes bundled with DotNetNuke but is not installed by default An earlier... aspirations of creating your own modules to extend DotNetNuke is that the code contained in the Announcements module is a good head start for creating the layout of your own modules For more on developing your own modules, refer to Chapters 9 through 12, which cover module development Banner Module The Banner module provides a method of offering advertisements in the DotNetNuke application Administering this... view for events If your events need a longer description to convey the meaning to your users, you will need use the list view for the Events module Table 6 -5 explores each of the options available in this module 166 Modules Figure 6-14 Table 6 -5: Edit Events Module Settings Description Title Here you can enter the title of your individual event Description Here you can enter a description for your... the Rich Text editor so that you can format your questions and answers in a way that is easy for your users to understand and to convey the intended message Figure 6- 15 shows the interface for the Edit functions of the module Figure 6- 15 168 Modules 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... module by the Host or Portal Administrator, and this module is the mechanism you will use to display those settings to the user For a full description of managing the Vendor functions in DotNetNuke, refer to Chapters 4 and 5 A description of each of the Edit Banner functions is shown in Table 6-4 Table 6-4: Edit Banner Options Setting Banner Source Selecting one of these radio buttons allows you to specify . sidekick not included). 150 Chapter 5 09 _59 5636 ch 05. qxd 5/ 10/ 05 9 :57 PM Page 150 Modules Now that you are familiar with the Host and Administration capabilities available within DotNetNuke, this chapter. functions are self-documenting. The Module drop-down control lists all the types of modules you have installed in 155 Modules 10 _59 5636 ch06.qxd 5/ 10/ 05 10:01 PM Page 155 your DotNetNuke instance. take a look at Figure 6 -5, add the Announcements module, and set the settings of your module instance. Figure 6 -5 156 Chapter 6 10 _59 5636 ch06.qxd 5/ 10/ 05 10:01 PM Page 156 You’ve now added your

Ngày đăng: 06/08/2014, 09:20

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan