• Resolved redwolf49

    (@redwolf49)


    Hey,

    I want to make a download history to see who’s downloading files.
    I’m trying to use the [stataway] shortcode but when i try to download a file it’s not showing in the table.
    [fileaway type=”table” base=”uploads/downloadable_files” sub=”fa-userrole”drawerid=”1″ directories=”off” filenamelabel =”Fichiers partagés” showto “fa-userrole” ]
    [stataway type=”table”]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author thomstark

    (@thomstark)

    First thing’s first:

    showto="fa-userrole" just means showto=”everyone” but the fa-userrole phrase doesn’t actually work with the showto attribute. So if you only want to show to logged in users, you’ll have to provide a complete comma-separated list of userroles in the showto attribute, e.g., showto="administrator,editor,author,subscriber"

    Second, do you have stats enabled on your File Away Settings page?

    Plugin Author thomstark

    (@thomstark)

    Also, base="uploads/downloadable_files" is incorrect. The base attribute takes a number from 1 to 5. So base="3" for example.

    Also also, directories="off" is unnecessary. Just remove the directories attribute from your shortcode if you don’t want directory tree navigation.

    Also also also, since you have sub="fa-userrole", only logged in users will be able to see anything, so you can effectively remove your showto attribute from the shortcode.

    Thread Starter redwolf49

    (@redwolf49)

    Thanks you for the fast reply,
    i updated my first shortcode
    [fileaway type=”table” base=”1″ sub=”fa-userrole”drawerid=”1″ directories=”on” filenamelabel =”Fichiers partagés”]

    Also also, directories=”off” is unnecessary.

    I know it but it’s not working without. By the way i turned it to “on” since i need tree navigation.

    Second, do you have stats enabled on your File Away Settings page?

    yes I do but when I put the [stataway type=”table”] shortcode we can only see blank table even if I download.

    • This reply was modified 8 years, 7 months ago by redwolf49.
    • This reply was modified 8 years, 7 months ago by redwolf49.
    Plugin Author thomstark

    (@thomstark)

    1. Do you have the Ignore Roles/Caps or Ignore Users field set on the Statistics tab of the File Away Settings page? If so, are you excluding yourself from stats?

    2. Do you have any javascript errors in your browser console?

    Thread Starter redwolf49

    (@redwolf49)

    1.No, Ignore fields are both blanks.

    2. I’ve got few js errors in my console:
    (sorry but I don’t know how to send screenshots on this forum)

    Uncaught Error: Bootstrap requires jQuery
    at bootstrap.min.js:7
    jquery-ui-timepicker-addon.min.js:5 Uncaught TypeError: Cannot read property ‘timepicker’ of undefined
    at jquery-ui-timepicker-addon.min.js:5
    at jquery-ui-timepicker-addon.min.js:5
    at jquery-ui-timepicker-addon.min.js:5
    192.168.222.102/:162 Uncaught TypeError: jQuery(…).footable is not a function
    at HTMLDocument.<anonymous> (192.168.222.102/:162)
    at j (jquery-1.11.2.min.js:2)
    at Object.fireWith [as resolveWith] (jquery-1.11.2.min.js:2)
    at Function.ready (jquery-1.11.2.min.js:2)
    at HTMLDocument.J (jquery-1.11.2.min.js:2)

    Plugin Author thomstark

    (@thomstark)

    That’d be why. Something is preventing jQuery from loading on your page. I would look at your other plugins.

    Thread Starter redwolf49

    (@redwolf49)

    I turned off all others plugins, there is still one error:
    It seems that jQuery is loading now.

    Uncaught TypeError: jQuery(…).footable is not a function
    at HTMLDocument.<anonymous> (?drawer=downloadable_files:139)
    at j (jquery-1.11.2.min.js?ver=1.0.0:2)
    at Object.fireWith [as resolveWith] (jquery-1.11.2.min.js?ver=1.0.0:2)
    at Function.ready (jquery-1.11.2.min.js?ver=1.0.0:2)
    at HTMLDocument.J (jquery-1.11.2.min.js?ver=1.0.0:2)
    (anonymous) @ ?drawer=downloadable_files:139
    j @ jquery-1.11.2.min.js?ver=1.0.0:2
    fireWith @ jquery-1.11.2.min.js?ver=1.0.0:2
    ready @ jquery-1.11.2.min.js?ver=1.0.0:2
    J @ jquery-1.11.2.min.js?ver=1.0.0:2

    • This reply was modified 8 years, 7 months ago by redwolf49.
    Plugin Author thomstark

    (@thomstark)

    Do you have the stataway shortcode on the same page as a fileaway shortcode?

    Thread Starter redwolf49

    (@redwolf49)

    Yes, i do my page look like that:
    [fileaway type=”table” base=”1″ sub=”fa-userrole”drawerid=”1″ directories=”on” filenamelabel =”Fichiers partagés” ]

    [stataway type=”table”]

    • This reply was modified 8 years, 7 months ago by redwolf49.
    Plugin Author thomstark

    (@thomstark)

    Then I can’t duplicate your issue. I’d need to take a closer look to help further.

    Thread Starter redwolf49

    (@redwolf49)

    Ok thanks you for the help i will continue to search by myself too.
    Hope I will find a solution that’s the last part for my project.

    Ps: I love your plugin (Small touch of humor are appreciable).

    Plugin Author thomstark

    (@thomstark)

    Cool.

    The issue is footable.js is not being loaded. Look on your page source and see if you see file-away/lib/js/footable.js in there. If so, your remaining javascript error is a mystery to me. If not, you have something somewhere deregistering footable from queue.

    OR …

    try making File Away’s javascript load in the Header All the Time on your Options tab on the File Away Settings page, if you don’t already have it set that way. That should not be the issue, but just try it in case.

    Thread Starter redwolf49

    (@redwolf49)

    file-away/lib/js/footable.js is not here i will look on what can deregister it.

    Thread Starter redwolf49

    (@redwolf49)

    Hey back,
    Didn’t find the problem, so i will try by an other way, is is possible to collect data without the stataway table? In the documentation you notice that these data are stocked in a database.
    Maybe I can access to this database directly?

    Thread Starter redwolf49

    (@redwolf49)

    Hey again,
    I just want to notice that my error was coming from my themes which was deregistering footable.js.
    Thx for the help

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Download history’ is closed to new replies.