Website - Member Statistics

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Jaggeh
Forum Newbie
Posts: 16
Joined: Sat Jul 05, 2008 12:59 am
Location: Canada
Contact:

Website - Member Statistics

Post by Jaggeh »

Okay well if you read my other topic (MySQL + PHP - Website/Forum Integration) you will know I'm integrating my whole website.

Well I just added a Statistics area:

Code: Select all

 
<?php
$stats = $SDK->get_board_stats();
$onlinemembers = $SDK->list_online_members(1);
foreach ($onlinemembers as $member) {
if ($return) {
$return .= ", ";
}
$return .= '<a href="'.$SDK->ips->vars[board_url].'/index.php?showuser='.$member['id'].'">'.$member['prefix'].$member['name'].$member['suffix'].'</a>';
}
$return = "Online members:<br /><br />".$return."
<br />
<br />
Posts: <b>{$stats['total_replies']}</b><br />
Members: <b>{$stats['mem_count']}</b><br >
Newest member: <b>{$stats['last_mem_name']}</b><br />
Most online: <b> {$stats['most_count']}</b> on <br /><b>{$SDK->sdk_date($stats['most_date'],'M j Y, G:i')}</b><br />
";
echo $return;
?>
 
When Logged In It Looks Like This:
Image

My problem here is that when you're logged in it doesn't show other online users, but when you're not logged in, you can see all logged in users.

Does anyone know a way to fix this problem? Please and Thank You.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Website - Member Statistics

Post by onion2k »

Sounds like a bug in $SDK, whatever that is.
Jaggeh
Forum Newbie
Posts: 16
Joined: Sat Jul 05, 2008 12:59 am
Location: Canada
Contact:

Re: Website - Member Statistics

Post by Jaggeh »

Would this make a differnece?

Code: Select all

<?php require_once('ipbsdk/ipbsdk_class.inc.php');
$SDK =& new IPBSDK();
$SDK->sdk_info();
?>
 
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Website - Member Statistics

Post by onion2k »

You'd need to ask the person who wrote that class. Or examine it for bugs yourself.

Also, could you remove that signature picture please. It's too big. The forum rules prohibit large images.
Jaggeh
Forum Newbie
Posts: 16
Joined: Sat Jul 05, 2008 12:59 am
Location: Canada
Contact:

Re: Website - Member Statistics

Post by Jaggeh »

I tried something else and it still doesn't work.
Jaggeh
Forum Newbie
Posts: 16
Joined: Sat Jul 05, 2008 12:59 am
Location: Canada
Contact:

Re: Website - Member Statistics

Post by Jaggeh »

UGH....It's still only displaying yourself when logged in.
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: Website - Member Statistics

Post by WebbieDave »

You will need to contact the authors of the class library you are using for support in this matter.
Jaggeh
Forum Newbie
Posts: 16
Joined: Sat Jul 05, 2008 12:59 am
Location: Canada
Contact:

Re: Website - Member Statistics

Post by Jaggeh »

Here's the Code for the $sdk

Code: Select all

 
<?php
 
$root_path = '*not_shown_for_privacy_reasons*htdocs/forums';
 
$board_url = 'http://www.gingrichgames.co.cc/forums';
 
$sdklang = 'en';
 
$allow_caching = '1';
 
?>
 

And the other one is:
http://www.gingrichgames.co.cc/uploads/ ... ss.inc.txt
Post Reply