DotNetNuke

Jump to: navigation, search
Categories » Programming » .NET Programming » ASP.NET » DotNetNuke
Categories » Programming » Web Programming » ASP.NET » DotNetNuke

Official Site

Contents

Installation

Upload files to the server. We're going to need to configure the release.config file.

Set File Permissions

Set the NTFS file permissions for the ASP.NET worker process. This step is required as DotNetNuke needs to be able to create directories and files. The user account that needs to be given permissions is different depending on which version of Windows you are using.

The required permissions for the various directories in DotNetNuke are as follows:

If you are likely to be installing Language Packs you will also need Write and Modify access to all child folders of the root.

Configuring web.config for Installation

All ASP.NET applications require a web.config file. In versions of DotNetNuke prior to 3.1, this file was part of the zip package. In v3.1 and later versions this file is not part of the zip package. If you are installing v3.1 or later, before doing anything else rename release.config to web.config. Before browsing to your site and initiating the installation, there are a number of web.config settings that you will need to set. In the <appSettings> group of settings, there are five settings that control the Installation/Upgrade.

<appSettings>
	<add key="SiteSqlServer" value="Server=(local);Database=DotNetNuke;uid=;pwd=;" />
	<add key="MachineValidationKey" value="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902" />
	<add key="MachineDecryptionKey"
	value="F9D1A2D3E1D3E2F7B3D9F90FF3965ABDAC304902F8D923AC" />
	<add key="MachineValidationMode" value="SHA1" />
	<add key="InstallTemplate" value="DotNetNuke.install.resources" />
	<add key="AutoUpgrade" value="true" />
	<add key="UseDnnConfig" value="true"/>
	<add key="InstallMemberRole" value="true" />
	<!-- Show missing translation keys (for development use) -->
	<add key="ShowMissingKeys" value="false" />
	<add key="EnableWebFarmSupport" value="false" />
	<add key="EnableCachePersistence" value="false" />
</appSettings>

Data Provider Settings

<data defaultProvider="SqlDataProvider">
	<providers>
	<clear />
	<add name="SqlDataProvider"
		type="DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider"
		connectionStringName="SiteSqlServer"
		upgradeConnectionString=""
		providerPath="~\Providers\DataProviders\SqlDataProvider\"
		objectQualifier=""
		databaseOwner="dbo" />
	</providers>
</data>

The objectQualifier attribute is used to control the prefix applied to every object in the SQL Server database. By default this is set to an empty string "", so for instance the Portals table is created as Portals. If, for example, the objectQualifier was set to dnn_ then the Portals table would be created as dnn_Portals and stored procedures etc that referenced the Portals table wold reference it as dnn_Portals. Setting this value is recommended, as it allows DotNetNuke to exist within an environment where multiple applications might need to use the same database.

The databaseOwner attribute is used to identify the user that "owns" the database objects. By default it is set to dbo and in most cases this attribute should be left this way. However, some SQL Server DBAs (in particular in shared hosting environments) may not grant the user you identify in the connection string db_owner privileges. In this case, set the databaseOwner attribute to your login user. Note this user will need to have the following SQL Permissions, at a minimum:

The previous two settings are only relevant for the default MS SQL Server Data Provider. If you are using an alternate data provider, you will have to refer to its documentation to configure the provider properly.

Navigation Provider Settings

<navigationControl defaultProvider="SolpartMenuNavigationProvider">
	<providers>
	<clear/>
	<add name="SolpartMenuNavigationProvider"
		type="DotNetNuke.NavigationControl.SolpartMenuNavigationProvider,
                      DotNetNuke.SolpartMenuNavigationProvider"
		providerPath="~\Providers\NavigationProviders\SolpartMenuNavigationProvider\"/>
	<add name="DNNMenuNavigationProvider"
		type="DotNetNuke.NavigationControl.DNNMenuNavigationProvider,
                      DotNetNuke.DNNMenuNavigationProvider"
		providerPath="~\Providers\NavigationProviders\DNNMenuNavigationProvider\"/>
	<add name="DNNTreeNavigationProvider"
		type="DotNetNuke.NavigationControl.DNNTreeNavigationProvider,
                      DotNetNuke.DNNTreeNavigationProvider"
		providerPath="~\Providers\NavigationProviders\DNNTreeNavigationProvider\"/>
	<add name="DNNDropDownNavigationProvider"
		type="DotNetNuke.NavigationControl.DNNDropDownNavigationProvider,
                      DotNetNuke.DNNDropDownNavigationProvider"
		providerPath="~\Providers\NavigationProviders\DNNDropDownNavigationProvider\"/>
	</providers>
</navigationControl>

Member Roles Prototype Settings

Issues

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/107/threadid/197267/scope/posts/threadpage/2/Default.aspx

Upgrading

