1
Freetime
Login form in header part
  • 2003/8/4 21:30

  • Freetime

  • Just popping in

  • Posts: 31

  • Since: 2003/7/30


Hello.

How can I change locaction of "Login form" from block to header?

The login form:

<form action="<{$xoops_url}>/user.php" method="post"><{$block.lang_username}><input type="text" name="uname"  value="<{$block.unamevalue}>" /><{$block.lang_password}><input type="password" name="pass" /><input type="hidden" name="op" value="login" /><input type="submit" value="Login" /><br> </form>


I can put it to the theme but... I'd like to hide the form after login... just like in block. If user loged in - block is hiden. I'd like it works just like the same.

Sorry about my english.... :)

Freetime

2
Hober
Re: Login form in header part
  • 2003/8/4 21:32

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


use the blocks manager to put it in the middle

3
Freetime
Re: Login form in header part
  • 2003/8/4 21:37

  • Freetime

  • Just popping in

  • Posts: 31

  • Since: 2003/7/30


Quote:

Hober wrote:
use the blocks manager to put it in the middle


I'd like it in header.. not in the block part.
Or.. should I move one of block-areas inside header?



4
Hober
Re: Login form in header part
  • 2003/8/4 21:40

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


that might work, but only if you don't plan on putting anything else in that block area, you don't want to wind up with a list of recent discussions in the forums filling up your whole header and making everything ugly.

5
Freetime
Re: Login form in header part
  • 2003/8/4 21:45

  • Freetime

  • Just popping in

  • Posts: 31

  • Since: 2003/7/30


Yes... that's one way. Is there any other?

6
Hober
Re: Login form in header part
  • 2003/8/4 21:48

  • Hober

  • Just popping in

  • Posts: 40

  • Since: 2003/6/13


Probably...there has to be some variable you can check to see if the user is logged in. You could try and find that and then just check that way.

7
Freetime
Re: Login form in header part
  • 2003/8/4 22:10

  • Freetime

  • Just popping in

  • Posts: 31

  • Since: 2003/7/30


yeah... got something...
http://wiki.xoops.org/wakka.php?wakka=SmartyVariables

<{$xoops_isuser}>
True if the visitor is a logged in user

<{$xoops_userid}>
User ID of the member

<{$xoops_uname}>
Uname for the member

That means....hmm
<{if $xoops_isuser == 0}> "do form..." <{/if}> 
Hello <{$xoops_userid}>!


Am I right?!?

Freetime

8
spisage
Re: Login form in header part
  • 2003/8/5 1:46

  • spisage

  • Just popping in

  • Posts: 2

  • Since: 2003/8/5 1


i'm a recent downloader of XOOPS and i love it.
i'm really happy to be contributing.

ok, here goes.

the following <td> is a modification of the theme.html file in the default theme folder:

Quote:

<td valign="top"><{if !$xoops_isuser}>
<form action="<{$xoops_url}>/user.php" method="post">&nbsp;<b>user:</b> <input type="text" id="topfield" name="uname" value="<{$block.unamevalue}>" /> &nbsp; <b>pass:</b> <input type="password" id="topfield" name="pass" /><input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" /><input type="hidden" name="op" value="login" /> <input type="submit" id="topbutton" value="login" />
&nbsp; <a href="<{$xoops_url}>/user.php#lost">lost pass?</a> &nbsp; <a href="<{$xoops_url}>/register.php">register</a>
</form><{/if}>
</td>




i know for a fact that this will work perfectly!

9
mvandam
Re: Login form in header part
  • 2003/8/5 1:51

  • mvandam

  • Quite a regular

  • Posts: 253

  • Since: 2003/2/7 2


You can also check for ideas in the "x2t" theme which is distributd with xoops. It has a search box built into the header.

10
Freetime
Re: Login form in header part
  • 2003/8/5 10:59

  • Freetime

  • Just popping in

  • Posts: 31

  • Since: 2003/7/30


Thanks! It's working

Freetime

Login

Who's Online

226 user(s) are online (130 user(s) are browsing Support Forums)


Members: 0


Guests: 226


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits