<plugin active="1" executionorder="1">
<title>vBCredits II - Charity</title>
<hookname>vbookie_do_charity</hookname>
<phpcode><![CDATA[$hook_query_fields = $hook_query_joins = '';
VBCREDITS::user($hook_query_fields, $hook_query_joins, array('user'), true);
$poor = $vbulletin->db->query_read("SELECT user.userid, (0$hook_query_fields) AS cash FROM " . TABLE_PREFIX . "user AS user $hook_query_joins WHERE cash < " . $vbulletin->options['vbookiegivetopoor']);
while ($user = $vbulletin->db->fetch_array($poor)) VBCREDITS::action('charity', $user['userid']);]]></phpcode>
</plugin>
$hook_query_fields = $hook_query_joins = '';
VBCREDITS::user($hook_query_fields, $hook_query_joins, array('user'), true);
$poor = $vbulletin->db->query_read("SELECT user.userid, (0$hook_query_fields) AS cash FROM " . TABLE_PREFIX . "user AS user $hook_query_joins WHERE (0$hook_query_fields) < " . $vbulletin->options['vbookiegivetopoor']);
while ($user = $vbulletin->db->fetch_array($poor)) VBCREDITS::action('charity', $user['userid']);
Okay, try editing the vBCredits II - Charity plugin and replace the contents with:
PHP:$hook_query_fields = $hook_query_joins = ''; VBCREDITS::user($hook_query_fields, $hook_query_joins, array('user'), true); $poor = $vbulletin->db->query_read("SELECT user.userid, (0$hook_query_fields) AS cash FROM " . TABLE_PREFIX . "user AS user $hook_query_joins WHERE (0$hook_query_fields) < " . $vbulletin->options['vbookiegivetopoor']); while ($user = $vbulletin->db->fetch_array($poor)) VBCREDITS::action('charity', $user['userid']);
Then reenable it and see if everything is working again.
The users receiving the payout need to log into the site and their pending payments will be processed as they browse your site.
We use essential cookies to make this site work, and optional cookies to enhance your experience.