DotNetNuke 5.4 Cookbook

By John K Murphy
    What do you get with a Packt Subscription?

  • Instant access to this title and 7,500+ eBooks & Videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Free Chapter
    Installation and Setup

About this book

DotNetNuke is a powerful and flexible content management system for building websites. It comes with many features for publishing content including tools to create Blogs, Banner Advertising, News Feeds, and much more. But setting up a fully featured website and customizing a complete content management system using the open source DotNetNuke package can be challenging. There are multiple pieces involved and each piece must be correct for the whole to work.

The recipes in this book will safely navigate you around the obstacles and have your own full-featured website using the DotNetNuke CMS with blogs, forums, wikis, user security, and much more up and running in no time. This book will also help you to build your own custom modules using VB.Net and restyle them with your own custom skins.

This book is an indispensible guide for installing, configuring and customizing a DotNetNuke website. It starts by explaining how to download and install DotNetNuke and then covers how to make the most of all the features such as blogs, forums, wikis, banner ads, newsletters, surveys and much more. When you've tried all the available modules, you will find recipes for creating your own custom modules: the tools you need, how to set up a development environment, how to use the DotNetNuke starter kit, and how to compile and deploy modules. Further, there are recipes for designing a database, creating stored procedures and debugging modules. You'll also learn the techniques of styling your website using skins and even how to create a site with multiple languages.

Publication date:
September 2010
Publisher
Packt
Pages
432
ISBN
9781849511681

 

Chapter 1. Installation and Setup

In this chapter we will cover the following topics:

  • Downloading the Microsoft Web Platform Installer

  • Installing SQLServer Express

  • Downloading and installing DotNetNuke package

  • Running the DotNetNuke installation

  • Setting the site name and information

  • Choosing a skin for the site

  • Choosing a container for the site

  • Adding a module to a page

  • Installing Standard DNN Modules

  • Downloading an extension (skin or module)

  • Installing a new extension

Introduction

DotNetNuke (which for brevity's sake we'll call "DNN" going forward) is a powerful and flexible content management system for building websites. It comes with many features for publishing content including tools to create Blogs, Banner Advertising, News Feeds, and much more. All of this comes right out of the box and if you use the Community Edition, all of it is free.

But setting up a website from scratch can be challenging. There are multiple pieces involved and each piece must be correct for the whole to work. Fortunately, the recipes in this chapter will safely navigate you around the obstacles and have your own website up and running in no time. It is important that you read the instructions of the recipes with care making sure each step is done as described. Following these recipes is very much like following a cooking recipe if you leave out an ingredient or set the oven to the wrong temperature the result could be a mess.

In the recipes of this chapter you will see the phrases web server and database server. If you are building a website for a company chances are the web server and database server are two different machines located on the network. To install and run DNN you need login access to each machine with privileges to install software.

On the other hand, if you are developing a small test website everything will be installed on your desktop or laptop and the terms web server and database server refer to your machine to which of course, you already have full access.

Internet access is necessary to download the DNN code and installation files but if you have made it this far we'll assume you are properly equipped.

Let's get started.

 

Introduction


DotNetNuke (which for brevity's sake we'll call "DNN" going forward) is a powerful and flexible content management system for building websites. It comes with many features for publishing content including tools to create Blogs, Banner Advertising, News Feeds, and much more. All of this comes right out of the box and if you use the Community Edition, all of it is free.

But setting up a website from scratch can be challenging. There are multiple pieces involved and each piece must be correct for the whole to work. Fortunately, the recipes in this chapter will safely navigate you around the obstacles and have your own website up and running in no time. It is important that you read the instructions of the recipes with care making sure each step is done as described. Following these recipes is very much like following a cooking recipe if you leave out an ingredient or set the oven to the wrong temperature the result could be a mess.

In the recipes of this chapter you will see the phrases web server and database server. If you are building a website for a company chances are the web server and database server are two different machines located on the network. To install and run DNN you need login access to each machine with privileges to install software.

On the other hand, if you are developing a small test website everything will be installed on your desktop or laptop and the terms web server and database server refer to your machine to which of course, you already have full access.

Internet access is necessary to download the DNN code and installation files but if you have made it this far we'll assume you are properly equipped.

Let's get started.

 

