uCoz Community uCoz Modules Page Editor Limiting Access To Site Pages. |
Limiting Access To Site Pages. |
Access limitation You can easily limit access to some parts of your website within uCoz web-services. To do so go to the page you want to limit access to. Login to the website as administrator with your login and password. You will be able to see a set of buttons in the right lower corner: ![]() Click the one that is indicate in the image. Editing page will open. Find option: Groups that have access to this page. Check the boxes of the groups you want to have access to the page. ![]() Do not forget to click Save afterwards. You have limited access to the page. Users from the groups that are prohibited to have access to the page will be automatically redirected to “Access denied” page. You may customize its appearance and change the text of the message in Design management (templates) option of the Control panel. How to set a password for a certain page? Edit the code of this page. Add: Code <script language="JavaScript"> if (top.location.search=="") { pass = prompt('Enter password'); if (pass=='1') // Your password { alert('Password accepted') } else { alert('Password not accepted!'), top.location.href="errorpas.htm" }// URL of the page where user will be redirected in case of error }; </script> How to prevent users from viewing a page? You might use conditional operators. Edit the code of Site pages template. Find $CONTENT$ there and substitute it with: Code <?if($USER_LOGGED_IN$)?>$CONTENT$<?else?>Text for guests. It can and should be edited. They can not see page content. <?endif?> See more about conditional operators here: http://forum.ucoz.com/forum/37-471-1#36483 How to limit access to the page in accordance with users' age? You need to add feature of converting date of birth into age between tags: Code <head></head> You may call for this feature with the code: Code <script type="text/javascript">document.write(age('$USER_BIRTHDAY$'));</script> Attachments:
4573660.png
(2.0 Kb)
·
9414958.png
(6.5 Kb)
|
DEEPKG, I suggest when you create a page with the help of Page Editor, you do not tag the checkbox "Add link to the page into the main site menu". So this page will not be shown in the site menu.
Does it sounds like something that will work for you? |
Quote (Natashko) DEEPKG, I suggest when you create a page with the help of Page Editor, you do not tag the checkbox "Add link to the page into the main site menu". So this page will not be shown in the site menu. Does it sounds like something that will work for you? thank you very much. |
Gabe5587, yes visitors will have to log in to see your site.
Quote (Gabe5587) my site no only the forum can i do that Just remove the corresponding check marks for other modules (see Armaros's example for Forum). If you want to make home page unavailable for Guests - go to Control Panel -> Page Editor -> Pages management -> Press "wrench" for Main page and at the bottom you'll see "Groups, having access to this page:". I'm not active on the forum anymore. Please contact other forum staff.
|
| |||