PDA

View Full Version : Mini Mods - MNG - Send Custom PM or Email to User on Paid Subscription


ringleader
03-27-2008, 10:00 PM
Send Custom PM or Email on Paid Subscription v1.0

About this mod:

I have seen a number of requests for the ability to send a custom PM and/or a custom email when a user buys a Paid Subscription from your board. This would be used if you want to tell them their payment has been received, rather than relying on, say, paypal to do it for you. You can write a custom message in the PM or email to explain what they've bought and are entitled to now.

This is also good for when you receive a donation from users, as you want them to feel like they've been acknowledged in some way, by PM or email.

I had to code this for my own board anyway, so I thought I'd release it here.
I'm just that nice.

This hack allows you to configure text for a PM and/or an email on a per-subscription basis.
You can set either the PM or email or both to send when someone purchases a subscription.

Configurable:
* The PM sender
* The PM subject
* The body of the PM
* PM active/inactive for a particular subscription.
* The email sender address
* The email subject
* The body of the email
* Email active/inactive for a particular subscription.
* The Paid Subscription ID that the PM and/or Email are to be sent for when one of the subscriptions is bought.
* Email text always includes the expiry date of the subscription (hardcoded).
* Email text always includes a link to the members' profile.


Input on features you would like to see for this hack is very welcome, but may not be possible to implement. The Paid Subscriptions are very tightly coded by default in vbulletin.

What this mod does to your board: (nice to know beforehand)

* 1 plugin added.
* 1 table added (called 'subscriptionpmemail').
* 1 Admincp menu xml file.
* 1 function file for use by the admincp.
* Time to install: 1 min

Updates:

Version 1.0 (28th March 2008):

* Release of this hack for vBulletin version 3.6.8

MAKE SURE YOU CLICK INSTALL!
If you like this hack and use it then DONATE!

Pictures (attached):

1. Admincp: Configure PM or Email text to send.
2. PM that is sent to user upon purchase of a particular subscription.
3. Email that is sent to a user upon purchase of a particular subscription.

ringleader
03-28-2008, 03:34 PM
*** Reserved, just in case ***

DssCrazy
03-28-2008, 05:23 PM
Am a little confused on what this does. Here is my understanding. When someone buys Paid Subscription it will send the staff a message stating that someone has used?

Thanks

DssCrazy
03-28-2008, 05:28 PM
Will this send an email/pm to the user telling them that their Paid Subscription is almost up is that what it does?

ringleader
03-28-2008, 05:29 PM
Am a little confused on what this does. Here is my understanding. When someone buys Paid Subscription it will send the staff a message stating that someone has used?

Thanks

No, currently when someone buys a subscription vbulletin will inform the admin (or whoever you nominate in the admincp).

The only information the customer/user receives is from paypal that their payment has gone through.

This allows you to send your own custom message to the customer/user using either a PM or email (or both), depending on the subscription purchased.

The kind of thing this would be used for is to give them information about what they're entitled to with their subscription, etc, or to tell them that you yourself acknowledge receiving their subscription payment.

It's a lot more professional than relying on paypal to inform them, but having no word from the forum itself about anything.

Edit: A user receives an email 2 days before their subscription is up, currently.

In future I'll be adding a configurable system that you can send custom PM's or emails to them whenever you choose to, e.g. weeks before it's up, etc.

DssCrazy
03-28-2008, 05:31 PM
I should have looked at the screen shot first lol. i see now it gives you the abillity to auto send a pm/email when a member buys a Paid Subscription. ok perfect installed. Will it also give a warning message when Paid Subscription is almost up?

Thanks

ringleader
03-28-2008, 05:46 PM
I should have looked at the screen shot first lol. i see now it gives you the abillity to auto send a pm/email when a member buys a Paid Subscription. ok perfect installed. Will it also give a warning message when Paid Subscription is almost up?


A user receives an email 2 days before their subscription is up, currently.

In future I'll be adding a configurable system that you can send custom PM's or emails to them whenever you choose to, e.g. weeks before it's up, etc.
That part may be made a paid mod though.

rmxs
03-28-2008, 07:25 PM
Can we use something like $user etc???

Xeder
03-28-2008, 08:17 PM
Thanks for this.
But i was hoping if u could add an option to send a copy of that pm to a defined staff?

DssCrazy
03-28-2008, 11:14 PM
Can you add the option to send pm certain staff?

Also where do you type in the message to let the member know when their Paid Subscription is almost up?

Thanks

Hornstar
03-29-2008, 04:20 AM
Thanks! I am actually a user that requested this several times, and even has 2 coders going to make it for me before they vanished. So I am very happy that you have made this.

ps. Will you be upgrading this to 3.7 as well, as I plan on upgrading when vb 3.7 goes gold.

ringleader
03-29-2008, 06:01 PM
Can we use something like $user etc???

Not currently. The PM body and email body cannot take variables and interpret them, unfortunately. I'll try to think of a way around this though, but until then this is not possible.

