|
Re: banner.module and private images: msg#01050php.drupal.devel
On Sun, 29 Feb 2004, Jeremy Andrews wrote: > > What worries me is that it does not seem to work. The banner seems to be > > loaded when the page is built up by the browser, but then disappears. > > I think what you're seeing is that the browser renders the page knowing > how big the image is, displaying an outline where the banner will go -- > when it then fails to load the banner image the outline goes away... Seems to be a more accurate description. > The problem appears to be that the banner module displays the image > directly: > return l("<img src='$filename' border=0 width='$banner->width' > height='$banner->height'>", "banner/$banner->id"); > > This works great in public mode, where $filename is set as follows: > http://localhost/files/logo.gif > > But in private mode, $filename is set to: > ?q=system/files&file=logo.gif > > Which result in a tag something like: > <img src='?q=system/files&file=logo.gif'> > > The image is not displayed in this case. Is this improper use of > file.inc, or is this a bug in file.inc? What's the proper way to display > an image when the download method is set to private? I don't know and hope that Kjartan can give us a hint. I think that it might be worthwhile to have banner.module store the banners in a separate (non-private) place. Or to allow handling of private and non-private files on one site in file.inc. The modules are responsible for storing file info anyway, so they can store the private/public info as well. All you'd need to add to file.inc would probably be a private/public argument to functions that move files around or display them. Cheers, Gerhard |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | cvs log messages: 01050, no-reply |
|---|---|
| Next by Date: | Re: Locale.module improvements of Gerhard: 01050, Stefan Nagtegaal |
| Previous by Thread: | Re: banner.module and private imagesi: 01050, Jeremy Andrews |
| Next by Thread: | filter caching (done :): 01050, Gabor Hojtsy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |