1
jackcpsu
want to show user id after user login
  • 2005/10/6 20:07

  • jackcpsu

  • Just popping in

  • Posts: 3

  • Since: 2005/10/6


Dear Friends,

I like to show welcome message with user id. When I insert the following code to theme.html, nothing happened.

Quote:
<{if $xoops_isuser}> Welcome, <{$xoops_uname}> to <{$xoops_sitename}> <{else}> <{$xoops_sitename}>, Please Register Here <{/if}>


When I create a block and paste the above codes, Here is the error message.

Quote:
Parse error: parse error, unexpected '<' in /drive2/fpgshttpd/subing/class/xoopsblock.php(146) : eval()'d code on line 1


What can I do? Thank you very much for your help.

2
JMorris
Re: want to show user id after user login
  • 2005/10/6 21:35

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


What version of XOOPS are you using?

The code you are using in your theme is Smarty code. Smarty code only works in templates and themes. You'll need to use the php equivalent in your custom block and set the block content type to php.

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

3
jackcpsu
Re: want to show user id after user login
  • 2005/10/6 23:31

  • jackcpsu

  • Just popping in

  • Posts: 3

  • Since: 2005/10/6


This is the information about my Xoops:

XOOPS 2.0.12 UTF8 release 20050906

And can anyone help me with the PHP equivalent of the smarty code? Thanks.

4
gediminasbyt
Re: want to show user id after user login

<{if $xoops_isuser}>
Welcome: <{$xoops_uname}>           Log Out  Profile  Notifications
<{if $xoops_isadmin}>
Admin menu
<{/if}>

Something like that might help you. Though it's not for xoops2.2.2 and notifications path is different I think. But direction is given

Gediminas

5
gediminasbyt
Re: want to show user id after user login

Thought you might be interested in another part as well:

<{if $msgcount > 0}>
 Inbox <{$msgcount}>
<{else}>
 Inbox
<{/if}>

<{else}>
Anonymous Log in • Register • Forgot password
<{/if}>


Now your part is connecting the dots...


Gediminas

6
jackcpsu
Re: want to show user id after user login
  • 2005/10/7 5:47

  • jackcpsu

  • Just popping in

  • Posts: 3

  • Since: 2005/10/6


Thank you very much. I will try them out.

but, should my smarty code work in Theme.html?

7
Herko
Re: want to show user id after user login
  • 2005/10/7 7:42

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Quote:

jackcpsu wrote:
should my smarty code work in Theme.html?
Yes.

Herko

Login

Who's Online

324 user(s) are online (54 user(s) are browsing Support Forums)


Members: 0


Guests: 324


more...

Donat-O-Meter

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

Latest GitHub Commits