PDA

View Full Version : Auto PM Premium Membership after payment received


Residue
02-27-2006, 02:10 AM
Ive searched around and wasnt able to find anything for 3.5 that had this functionality.

What I'd like to do is have vB automatically send Premium members a 'Thank you PM' after payment for their membership is recieved.

If anyone knows of an existing hack to do this, or could help me create one, I'd greatly appreciate it!

Reeve of shinra
02-27-2006, 03:25 AM
Good idea...

bada_bing
02-27-2006, 03:39 AM
This would be nice.

3z3k3l
02-27-2006, 03:49 AM
agreed. Great idea

Reeve of shinra
02-27-2006, 03:52 AM
This looks easier than I thought...

Create a new plugin.
Hook Location: paidsub_complete

Plugin PHP Code:

Copy and past the example Andreas gave in the first php code box, just be sure to change the approprate userid and message and stuff like that.

https://vborg.vbsupport.ru/showthread.php?t=82786

edit: I dont have subs yet, so I haven't tried this out.

Residue
02-27-2006, 04:13 AM
This looks easier than I thought...

Create a new plugin.
Hook Location: paidsub_complete

Plugin PHP Code:

Copy and past the example Andreas gave in the first php code box, just be sure to change the approprate userid and message and stuff like that.

https://vborg.vbsupport.ru/showthread.php?t=82786

edit: I dont have subs yet, so I haven't tried this out.

Interesting...good find. I will have to mess with this sometime this week to figure out how to make it do what i want.

So I would change the line

$pmdm->set_recipients('newuser', $botpermissions)

to:
$pmdm->set_recipients('paidsub_complete', $botpermissions)

?? Thanks

Reeve of shinra
02-27-2006, 04:58 AM
no, when you create the new plugin, paidsub_complete should be teh HOOK that you use

gonkowonko
02-28-2006, 12:11 PM
If you created a plugin how does it know to send Pm to that new member of that premium membership when they sign up??

// create the DM to do error checking and insert the new PM
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('fromuserid', 1234);
$pmdm->set('fromusername', 'Welcome-Bot');
$pmdm->set('title', 'Welcom to our Forums');
$pmdm->set('message', "Hello\nI am a Bot and would like to give you a warm welcome :)");
$pmdm->set_recipients('newuser', $botpermissions);
$pmdm->set('dateline', TIMENOW);