Closed (fixed)
Project:
Banner
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Sep 2006 at 18:13 UTC
Updated:
21 Nov 2009 at 15:29 UTC
I just downloaded this module expecting to be able to display banners on my site, but the install file says that I have to set my File System settings to Public in order to use it.
I operate an ecommerce site that sells downloadable products, and I also limit free downloads to registered members. There's no way I can ste my File System to Public, which mean that at the moment I cannot use this module.
It would be great if this limitation could be removed and it would work with the file system set to Private.
Comments
Comment #1
manuj_78 commentedI am also hoping that the file system is set to private so that I can use this module
Comment #2
wulff commentedActually, the banner.module kinda works with private files. The problem is, that to make the file cache handler work, the current file system path is passed to the script. I'm not sure that is ideal.
One solution is to require that banner can get write access to a sub folder of the site root (e.g. <drupalroot>/cache). That way we can get around passing paths around which are currently only neede by the file cache handler.
If nobody as any major objections, I think adding a specific dir for the banner cache is an acceptable solution.
Comment #3
AlanT commentedThat sounds fine to me.
I really appreciate your quick response on this.
Comment #4
AlanT commentedI just thought of something.
I'm not even sure if this makes sense, but could a new permission be added for viewing banners, so that we can simply set viewing priledges to all users? This way, you could use the same upload process.
I'm gathering from what I've read that the issue involves rotating banners even on cached pages. I thought I saw that javascript was used in that situation, eliminating the problem, however it appears from what you're saying that this isn't necessarily true.
Anyways, I don't understand the whole thing, so I trust that you know what you're doing.
Comment #5
AlanT commentedI guess I forgot to mention what may be an important detail.
i don't need the ability to allow users to upload banners. I'll do all that myself with FTP. I also don't cache my pages as Drupal has a problem with that on my site.
Comment #6
manuj_78 commentedwulff,
Can you please tell us when you plan to implement your solution and if you dont mind can you please also elaborate what should be done for using banner module with the private file system.
Manuj
Comment #7
sunBanner.module isn't really guilty here. There are a lot more modules that do not work with private file access. If you need a quick workaround for a new site then setup your site with public file access and add a .htaccess file containing
to the directory below
/filescontaining your protected files, i.e./files/protectedor/files/store. If you're using E-Commerce file.module then you will find an separate option where files shall be stored in file settings. This way you'll have public file access to any files that are free (images and the like) and private file access to all protected, i.e. sold, files. Although file.module appends the real file path to the purchased file download link URL it won't be accessible by entering that file path directly.If you already have a running site I badly suggest you to create a devel copy of it, change the global file handling, create some new protected files and have a look which files need to be moved and what needs to be changed to convert (fix) your productive site.
I really don't know where this issue should be properly discussed. I'll cross post at Groups for now.
Comment #8
gpk commented>This way you'll have public file access to any files that are free (images and the like) and private file access to all protected
How would access be given to the private files (for authorised users) in this case (e.g. in files/protected)? The .htaccess files prevents Apache from serving them directly, which is what we want, but with access type as public Drupal doesn't serve them either and hence can't give let alone control access ...
Am I missing something?!
gpk
Comment #9
sunEvery module supporting private file access has to support streaming of private files. Without streaming through a module url, file access wouldn't be possible if you had a "real private access directory" (such as
../../../files). So every module supporting private file access already implements a path based function to retrieve a file from private file storage.However, I don't know if Banner module supports private file access. I don't think this would make sense... So banner files should always reside in a public accessible directory.
If you're implementing direct file access to private files within your templates, you should have a look at file.inc which should provide functions for retrieving files of a private/protected file storage. Your url will look then like this: www.example.com/somemodule/?fid=14. However, I don't think it makes sense to implement private file access without proper access permission handling by a module.
There is no way to grant only authenticated users access to private files. This is the job of the module providing access to private files. Anyhow, you could have a look at securesite module which allows dynamic .htaccess rules for your Drupal site, therefore allowing path access by user authentication.
Comment #10
wulff commentedBanner module supports private files (uploads are handled by the upload module, so this functionality comes for free).
The only problems is that the file-based cache handler needs the path to the files dir passed as a parameter to make it work. I'm working on a solution for that.
Comment #11
marczak commentedYes - I second (or third) this: very important. Interestingly, even if I turn the cache off, I still don't get banners for anonymous users. Am I missing something simple - or is this part of the same issue?
Comment #12
AlanT commentedThe new support for Private file access is worthless!
I am NOT going to give anonymous users access to my downloads!
This is not going to work. Guess I have to look elsewhere for a banner module for my site.
Comment #13
AlanT commentedHow about defining a NEW directory for banners?
This way, there is NO dependency whatsoever on the file system settings.
Or, what about creating a new permission to allow anonymous users to view banners? That way, private file access in other areas can still be restricted to registered users.
Comment #14
wulff commentedMarking as closed since the banner module has been abandoned.