Re: Login Box - Display on Edit
Hi Rick,
As per your suggestion, I performed the following steps:
- Removed login_box module.
- Added the follwing code to the bottom of the tiki-show_page.tpl template:
{if !$user}<a href="tiki-login.php">Login to edit this page</a>.{/if}
Now, Registered or Anonymous users cannot view the "Login" box on the first page of the site. To log on to the site, users need to use the tiki-login.php URL.
Is that how it is???
P.S: I want if a user double-clicks a page without logging on to the site, the "Login" box should appear automatically. After successfully logging on to the site, the users can edit pages.
Regards,
Arun Bamania
> How are you going to let users "try to edit a page"? Are you going to manually add a EDIT button to every wiki page? The EDIT button will not appear (automatically) unless the user is already logged in.
>
> I think a better solution may be:
> #Remove the login module (this way it won't appear for anonymous users).
> #Edit the tiki-show_page.tpl template (that is used for displaying wiki pages), and add a single link at the bottom of the page:
> {if !$user}<a href="tiki-login.php">Login to edit this page</a>.{/if} >
>
> This link will appear only when a user is not yet logged in
>
> I think this covers the functionality that you're trying to accomplish.
>
> HTH,
>
> -Rick
>
> > Hi Rick,
> >
> > He is the problem scenario:
> >
> > I have created structures for many user guides for our documentation purpose. These guides are available for users in the left pane of our site. Any user can view the documentation on the site. What our client wants is that the "Login" box should not be available in the View mode. However, the "Login" box should appear automatically ONLY when a (any) user tries to edit a page, and ask the user to log on to the site. If the user has a valid username and password, the user can log on to the site and edit the desired page. If not, the user cannot edit the page.
> >
> > Hope this time I am able to clearly explain my query.
> >
> > Regards,
> > Arun Bamania
> >
> > > You could easily edit the error page (that appears when you try to access a page that anonymous users do not have permission to view) to also show the login module with the error message. For example, when an anonymous user tries to access my Tiki's sandbox, they are automatically prompted to login: example
.
> > >
> > > However.... What are your anonymous users going to click in order to get the error page? Normally the EDIT button does not appear (unless you are already logged in).
> > >
> > > Can you give a use case example of what you're trying to do?
> > >
> > > -R