Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
7 + 9 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: How to show the count of registered members on homepage?
by phillipd on 2005/1/20 20:27:40

How do I get my user information? Full name, username and such?

Ahh, I see: $xoopsUser->getVar('uname');

Where can I find specific info on what "getVar" can provide me?

Also where do I find exactly what XOOPS variables I have access to in my php scripts? Is this documented anywhere?

Thanks

Doug P
Re: How to show the count of registered members on homepage?
by Bender on 2004/9/21 22:49:47

Quote:

solo71 wrote:
Blockutils in the Wolf XOOPS Pack.



I knew it was a regular
Re: How to show the count of registered members on homepage?
by Mithrandir on 2004/9/21 19:38:11

Are you telling me that you are experimenting with code without PHP debug? That's really not very clever.

I made a typo - it should be $xoopsDB->... instead of $db->...
Re: How to show the count of registered members on homepage?
by iolai on 2004/9/21 19:32:43

I tried it, but only got blank white screen.
Re: How to show the count of registered members on homepage?
by Mithrandir on 2004/9/21 19:18:31

That will just show the rank ID and not the actual rank.

$user->rank(); will give the rank name, but with an SQL query for each user.

Try this instead:
le="color: #000000"><?php $sql = "SELECT rank_id AS id, rank_title AS title, rank_image AS image FROM ".$db->prefix('ranks'); $result = $db->query($sql); while ($rank = $db->fetchArray($result)) { $ranks[$rank['id']] = $rank; } $users = $member_handler->getObjects(new Criteria('level', 0, '>')); foreach ($users as $user) { echo $user->getVar('uname').' | '.$ranks[$user->getVar('rank')].'<br />'; }

Who's Online

209 user(s) are online (162 user(s) are browsing Support Forums)


Members: 0


Guests: 209


more...

Donat-O-Meter

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

Latest GitHub Commits