Thanks for this.
But i was hoping if u could add an option to send a copy of that pm to a defined staff?

Yes, I will be adding a cc list that you can send the same pm/email to other people like moderators or the admin (though there's already an option in vbulletin that sends an email to the admin when someone buys a paid subscription).


Also where do you type in the message to let the member know when their Paid Subscription is almost up?


Custom messages for when a paid subscription is about to expire is not currently in version 1.0
It will be in a future version though, with the option to set when each subscriber is informed (currently subscribers are emailed by default in vbulletin 2-3 days before their subscription is to expire)

Thanks! I am actually a user that requested this several times, and even has 2 coders going to make it for me before they vanished. So I am very happy that you have made this.

I noticed that people were asking for the same mod that I needed myself.
I'm glad that you like it! :D


ps. Will you be upgrading this to 3.7 as well, as I plan on upgrading when vb 3.7 goes gold.

Yes, I will be updating this for 3.7 but only when a stable version is released.
The PM system in 3.7 for automated PM's is slightly different to the system in 3.6.8 I understand, so the PM bit in this mod will almost definitely not work in 3.7
If you (of anyone else for that matter) want to install it on a 3.7 board, the emails should work the way they are set at the moment ;)

codershark
03-29-2008, 09:27 PM
please make it compatible for 3.7 8)

Code Monkey
04-02-2008, 12:30 AM
Hi Ringleader. Thanks for making this mod. I had a customer that was using the other defunct one and it stopped working in 3.68.

I made a change to the cpnav_autopmemailpaidsub.xml so that it would load the menu item under the paid subscription menu instead of creating a whole new menu listing. Much neater that way. If anyone else wants to change this then just replace the contents of cpnav_autopmemailpaidsub.xml with the following code.


<?xml version="1.0" encoding="ISO-8859-1"?>

<navgroups product="autopmemailpaidsub" master="false">

<navgroup phrase="paid_subscriptions" permissions="canadminusers" hr="true" displayorder="170">

<navoption displayorder="500">
<phrase>email_pm_manager</phrase>
<link>pmemail.php?do=modify</link>
</navoption>
</navgroup>

</navgroups>
Also if you want to use variables then the best way is to use phrases instead of a text input box.

redraider
04-03-2008, 11:56 PM
perfect! this is what I was looking for

ringleader
04-07-2008, 12:28 PM
Hi Ringleader. Thanks for making this mod. I had a customer that was using the other defunct one and it stopped working in 3.68.

I made a change to the cpnav_autopmemailpaidsub.xml so that it would load the menu item under the paid subscription menu instead of creating a whole new menu listing. Much neater that way. If anyone else wants to change this then just replace the contents of cpnav_autopmemailpaidsub.xml with the following code.


<snip>
Also if you want to use variables then the best way is to use phrases instead of a text input box.

Good idea, Code Monkey.
I guess I just started building it as though it was going to be larger initially than it actually ended up being :)

Re: variables.
I can't seem to get my head around how to construct a phrase like that, so that cleanliness was being kept for a later version. Sure no-ones particularly notices for the time being ;)


****** NOTE FOR ALL - JUST SO YOU ARE AWARE *********
Be aware all that if you manually change, delete or extend someone's subscription in the Admincp it will resend the email and/or PM to the person. This is because the subscription is re-built again by vbulletin, and the email/pm bit is executed on build.

It won't affect you really, is not particularly bad, and you probably won't ever encounter this anyway!

redraider
05-12-2008, 05:02 PM
any changes for 3.7 version?

ringleader
06-01-2008, 05:01 PM
I haven't a clue, redraider. I haven't upgraded my boards yet.

Since it doesn't use form tokens, it will work in versions up to 3.6.10

Let me know if you see any problems with it, will you?

MessiAz
06-13-2008, 06:05 PM
i would like to see a 3.7.1 version
thank you

fariborz
06-24-2008, 12:12 AM
I installed in 3.7.1 PL2
I have not any problem with this product, just can't send any email to users.

I like to to see your updates.
Thanks

stamos2003
06-25-2008, 02:06 PM
awesome, I will give it a try!

Konstantinos
07-19-2008, 07:33 AM
* Email text always includes the expiry date of the subscription (hardcoded).
* Email text always includes a link to the members' profile. how do we include this in pm too

Konstantinos
08-02-2008, 05:59 AM
I installed in 3.7.1 PL2
I have not any problem with this product, just can't send any email to users.


well if this is not a problem than what whould be ? :D

MrEyes
08-08-2008, 10:09 AM
I have installed this on my 3.7.2 test forum and everything seems to work as intended which is great.

However, I have noticed a quirk....

If an admin goes to ACP Paid Sub Manager and edits an existing user subscription then a PM is also sent to the user. Is there anyway to stop this from happening?

And, I have a couple of suggestions....

It would be great to have replacement variables in the PM text, for example:


Hello {UserName}

Thanks for subscribing to {PaidSubName}, I can confirm that we have received your payment of {PaidSubAmount} and your account has now been upgraded


