Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > vbBux / vbPlaza
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Subscriptions - Still not getting vbBux points (3.6 with latest 1.5.8 vbBux) Details »»
Subscriptions - Still not getting vbBux points (3.6 with latest 1.5.8 vbBux)
Version: , by Quarterbore Quarterbore is offline
Developer Last Online: Aug 2020 Show Printable Version Email this Page

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.

I know from the following thread:

https://vborg.vbsupport.ru/showthrea...ht=quarterbore

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.

Comments
  #2  
Old 08-10-2006, 08:53 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So, is my code rework the only option?
Reply With Quote
  #3  
Old 08-26-2006, 02:45 PM
agiacosa agiacosa is offline
 
Join Date: Dec 2004
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did this get sorted out?
Reply With Quote
  #4  
Old 08-26-2006, 06:03 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hav ebeen using it with the change I posted above and it has been working since the day I posted it...

I posted over at vBplaza.com and never got a reply there either...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:58 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01868 seconds
  • Memory Usage 2,271KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete