1
wammes
Easy question for someone with knowlegde of php/smarty.
  • 2003/11/7 12:21

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


I tried different things without succes. I'd like to add extra smarty variables to get userinfo in my theme. I like to get the userrank title in a smarty variable.
I've edited header.php and added:
$xoopsTpl->assign('rnktitle', $xoopsUser->getVar('rank'));

Now in the API documentation about userrank it says:

array rank( )

get the user's rank

Tags:
return - array of rank ID and title

So my smarty variable should be an array (I think). But I can't load the userrank title. How can I call the second element in the array?
<{$rnktitle}> doesn't give me the title, only the id number. I've tried with <{$rnktitle[1]}> or <{$rnktitle[title]}> without succes. What am I doing wrong?


Thank you very much for any help.

2
ackbarr
Re: Easy question for someone with knowlegde of php/smarty.

Try this instead:
$xoopsTpl->assign('rnktitle'$xoopsUser->rank());


3
wammes
Re: Easy question for someone with knowlegde of php/smarty.
  • 2003/11/7 12:51

  • wammes

  • Not too shy to talk

  • Posts: 101

  • Since: 2002/1/3 1


Thanks ackbarr,
with your modification I can load the ranktitle with <{$rnktitle.title}> in my theme!

Login

Who's Online

236 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 236


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