2011-03-13 44 views
0

因此,我正在構建一個模塊,我必須爲內置文檔庫功能添加註釋功能。我試圖找到我從哪裏提取文件。我也想要清單安全修剪。我真的希望有一個API,我不必建立一個手動的解決方案,打破文檔庫的更新...從文檔庫(專業版)中獲取修改過的文檔列表

任何幫助獲取此信息的位置?

回答

0

您可能可以使用DNN文件選取器控件,或重新使用它的某些邏輯。

源Codeplex上可用的代碼具有用於用戶和檢索文件的文件夾的一個例子(用於用戶)檢索文件夾的示例:

http://dotnetnuke.codeplex.com/SourceControl/changeset/view/58672#612642

Private Sub LoadFolders() 
    cboFolders.Items.Clear() 

    'Add Personal Folder 
    If UsePersonalFolder Then 
     Dim userFolder As String = FileSystemUtils.GetUserFolderPath(UserController.GetCurrentUserInfo().UserID) 
     Dim userFolderItem As ListItem = cboFolders.Items.FindByValue(userFolder) 
     If userFolderItem IsNot Nothing Then 
      userFolderItem.Text = Utilities.GetLocalizedString("MyFolder") 
     Else 
      'Add Dummy Folder 
      cboFolders.Items.Add(New ListItem(Utilities.GetLocalizedString("MyFolder"), userFolder)) 
     End If 
    Else 
     Dim folders As ArrayList = FileSystemUtils.GetFoldersByUser(PortalId, ShowSecure, ShowDatabase, Permissions) 
     For Each folder As FolderInfo In folders 
      Dim folderItem As New ListItem 
      If folder.FolderPath = Null.NullString Then 
       folderItem.Text = Utilities.GetLocalizedString("PortalRoot") 
      Else 
       folderItem.Text = folder.DisplayPath 
      End If 
      folderItem.Value = folder.FolderPath 
      cboFolders.Items.Add(folderItem) 
     Next 
    End If 

End Sub 

Private Function GetFileList(ByVal NoneSpecified As Boolean, ByVal Folder As String) As ArrayList 
    Dim fileList As ArrayList 

    If IsHost Then 
     fileList = Globals.GetFileList(Null.NullInteger, FileFilter, NoneSpecified, cboFolders.SelectedItem.Value) 
    Else 
     fileList = Globals.GetFileList(PortalId, FileFilter, NoneSpecified, cboFolders.SelectedItem.Value) 
    End If 

    Return fileList 
End Function 
+0

拉動文件的方式是從文檔庫模塊顯示相同的文件,還是可以看到存儲在該模塊外部的文件? – CamronBute 2011-03-14 19:36:21

相關問題