Ok, so it looks like the comma needs to be removed. Will take another look
Oh yeah!
Code:[mworthington@artemis ~]$ ./xenforo_users2 members.value 145 guests.value 1959
This version adds a fix in to remove the comma used for thousand separators on large boards.
Code:members.value 138 guests.value 1982
And?
Didn't you forget something else in the message?![]()
if ($response->content =~ /\:\s(.*)\s\(members\:\s(.*),\sguests\:\s(.*)\)/im)
{
my $members = $2;
$members =~ s/,//g;
my $guests = $3;
$guests =~ s/,//g;
print "members.value $members\n";
print "guests.value $guests\n";
} else {
print "members.value U\n";
print "guests.value U\n";
}
Was just updating the resource.
To fix it:
Code:$members =~ s/,//g; }
# part of the output we want to catch : Online now: 79 (members: 18, guests: 61) --> 18 - 61
if ($response->content =~ /\:\s(.*)\s\(members\:\s(.*),\sguests\:\s(.*)\)/im)
{
my $members = $2;
$members =~ s/,//g;
my $guests = $3;
$guests =~ s/,//g;
print "members.value $members\n";
print "guests.value $guests\n";
} else {
print "members.value U\n";
print "guests.value U\n";
}
# part of the output we want to catch : Online now: 79 (members: 18, guests: 61, robots: 0) --> 18 - 61
if ($response->content =~ /\:\s(.*)\s\(members\:\s(.*),\sguests\:\s(.*),\srobots\:\s(.*)\)/im)
{
my $members = $2;
$members =~ s/,//g;
my $guests = $3;
$guests =~ s/,//g;
my $robots = $4;
$robots =~ s/,//g;
print "members.value $members\n";
print "guests.value $guests\n";
print "robots.value $robots\n";
} else {
print "members.value U\n";
print "guests.value U\n";
print "robots.value U\n";
}
print "members.label Members\n";
print "members.draw AREA\n";
print "guests.draw STACK\n";
print "guests.label Guests\n";
print "members.label Members\n";
print "members.draw AREA\n";
print "guests.draw STACK\n";
print "guests.label Guests\n";
print "robots.draw STACK\n";
print "robots.label Robots\n";
@MattW can you check my PHP and make sure it is right. I had forgotten to modify the graphing section - and I "think" this addendum I did is correct but thought you would be know best.Hmm, not too sure on that one![]()
I've just been looking at the documentation on drawing graphs, and there is nothing to suggest this would fail to draw when the first area section is greater than 1k, as the second should just stack on top of it.Hmm think I spoke too soon. This seems to still fail when my members (green curve) are greater than 1000. When that happens the guests (blue curve) fails to show.
Any ideas @MattW?
We use essential cookies to make this site work, and optional cookies to enhance your experience.