• Resolved dmhsupport

    (@dmhsupport)


    I need to make it so downloads are enabled on file specific and not user or role specific. Can you tell me how to do this or can i just alter some of the original code to serve as the “permissions” for download and just use that to do an IF statement.

    I need this quickly. Thank you.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author bhaldie

    (@bhaldie)

    its not an easy question to answer. There are many conditions that mdocs uses to determine if a file has the ability to be download, and its not an easy thing just to added new functionality.

    I can’t give you a quick fix to the problem the best I can do is add this request to the features list.

    Feel free to alter mdocs in anyway the files that might be helpful to you are mdocs-rights.php and mdocs-functons.php

    Just so I’m clear, you want for example only pdfs downloadable and docs not downloadable?

    Thread Starter dmhsupport

    (@dmhsupport)

    Currently to my understanding the only way download permissions are setup by the plugin are user and role based. Is that correct?

    If so then what I want is the ability to say this file is allowed to be downloaded, where as the next file i uploaded i don’t want to be downloaded. Not really specific to the file types, just the file itself. So if i have files a b c d e in the folder called “files” and i display that folder on a page, i don’t want files a b to be downloadable but i want c d and e to be downloadable? I hope that makes sense. The site i’m currently developing I need to be able to restrict only specific files from being downloadable or printable.

    I’ve already modified the plugin to remove the download button all together but i want that to be specific to the file being viewed. The site i’m developing is very copy protected and currently your plugin is the nearest full featured document management solution available that allows me to display documents in a listed format and make them preview-able.

    • This reply was modified 7 years, 9 months ago by dmhsupport.
    • This reply was modified 7 years, 9 months ago by dmhsupport.
    Thread Starter dmhsupport

    (@dmhsupport)

    That being said, what permission(s) is/are file specific and can be View-ably renamed easily without breaking functionality and are also not absolutely required? I don’t need the social stuff, i don’t need the sharing, can they be “renamed” essentially and work as a permission setting for specific files? can i just redo the download to essentially if is share then display download link and not break anything else?

    • This reply was modified 7 years, 9 months ago by dmhsupport.
    Plugin Author bhaldie

    (@bhaldie)

    I can’t say for sure what the ramifications will be doing that. In theory it could work. But you would need to alter the rights of the share or social modals in order to achieve what you are looking for.

    Can I ask why the hidden file attribute does not work for you. This would hide the file from all users accept for the administrators and the owner of that file. All other users would not see the file at all.

    Thread Starter dmhsupport

    (@dmhsupport)

    I also would like to mention that i ripped out the google docs previewer because it bypassed “download” permissions.

    I’ve replaced it with a local version of PDF.js if you’re interested I can show you how i achieved that and you can do native pdf viewing with it instead of relying on google documents. I know this breaks other document types being viewable but the specific site i’m doing won’t be doing any other types except PDF.

    you could add a custom preview type for PDFs only.

    Thread Starter dmhsupport

    (@dmhsupport)

    The reason is because this site i’m doing will have only two users and those users will be shared by a community of people. This would be a lot easier to manage if they weren’t shared users but unfortunately this is the type of requirements my client has…

    Plugin Author bhaldie

    (@bhaldie)

    thanks for the tip about pdf.js. I will take a look at it and try to add it in an upcoming release.

    Thread Starter dmhsupport

    (@dmhsupport)

    I was able to get this accomplished using the show_social permissions. It really didn’t take much to do just time consuming. Switching the conditionals for the downloads to check for social’s boolean and then eliminating the social buttons from being displayed and renaming the Show Social items allows this to work perfectly.

    I’m sorry I had to hack it up to get it to work this way and I know it’s not your intentional design to the plugin but i do hope you add more customized permission system later on like this.

    Thanks for the talk.

    Plugin Author bhaldie

    (@bhaldie)

    Thats great, it would be nice to see how it working live. So I could incorporate this functionality in later releases.

    Maybe you could send me the source code for the modified mdocs.

    Let me know.

    Thread Starter dmhsupport

    (@dmhsupport)

    Sure, I’ll have to go through and comment on all the changes i’ve made just so you can see where i’ve done them. I need to document my changes for the business anyways. I’m not that great when it comes to PHP and wordpress, i’m sure you’ll find my changes laughable and maybe be able to improve upon it.

    I’ll write back here once i get that done.

    Plugin Author bhaldie

    (@bhaldie)

    I’m in no rush, take all the time your need ??

    Thread Starter dmhsupport

    (@dmhsupport)

    Just out of curiosity is there an ability for us to shortcode an upload form or something to a page? I’d like to be able to create a page that a specific user could upload to a folder. Is that possible currently?

    • This reply was modified 7 years, 9 months ago by dmhsupport.
    Plugin Author bhaldie

    (@bhaldie)

    It is a feature request, but it has not been implemented yet.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘File Downloads’ is closed to new replies.