Version: , by Quarterbore
Developer Last Online: Aug 2020
Version: Unknown
Rating:
Released: 08-08-2006
Last Update: Never
Installs: 0
No support by the author.
I am still stumped by this one... I have just started working with 3.6 Gold and I have installed a classifieds script and vbBux only on my site so far and I have a problem in that when I pay for a Subscription the usergroups get advanced BUT I do not get the vbBux that should have come with the subscription. I do get the 100-points that come from ANY subscription.
Now, from that other thread I understand that this is handled by the hook paidsub_build or possibly the following file:
/plugins/vbplaza_paidsub_build.php
My guess is that it is a php version issue but I need to find an alternate code as my usergroups get vbBux to allow them to purchase extras for their donations using vbPlaza....
I'll post updates if I can figure this out!
OK, I am trying to disect the code in the file vbplaza_paidsub_build.php following is the complete file:
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vbPlaza Integrated Store System for vBulletin 3.5+ # ||
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ?2006 GSCCC, Inc. # ||
|| # http://www.cmgsccc.com # ||
|| #################################################################### ||
\*======================================================================*/
// check to make sure VB_AREA is defined
if (defined('VB_AREA'))
{
// check if it's enabled first
if ($vbulletin->options['vbbux_enabled'] == 1)
{
// check to see if there is a different amount of points for this individual subscription
$findsub = $vbulletin->db->query_first("SELECT `vbp_vbbuxsub` FROM " . TABLE_PREFIX . "subscription WHERE subscriptionid = '" . $subscriptionid . "'");
// check if it was found
$givepoints = 0;
if (!empty($findsub['vbp_vbbuxsub']) && ($findsub['vbp_vbbuxsub'] != 0))
{
// set the amount of points to give
$givepoints = $vbulletin->options['vbbux_persubscription'];
}
// check if the user gets any global points per subscription
else if ($vbulletin->options['vbbux_persubscription'] != 0)
{
// set the amount of points to give
$givepoints = $vbulletin->options['vbbux_persubscription'];
}
// check if any points should be added
if ($givepoints != 0)
{
// verify they have enough points to do this action
if (($user[$vbulletin->options['vbbux_pointsfield']] + $givepoints) < 0)
{
// display error, not enough points
eval(standard_error(fetch_error('vbplaza_not_enough_points')));
}
// send the query to add to this users points
$vbulletin->db->query_write("
UPDATE " . TABLE_PREFIX . $vbulletin->options['vbbux_pointstable'] . "
SET
`" . $vbulletin->options['vbbux_pointsfield'] . "` = `" . $vbulletin->options['vbbux_pointsfield'] . "` + " . $givepoints . "
WHERE userid = '" . $user['userid'] . "'
AND vbp_receivespoints = '1'
");
}
}
}
?>
I have verified that the problem is in this file! The following code CORRECTLY adds the points that my users would get with their paid subscription! Note that I have cut out a LOT of code to verify that this was the problem and the problem could be fixed here!
PHP Code:
<?php
/*======================================================================*\
|| #################################################################### ||
|| # vbPlaza Integrated Store System for vBulletin 3.5+ # ||
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ?2006 GSCCC, Inc. # ||
|| # http://www.cmgsccc.com # ||
|| #################################################################### ||
\*======================================================================*/
// check to make sure VB_AREA is defined
if (defined('VB_AREA'))
{
// check if it's enabled first
if ($vbulletin->options['vbbux_enabled'] == 1)
{
$givepoints = 0;
// check to see if there is a different amount of points for this individual subscription
$findsub = $vbulletin->db->query_first("SELECT `vbp_vbbuxsub` FROM " . TABLE_PREFIX . "subscription WHERE subscriptionid = '" . $subscriptionid . "'");
$givepoints = $findsub['vbp_vbbuxsub'];
// check if any points should be added
if ($givepoints != 0)
{
// verify they have enough points to do this action
if (($user[$vbulletin->options['vbbux_pointsfield']] + $givepoints) < 0)
{
// display error, not enough points
eval(standard_error(fetch_error('vbplaza_not_enough_points')));
}
// send the query to add to this users points
$vbulletin->db->query_write("
UPDATE " . TABLE_PREFIX . $vbulletin->options['vbbux_pointstable'] . "
SET
`" . $vbulletin->options['vbbux_pointsfield'] . "` = `" . $vbulletin->options['vbbux_pointsfield'] . "` + " . $givepoints . "
WHERE userid = '" . $user['userid'] . "'
AND vbp_receivespoints = '1'
");
}
}
}
?>
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.