Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Bulk Upload DocumentsBulk Upload Documents
Previous
 
Next
New Post
5/8/2007 9:55 AM
 

I would like to link my documents to be available online... I have directory structure i would like to keep can we on DNN upload all documents via links and display them as the directory hiarchary stored locally.. and more useful upload in bulk?

 

thanks

Nick

 
New Post
5/8/2007 10:17 PM
 

There's a docs module that does it, its basically a client side mod of the file manager. I've seen the creator advertising it in the forums but can't remeber the name.

The other option is to write an importer function. We have a primitive one but it has to be manually installed and run one folder at a time. It beats doing data entry but I think I invested a grand total of 20 minutes building it so use at your own peril.

THIS CODE WILL NOT WORK WITHOUT MODIFICATION AS WE HAVE MADE CORE CHANGES TO OUR DOCUMENTS MODULE
I have this compiling as part of the docs project you will need to remove the terms of use stuff as this is a mod to the docs DB for our version.

DataImporter.Aspx

 -------

 <%@ Control language="vb" CodeBehind="DocumentImporter.ascx.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.Modules.Documents.DocImporter" targetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<DIV class="DNN_Documents">&nbsp;</DIV>
<DIV class="DNN_Documents">
 <DIV class="DNN_Documents">TermsOfUse:
  <asp:TextBox id="txtTermsOfUse" runat="server"></asp:TextBox>&nbsp;0:None 1:MAR
  Forms 2:Local Board Forms</DIV>
 <DIV class="DNN_Documents">&nbsp;</DIV>
 <DIV class="DNN_Documents">FolderID:
  <asp:DropDownList id="drpfolderid" runat="server" DataValueField="FolderID" DataTextField="FolderPath"></asp:DropDownList></DIV>
 <DIV class="DNN_Documents">&nbsp;</DIV>
 <DIV class="DNN_Documents">
  <asp:Button id="Button2" runat="server" Text="Button"></asp:Button>
  <asp:DataGrid id="DataGrid1" runat="server"></asp:DataGrid></DIV>
</DIV>

 

--------

 

 

DocumentImporter.aspx.vb

-----

'

Imports

DotNetNuke

Imports

System.Web.UI.WebControls

Imports

DotNetNuke.Services.FileSystem

Namespace

 

 

DotNetNuke.Modules.Documents''' -----------------------------------------------------------------------------

 

''' <summary>

 

''' The Document Class provides the UI for displaying the Documents

 

''' </summary>

 

''' <returns></returns>

 

''' <remarks>

 

''' </remarks>

 

''' <history>

 

''' [cnurse] 9/22/2004 Moved Documents to a separate Project

 

''' </history>

 

''' -----------------------------------------------------------------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

#

 

#

Public MustInherit Class DocImporterInherits Entities.Modules.PortalModuleBaseImplements Entities.Modules.IActionablePrivate Const NOT_READ As Integer = -2Private mobjSettings As DocumentsSettingsInfoPrivate mobjDocumentList As ArrayListPrivate mintTitleColumnIndex As Integer = NOT_READProtected WithEvents Button1 As System.Web.UI.WebControls.ButtonProtected WithEvents Terms1 As System.Web.UI.WebControls.PanelProtected WithEvents Terms2 As System.Web.UI.WebControls.PanelProtected WithEvents txtTermsOfUse As System.Web.UI.WebControls.TextBoxProtected WithEvents Button2 As System.Web.UI.WebControls.ButtonProtected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGridProtected WithEvents drpfolderid As System.Web.UI.WebControls.DropDownListPrivate mintDownloadLinkColumnIndex As Integer = NOT_READRegion " Controls "End Region

#

 

 

Region " Event Handlers "Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadIf Page.IsPostBack = False Then

 

 

folderlistreader = DotNetNuke.Data.DataProvider.Instance.ExecuteSQL(mysql)

drpfolderid.DataSource = folderlistreader

drpfolderid.DataBind()

folderlistreader.Close()

 

Dim mysql As String = "SELECT * From Folders Order By FolderPath"Dim folderlistreader As IDataReaderEnd If

 

 

End Sub

#

End Region

#

 

 

Region " Optional Interfaces "Public ReadOnly Property ModuleActions() As Entities.Modules.Actions.ModuleActionCollection Implements Entities.Modules.IActionable.ModuleActionsGet

 

Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl(),

 

 

Dim Actions As New Entities.Modules.Actions.ModuleActionCollectionFalse, Security.SecurityAccessLevel.Edit, True, False)Return ActionsEnd Get

 

End Property

#

End Region

#

 

Region " Web Form Designer Generated Code "'This call is required by the Web Form Designer.

<System.Diagnostics.DebuggerStepThrough()>

 

Private Sub InitializeComponent()End Sub

 

 

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init'CODEGEN: This method call is required by the Web Form Designer

 

'Do not modify it using the code editor.

InitializeComponent()

 

' declare module actions

 

End Sub

#

End Region

#

 

 

 

 

Region " Private Methods "Private Sub AddDownloadLink(ByVal Title As String, ByVal Name As String)Dim objTemplateColumn As System.Web.UI.WebControls.TemplateColumnDim strCellPrefix As String

objTemplateColumn =

objTemplateColumn.ItemTemplate =

objTemplateColumn.HeaderText = Title

strCellPrefix = Title

 

New System.Web.UI.WebControls.TemplateColumnNew DownloadColumnTemplate(Name, Localization.GetString("DownloadLink.Text", LocalResourceFile), ListItemType.Item)If strCellPrefix = String.Empty AndAlso Name = "ctlDownloadLink" Then

strCellPrefix = "Download"

 

End If

objTemplateColumn.HeaderStyle.CssClass = strCellPrefix & "Header"

'"NormalBold"

objTemplateColumn.ItemStyle.CssClass = strCellPrefix & "Cell"

'"Normal"

 

 

 

 

End Sub

#

 

End Region

 

 

 

Response.Write(drpfolderid.SelectedItem.Value)

 

dbread = DotNetNuke.Data.DataProvider.Instance.ExecuteSQL(mysql2)

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.ClickDim mysql2 As String = "SELECT Files.FileId, Files.PortalId, Files.Extension, Files.FileName, Files.Size, Files.Width, Files.ContentType, Files.Height, Files.Folder, Files.FolderID, Files.[Content], Folders.FolderPath, Folders.PortalID AS Expr1 FROM Files LEFT OUTER JOIN Folders ON Files.FolderID = Folders.FolderID WHERE(Files.FolderID = " & Me.drpfolderid.SelectedValue & ")"Dim dbread As IDataReader

 

 

 

 

 

.Category = ""

.CreatedByUser = ""

.CreatedByUserID = 1

.CreatedDate = Now()

.Description = ""

 

.ModifiedDate = Now()

.ModifiedByUserID = 1

.ModifiedByUser = ""

.ModuleId =

.NewWindow =

Do While dbread.ReadDim DocControl As New DotNetNuke.Modules.Documents.DocumentControllerDim MyDoc As New DotNetNuke.Modules.Documents.DocumentInfoWith MyDocMe.ModuleIdFalse

.Size =

.SortOrderIndex = 0

.TermsOfUse =

.Title =

.Title = Replace(.Title, "_", " ")

.Title = Replace(.Title, ".pdf", "")

.Title = Replace(.Title, ".doc", "")

.TrackClicks =

CType(dbread("Size"), Integer)CType(txtTermsOfUse.Text, Integer)CType(dbread("FileName"), String)True

.Url = "FileID=" &

 

 

CType(dbread("FileID"), Integer)End With

DocControl.AddDocument(MyDoc)

 

Loop

 

'End If

dbread.Close()

 

End Sub

 

End

End Class Namespace

-----

 

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Bulk Upload DocumentsBulk Upload Documents


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out