release.config

XMod

FormView Module

This module allows a user to submit a form but not view other submissions of the form. Example: "Submit your feedback" type form.

The FormView Module must be installed after XMod installation. From the manual:

Adding the FormView Module
  1. After you have installed XMod, if you haven't already done so, login to your DNN site under the Host or SuperUser account,
  2. Locate an XMod module or add one to a page.
  3. From the module's Actions Menu, select Administration to navigate to the XMod Administration page.
  4. On the General tab, find the FormView Module section and click the Install/Update Module button.
  5. After clicking the button you should receive a success message.
  6. After your module is installed, you'll be able to place XMod FormView modules on your pages to display your XMod forms.
  7. XMod also provides a set of basic starter packages. These are collections of data-entry forms and templates to help get you started using XMod more quickly. For more information, see the XMod Starter Packages topic.

Sample Form

When creating a form, select Custom HTML-Based Form. Here's a sample XMod form:


Image Gallery / Lightbox

Thickbox

  1. Download from their site at http://jquery.com/demo/thickbox/
  2. Modify thickbox.js.
    • Find/replace $( with jQuery(
    • The ASP.NET resizer script I was using caused the Thickbox script to think it wasn't displaying an image. I overrode the filetype detection system: Search for the following line (line 68 as of the version I downloaded):
      if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
      And replace it with:
      if(/*ikenote: overriding type detection*/true||/*end ikemod*/urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
    • Update the path to the "loading" image. In my version of the file, this was on line 8.
      var tb_pathToImage = "/portal/thickbox/loadingAnimation.gif";

File Upload / File Picker Control

From the XMod Help file, starting at page 412

Enabling Custom Controls

  1. From an XMod control, select the Administration option.
  2. Enable Enable Custom Form Controls.
  3. Click Save Changes.

Adding the Picker to a Form

<form>
  <controls>
    <register tagprefix="kbcc" namespace="KnowBetter.XModControls" assembly="KnowBetter.XModControls"/>
    ...
    <custom tagprefix="kbcc" name="FileUpload" ref="FileUpload" cssclass="NormalTextBox"
    cssclasslink="Normal" style="background-color: blue; color: yellow;" extensions="zip,jpg,gif,png" 
    uploaddirectory="image_gallery" noneselected="true" uploadsuccessmsg="Your image has been uploaded" 
    uploadonce="True">
      <label>File Upload</label>
    </custom>
    ...
  </controls>
</form>

Customizations

Resizing User Uploaded Images

This method involves javascript and client-side image src redirects, it has been tested and found functional on Firefox, Internet Explorer, Opera, and Safari.

Files

You will first want to grab a copy of ImageGen (an Umbraco package) available here.

The following installation instructions are transcribed from the ImageGen Documentation available here.

Installation

  1. Extract imagegen_2.0.1.zip
  2. Create an ImageGen directory in the root of the DNN install
  3. Copy ImageGen.ashx to the ImageGen directory
  4. Copy ImageGen.dll to the Bin directory in the root of the DNN install
  5. Copy ImageGen.sample.config to the Config directory in the root of the DNN install
  6. Create a new Javascript File named ImageGen.js in the ImageGen directory with the following code:
  7. Modify Default.aspx from the root of the DNN install
    • Add line 19 as shown below:
      18. <style type="text/css" id="StylePlaceholder" runat="server"></style>   //Existing Line
      19. <script type="text/javascript" src="ImageGen/ImageGen.js"></script>    //New Line
      20. <asp:placeholder id="CSS" runat="server"></asp:placeholder>            //Existing Line
    • Add line 30 as shown below:
      29.     </dnn:Form>                                                        //Existing Line
      30.     <script type="text/javascript">getImages();</script>               //New Line
      31. </body>                                                                //Existing Line

Issues

There known to be possible issues with Safari, that it does not interrupt the download stream of the original image before starting the download of the re-sized image.

Customizing DNN Modules

This section will address how to setup a DNN source environment in Visual Studio 2005 for the purpose of editing an existing module.

Files

You will need to grab a copy of the DNN "Install Version" from the downloads section of the Dot Net Nuke Website

Setup

  1. Open DotNetNuke_xx.xx.xx_StarterKit.vsi to being the installation, following the instructions.
  2. Open up Visual Studio 2005, go to File / New Website and select the DotNetNuke Template (if it is not visible make sure that you have the Visual Basic language selected)
  3. Once DNN is installed to the directory of your choice you are free to compile using CTRL+F5
  4. When prompted by the browser installation wizard select the auto installation option
  5. Install the package that you would like to modify as usual, under the hosts user in the Module Definitions menu
  6. The desired source is now available in your Visual Studio Solution Explorer
Personal tools
Namespaces
Variants
Actions
Navigation
Categories
Toolbox