Loading...
 
Architecture / Installation

Architecture / Installation


Re: Re: Prevent anoynmous users from seeing Wiki content creates 2 Login forms on home page

posts: 3665 United States

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:

  1. Edit the tiki-index.php file.
  2. Find these lines (at, or near, line 230):
    Copy to clipboard
    if($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.
  3. 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

There are no comments at this time.