DNN 3.0的安装模版--DotNetNuke Host Template翻译
DNN 3.0的安装模版 (DotNetNuke.install)
概要
3.0版本的DotNetNuke使用一个安装模版来控制安装的进程。这个安装模版是一个XML文件,这篇文章将介绍这个模版中的节点和他们的用法。
<host>节点
<host> 节点是模版的根节点,其他所有的节点都是它的子节点。总共有8个下级节点:
- <description> 子节点
提供模版的描述。 - <schemascript>子节点
创建数据库模式脚本的名称 (这个脚本必须位于web.config中default Data provider的providerPath属性所指示的文件夹) - <datascript>子节点
创建所需要的数据库数据的脚本文件名称(这个脚本必须位于web.config中default Data provider的providerPath属性所指示的文件夹) - <version>子节点
所要创建的数据库的<schemascript>, <datascript>文件版本. 通常是正确的版本,但如果版本比正确版本要低,那么相应的升级脚本将运行使得数据库版本和应用程序版本相一致。 - <superuser>子节点
超级管理员信息- 见下 - <settings>子节点
默认的主机设置——这个节点的子节点对应于数据库中主机设置表,并且在安装后由主机设置栏控制。 - <desktopmodules>子节点
安装中默认安装的桌面模块– 见下 - <portal>子节点
默认站点配置– 见下
<superuser> 节点
<superuser>节点配置了默认的超级用户或者主机管理员,有5个子节点:
- <firstname>子节点
超级用户的姓 - <lastname>子节点
超级用户的名字 - <username>子节点
超级用户的用户名 - <password>子节点
超级用户的密码 - <email>子节点
超级用户的email地址
<desktopmodules> 节点
<deskopmodules>节点配置了默认安装的桌面模块,它有许多<desktopmodule>子节点 ,每个子节点定义一个模块的安装。<desktopmodule> 节点的架构类似于在DNN文件中定义自定义模块。事实上,In fact the schema for the <desktopmodule>节点的架构和在dnn模块安装文件中(更多详细资料参见模块开发指南)的<folder>架构一样,除了我们没有在这个过程中添加文件,所以没有<files> 节点。
<portal>节点
<portal> 节点配置了默认的站点,它具有8个子节点。
- <portalname>子节点
默认站点的名称 (在标题栏显示) - <administrator>子节点
配置站点管理员——具有和<superuser> 节点相同的架构——见上 - <description>子节点
站点简介(用于Html页面的META标签) - <keywords>子节点
站点关键字(用于Html页面的META标签) - <templatefile>子节点
用于站点的模版文件名称 (必须位于 Portals/_default文件夹) - <homedirectory>子节点
设置站点的主目录 (通常保持空白 – 默认为 Portals/[PortalId] - <portalalias>子节点
站点的别名(通常保持空白– 默认为安装的配置) - <ischild>子节点
必须为空 (未来使用节点)
示例:(见原文档)
The Install Template for DNN 3.0 (DotNetNuke.install)
General
Version 3.0 of DotNetNuke uses an install template to control the installation process. The template is an XML file and this document will explain the various nodes in the template and their uses.
<host>Node
The <host> node is the root node of the template. All other nodes are children of <host>. There are 8 immediate children
- <description> child
Provides a description of the template.
- <schemascript> child
Name of the Script file that builds the Database Schema (this file must be located in the folder indicated by the “providerPath” attribute of the default Data provider in web.config)
- <datascript> child
Name of the Script file that builds the required Database Data (this file must be located in the folder indicated by the “providerPath” attribute of the default Data provider in web.configr)
- <version> child
The database version that the <schemascript>, <datascript> files build. This is usually the current version, but if the version is less than the current version then the appropriate upgrade scripts are run to make the database version = app version
- <superuser> child
Information about the superuser (Host Account) - see later
- <settings> child
The default HostSettings for the application – the child nodes of this node correspond to the HostSettings table in the database, and are managed under the Host/Host Settings menu (after installation)
- <desktopmodules> child
The desktop modules to install for this installation – see later
- <portal> child
The default portal configuration – see later
<superuser> Node
The <superuser> node configures the default superuser (or host account). It has 5 immediate children.
- <firstname> child
The first name of the superuser
- <lastname> child
The last name of the superuser
- <username> child
The user name of the superuser
- <password> child
The password of the superuser
- <email> child
The email address of the superuser
<desktopmodules> Node
The <deskopmodules> node configures the desktopmodules to be installed. It has a number of <desktopmodule> nodes, one for each module to be installed. The schema for the <desktopmodule> nodes is similar to the structure used for custom modules in the dnn file. In fact the schema for the <desktopmodule> node is the same as the schema for the <folder> node in the dnn Module Installer file (see the Module Dev Guide for more info on these nodes) except that we are not adding files in this process so there are no <files> nodes.
<portal> Node
The <portal> Node configures the default portal. It has 8 immediate child nodes.
- <portalname> child
The name of the portal (will display in the TitleBar)
- <administrator> child
Configures the Admiistrator User for the portal - has the same schema as the <superuser> node – see above
- <description> child
A description of the portal (used in the Html Page META Tags)
- <keywords> child
keywords for the portal (used in the Html Page META Tags)
- <templatefile> child
The filename of the template file used for the portal (must be physically located in the Portals/_default directory)
- <homedirectory> child
Sets the portal’s home directory (usually left blank – defaults to Portals/[PortalId]
- <portalalias> child
Portal Aliases for the portal (usually left blank – defaults to the location where the installation runs)
- <ischild> child
Must be blank (future use)
Sample
<host>
<description>This is the default DotNetNuke Host Installation Template</description>
<schemascript>DotNetNuke.Schema.SqlDataProvider</schemascript>
<datascript>DotNetNuke.Data.SqlDataProvider</datascript>
<version>03.00.04</version>
<superuser>
<firstname>Host</firstname>
<lastname>Account</lastname>
<username>host</username>
<password>host</password>
<email>host</email>
</superuser>
<settings>
<DemoPeriod></DemoPeriod>
<DemoSignup>N</DemoSignup>
<DisablePageTitleVersion>N</DisablePageTitleVersion>
<DisableUsersOnline>N</DisableUsersOnline>
<EncryptionKey></EncryptionKey>
<FileExtensions>jpg,jpeg,jpe,gif,bmp,png,doc,xls,ppt,pdf,txt,xml,xsl,css,zip</FileExtensions>
<HostCurrency>USD</HostCurrency>
<HostEmail>support@dotnetnuke.com</HostEmail>
<HostFee></HostFee>
<HostPortalId>0</HostPortalId>
<HostSpace></HostSpace>
<HostTitle>DotNetNuke</HostTitle>
<HostURL>www.dotnetnuke.com</HostURL>
<PaymentProcessor>PayPal</PaymentProcessor>
<PortalModule>Y</PortalModule>
<ProcessorPassword></ProcessorPassword>
<ProcessorUserId></ProcessorUserId>
<ProxyPort></ProxyPort>
<ProxyServer></ProxyServer>
<SiteLogHistory>60</SiteLogHistory>
<SMTPServer></SMTPServer>
<UseCustomErrorMessages>Y</UseCustomErrorMessages>
<UseFriendlyUrls>Y</UseFriendlyUrls>
<UsersOnlineTime>20</UsersOnlineTime>
</settings>
<desktopmodules>
<desktopmodule>
<name>Announcements</name>
<description>This module renders a list of announcements. Each announcement includes title, text and a "read more" link, and can be set to automatically expire after a particular date.</description>
<version>01.00.00</version>
<businesscontrollerclass>DotNetNuke.Modules.Announcements.AnnouncementsController, DotNetNuke.Modules.Announcements</businesscontrollerclass>
<modules>
<module>
<friendlyname>Announcements</friendlyname>
<controls>
<control>
<src>DesktopModules/Announcements/Announcements.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit Announcements</title>
<src>DesktopModules/Announcements/EditAnnouncements.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>Contacts</name>
<description>This module renders contact information for a group of people, for example a project team. Contacts includes an edit page, which allows authorized users to edit the Contacts data stored in the database.</description>
<version>01.00.00</version>
<businesscontrollerclass>DotNetNuke.Modules.Contacts.ContactController, DotNetNuke.Modules.Contacts</businesscontrollerclass>
<modules>
<module>
<friendlyname>Contacts</friendlyname>
<controls>
<control>
<src>DesktopModules/Contacts/Contacts.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit Contacts</title>
<src>DesktopModules/Contacts/EditContacts.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>Discussions</name>
<description>This module renders a group of message threads on a specific topic. Discussion includes a Read/Reply Message page, which allows authorized users to reply to exising messages or add a new message thread. The data for Discussion is stored in the SQL database.</description>
<version>01.00.00</version>
<businesscontrollerclass>DotNetNuke.Modules.Discussions.DiscussionController, DotNetNuke.Modules.Discussions</businesscontrollerclass>
<modules>
<module>
<friendlyname>Discussions</friendlyname>
<controls>
<control>
<src>DesktopModules/Discussions/Discussion.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit Discussions</title>
<src>DesktopModules/Discussions/DiscussDetails.ascx</src>
<type>Anonymous</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>Documents</name>
<description>This module renders a list of documents, including links to browse or download the document. Documents includes an edit page, which allows authorized users to edit the information about the Documents (for example, a friendly title) stored in the SQL database.</description>
<version>01.00.00</version>
<businesscontrollerclass>DotNetNuke.Modules.Documents.DocumentController, DotNetNuke.Modules.Documents</businesscontrollerclass>
<modules>
<module>
<friendlyname>Documents</friendlyname>
<controls>
<control>
<src>DesktopModules/Documents/Document.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit Documents</title>
<src>DesktopModules/Documents/EditDocs.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>Events</name>
<description>This module renders a list of upcoming events, including time and location. Individual events can be set to automatically expire from the list after a particular date. Events includes an edit page, which allows authorized users to edit the Events data stored in the SQL database.</description>
<version>01.00.00</version>
<businesscontrollerclass>DotNetNuke.Modules.Events.EventController, DotNetNuke.Modules.Events</businesscontrollerclass>
<modules>
<module>
<friendlyname>Events</friendlyname>
<controls>
<control>
<src>DesktopModules/Events/Events.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit Events</title>
<src>DesktopModules/Events/EditEvents.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
<control>
<key>Settings</key>
<title>Events Settings</title>
<src>DesktopModules/Events/Settings.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>FAQs</name>
<description>FAQs allow you to manage a list of Frequently Asked Questions and their corresponding Answers.</description>
<version>01.00.00</version>
<businesscontrollerclass>DotNetNuke.Modules.FAQs.FAQsController, DotNetNuke.Modules.FAQs</businesscontrollerclass>
<modules>
<module>
<friendlyname>FAQs</friendlyname>
<controls>
<control>
<src>DesktopModules/FAQs/FAQs.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit FAQs</title>
<src>DesktopModules/FAQs/EditFAQs.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>Feedback</name>
<description>Feedback allows visitors to send messages to the Administrator of the portal.</description>
<version>01.00.00</version>
<businesscontrollerclass></businesscontrollerclass>
<modules>
<module>
<friendlyname>Feedback</friendlyname>
<controls>
<control>
<src>DesktopModules/Feedback/Feedback.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Settings</key>
<title>Feedback Settings</title>
<src>DesktopModules/Feedback/Settings.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>IFrame</name>
<description>IFrame is an Internet Explorer browser feature which allows you to display content from another website within a frame on your site.</description>
<version>01.00.00</version>
<businesscontrollerclass></businesscontrollerclass>
<modules>
<module>
<friendlyname>IFrame</friendlyname>
<controls>
<control>
<src>DesktopModules/IFrame/IFrame.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit IFrame</title>
<src>DesktopModules/IFrame/EditIFrame.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>Image</name>
<description>This module renders an image using an HTML IMG tag. The module simply sets the IMG tags src attribute to a relative or absolute URL, so the image file does not need to reside within the portal. The module also exposes height and width attributes, which permits you to scale the image. Image includes an edit page, which persists these settings to the portals configuration file. </description>
<version>01.00.00</version>
<businesscontrollerclass></businesscontrollerclass>
<modules>
<module>
<friendlyname>Image</friendlyname>
<controls>
<control>
<src>DesktopModules/Images/ImageModule.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit Image</title>
<src>DesktopModules/Images/EditImage.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>Links</name>
<description>This module renders a list of hyperlinks. Links includes an edit page, which allows authorized users to edit the Links data stored in the SQL database.</description>
<version>01.00.00</version>
<businesscontrollerclass>DotNetNuke.Modules.Links.LinkController, DotNetNuke.Modules.Links</businesscontrollerclass>
<modules>
<module>
<friendlyname>Links</friendlyname>
<controls>
<control>
<src>DesktopModules/Links/Links.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit Links</title>
<src>DesktopModules/Links/EditLinks.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
<control>
<key>Settings</key>
<title>Links Settings</title>
<src>DesktopModules/Links/Settings.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>News Feeds (RSS)</name>
<description>News Feed allows you to consume syndicated news feeds in Rich Site Summary (RSS) format.</description>
<version>01.00.00</version>
<businesscontrollerclass></businesscontrollerclass>
<modules>
<module>
<friendlyname>News Feeds (RSS)</friendlyname>
<controls>
<control>
<src>DesktopModules/News/RssModule.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit News Feeds (RSS)</title>
<src>DesktopModules/News/EditRss.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>Text/HTML</name>
<description>This module renders a snippet of HTML or text. The Html/Text module includes an edit page, which allows authorized users to the HTML or text snippets directly. The snippets are stored in the SQL database.</description>
<version>01.00.00</version>
<businesscontrollerclass>DotNetNuke.Modules.Html.HtmlTextController, DotNetNuke.Modules.Html</businesscontrollerclass>
<modules>
<module>
<friendlyname>Text/HTML</friendlyname>
<controls>
<control>
<src>DesktopModules/HTML/HtmlModule.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit Text/HTML</title>
<src>DesktopModules/HTML/EditHTML.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>User Defined Table</name>
<description>User Defined Table allows you to create a custom data table for managing tabular information.</description>
<version>01.00.00</version>
<businesscontrollerclass></businesscontrollerclass>
<modules>
<module>
<friendlyname>User Defined Table</friendlyname>
<controls>
<control>
<src>DesktopModules/UserDefinedTable/UserDefinedTable.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit User Defined Table</title>
<src>DesktopModules/UserDefinedTable/EditUserDefinedTable.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
<control>
<key>Manage UDT</key>
<title>Manage UDT</title>
<src>DesktopModules/UserDefinedTable/ManageUserDefinedTable.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
<desktopmodule>
<name>XML/XSL</name>
<description>This module renders the result of an XML/XSL transform. The XML and XSL files are identified by their UNC paths in the xmlsrc and xslsrc properties of the module. The Xml/Xsl module includes an edit page, which persists these settings to the SQL database.</description>
<version>01.00.00</version>
<businesscontrollerclass></businesscontrollerclass>
<modules>
<module>
<friendlyname>XML/XSL</friendlyname>
<controls>
<control>
<src>DesktopModules/XML/XmlModule.ascx</src>
<type>View</type>
<helpurl></helpurl>
</control>
<control>
<key>Edit</key>
<title>Edit XML/XSL</title>
<src>DesktopModules/XML/EditXml.ascx</src>
<type>Edit</type>
<helpurl></helpurl>
</control>
</controls>
</module>
</modules>
</desktopmodule>
</desktopmodules>
<portal>
<portalname>DotNetNuke</portalname>
<administrator>
<firstname>Administrator</firstname>
<lastname>Account</lastname>
<username>admin</username>
<password>admin</password>
<email>admin</email>
</administrator>
<description>Default DotNetnuke Portal</description>
<keywords>Default, DotNetNuke, CMS, Web, Future</keywords>
<templatefile>DotNetNuke.template</templatefile>
<homedirectory>Portals/0</homedirectory>
<portalalias></portalalias>
<ischild>false</ischild>
</portal>
</host>
Provides a description of the template.
Name of the Script file that builds the Database Schema (this file must be located in the folder indicated by the “providerPath” attribute of the default Data provider in web.config)
Name of the Script file that builds the required Database Data (this file must be located in the folder indicated by the “providerPath” attribute of the default Data provider in web.configr)
The database version that the <schemascript>, <datascript> files build. This is usually the current version, but if the version is less than the current version then the appropriate upgrade scripts are run to make the database version = app version
Information about the superuser (Host Account) - see later
The default HostSettings for the application – the child nodes of this node correspond to the HostSettings table in the database, and are managed under the Host/Host Settings menu (after installation)
The desktop modules to install for this installation – see later
The default portal configuration – see later
The first name of the superuser
The last name of the superuser
The user name of the superuser
The password of the superuser
The email address of the superuser
The name of the portal (will display in the TitleBar)
Configures the Admiistrator User for the portal - has the same schema as the <superuser> node – see above
A description of the portal (used in the Html Page META Tags)
keywords for the portal (used in the Html Page META Tags)
The filename of the template file used for the portal (must be physically located in the Portals/_default directory)
Sets the portal’s home directory (usually left blank – defaults to Portals/[PortalId]
Portal Aliases for the portal (usually left blank – defaults to the location where the installation runs)