Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-12-2009, 07:11 PM
chrisbreault chrisbreault is offline
 
Join Date: Feb 2009
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Subscription Usergroup Fix

I have a question about the Paid Subscription setup. Currently, you can set it so that when a user purchases that subscription, their usergroup gets changed to whatever usegroup you associate with that subscription.

The problem that I'm having, however, is that if a user purchases one subscription, which we'll call X, their usergroup gets changed to the associated usergroup with subscription X. Now, if that same user purchases subscription Y, his primary usergroup is set that of which is associated with subscription Y, and the old usergroup from subscription X is removed.

Is there any way to make the subscription system update the primary usergroup, and make it's existing primary usergroup a secondary usergroup? This is all very confusing to explain. But, hopefully someone will catch my meaning.

The problem is that if someone purchases X, and then Y, their forum permissions from being a member of usergroup X are removed, and those of usergroup Y take effect. I need there to be both, where the primary will be Y, and the secondary will be X (Given that the user purchased X and then Y respectively).

Thank you.
Reply With Quote
  #2  
Old 05-12-2009, 10:03 PM
3xigames 3xigames is offline
 
Join Date: Apr 2009
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can set it just to add the permissions..
That's what I do.
Its right in the same interface.
Reply With Quote
  #3  
Old 05-13-2009, 12:16 AM
chrisbreault chrisbreault is offline
 
Join Date: Feb 2009
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're not understanding what I'm saying, apparently. Yes, you can set it there, however that just sets their PRIMARY usergroup. Yes, you can set secondary, but then someone who only purchases subscription Y will get permissions for X and Y.

What I'm asking isn't hard to understand. If you purchase X, you get the permissions to access the forum related to X. If you purchase Y, you get the permissions to access the forum related to Y. When you purchase X, your usergroup changes to that of which is associated with X, and the same with Y.

The issue is that if you purchase X, and then Y, your usergroup changes to just Y. The old usergroup, of X, is removed, when it should be set as a secondary usergroup.
Reply With Quote
  #4  
Old 05-13-2009, 05:56 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't see the problem with just setting them as secondary? A "yes" permission will always overtake a "no".
Reply With Quote
  #5  
Old 05-13-2009, 04:50 PM
chrisbreault chrisbreault is offline
 
Join Date: Feb 2009
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
I don't see the problem with just setting them as secondary? A "yes" permission will always overtake a "no".
Yes, but, what I'm asking about is how to make that automated. Setting it as a secondary thing manually is fine, but, to have it done automatically would be that much better.

For what I'm doing, it's necessary for it to be automated.
Reply With Quote
  #6  
Old 05-14-2009, 09:47 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you set up the subscription so it does this?
Reply With Quote
  #7  
Old 05-14-2009, 02:25 PM
chrisbreault chrisbreault is offline
 
Join Date: Feb 2009
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The subscription is currently set up so that when they purchase the Paid Subscription called X, their primary usergroup gets changed to X, so that they have the user title and color, and permissions associated with usergroup X. Usergroup why is set up so that they get everything associated with usergroup Y.

The issue is this, I'll attempt to explain it again.

When they purchase X, for say $5, they are changed into the primary usergroup of X. Now, if they purchase usergroup Y, for say $10, they are changed into the primary usergroup of Y.

The problem comes that they should still have the access rights to usergroup X as well, because they did pay for it. So, Y (since it is the most recent paid subscription for that user) should be set as the primary usergroup, and their old primary usergroup of X should be changed into an "additional usergroup" (secondary).

Do you follow? This isn't as much for forum access than it is for something else. The point here is that I need to have the subscription script check to see if they have a currently active subscription, and if they do, move that subscription usergroup into an additional usergroup, and set the primary usergroup to that of the newest subscription (the second one, Y).
Reply With Quote
  #8  
Old 05-15-2009, 06:58 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just create a "normal" usergroup and make this the primary usergroup always. Make both the subscriptions add as secondary. This will make the user have both sets of permissions. The user can choose the "Display Usergroup" in their User CP.
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 06:13 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04178 seconds
  • Memory Usage 2,226KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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