Fork me on GitHub

How to hide the download link?  Bottom

  • HI All,
    I would like to know how to hide the download file link in postnuke module

    any function can redirect to the file??

    how to use (any example)??

    thx you!!
  • Do you want to hide it from specfic users, or totally remove it from the menu? If you aren't going to use it at all, then just remove it from your menu block. If you want to remove it for a specific group, look at the permissions tables, there are a few permissions that remove links based on the group.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • I write a module and want to provide a link to user to download something.
    but I don't want them to know the path
  • ..you'll have to use fpassthru(); or similar.. see php.net for more details..

    -IR
  • Cann't!anyone cann't hide anything because it is internet.
  • Not sure what the goal is but it's easy enough to render such knowlege useless. Anyone downloading something to their computer can be expected to want to verify that they are indeed downloading what they want and where it is coming from. That doesn't mean they have to have the ability to do anything they wish with that knowledge. It's easy to deny them unauthorized access to the directory and/or file, if that is what you want to do; but I suspect there's more to this than that.

    Slugger
  • ..Hey Slugger :D

    I figured he just wanted to hide the file URL when passing a file to the browser.. I've used fpassthru(); with .htaccess files that restrict access to the original files with a lot of success..

    I can agree with this:

    Quote


    Anyone downloading something to their computer can be expected to want to verify that they are indeed downloading what they want and where it is coming from.

    .. but in the same token, some people have a distinct "need" to protect files from unauthorized access.. while fpassthru(); will not reveal the file path to the browser (even in source) it doesn't protect against the indexing of directories..which is where the .htaccess comes into play (restricting access to the host machine [aka: localhost]).. even if they miraculously guessed the directory of the files, they'd still be prevented access..

    the other side of the "operation".. passing the file location in the header makes it difficult to protect the files.. you could use referer rules in the htaccess, but some browsers don't send referer info (..or so I've read).. it would also expose the first line of 'defense'.. the directories..

    ..it's a handy little system, but cross-compatibility can be a headache.. a browser update can alter dependancies.. nevertheless, it's worth it for "peace-of-mind"..

    take care Slugger! .. and good luck antony_csf!
    -IR
  • thx all of you!!! icon_redface
  • 0 users

This list is based on users active over the last 60 minutes.