Downloading the Microsoft Web Platform Installer


In this recipe we will show how to prepare a machine for a DNN installation by installing Microsoft Web Platform Installer (Web PI). The Microsoft Web Platform Installer is a free tool for downloading applications from the Internet including the DotNetNuke installation, Internet Information Services (IIS), SQL Server Express, .NET Framework, and Visual Web Developer. To make installing DNN as simple as possible, it is best to install Web PI first.

How to do it...

  1. 1. Open your favorite web browser and go to the site http://www.microsoft.com/web/Downloads/platform.aspx.

  2. 2. Click on the Download It Now button on the right side of the page.

  3. 3. Web PI will now start to download. When the Run/Save dialog appears, click on Run.

  4. 4. If prompted by the Security Warning, click on Run.

  5. 5. If you are prompted by the browser, click on the security bar at the top of the browser and allow the file to download.

  6. 6. Lastly, if you are prompted to allow access to run the program, click on Allow.

  7. 7. Web PI will now launch and show the products available for download.

  8. 8. From this dialog you can choose the software to download. Click on Exit when you are done downloading products.

See also

With Web PI installed you can easily download the tools needed for the rest of this chapter. See the individual recipes for instructions.

 

Installing SQLServer Express


This recipe will show you how to download and install Microsoft's free version of SQLServer called Microsoft SQL Server 2008 Express. DNN currently supports SQL Server 2005 and 2008, but SQL Server Express is also a good solution for a website developer looking to run DNN from a single machine.

Getting ready

For this recipe you should have Windows Server 2003, 2008, or 2008R2. For development you may use Windows XP Professional, Windows Vista, Windows 7 (Home Premium and above).

In addition, you should complete the following recipe:

  • Downloading the Microsoft Web Platform Installer

How to do it...

  1. 1. Start by launching the Microsoft Web Platform Installer.

  2. 2. When the list of available products is displayed, click on the Web Platform tab.

  3. 3. Under the Database section, click on the Customize link.

  1. 4. Make sure the following products are selected:

    • SQL Server Express 2008

    • SQL Server 2008 Management Studio Express

    • SQL Server 2008 Management Objects

  2. 5. Click on the Install button to begin the installation.

  3. 6. The next dialog will list the file you are downloading and prompt I Decline or I Accept. Click on I Accept.

  4. 7. Lastly, you must choose how you want to authenticate users in the database. As this installation is probably just for your local use, you can choose Mixed Mode Authentication.

  5. 8. Pick a password for the SQL Server administrator (SA). It must be a strong password, so try to include numbers, special characters, and mixed case. Supply a good password and click on Continue.

  1. 9. Now the file will download and install by double-clicking it. It will take several minutes, even with a fast connection. Halfway through the installation it may prompt if you want to reboot, click on No so that the installation will continue.

  2. 10. After the installation finishes you will see a congratulations message. If you are prompted to reboot, click on Yes.

How it works...

Microsoft's Web Platform Installer handles the details of the file download and installation. Once it is completed, you will have SQL Server Express running on your machine.

 

Downloading and installing the DotNetNuke package


In this recipe we will walkthrough downloading and installing the DotNetNuke package using the Web PI tool.

Some of the other ways to install DNN are:

Pre-installed by a hosting provider

This is certainly the easiest way. There are many hosting providers offering DNN as part of a hosting package.

Manually uploading and installing

If you are familiar with SQL Server databases and IIS you can download the DNN installation files and manually install the package. This is a good way to see how the individual pieces fit together.

Use DNN Starter Kit for Visual Studio 2008

You can also run DNN from your development tool. For more information, see Chapter 5, Building, Debugging, and Deploying Modules

Getting ready

For this recipe you should have Windows Server 2003, 2008, or 2008R2. For development you may use Windows XP Professional, Windows Vista, Windows 7 (Home Premium and above).

In addition, you should complete the following recipe:

  • Downloading the Microsoft Web Platform Installer

