217
When I try to change XOOPS behavior between anonymous users and registered users, I always think of my favorite hack.
So, for this problem, open up visit.php of modules/mydownloads/ and add this piece of code just after the includes (
include "../../mainfile.php";)
// If not a user, redirect
if ( !$xoopsUser ) {
redirect_header('index.php',3,"You must be a registered user to download files.");
exit();
}
// End of redirect hack
This will redirect the anonymous user back to the index page of the downloads with a message that he/she should register first. Change the message if you want. The number 3 specifies the no. of seconds the redirect page is rendered until it redirects.
The only limitation of this hack is that it does not distinguish between registered user groups, only between anonymous and registered users.
Hope this helps.