Login / Register to download attachment link to anonymous users
gauravkhambhala - February 26, 2009 - 19:05
| Project: | Web File Manager |
| Version: | 6.x-2.10-rc4 |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Can we have Login/Register link to anonymous users instead of showing nothing as they don't have permission to see webfm attachments ?

#1
Basically when user don't have permission to download, they should be able to see the file and Login/Register to download message.
#2
Basically Showing trees and Downloading for Anonymous doesn't work at all.
See here: #475294: No trees found in Public access
#3
I was looking for the same thing
If using CCK - goto file_formatter.inc in filefield folder in module
and paste the following code at the bottom
global $user;
if ($user->uid == 0) {
$url = "";
$link_text = "You must register or login to download attachments.";
}
return '<div class="filefield-file clear-block">'. $icon . l($link_text, $url, $options) .'</div>';
}
I do not know how safe it it. But it worked for me. And it seems to be fine.