vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Auto PM Premium Membership after payment received (https://vborg.vbsupport.ru/showthread.php?t=108996)

Residue 02-27-2006 02:10 AM

Auto PM Premium Membership after payment received
 
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

Quote:

Originally Posted by Reeve of shinra
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??

PHP Code:

 // create the DM to do error checking and insert the new PM 
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_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); 



All times are GMT. The time now is 12:16 PM.

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.01139 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete