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...display folder contentsdisplay folder contents
Previous
 
Next
New Post
3/19/2008 11:10 AM
 

Hi. I have a couple folders that each have a bunch of pdf files that I would like to have the public be able to view and open. I'm kind of lazy I guess because I was originally going to just make a list of links but that's a lot of work and the list is constantly growing. So I figured there has to be a better way. I have looked into links modules, file manager type functions, and documents modules but haven't found the answer. Is there a setting in dnn that I'm missing? Or a third party module? I'm open to suggestions. Thanks! Mike


Michael Emond
City of Manchester NH
www.manchesternh.gov
 
New Post
3/19/2008 11:54 AM
 

Would it be possible to just open that folder up for directory traversal in IIS?

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
866-907-4002
DNN partner specializing in custom, enterprise DNN development.
 
New Post
3/19/2008 3:35 PM
 

Hi Brian. i was hoping to keep the solution within the web framework and present the user with the file list from within one of the site's web pages if possible. I am not as familiar with IIS as I should be so I am not sure if it is capable of this? Thanks, Mike


Michael Emond
City of Manchester NH
www.manchesternh.gov
 
New Post
3/19/2008 3:58 PM
 

I haven't tried yet, but maybe you can use a report on Files table to providea download list for a fixed folder


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/20/2008 9:13 AM
 

I'm using this code (as is, fits my needs, may not yours):

Function AgendaListing() As String
  Dim DirInfo As New DirectoryInfo("h:\inetpub\naplesclerk\current_agendas\")
  Dim Files As FileInfo() = DirInfo.GetFiles()
  Dim i As Integer
  Dim txtFileList As String = ""
  Dim DisplayName As String = ""
  Dim TempDate As String = ""
  Dim FileYear As String = ""
  Dim TempMonthDay As String = ""
  Dim FileMonth As String = ""
  Dim FileDay As String = ""
  Dim CurrentYear As Integer = DatePart("YYYY", Now())
  Dim CurrentMonth As Integer = DatePart("M", Now())
  Dim CurrentDay As Integer = DatePart("D", Now()) 
  txtFileList = txtFileList & "<ul>"
  For i = 0 To Files.Length - 1
    TempDate = Left(Files(i).Name, 8)
    FileYear = Left(Files(i).Name, 4)
    TempMonthDay = Right(TempDate, 4)
    FileMonth = Left(TempMonthDay, 2)
    FileDay = Right(TempMonthDay, 2)
    If DateSerial(CInt(FileYear), CInt(FileMonth), CInt(FileDay)) >= DateSerial(CurrentYear, CurrentMonth, CurrentDay) Then
      DisplayName = Replace(Left(Files(i).Name, Len(Files(i).Name) - 4), "_", " ")
      txtFileList = txtFileList & "<li><a href=""http://clerk.naplesgov.com/current_agendas/" & Files(i).Name & """>" & DisplayName & "</a></li>"
    End If
  Next i
  txtFileList = txtFileList & "</ul>"
  Return txtFileList
End Function

-----

<asp:Label ID="UpcomingAgendas" runat="server" Text="No posted agendas"></asp:Label>

-----

Filenames are formatted as:

yyyymmdd_-_Month_Day_Year_-_Filename.pdf

Sorts by date, displays only those newer than yesterday.  Modify as you see fit, feel free to clean it up and if you release it as a module, please make it a free module and email me a copy.  I was too lazy to create a real module out of it.  :)

Maybe someday I'll have time to fix all the stuff I threw together quickly that became legacy code.

Jeff

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...display folder contentsdisplay folder contents


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