1
GadgetMn
Displaying the username in a theme
  • 2003/11/17 10:28

  • GadgetMn

  • Just popping in

  • Posts: 55

  • Since: 2003/7/15


Is there an easy way to display the current username within a theme?

I want to display either the name or "Visitor" depending on whether the user is known or not.

Can anyone help?

GadgetMn

2
blueangel
Re: Displaying the username in a theme
  • 2003/11/17 12:34

  • blueangel

  • Module Developer

  • Posts: 132

  • Since: 2002/2/20


try to use in your html template file the variabile

<{$user.name}>

it should display the name of the user



3
Mithrandir
Re: Displaying the username in a theme

or {$xoops_uname}

Try turning on SMARTY debug and open the page, you wanna change, and see look for your own username and note the associated variable name.

4
Bassman
Re: Displaying the username in a theme
  • 2003/11/17 23:30

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


ackbarr's karate_redux theme does exactly this, i'm sure it's available in the downloads section. You could download it and see how he does it.

5
watar
Re: Displaying the username in a theme
  • 2004/2/9 11:24

  • watar

  • Just popping in

  • Posts: 12

  • Since: 2002/2/7 8


I'd like to expand this and also include info for new PMs:

Welcome USERNAME, you have XXX new messages

or even further:
If new PM --> Welcome USER, you have XXX new messages
If no new PM --> Welcome USER
...

Any ideas?
/W

Login

Who's Online

275 user(s) are online (172 user(s) are browsing Support Forums)


Members: 0


Guests: 275


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