How to do it...

  1. 1. Start by launching the Microsoft Web Platform Installer.

  2. 2. When the list of available products is displayed, click on the Web Applications tab.

  3. 3. Scroll down until you see DotNetNuke and make sure it is selected.

  1. 4. Click on the Install button to begin the installation.

  2. 5. The next dialog will list the file you are downloading and prompt I Decline or I Accept. Click on I Accept.

  1. 6. Now DotNetNuke will download. Install by double-clicking on it. It will take several minutes, even with a fast connection. Halfway through the installation it may prompt if you want to reboot, click on No so that the installation will continue.

  2. 7. Once DotNetNuke package has been downloaded, Web PI will immediately launch the installation. It starts by prompting for the details of your new DNN site:

  1. 8. Leave the defaults and click on Continue.

  2. 9. Next is the prompt for the application information:

  1. 10. Enter the application information:

    • Database: SQL Server

    • Create new or use an existing database: Create New database

    • Database Administrator: sa

    • Database Administrator Password: use the password you choose when the database was installed

    • Database User Name: Choose a user name (such as DNN5User)

    • Database Password: Choose a password (such as DNN5User2010)

    • Database Server: .\SQLExpress

    • Database Name: DotNetNuke

  2. 11. Click on Continue.

  3. 12. Next, the status screen will be displayed as the installation runs. If you see a login failure instead, check that your database is up and running and you gave the correct password for the user sa.

  4. 13. You should now see the congratulations screen. Click on Finish.

  5. 14. Click on Exit to close the Web Platform Installer.

How it works...

In this recipe we used the Web PI Installer to download and install the DNN site. To complete the installation, see the next recipe Running the DotNetNuke installation.

 

Running the DotNetNuke installation


Once all the pieces are in place the final step is to access the DNN web and run the final installation code.

Getting ready

At this point you must have successfully completed the following recipes:

  • Downloading the Microsoft Web Platform Installer

  • Installing SQLServer Express

  • Downloading and installing DotNetNuke package

