现在的位置: 首页 > 综合 > 正文

DotNetNuke Skinning Whitepaper 翻译记录(皮肤上传部分)

2011年02月24日 ⁄ 综合 ⁄ 共 2976字 ⁄ 字号 评论关闭
 

皮肤上传

 

一旦基于ASCX文件格式的可以执行的皮肤被加入到ASPX页面中,一些皮肤文件中的恶意脚本可能危害到整个系统。基于这个考虑,主机拥有对主机或者网站进行皮肤上传的授权功能。用HOST账户登录,选择主机栏目下的主机设置,你可以看到这个选项。如果该选项被设置成Portal(默认),那么网站的管理者可以不受到主机的干涉上传自己网站的皮肤。

任何文件上传的功能都被集中在DotNetNuke 中网站管理或主机管理下的文件管理栏目。在网站管理下的文件管理中上传皮肤则这个皮肤仅适用于该站点,而如果在主机管理下上传皮肤则适用于该主机的所有站点。文件管理器有一个上传选项,选择该选项则出现允许上传皮肤和容器包的文件上传界面。在上传压缩包之前应选择适当的文件用途选项(应用程序通过这个来区分压缩包的用途)。注意:如果没有得到上传授权,这个选项无法出现。:(

 

 

皮肤上传机制将自动解压缩皮肤包,创建必要的文件夹并释放文件,而且还会通过ASP.NET脚本将HTML文件中的占位符替换掉以实现将HTML文件转换成ASCX用户控件的目的。这个转换是按照数据库中ModuleControls表中皮肤对象的定义来实现的。ASCX用户控件文件和CSS样式表文件依旧以相对路径的方式关联图形文件。注意:如果你上传的皮肤包同时包含了皮肤和容器( containers.zip and skins.zip ),那么应该选择皮肤包选项。

 

Skin Upload

 

Since skins are based on ASCX files which are essentially executable once they are added to an ASPX page, there is some risk that malicious script could be inserted into the skin files – putting your entire installation in danger. For this reason, the Host has the ability to grant Skin Upload Permission to either the Host or Portal. The option is available when you login as the Host User and select the Host Settings option from the Host tab. If the option is set to Host then only the Host User is able to upload skins to the site. If the option is set to Portal ( default ), then the Administrator of the portal is able to upload their own skins without Host intervention.

 

The upload of files has been centralized in DotNetNuke to the File Manager tab on the Admin or Host menu. To upload skins to a specific portal, you must browse to the portal’s URL, login, and then use the File Manager option in the Admin tab. To upload skins which are available to all portals, the Host should use the File Manager option in the Host tab. The File Manager has an option to Upload New File(s). Selecting this option displays the File Upload interface which allows you to upload your skin and container packages. Select the appropriate option from the upload file type options prior to uploading a package ( the application must be able to distinguish between the various ZIP file packages ). Please note that depending on the Skin Upload Permission defined above, some of the options may not be available to you.

 

 

The Skin Upload will unzip the skin package; creating the necessary folder and decompress the files. It will convert any HTML files to their ASCX user control equivalent by replacing the placeholder tokens with the actual ASP.NET script. This replacement is done according to the skin objects defined in the ModuleControls database table. ASCX user control files and CSS style sheet files will also be parsed to include the relative path references for graphics files. Please note that if you are installing a skin package which contains both skins and containers ( containers.zip and skins.zip ) then you should choose the Skin Package option above.

DotNetNuke Skinning Whitepaper 翻译记录:
DotNetNuke Skinning Whitepaper 翻译记录(简介部分)
DotNetNuke Skinning Whitepaper 翻译记录(术语与win客户端程序部分)
DotNetNuke Skinning Whitepaper 翻译记录(技术部分)
DotNetNuke Skinning Whitepaper 翻译记录(定义部分--大厨师翻译)
DotNetNuke Skinning Whitepaper 翻译记录(DotNetNuke部分)
DotNetNuke Skinning Whitepaper 翻译记录(总揽部分)
DotNetNuke Skinning Whitepaper 翻译记录(文件组织部分--大厨师翻译)
DotNetNuke Skinning Whitepaper 翻译记录(页面处理部分)
DotNetNuke Skinning Whitepaper 翻译记录(皮肤包部分)
DotNetNuke Skinning Whitepaper 翻译记录(皮肤定义部分)
DotNetNuke Skinning Whitepaper 翻译记录(皮肤创建部分) (大厨师翻译中...)
DotNetNuke Skinning Whitepaper 翻译记录(容器创建部分)
DotNetNuke Skinning Whitepaper 翻译记录(皮肤上传部分)

抱歉!评论已关闭.