We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34365
    • 8 Posts
    I installed it with the example html and added my path. Worked fine so far as it lists the directory contents as links with a literally crypted href. But I expected the files to be downloaded when I click the links. Instead the path is added on the page where I had the filelister.path placeholder, that's all. I replaced the default chunks by my own copies, set allowDownloads explicitly to 1 but no success so far. A previous post hinted me to php5 mcrypt. Not sure if my provider has set everything correctly, but I found at least some lines about mcrypt support in phpinfo.
    Sorry for the newbie's question, but I have no idea what to check further and how to proceed. [ed. note: ArminB last edited this post 15 years ago.]
      • 32316
      • 387 Posts
      whistlemaker Reply #2, 15 years ago
      I do not understand what is happening on your site - I do not understand what you mean by
      the path is added on the page where I had the filelister.path placeholder

      Perhaps if I describe how it works for me:
      I have the call on a page - url is "mysite.org/files.html" (well not really but you get the idea).
      This looks in a directory that has no files, but does have some directories - clicking on one of the created links the url becomes -
      mysite.org/files.html?fd=%2581%257B%25CD%2503%2584... etc
      and displays a list of file names.
      The list of filenames are anchors with similar urls (so just a different number) - If I click on one it either opens the file if the browser can deal with it (jpg pdf etc) or downloads it if it cannot (for example a .doc file) - I can of course download the file if I either right click or option click the link.

      So the all the links are going to look like ... page-name.htm?fd=%1234%2345 ...
      what happens when you click one depends on what the link links to.
        • 34365
        • 8 Posts
        Yes, what you describe is how I thought it would work.
        This is the code:
        <h2>2011</h2>
        <p>Current Path: <span>[[+filelister.path]]</span></p>
        <table>
        <thead>
        <tr>
          <th>Name</th>
          <th>Filesize</th>
          <th>Last Modified</th>
        </tr>
        </thead>
        <tfoot>
        <tr>
          <th colspan="3">
            Files: [[+filelister.total.files]]
            | Directories: [[+filelister.total.directories]]
          </th>
        </tr>
        <tbody>
        [[FileLister? &path=`assets/content/pdf/2011`]]
        </tbody>
        </table>

        This is what I get:
        <h2>2011</h2>
         
        <p>Current Path: <span><a href="index.php?id=100?fd=">assets/content/pdf/2011</a>/</span></p>
        
         
        <table>
        <thead>
        <tr>
          <th>Name</th>
          <th>Filesize</th>
          <th>Last Modified</th>
        </tr>
        </thead>
        <tfoot>
        <tr>
        
          <th colspan="3">
            Files: 18
            | Directories: 0
          </th>
        </tr>
        <tbody>
        <tr class="feo-row feo-first-row">
            <td class="feo-filename"><a href="index.php?id=100&fd=%259EF7V%25CC%2500%251E%257E%25B0%25B2Q%2598%25BA%251E%2501%2517%2587%25AFU%25ADefDb%2590%25D9%2589%250D%25C016%25D8%25862%2515%2583%25EF">Chorfahrt zum Kaiserstuhl.pdf</a></td>
            <td class="feo-filesize">24.52 kb</td>
            <td class="feo-lastmod">Sep 13, 2011</td>
        
            <td class="feo-downloads">0</td>
        </tr>
        
        and so on...

        In an earlier version all what happens it added the name of the file I selected at the end of the line where it says "Current Path". I don't know what I changed but even this doesn*t appear any more.
        Just found out that "nothing" happens was wrong, instead it simply reloads the page. If I understood this correctly it is supposed to do a redirect to the pdf then. Well it doesn't. Why?
          • 32316
          • 387 Posts
          whistlemaker Reply #4, 15 years ago
          Perhaps you are just missing a "/"
          [[FileLister? &path=`assets/content/pdf/2011`]]

          should be
          [[FileLister? &path=`assets/content/pdf/2011/`]]

          since it is a directory
            • 34365
            • 8 Posts
            Thanks. Tried it. Both versions look the same, so the slash seems to be obsolete. No success
              • 32316
              • 387 Posts
              How did I miss this!
              you need to call FileLister uncached - so:
              [[!FileLister? &path=`assets/content/pdf/2011/`]]

                • 34365
                • 8 Posts
                Hooray! Million Thanks! Worked finally.
                So the slash is essential. And the exclamation mark!
                Very subtle! Maybe the author could add some notes to this in the docu. (Or has he?)