| 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:
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 />'; }
|