1
ideagot
How can i add "hi,username" in the user menu?
  • 2004/10/25 14:05

  • ideagot

  • Just popping in

  • Posts: 17

  • Since: 2003/4/16


Help me.
How can i add "hi,username" in the user menu?
Thx a lot.

2
tjnemez
Re: How can i add "hi,username" in the user menu?
  • 2004/10/25 14:23

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


this may work for you:

<table border="0" class="outer" cellpadding="3" cellspacing="0">
<tr>
<td class="">
<{if $xoops_isuser}><span class="small">Hi
<a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>!</span>&nbsp;&nbsp;&nbsp;<{else}>
<form style="margin-bottom:0px;" action="<{$xoops_url}>/user.php" method="post">User: <input type="text" name="uname" size="10"value="<{$block.unamevalue}>" />
&nbsp; Password:
<input type="password" name="pass" size="10"/>
<input type="hidden" name="op" value="login"/>
&nbsp; <input type="submit" value="Login" name="login" /></form>
<{/if}>
</td>
</tr>
</table>

3
limecity
Re:How can i add
  • 2004/10/25 14:25

  • limecity

  • Friend of XOOPS

  • Posts: 1602

  • Since: 2003/7/6 0


Not sure about putting this in USER MENU like u said, but this might work if you put it in your theme front page.

Your may try to put this in the user menu template see if it works. XOOPS experts, correct me if i am wrong.

<{if $xoops_isuser}> Hi <a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>&nbsp;&nbsp;&nbsp;<a href="<{$xoops_url}>/user.php">your account </a>&nbsp; <{else}> <a href="<{$xoops_url}>/register.php">Free Registration</a> on Your Website.com! <{/if}> <span class="right"> <{if $xoops_isuser}>

*edit*edit*
Oops, someone posted already. just listen to what tjnemez just posted.

4
tjnemez
Re:How can i add
  • 2004/10/25 14:35

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


i think you are right limecity, what you and i posted should be added to theme.html

5
tjnemez
Re:How can i add
  • 2004/10/25 14:36

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


oops!

6
sunsnapper
Re: How can i add "hi,username" in the user menu?

Yeah, I don't think you need to do a core hack for this.

You could put it in your theme, as suggested. However, if you want it in the User Menu...

Add the code provided above to the User Menu block. (If you are going to edit a system block, might as well make a backup copy of it before you start making changes.)

Even better, in my opinion, is to create a Custom Block with the code.

7
tjnemez
Re: How can i add "hi,username" in the user menu?
  • 2004/10/25 14:42

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


as sunsnapper suggests the custom block will likey be easiest way to go.

8
Dave_L
Re: How can i add "hi,username" in the user menu?
  • 2004/10/25 16:31

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7



9
ideagot
Re:How can i add
  • 2004/10/26 1:05

  • ideagot

  • Just popping in

  • Posts: 17

  • Since: 2003/4/16


thanks everyone.
i put "Hi,<{$xoops_uname}>" in system_block_user.html,and it work well.

Login

Who's Online

230 user(s) are online (160 user(s) are browsing Support Forums)


Members: 0


Guests: 230


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