Viewing 15 replies - 16 through 30 (of 33 total)
  • Plugin Author thomstark

    (@thomstark)

    Works for me.

    [fileaway showto="access_s2member_ccap_thomstark_custom_capability"]

    shows it to me.

    [fileaway hidefrom="access_s2member_ccap_thomstark_custom_capability"]

    hides it from me.

    Plugin Author thomstark

    (@thomstark)

    I see the confusion. s2member doesn’t register the custom caps to the administrator role (normally the administrator has ALL caps, custom or otherwise). It only registers the caps to individual users when they use the paypal button. Hence, that’s why they’re not in my dropdowns. Nevertheless, they still work fine in all File Away shortcodes

    [fileaway] [fileup] [attachaway] [fileaway_values] [fileaway_tutorials] [fileaframe]

    in any attribute that takes a comma-separated list of roles/caps:

    showto, hidefrom, role_override, dirman_access

    Thread Starter Li-An

    (@li-an)

    I made a test: with custom capabilities, you can put the files in a directory reserved to a custom capabilities like
    /www/site/wp-content/plugins/s2member-files/access-s2member-ccap-projet
    where they are protected. So well protected that File Away cannot find them πŸ™‚
    So I will have to put the files in a “regular” directory. It’s not a great problem as the page where they show is already protected but it’s just to say.

    Plugin Author thomstark

    (@thomstark)

    Can’t scan a directory if it isn’t readable. πŸ™‚

    But the showto and hidefrom attributes are protection in and of themselves. You don’t even need a protected page. You can put it on a public page (your HOME page), and if you have showto="access-s2member-ccap-projet" in your shortcode, only users with that custom cap will see the File Away list/table.

    Plugin Author thomstark

    (@thomstark)

    Maybe I’m missing something but I added a directory named for a custom capability, and File Away and read it just fine:

    [fileaway directories=”true” heading=”Heading” base=”s2member-files” sub=”access_s2member_ccap_thomstark_custom_capability”]

    Table’s on the page. Files are on the page. Downloadable and everything.

    Thread Starter Li-An

    (@li-an)

    You are right. But I did not noticed the s2meber-files attribute ! (great idea).

    Nothing to do but as I can read, there is no simple way to show the files with a comon term in their name ? I need to exclude the others ?

    Plugin Author thomstark

    (@thomstark)

    I don’t understand your question.

    Plugin Author thomstark

    (@thomstark)

    If you mean, you only want to show files that share a certain string in common, that’s easy. You can even have multiple strings.

    [fileaway only="arcand"]

    will only show files that have “arcand” in the filename.

    [fileaway only="godard,truffaut"]

    will only show files that have EITHER “godard” OR “truffaut” in the filename.

    Thread Starter Li-An

    (@li-an)

    Sorry πŸ™‚

    In the “project directory” I’ve put different project files (StarWars01.pdf, StarWars-cover.jpg, Blue-Velvet-remake.pdf, Blue-Velvet01.jpg…) and I try to show only The “Blue-Velvet” files. I understand it will work with subdirectories but just to know. I saw “exclude” attribute and “include” but if I try “include=”Blue”” it shows everything. Maybe I missed something.

    And thanks for your patience.

    Plugin Author thomstark

    (@thomstark)

    See above. Use only=""

    Plugin Author thomstark

    (@thomstark)

    I love how you were referencing the American films, and I was referencing the French ones. πŸ™‚

    Thread Starter Li-An

    (@li-an)

    Well I don’t know any Girard as movie director πŸ™‚ Or actor. And I am very fond of Truffaut’s movie – not Star Wars but it was an easy example.

    Now, I just have to wait for the statistics feature.

    Plugin Author thomstark

    (@thomstark)

    Yes, I edited it to godard a couple minutes ago. I had Rene Girard in my head, but meant good ol Jean-Luc. Vivre sa vie!

    Plugin Author thomstark

    (@thomstark)

    I’ll try to have statistics out to you within two days (hopefully). I’ve got it successfully adding the statistics to a custom SQL database table, in any mode: flightbox, manager, encrypted, s2member, etc. now I just have to build all the extras, like the “most popular” display, the email notifications, the renaming/moving file operation (to update the old filename/location to the new in all instances of the database), the database size limit options, the cron jobs. It’s all easy stuff but it’s tedious, and I haven’t slept in 36 hours.

    Thread Starter Li-An

    (@li-an)

    Go to sleep and after that, look at a good movie. I’m not in a hurry and I suppose it can wait some days.

Viewing 15 replies - 16 through 30 (of 33 total)

The topic ‘statistics’ is closed to new replies.