Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 06:34 am EDT

Geeklog Forums

Login / Password on a static page.


Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30
artistic
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.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The login is just a plain HTML form - you can simply copy the one from the User Functions block.

bye, Dirk
 Quote

Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30
I am not sure where to find "User Functions block" Oops!
I have copied the user/loginform.thtml but when i try to login the file is not found.
 Quote

Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30
Big Grin 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
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
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.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30
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.
 Quote

Status: offline

exaurdon

Forum User
Regular Poster
Registered: 08/13/03
Posts: 107
Hello, sounds like you got it working.

For anyone else reading this thread, the html form that Dirk refered to would be as follows:

Text Formatted Code
<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~
 Quote

All times are EDT. The time is now 06:34 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content