How to do it...

  1. 1. Open your favorite web browser and go to the new site (for example, http://localhost/DotNetNuke).

  2. 2. There will be a pause while the installation begins, then you will see the installation wizard screen.

  1. 3. Select Typical for the installation method.

  2. 4. Choose English for the language.

  3. 5. Click on Next.

  4. 6. The next page will test the file permissions. The wizard will automatically check the file permission. You should see the message: Your site passed the permissions check. Click on Next.

  5. 7. Now we must point our DNN installation to the database. Make sure SQL Server 2005/2008 Database is selected at the top of the page (select this option even if you are using SQL Express. We're not really defining the database here; we're just saying how we want to connect to it).

  1. 8. For Server, go with the default .\SQLExpress.

  2. 9. For the Database, type the name of the database created when SQLServer Express was installed: DotNetNuke.

  3. 10. Leave Integrated Security unchecked.

  4. 11. User ID should be the user name you selected (such as DNN5User).

  5. 12. Password should be the password you selected (such as DNN5User2010).

  6. 13. Check Run as db Owner.

  7. 14. Type dnn for the Object Qualifier. This is optional, but it helps to separate out database objects that belong to DNN from those that don't.

  8. 15. Click on Next. You will now see status messages as the database tables and stored procedures are created. At the end should be the message Installation of Database Complete. If the installation was successful, pat yourself on the back and click on Next.

  9. 16. Now the wizard will create two users to start with: the SuperUser who controls the entire DNN installation and the Administrator user who administers the portals and has more limited privileges.

  1. 17. For the First Name, keep the default SuperUser.

  2. 18. For the Last Name, type Account.

  3. 19. Select a User Name (avoid the standard host for the username. It is too well known).

  4. 20. Choose a good password and confirm it. Then write it down as you will need it later.

  5. 21. Provide your Email Address to get system messages.

  6. 22. Click on Next and provide the details for the Administrator user.

  1. 23. For the First Name, keep the default Administrator.

  2. 24. For the Last Name, type Account.

  3. 25. Select a User Name (avoid the standard admin for the username. It is too well known).

  4. 26. Choose a good password and confirm it. Then write it down as you will need it later.

  5. 27. Provide your Email Address to get system messages.

  6. 28. Lastly, the wizard will prompt for the basic information for your site. Choose a title for your site and type it into Portal Title.

  7. 29. Select Default Website for the Template.

  8. 30. Click on Next.

  9. 31. When you see the Congratulations screen, click on Finished (Goto Site) to complete the installation.

  10. 32. After a pause you should see the Welcome screen to your new website. Congratulations! You have successfully installed and set up a DNN website.

How it works...

When you navigate to a brand-new DNN website, it checks whether the necessary tables and stored procedures exist or not. If they are not there the script will create the tables, views, and stored procedures that DNN needs to run.

There's more...

As this recipe is the final step in the DNN installation it will show an error if any of the previous recipes were not done correctly. This means you may not realize until this moment that a step has been missed in any of the previous recipes. If you do encounter an error the best course of action is to cancel the installation by closing the browser; then review all the previous recipes to confirm every step was done correctly. If the installation continues to fail, it is recommended that you delete all files and the database and retry this recipe from the beginning.

 

Setting the site name and information


With the installation complete you can now setup your site. DNN is a powerful and flexible content management system so there is much to customize. This recipe will take you through the basics and show you how to quickly set up your site name and copyright message, as well as demonstrate how to upload your own logo for the site.

Getting ready

In this recipe we will demonstrate setting up the basic information for your site. To accomplish this task you must have successfully installed DNN as described in the first four recipes. You will also need to know the host and admin logins, and their passwords as chosen when DNN was installed.

How to do it...

  1. 1. Open your favorite web browser and go to the site you set up. If you are developing on your own machine then the web address would be http://localhost/DotNetNuke/default.aspx.

  2. 2. At the welcome screen click on the Login link in the upper right corner of the page (just below the search magnifying glass).

  3. 3. Type the username and password you set up for the admin account (sysadmin in our examples). Remember: the password is case sensitive.

  4. 4. The first thing you'll notice is the Control Panel across the top of the page. It contains useful tools to maintain the site divided into four categories: Common Tasks, Current Page, Admin, and Host. Some of these tools are also available under the host or admin menus, but they're easier to find here in the Control Panel.

  1. 5. Click on Admin to display the Admin tasks and click on the Site Settings icon in the upper-left corner.

  2. 6. This presents the Site Settings form. This is a typical data entry form in DNN. You have fields with labels, but also titles such as Basic Settings with little minus signs next to them. These are collapsible panels. You can hide parts of the form by clicking on the minus sign. You'll also see small Help icons next to all the fields. Clicking on these might provide more information about the field.

  1. 7. Start filling out this form with the following information:

    • Title: My Own Personal DNN Website

    • Description: My first DNN site

    • Copyright: Copyright 2010 by DNN Newbee

  2. 8. Click on the small plus sign next to Appearance to expand the panel and display fields dealing with the appearance of the site.

  3. 9. You can upload your own logo to the site by clicking on the Upload File link next to the Logo: prompt.

  1. 10. This will make a Browse button and two new links appear. Click on the Browse button.

  2. 11. When the Choose File dialog appears, navigate through your files and pick an image file to upload. In general, logo images look best if they are wide, but not too tall. Approximately 300 by 100 pixels.

  3. 12. Click on OK to close the File dialog.

  4. 13. Then click on the Save File link to actually bring your file up to the web server for DNN to display. The name of the file will now appear in the form.

  5. 14. Click on Update at the very bottom of the page to save your changes.

How it works...

The Site Settings page has a variety of options you can set, many of which will be explored in later chapters. Feel free to try different options. If it doesn't look right you can come back to this screen and change it back.

 

Choosing a skin for the site


This is a quick and easy recipe for changing the color scheme (called the "Skin") of your DNN site. When you download DNN it comes with a basic skin. However, you can download different skins selecting the one which you want your visitors to see. You may even opt for a different skin for the site administrator.

Getting ready

The typical installation of DNN has only one skin. In order to follow this recipe you will need to download at least one other skin to switch. If your site has only one skin you can still follow along to see how to change it. Or try the recipe Downloading an extension (skin or module) to download more skins for your site then come back and see how to change them.

How to do it...

  1. 1. Log in as Portal Administrator (sysadmin in our example).

  2. 2. From the Admin menu, select Skins.

  1. 3. Look for the drop-down list showing the available skins that have been installed on your site. If you don't see the skin you want, refer to the recipe Downloading an extension (skin or module) to install more skins.

  2. 4. Select the skin you want from the drop-down list. Samples of the skin will then be displayed.

  3. 5. Click on Preview to see what your site would look like with the selected skin.

  4. 6. If you like how it looks, click on Apply to apply the skin to your site.

  5. 7. If you want to have a different skin just for the Administrator user, then find the two checkboxes labeled Portal and Admin. Uncheck Portal and leave Admin checked, then apply the skin as described.

How it works...

A skin in DNN is a kind of layout. Visual elements in DNN like the login link, the copyright phrase, and the site logo appear to the skin as simple tokens that are easily repositioned in the layout. The purpose of a skin is to separate the functionality of your site from the visual layout. It allows the artists to design the site without having to worry about how the code works; in turn the programmers can code the site without having to worry about how the graphics work. It provides a consistent look all over the pages of your website.

See also

See the next recipe for more ways to change the visual appearance of your site.

 

Choosing a container for the site


The skin controls the layout and color scheme of your site but the actual content of your DNN site (the blogs, news articles, and so on) are contained inside visual blocks called Containers. Containers help you lay out your site but you can also choose a visual style for these containers in the same way you pick a visual style for the page itself.

How to do it...

  1. 1. Log in as Portal Administrator (sysadmin in our example).

  2. 2. From the Admin menu, select Skins.

  3. 3. Look for the drop-down list showing the available skins that have been installed on your site.

  4. 4. Select a skin from the drop-down list. Samples of the skin will then display along with the containers within the skin.

  1. 5. Look over the available containers and click on Preview to see what your site would look like with the selected container.

  2. 6. If you like how it looks, click on Apply to apply the container to your site.

  3. 7. If you want to have a different container just for the Administrator user, then find the two checkboxes labeled Portal and Admin. Uncheck Portal and leave Admin checked, then apply the container as above.

How it works...

Containers are usually found within skins so the styles available for the containers are determined by the skin you have chosen. That is why you have to pick a skin before you can see the available containers. However, DNN is very flexible, allowing you to assign one skin to the pages of your site but also allowing the use of containers from a totally different skin. You are free to mix and match containers and skins to achieve the best appearance for your site.

See also

For more information on how to change the appearance of your site pages, see the recipe Choosing a skin for the site.

 

Adding a module to a page


A module in DNN is a way to organize content into easy-to-use (and easy to reuse) plugins. You create a forum or a blog once, but you can "plug it in" to any page in your site as many times as you like. That is how you build your site by creating pages and plugging in whatever modules you have.

Getting ready

The only thing you need for this recipe is a page in your site. You can add modules to your home page or create a new page to hold your module. In this example we'll add a Banner Ads module to a new page called Our Sponsors.

How to do it...

  1. 1. Log in as Portal Administrator (sysadmin in our examples).

  2. 2. Make sure the Control Panel is displayed across the top of the page (the Control Panel is the set of icons you see when you are logged in as administrator).

  1. 3. Click on the New icon on the left side. This will create a new page.

  2. 4. For the Page Name, use Our Sponsors.

  3. 5. For the Page Title, use Our Sponsors.

  4. 6. Leave the rest as default and click on Update to create the page.

  5. 7. Next, look at the top center of the Control Panel and make sure Add Module: New is selected.

  6. 8. Locate the drop-down list that appears next to the Module: prompt. Select Banners.

  7. 9. Find the drop-down list next to the Pane: prompt and make sure ContentPane is selected.

  8. 10. In the Title box, type A Word from Our Sponsors.

  9. 11. In the drop-down list labeled Insert: make sure Bottom is displayed.

  10. 12 Click on the Add Module button to insert the Banners module into the page you're looking at.

  11. 13. That's all there is to it. Once a module is added to a page you must set the options for the module before you use it. For more details on setting up specific modules, see Chapter 3,Easy tricks with existing modules

How it works...

Adding a module to a page is a simple task and one you will do often. Building a website in DNN is merely adding modules to pages to create the features you need.

The Control Panel offers other options for positioning the module on the page. The example used ContentPane (which is the center pane) but you can also position modules in the left, right, top, and bottom panes.

When you already have modules on the page, the Insert drop-down list controls whether the new module should appear above or below the existing modules. Again these are just options to help position the module on the page you've selected. Feel free to experiment with module positioning to get a better feel for what looks good on your site.

 

Installing standard DNN modules


DNN comes out of the box with many modules, but only the most popular are installed at first. This was a conscious decision by the makers of DNN so that new DNN websites would not be bogged down running a lot of modules that were not needed. This makes for an efficient install, but it also means you'll want to install several standard modules once your site is created.

How to do it...

  1. 1. Log in as a SuperUser (syshost in our examples).

  2. 2. Look at the Control Panel and make sure you're in Edit mode.

  3. 3. Look under the Host menu and select Extensions.

  4. 4. Scroll to the bottom and click on the link Install Available Extensions or hover the mouse over the module action menu and select it.

  1. 5. Check the modules you want to install. For the recipes in this book, select the following modules:

    • Announcements

    • Blog

    • Documents

    • Events

    • FAQs

    • Forum

    • IFrame

    • Links

    • Reports

    • Wiki

  2. 6. Scroll to the bottom of the page and click on Install Selected Extensions.

  3. 7. Now each of these modules will appear in the Control Panel.

How it works...

By installing these additional modules you have many more features you can place on your pages.

 

Downloading an extension (skin or module)


Extensions in DNN consist of a set of files put together in a compressed folder (also called a ZIP file). To install a new extension you just provide the ZIP file and the DNN extension wizard will do the rest. Only the SuperUser can install new skins and modules.

A good way to get new extensions for your DNN site is to download them from the Internet. Sometimes they are free or cost only a nominal amount. In later chapters you will see how to make your own extensions. No matter how you get your extensions it will consist of a single ZIP file that you need to upload to the DNN server and install before it will appear in the Control Panel drop-down lists as we saw in Adding a module to a page.

Popular sites for downloading DNN extensions are www.codeplex.com (free open source modules), DotNetNuke Forge (www.dotnetnuke.com), and www.snowcovered.com (mainly commercial modules). You may need to register for an account with the site, but the registration is free.

This recipe will show how to download an extension (a free skin in this example) but the process is basically the same for all different extension types (such as modules and foreign language packs).

How to do it...

  1. 1. Open your favorite browser and go to www.snowcovered.com.

  2. 2. Find the Register link at the top of the screen (next to the Help icon) and click on it. If you already have an ID on this site, you can click on Login, provide your username and password, and skip to step 4.

  3. 3. Fill in your name and pick a Username and Password to use with this site. Fill in any other required fields and click on Register.

  4. 4. After a successful login or registration, you will see the Welcome page, showing the most recent modules and skins. In the upper left corner, click on DotNetNuke 5 in the list of Browse links.

  1. 5. This will show a list of all the modules and skins for DNN 5. We're looking to get a free skin, so find and click on the Skins link in the Browse list to the upper left.

  2. 6. Next, locate the drop-down list that says Release Date and select Price: Low to High. Then click on the Sort link. This will show the free skins first.

  1. 7. Look over the free skins and pick one you think will look nice on your site. In this example we'll pick one called Greytness, but you can pick whichever one you like. Click on it to go to the skin detail screen.

  2. 8. Examine the details of the skin (especially the price which will be $0 if it is a free skin). Then click on the Add to Cart link on the right side of the page.

  3. 9 A message will confirm the skin is added to your cart. Now click on the link called View Cart to complete the transaction.

  4. 10. The next screen shows the skin you are downloading. Click on the Proceed to Checkout button.

  1. 11. At the Payment page, type your e-mail address. Click on the Continue button.

  2. 12. If you haven't logged into the SnowCovered site yet, you will be asked for your username and password. Otherwise you'll go right to the Payment page.

  3. 13. The Payment page will show your account information. Make sure all the required fields are filled in and click on Continue.

  4. 14. The next screen will show the Sales Agreement and Terms. Click on the Agree to terms checkbox and click on Confirm Order.

  5. 15. The last page will present a link called My Downloads. Click on this link.

  6. 16. At the list of pending downloads, click on Downloads shown next to the skin you purchased.

  1. 17. On the next page, click on the Download link.

  2. 18. The File download dialog will ask if you want to Open or Save. Click on Save and select a temporary folder to hold the ZIP file.

  3. 19. That's all we need from the SnowCovered site so close the browser.

  4. 20. There is one more thing we need to do. Often when we download an extension, the ZIP file we really need is inside the ZIP file we downloaded. We'll need to look inside the ZIP file we just got and extract the ZIP file we need. Go to the temporary folder where you saved the download file.

  5. 21. Right-click on the file you downloaded and choose Open With | Compressed (zipped) Folders.

  6. 22. In the file we downloaded, there are several folders inside, one for DNN4 and one for DNN5. Look inside the DNN5 folder and you'll see the ZIP file we really need called Greytness_01.00.00_Install.zip. Choose File | Extract All from the menu and save all files that were inside the original ZIP to their own folder.

  7. 23. Remember the name of the folder holding the Greytness_01.00.00_Install.zip file. This is the ZIP we will send up to our DNN site. We will not send up the ZIP file we got from SnowCovered site but the ZIP we found inside that file.

How it works...

A DNN extension is an installable add-on for DotNetNuke that extends the visual experience (Skin, Container), Functions (Skin Objects, Modules), Services (Providers), Localization, or even modules. Modules, skins, and foreign language packs were treated separately in older versions of DNN, but in version 5 they are grouped together under the category of Extension with a single wizard to install them.

See also

Now that you have downloaded the extension in a ZIP file, the next recipe will show how to upload the ZIP file to your DNN site and install it.

 

Installing a new extension


Once an extension has been downloaded and saved in a temporary folder the last step is to connect to your DNN site and upload the module or skin. This recipe will show you how to install a module you have downloaded from a site like SnowCovered.

Getting ready

To perform this recipe you need to have downloaded an extension file as described in the recipe Downloading an extension (skin or module). In this example we will assume you have a file called Greytness_01.00.00_Install.zip ready to upload. Note: some extension packages are zipped with additional material (documentation, install instructions) together and need to be unzipped to be installed. For example, a DNN 5 install ZIP must have a manifest file inside.

How to do it...

  1. 1. Point your browser to your DNN site.

  2. 2. Log in as SuperUser (syshost in our examples). We must use the SuperUser account (not the admin account) because we are adding a new extension to the site.

  3. 3. Look at the Control Panel and make sure you are in Edit mode (not View mode).

  4. 4. Go to the menu Admin | Extensions.

  5. 5. Scroll to the bottom of the page and click on the link called Install Extension Wizard. You can also select this from the module action menu.

  6. 6. Click on the Browse button and select the ZIP file (Greytness_01.00.00_Install.zip in our example).

  7. 7. Click on Next.

  8. 8. If you see a screen with a warning about a missing manifest, don't panic! It probably means that you skipped the steps from the download recipe and are trying to load the ZIP file that you got directly from SnowCovered. Click on Cancel and repeat the steps from the recipe Downloading an extension (skin or module) to extract the ZIP file for DNN5. w

  9. 9. If all is well, you will see the Install Extension page. This shows the details of the skin file. Click on Next to install it.

  1. 10. At the Release Notes page, click on Next.

  2. 11. If you see a Review License page, check Accept License and click on Next.

  3. 12. The last screen is the Package Installation Report which should list all the items loaded for the skin with a final message at the bottom saying Installation Successful. If you see an error message instead, there could be a problem with the skin file. Try loading a different skin.

  4. 13. Click on Return to complete the skin installation.

  5. 14. The skin is now available to use on your site. If go to the menu Admin | Extensions you will now see that the new skin appears in the drop-down list of skins.

How it works...

The ZIP file holding the extension is uploaded to the DNN site and parsed for a special file called a manifest. The manifest tells DNN whether this is a skin, module, or foreign language extension you are trying to load. From there DNN knows what to do and it will make sure your extension is put in the right place.

There's more...

Installing a module extension is exactly the same as above except that when a module successfully installs it will appear in the Control Panel under the list of available modules.

About the Author

  • John K Murphy

    John K Murphy is a software industry veteran with more than 25 years experience as a programmer and database administrator. A graduate of the University of West Virginia he began writing computer games in the 1980's before pursuing a career as a  computer consultant. Over the years, John has enjoyed developing software in most major programming languages while striving to keep current with new technologies.

    In his spare time, John enjoys scuba diving, skydiving and piloting small planes. He lives with his wife and two children in Pittsburgh, Pennsylvania.

    Browse publications by this author
DotNetNuke 5.4 Cookbook
Unlock this book and the full library FREE for 7 days
Start now