The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Hooks and variables after paid subscription complete
Hi!
I need some help from a vBulletin programming god! I'm working on a fairly simple plugin that will send a private message to users who subscribe to one particular subscription plan in vBulletin. The subscription has the ID of 3. The usergroup ID users get moved after subscription is 9. So I've decided the best way to do this is check the usergroup ID after their payment is complete. I've chosen this hook: paidsub_build And the code: <phpcode><![CDATA[if ($user['usergroupid'] == 9) { ---CODE GOES HERE IF TRUE---- }]]></phpcode> This isn't working for whatever reason. I guess the variable I'm trying to check is not valid, set or available from within the hook. Should I use a different hook location? Which one? And which variable should I check (i.e. $newusergroupid == 2)? I'd be so grateful if someone could give me some hints on what I'm doing wrong. This is really driving me insane today. |
#2
|
|||
|
|||
$vbulletin->userinfo['usergroupid']
|
#3
|
||||
|
||||
I think what you want is something like:
PHP Code:
|
#4
|
||||
|
||||
Thanks for the advise. I've given up on this, I can't even get the private message to send - let alone concern myself with checking the usergroup or subscription ID.
If anyone is interested in coding this for me, I've posted a paid work request here: https://vborg.vbsupport.ru/showthread.php?t=172882 As I posted in the above link, you'll find plenty of code around already to get this job done. I'm willing to pay a premium if someone has the time to get this done today. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|