1) I knew that the "Site Stats" block displays the number of registered users so instead of trying to figure out how to query the information I first looked in the site_stat.php block...
2) It was obvious where the output was for the registered members line once I looked in the code. Not only was the code below in the correct position for what I observed in the online block output but it even used the words "members" and "u_registered" which looked alot like "users registered".
Quote
{$stat['members']} {$this->lang['u_registered']}
I wasn't so sure about the variable that actually displays the number of users so I just put the code in the online.php block and refreshed my test homepage to see what would happen. The number of users did not display.
So now since the variable uses "$stat" I looked for other instances of "$stat" in the site_stat.php file. Toward the top is the line "$stat = $mklib_board->get_site_stat();" which since it says "get_site_stat" I thought it was a safe assumption that the stats info was called from that line. So I added it to the top of online.php and now the new "Registered Members" line worked.
4) Since the $stat variable was not used anywhere in the default online.php I knew I needed to "unset" the variable since non global variables should be unset in MKPortal blocks. This is just something I learned by hanging around here. It's not something that you could just easily figure out on your own I don't think. But now you know.
So you see that with a little thought and experimentation even those of us who are not very good with php can figure out alot of little hacks. You should start trying little stuff like this yourself.
-=DKC=-
------------------------------------------
FIND in online.php:
$users= $mklib_board->get_onlineblock();ADD BELOW:
$stat = $mklib_board->get_site_stat();FIND:
"; unset($lonlinelist);ADD ABOVE:
<tr>
<td class="tdblock">
<span class="mktxtcontr">{$stat['members']}</span> {$this->lang['u_registered']}
</td>
</tr>
FIND: ?>ADD ABOVE:
unset($stat);













