Posted on: 03/18/04 10:37am
By: Uffe
I will like to put my Login/Password on a static page, and make a link in my menu named Login.
Does anyone knows the answer?
Thank you.
Login / Password on a static page.
Posted on: 03/18/04 02:53pm
By: Dirk
The login is just a plain HTML form - you can simply copy the one from the User Functions block.
bye, Dirk
Login / Password on a static page.
Posted on: 03/18/04 04:58pm
By: Uffe
I am not sure where to find "User Functions block"
I have copied the user/loginform.thtml but when i try to login the file is not found.
Login / Password on a static page.
Posted on: 03/20/04 08:52am
By: Uffe
I got this solution: point the login link to /public_html/users.php
But where do i remove the login form in the left colum!
http://www.byrholtantik.dk
Login / Password on a static page.
Posted on: 03/20/04 11:15am
By: Blaine
Uffe,
This is similar to how I have my site setup - with the login/logout in the header.
I order to accomplish, this you need to be able to change the variables used by COM_siteHeader and the template file header.thtml.
The header.thtml file is the only template file that you can add PHP so it may be possible add the logic test and hard code the login/logout links.
For my site, I used a different approach. The COM_siteHeader function will first look to see if the current theme has a custom function that should be used. I copied the code from COM_siteHeader and created a function in lib-custom called portalparts_siteHeader() and then customized the function to meet my needs. I added the logic to see if the user was logged in or not and then set the template variables needed.
This makes upgrades easier since I have not hacked lib-common and I can select another theme and all is back to normal.
Login / Password on a static page.
Posted on: 03/23/04 04:13pm
By: Uffe
Thanks for your support.
There is another way if you are using menuplugin:
Make a Login links to: http:/public_html/users.php
Set permissions to only Anonymous.
Set usermenu permissions to Owner Groups members.
Thats all.
Login / Password on a static page.
Posted on: 03/23/04 06:14pm
By: exaurdon
Hello, sounds like you got it working.
For anyone else reading this thread, the html form that Dirk refered to would be as follows:
<form action="http://www.yoursite.net/users.php" method="POST">
<b>Username:</b><br>
<input type="text" size="10" name="loginname" value=""><br>
<b>Password:</b><br>
<input type="password" size="10" name="passwd"><br>
<input type="submit" value="Login">
</form>
Note that no php is required at all. However, in this state, the form will be seen by all users, whether they are logged in or not. You could do some simple code to hide the form if a user was logged in.
Exaurdon~