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

    (@thomstark)

    Sub attribute extends base directory. There’s no way you need more than one. 5 is a placebo.

    Thread Starter Futuresweb

    (@webmasterfutureswebcom)

    thanks

    Plugin Author thomstark

    (@thomstark)

    No prob.

    Thread Starter Futuresweb

    (@webmasterfutureswebcom)

    ok got that to work but how would I designate a particular username that is say a contributor to be able to upload files to that sub directory only? Let’s say I placed 3 sub attributes on the same page to upload to and based on who logs in that attribute will be the only one that appears?

    Plugin Author thomstark

    (@thomstark)

    Is it based on user role, or user name or what?

    Thread Starter Futuresweb

    (@webmasterfutureswebcom)

    well each user would be a contributor but we will have 3 contributors to upload files to three different sub directories.

    Plugin Author thomstark

    (@thomstark)

    for user role:

    [fileup sub="sub1" showto="administrator,editor"][fileup sub="sub2" showto="author"][fileup sub="sub3" showto="subscriber"]

    If it’s based on a specific user, you can create custom user-meta for your users. So, create a user-meta called, for example, “fileaway-subdir”, then for the relevant users, set the value of that user-meta to be the name of the sub-directory. E.g., users 1, 5, and 25: fileaway-subdir would be “sub1”, but for users 2, 3, 4, and 75: fileaway-subdir would be “sub2”. Then in your shortcode, you simply do this:

    [fileup sub=”path/to/fa-usermeta(fileaway-subdir)”]

    Then whoever is logged in will have an upload directory pointing to whatever the value is for their user-meta key.

    Plugin Author thomstark

    (@thomstark)

    Fixed typo:
    [fileup sub=”path/to/fa-usermeta(fileaway-subdir)”]

    Thread Starter Futuresweb

    (@webmasterfutureswebcom)

    I’ll give it a whirl…thanks!

    Plugin Author thomstark

    (@thomstark)

    Or, if it’s simply three contributors, you can name the subdirectories for their user-id or their username or their first and last name (one-word lowercase), and do this:

    [fileup sub=”path/to/fa-userid”] or [fileup sub=”path/to/fa-username”] or [fileup sub=”path/to/fa-firstlast”]

    or a combo: [fileup sub=”fa-user-id_fa-firstlast”] or whatever you want.

    Thread Starter Futuresweb

    (@webmasterfutureswebcom)

    ok that will work

    Plugin Author thomstark

    (@thomstark)

    Fixed a typo in that last comment too. All the instructions on these “dynamic paths” options are in the tutorials tab.

    Thread Starter Futuresweb

    (@webmasterfutureswebcom)

    So while referencing fa-username and renaming the directory to that respective username does work. However, when logged in as admin I cannot see the upload buttons. I tried adding showto=administrator but then neither works.

    So is there a way to allow both the user that is logged in access to that directory and the admin to everything?

    Plugin Author thomstark

    (@thomstark)

    Yes:

    [fileup hidefrom=”administrator” sub=”fa-username”][fileup showto=”administrator”]

    Thread Starter Futuresweb

    (@webmasterfutureswebcom)

    that only allows the admin to see base 1 but not base 2 or 3. A destination dropdown appears and only base 1 directory is listed.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘base directory’ is closed to new replies.