DotNetNuke:FAQ[随笔]
我想应该也为自己建立一个FAQ随笔,昨天刚刚解决了心中的疑问,结果早上过来又忘记了昨天是怎么解决了,又浪费了好几个小时,哎!我也不知道该随笔何时会更新,反正有疑问并解决之后就会FAQ
一,何时使用skins目录下的default.ascx或是admin.ascx
这二个自定义控件的区别在admin.ascx只有contentpane,而default.aspcx有leftpane,rightpane,contextpane,它们的是如何载入??
' returns a boolean value whether the tab is an admin tab
'返回的位置是否是admin的位置
Public Function IsAdminTab()Function IsAdminTab(ByVal intTabId As Integer, ByVal intParentId As Integer) As Boolean
' Obtain PortalSettings from Current Context
'获取portaSettings的HTTPCONTEXT请求信息
Dim _portalSettings As PortalSettings = CType(HttpContext.Current.Items("PortalSettings"), PortalSettings) 'AdminTabId为TabID,并且条件是admin
Return (intTabId = _portalSettings.AdminTabId) Or _
(intParentId = _portalSettings.AdminTabId) Or _
(intTabId = _portalSettings.SuperTabId) Or _
(intParentId = _portalSettings.SuperTabId)
End Function上面的代码中_portalSettings.AdminTabId是admin菜单位置,_portalSettings.SuperTabId是host菜单位置,调用的存储过程是:DNN_GetPortalSettings
二,模块的最大化/最小化
第一次看见这个也有点好奇,但分析完之后你就会发出感叹:原来是这样的~![]()
最大化/最小化它实际上是在容器中产生的,Containers/Visibility.ascx
单击最大化图标
时,隐藏名称为ModuleContent 的pane控件,并将值保存到cookie当中,并显示小图标
。相反,就显示图标,并保存值,当你第一次载入控件的时候,判定该保存的cookie的值,进行是否显示,或隐藏~
三,垂直菜单的SKIN
到现在我还没瞧见过垂直的菜单。呵呵,不过今天在论坛里发现这个问题,vertical menu
http://www.dotnetnuke.com/Default.aspx?tabid=687
四,DOTNETNUKE官方网站的SKIN 演示(demo)
http://www.dotnetnuke.com/Default.aspx?tabid=675
五,对官方网站SKIN投票的结果
The votes have been counted and the results are in.
Most Original:
Tyler Fawcett - Tranquility 37% - Not winning because it won Best Overall
1st: Christiaan Hattingh - DotNetNuke Machine 14%
2nd: Steve Fabian - Metal 2004 9%
3rd: Adam Ward - Brass Knuckles 9%
Vasilis Terzopoulos - Orange Futurism 7% - Honorable Mention
Best Overall:
1st: Tyler Fawcett - Tranquility 30%
Nina Meiers - Destination DesigN Away 11% - Honorable Mention
Most Professional:
1st: Nina Meiers - Destination DesigN Away 26%
2nd: Vasilis Terzopoulos - Illuminated Metals 24%
3rd: Ben Ursu - Ice 18%
Christiaan Hattingh - Formulae 12% - Honorable Mention
Most Efficient:
1st: Christiaan Hattingh - DotNetNuke the Essence
2nd: Bo Norgaard - PapayaWhip
3rd: Luis Cabrera - Blue Skin
六,Logo File Types(谁有告诉我Admin Settings-> Logo dropdown list box)
In the components\globals.vb, there is a routine that specifies the available image types.
Public Const glbImageFileTypes As String = "jpg,jpeg,jpe,gif,bmp,png"
And the routine that the sitesettings calls is GetFileList, also in the Globals.vb
' get list of files from folder matching criteria

Public Function GetFileList()Function GetFileList(Optional ByVal PortalId As Integer = -1, Optional ByVal strExtensions As String = "", Optional ByVal NoneSpecified As Boolean = True) As ArrayList
Dim arrFileList As New ArrayList


If NoneSpecified Then
arrFileList.Add(New FileItem("", "<None Specified>"))
End If
Dim objFiles As New FileController
Dim dr As IDataReader = objFiles.GetFiles(PortalId)
While dr.Read()
If InStr(1, strExtensions.ToUpper, dr("Extension").ToString.ToUpper) <> 0 Or strExtensions = "" Then
arrFileList.Add(New FileItem(dr("FileName").ToString, dr("FileName").ToString))
End If
End While
dr.Close()
GetFileList = arrFileList
End Function
' load the list of files found in the upload directory
Dim ImageFileList As ArrayList = GetFileList(intPortalId, glbImageFileTypes)
cboLogo.DataSource = ImageFileList
cboLogo.DataBind()
cboBackground.DataSource = ImageFileList
cboBackground.DataBind()
