SimplePortal
Support => English Support => Topic started by: moal on June 28, 2014, 09:17:48 AM
-
Hi there,
I hope you can help me. I have created some pages on SP, which I would like to make it available only to members.
For these sites there are on the home page button that can be seen by guests. I would like to have deliberately so, because it makes you curious.
Click now but a guest on one of the banners, so he does not get to Login or Sign-side as you would expect, but he gets the message "There was an error." A message which at this point is completely inappropriate, and the user is not been encouraged to register or log on, but just to leave the page. What can I do so that is directed to the correct page when groups access without permission to a SP page?
best regards moal
Sorry, I use the Google translator..
-
Can not anybody help me?
-
Unfortunately, if you do not allow guests permission to see it, this is how Simple Portal works.
An Error Has Occurred!
The page you requested cannot be found.
You would need custom code to make changes so that it would show a login page. I do not think you would get that customization here but I might be wrong.
I think the error message should say they do not have permission to view the page.
An Error Has Occurred!
You do not have permission to view this page.
In fact, I will post this as a request myself.
-
Hi Andy,
Thank you! :)
In my case, guests will receive a much shorter message:
An error has occurred!
back
Since no human can think that a registration or login would help.
best regards moal
-
Current behavior is that of SMF's - that is, if you can't access something, you shouldn't even know that it exists. However, you can change this behavior by the following edit:
Sources/PortalPages.php
$context['SPortal']['page'] = sportal_get_pages($page_id, true, true);
if ($user_info['is_guest'])
{
$context['SPortal']['page'] = sportal_get_pages($page_id, true, false);
if (!empty($context['SPortal']['page']['id']) && !sp_allowed_to('page', $context['SPortal']['page']['id_page']))
is_not_guest('Please login for access to the page!');
}
else
$context['SPortal']['page'] = sportal_get_pages($page_id, true, true);
You can change the "Please login for access to the page!" bit as you wish.