1
ghostrunner
users real name in themefile

Hey.
when a user is logged in to my site I would like their name to be in the top of the page. Similar to here on xoops.org.
Is there a default smartycode i can use?
If not, what do i need to do?

2
Burning
Re: users real name in themefile
  • 2009/11/14 23:37

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


hi

Just try to put this code in theme.html

<{if $xoops_isuser}>
    <{
$xoops_name}>
<{/if}>

3
ghostrunner
Re: users real name in themefile

i tryed but $xoops_name doesn't work.
$xoops_uname works but that's the username.

4
ghia
Re: users real name in themefile
  • 2009/11/15 10:01

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


You have to add
'xoops_name' => $GLOBALS['xoopsUser']->getVar('name'),
in /class/theme.php after
'xoops_uname' => $GLOBALS['xoopsUser']->getVar('uname')
,
In older versions 2.3.x-, it is
'xoops_name' => $xoopsUser->getVar('name'),

=>
'xoops_uname' => $xoopsUser->getVar('uname'),

Maybe also to modify is /include/xoops13_header.php

Should maybe useful enough to add in the core.

5
Sir_Saeed
Re: users real name in themefile
  • 2009/11/18 8:18

  • Sir_Saeed

  • Just popping in

  • Posts: 41

  • Since: 2007/10/10


How can we make a query to use in theme? Especially about custom fields created by profile module.

6
ghia
Re: users real name in themefile
  • 2009/11/18 9:42

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


See this.

Login

Who's Online

167 user(s) are online (90 user(s) are browsing Support Forums)


Members: 0


Guests: 167


more...

Donat-O-Meter

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

Latest GitHub Commits