So this would be received as



Hello JohnDoe

Thanks for subscribing to The Greatest Subscription on Earth, I can confirm that we have received your payment of ?1,000,000 and your account has now been upgraded


Another suggestion, which I am sure many people will really appreciate is the ability to run custom SQL calls on subscription. As a silly example, buying a paid sub increases your post count by 100 and gives you 1000 in casino money (see Casino mod here on vb.org) So you would define additional SQL as:


update user set posts = posts + 100 where userid = {userid}
update user set casino_cash = casino_cash + 1000 where userid = {userid}


And finally, another suggestion - have the ability to exclude usergroups/userid from receiving the PM

EDIT: Note to self, read the entire mod description before wading in with a "quirk report" ;) However having the ability to exclude userid from the PM could prevent this. So if an admin is making a sub edit they temporarily add the userid into exclusions, make the edit and then remove it.

EDIT 2: If for whatever reason you do not want to make these changes do you mind if I take the current mod code base and extend it to perform these functions?

ringleader
08-13-2008, 08:11 PM
Hey guys, I've been reading the posts and keeping up with the suggestions and such on this thread, but I've been snowed under with work for the past while (new job and all that jazz).

I will be free in about 2 weeks to begin working on this again immediately. Thanks for supporting the mod! Apologies for not getting the time to respond earlier.

fariborz
08-18-2008, 11:35 AM
I'm using vBulletin 3.7.2 PL2, and i'm moving my second DataBase to other server.
After that your problem is not worked for me!!
and after add paid i received this error:

FATAL ERROR

Unable to proceed with save while $errors array is not empty in class vB_DataManager_PM in [path]/includes/class_dm.php on line 810
#0 vb_error_handler(256,

===================

What can i do now?

kafi
09-11-2008, 09:10 AM
Some of my users got PM and Email although I havent updated or changed their subscriptions.
The time when messages was sent gives me hint that this happen somehow along with subscription script reminder.

Is that possible? What really trigger these mesages in this add-on?

fariborz
09-15-2008, 12:25 AM
please update this plugin, i so need to using this :(

nocturnix
12-07-2008, 01:29 PM
I would love to see an update too!

stamos2003
01-29-2009, 01:49 PM
what about an option for sending PMs on subscription end? ;)

Deyth
03-20-2009, 11:30 PM
I'd love to see a version working on 3.8.x. I'm surprised this isn't built into vBulletin.

siveriano
05-27-2009, 05:37 PM
I'm all about this mod and wish it could get updated. There seems to be a few quirks with v3.7.x and probably needs work done for v3.8.x also. I really wish I was a coder and understood php.

I'd love to send a pm or email to new subscribers saying thank you and also outlining further instructions and perks that come with the subscriptions.

Raul7
08-02-2009, 07:09 AM
I'd love to see a version working on 3.8.x. I'm surprised this isn't built into vBulletin.

same here !
appreciate it

sheep92032
08-02-2009, 10:07 PM
same here !
appreciate it

I +1 that

SVTCobraLTD
11-02-2009, 08:57 PM
So this does not work on 3.8.x yet?

choccyclaire
12-25-2009, 08:17 PM
Has anyone tested this on 3.8?

MagicThemeParks
01-07-2010, 12:18 AM
Anyone get this working on 3.8 yet? Has anyone tried it?

Gorgias
02-26-2010, 05:21 PM
I have just test the hack in vB 3.8.4 and it works perfectly! Both notifications, email and private message, arrives correctly. I have my forum in Spanish, so the only change I have to do, is translate several phrases. But no more modifications are need. Really, an excelent and useful hack!

Kyoshokid
08-02-2010, 04:00 PM
I dunno if this will bump this thread but, works perfectly on 4.0.5.

cgrafx
09-08-2010, 08:50 PM
I've had this installed in one of my forums (3.7.4) for over a year now...without any obvious problems.

I just added Authorize.net as a payment API, and couldn't get it to work until I disabled this plug-in.

Just an FYI.

imranbaig
09-16-2010, 11:18 PM
Can we have a 4.X supported version please.

Ramsesx
11-19-2011, 04:43 PM
To bad I've seen this too late, would have saved me a lot of time. Thanks. (Works perfect on 3.8.7)

Big-Pete
07-04-2012, 11:18 AM
Anything similar to this for vB4.2??

Prorockz
10-15-2012, 11:35 PM
Awasome Plugin.

Installed and Working perfectly with my vBulletin 3.8.7.

Jon12345
08-08-2013, 01:06 PM
I have installed this plugin on my forum now and set up all the emails and private messages. Is there any way to test that it will send a message and what it will look out without me having to actually buy a subscription off my self via paypal?

[Great plugin by the way. This feature should have been included in vbulletin by default. I am amazed it was not.]

ANTIViRTUS
09-14-2013, 12:34 PM
Works with vBulletin 4.2?

Ravallojr
09-06-2014, 05:51 AM
is there one for 4.2.2?