Well, I've got users mysteriously disappearing from the leaderboard.
If I manually run the cron update task for it, I get the following error:
Code:
gXboxLive Info Update
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in [path]/includes/cron/miner.gxboxlive.php on line 85
Updated Accounts: .
Process Time: 0s.
Total Queries: 29.
Done
Looks like there may be a problem with the query.
I added some debug echos to the script, to try figure out what's going on.
I got the resolved query from $main_query, and ran it in phpmyadmin - I get a (correct) list of users.
However the line:
PHP Code:
$fullresult = $vbulletin->db->query_read($main_query);
appears to return nothing. Unfortunately I don't know enough about PHP and in particular, the VB api to try figure out what it's supposed to return.
I'll try investigate further, and I'll update this post as I go along.
Ok. Found the way to fix the error:
In the file /forum install/includes/cron/miner.gxboxlive.php
Find:
PHP Code:
$querylimit = ceil(mysql_num_rows($fullresult) / ceil((strtotime(date("Y-m-d", strtotime("+1 day"))) - TIMENOW) / 60) ) + 5;
And change it to:
PHP Code:
$querylimit = ceil($vbulletin->db->num_rows($fullresult) / ceil((strtotime(date("Y-m-d", strtotime("+1 day"))) - TIMENOW) / 60) ) + 5;
That fixes the initial error, but the rest of the script doesn't seem to be working.
---
Ok, after iterating through the $card_string array, it seems that my server is being rejected - all the cards contain "403 Forbidden". This might indicate why it no longer works.
---
For what it's worth, changing
PHP Code:
$card_string = fetch_file_via_socket($fetch_url . "?bot=gXboxLive_" . $gxblprod['version'] . "&ref=" . $vbulletin->options['bburl'] . "/gxboxlive.php");
to simply
PHP Code:
$card_string = fetch_file_via_socket($fetch_url);
fixed the issue for me. I don't know if it's the bot=gXboxLive string that has been banned or what.