Re: Re: Prevent anoynmous users from seeing Wiki content creates 2 Login forms on home page
By default, the login module will appear in the center of the page, if a an anonymous visitor attempts to access a page that requires him to be logged in. To remove this "extra" login module:
- Edit the tiki-index.php file.
- Find these lines (at, or near, line 230):
Copy to clipboardif($tiki_p_view != 'y') { if (!isset($user)){ $smarty->assign('msg',$smarty->fetch('modules/mod-login_box.tpl'));
This is where Tiki checks to see if you have permission to view the page and, if not, displays the login module. - Change the this line:
Copy to clipboard$smarty->assign('msg',$smarty->fetch('modules/mod-login_box.tpl'));
To something like this:Copy to clipboard$smarty->assign('msg','You must login to view this page.');
Now, when an anonymous visitor attempts to access a page that requires him to be logged in, he'll get the error page with only the message "You must login to view this page."
HTH,
-Rick
Need more help? Try TikiWiki for Dummies Smarties or read my Tiki Blog or visit my UserPage