vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Mini Mods - Email Reminder for inactive users (https://vborg.vbsupport.ru/showthread.php?t=264268)

TalkVirginia 05-26-2011 10:00 PM

Email Reminder for inactive users
 
1 Attachment(s)
Like others before me, I've been using this mod quite a while on previous versions of vBulletin. Since updates and support for older versions had stopped, I figured I would make my own modifications and help others that have enjoyed it as well. I want to add back in some of the previous functionality that has been left out as well as add some new functionality. This mod for the most part picks up where the 3.7.x version leaves off.

What does it do?
=====================================
This mod will send out reminder emails to inactive members to encourage them to come back to your site. This is now only based on member's last activity date.

*** See Updates section below for new feature list per release. ***

IF YOU HAVE QUESTIONS OR PROBLEMS WITH THE ADDON, PLEASE LET ME KNOW.

PLEASE DON'T FORGET TO CLICK THE INSTALLED LINK AND DON'T FORGET TO NOMINATE MOTM!!
THANK YOU!!

Features
The following features are updatable through the AdminCP.
=====================================
* Turn Product on/off.

* Set the number of days a user can be inactive (grace period) before email is sent.
Example: Inactivity Graceperiod is set for 60 days. On day 61, member Bob will begin receiving reminder emails.

* Send Email Once.
If this is set, when members become inactive they will receive one reminder only.

* Set how often an reminder email is sent after an inactive member has received their first reminder.
Example: Inactivity Grace period is set for 60 days, and Reminder Email frequency is set for 30 days. On day 61, member Bob will receive his first reminder email letting him know he has been inactive for over 60 days asking him to come back to see your new content. If Bob, continues to be inactive, Bob will receive reminder emails based on the number of days you have the email frequency set to. If set to 30 days, members will receive reminders every 30 days after their first reminder.

* Set reminder email format - TEXT or HTML.

* Set the reminder email subject. (phrased)

* Set the reminder email body. (phrased)

* Set the usergroups to be sent a reminder email.

* Set Userids to exclude.

* Edit number of emails send totally (Max Reminders)
Example: If the Send Once option is set to false, and this option is set to 50. Inactive members will only receive 50 reminders.

* Keep a log of all inactive users contacted

* Opt-Out Feature for members - Include an opt-out link in reminder email. (Thanks to Gene Steinberg)

Install Instructions
--------------------------
1. Upload file in the upload folder to the forums folder on your server.

2. In your AdminCP:
a. Go to Plugs & Products -> Product Manager -> Add New Product.
c. Import the product xml from the zip file. (make sure to use overwrite)
3. The mod is disabled by default on install so you will need to enable it. Go to Vbulletin "Settings" -> Options -> Inactivity Reminder Emails.

4. Settings and the inactivity log viewer are also available on the left menu just above the users settings group.

5 Mark as Installed

6 Please Nominate for MOTM

=======================================
Update 2.1.5 - Initial Release for VB 3.8.x

Credits & Previous Updates
======================================
Updates and fixes that have been carried over from version 1.1.3 can be found at the link below.
https://vborg.vbsupport.ru/showthread.php?t=180025&highlight=email+reminder

I also want to give full credit and thanks to the developers of the previous versions 1.0.6 to 1.1.3 from which this was derived:

C Braithwaite
robertjandreu

PLEASE DON'T FORGET TO CLICK THE INSTALLED LINK.

TalkVirginia 05-27-2011 02:28 AM

Inactive User Reminder Emails Tutorial

This is a sort of intro tutorial on this mod. If you have further questions, haven't made something clear, please let me know and I'll add it to this write up.

Inactive Reminders Menu Group
First up, as you can see from this screen, you can find the settings in it's own menu group just above the vBulletin Users menu group. You can also find it by going to the vBulletin "Settings" menu group at the top.


How does processing occur?
This mod uses an scheduled Cron Job called "Inactive User Reminder Emails" and can be found in the Scheduled Tasks Manager. When installed, it's configured to run nightly at 1:30am.

http://www.talkvirginia.net/images/r...er_cronjob.png


Enabling the mod
This mod is disabled by default on first-time install. If you are upgrading from a previous version, you should still make sure it's enabled. In addition, you should do a save even if no settings are changed to save settings for any new features.

http://www.talkvirginia.net/images/r...der_enable.png


Batch Processing
This comes into play if you have a large site and don't want to overwhelm your host with 20k or more worth reminder emails sent at one time. This feature will allow you to set the amount of reminders sent out during each scheduled cron job

http://www.talkvirginia.net/images/r...nder_batch.png


Send Reminder Emails Once Only
If you want to send out reminders only one time to your members after they have become inactive, you can do this by setting this option to yes.

http://www.talkvirginia.net/images/r...r_sendonce.png

Maximum Email To Send
If you set the option above to No, then this option will be used. Set this to any amount greater than zero and that is all your inactive members will receive. Set it to 3, and once the counter reaches 3, no more reminders will be sent.

https://vborg.vbsupport.ru/external/2011/05/6.png


Inactivity Grace Period
This allows you to set a variable threshold or number of days before your members are consided to be inactive. I would recommend setting this to 30 days or higher. Once they have not logged in for this many days, on the following day they will start receiving reminder emails.

https://vborg.vbsupport.ru/external/2011/05/6.png

Inactivity based on Last Post *REMOVED*
[S]
If this is set to Yes, then user inactivity will be determined by the date which they last posted. Users will begin receiving reminders the day after the number of days set for Inactivity Grace Period, if they haven't posted within that amount of time. If this is set to No, then Inactivity will be based on the last time the user visited your site.
[/S]
Inactivity is now based on Last Activity Date only. If you feel that inactivity should be based on something else, please let me know what, and why and I will think about changing it but this seemed to be the most logical at the time.

http://www.talkvirginia.net/images/r...r_lastpost.png

How often should reminder emails be sent?
After users have become inactive either based on last post or their last activity on your site, reminder emails will be sent every x number of days set here. If you set this option to 7, users will receive email reminders once a week, after their initial reminder has been received, until they log in again and/or make a post.

http://www.talkvirginia.net/images/r..._frequency.png

Usergroups to receive reminder emails
This option is required. You will need to specify which Usergroup IDs are to receive inactivity reminder emails. IDs must be separated with a comma.

http://www.talkvirginia.net/images/r...usergroups.png

Exclude User IDs
If there is a user in one of the Usergroups specified above, that you do not want to receive reminder emails, you can indicate that here.

http://www.talkvirginia.net/images/r...udeuserids.png

Email Format
This option enables you to set the format that users receive reminders in, as well as the format that admins receive notification that this addon is working. You can set this to either TEXT or HTML. This will not affect other emails that are sent out through vBulletin. I have included sample reminder email content, however reminder emails use vBulletin phrases so thay can be customized as you like. You can change them by clicking on the links shown here with this option, or through the vBulletin Phrase Manager. The phases are located in the Email Subject and Email Message phrase groups. The phrases this mod installs are called inactivity_reminder_plaintext and inactivity reminder_html. They are called the same in both phrase groups. You may alter the contents of these phases however please do not change the names. You may include variables such as $username, $userid, $email, $bbtitle, $homeurl, $forumurl, and $hometitle. If you would like to include other information in your content, please let me know and I'll will look into adding it in future versions.

http://www.talkvirginia.net/images/r...mailformat.png


Enable Admin Email Report: This option gives you the choice of receiving an admin report with a list of members that were sent inactivity reminders.

Enable Logging: This will allow you to turn logging on and off. This records who have been sent reminder emails.

Inactivity Log Duration: How many days do you want to keep in the log. Each time the Cron Job runs and emails are sent out, users will recorded in the log, then any entries older than the number of days indicated here will be automatically purged.

That's about it. Any questions? Comments? Any features requests? :)

I want to thank everyone that has downloaded and is using this mod on their site. Your constructive comments, both positive and negative, give me a lot of encouragement to do more and do better.

FreshFroot 05-27-2011 06:11 AM

Thanks been waiting for awhile and this is great! :D

Hornstar 05-27-2011 08:19 AM

Yeah I might give this a go and see how it goes. A little worried what it might do to server load with having over 600 000 members.

TalkVirginia 05-27-2011 08:54 AM

Quote:

Originally Posted by Hornstar (Post 2200517)
Yeah I might give this a go and see how it goes. A little worried what it might do to server load with having over 600 000 members.

If you can find a good balance of emails to send at one time or multiple times during the day. If my math serves correct... :) example: 600000/(24*7) = 4000 emails / 24 = 166.6 per hour) You should be able to handle more than that I would think.

MagicThemeParks 05-27-2011 10:54 AM

Thanks Jim! :up:

I'll be downloading it and installing it probably this weekend :D

TalkVirginia 05-27-2011 11:29 AM

Quote:

Originally Posted by MagicThemeParks (Post 2200538)
Thanks Jim! :up:

I'll be downloading it and installing it probably this weekend :D

You're most welcome! :)

MrAd 05-27-2011 06:07 PM

Installed. thanks!

MrAd 05-27-2011 06:09 PM

Also nominated! Great mod, thanks again Jim!

MrAd 05-27-2011 06:31 PM

first Bug, I get the following Error

Fatal error: Class 'vB_Template_Runtime' not found in xxxx/public_html/admincp/inactivitylog.php on line 112

MrAd 05-27-2011 06:51 PM

one more bug, when a user want to opt himself out

Fatal error: Call to undefined function render_navbar_template() /public_html/optout-reminders.php on line 40

TalkVirginia 05-27-2011 06:56 PM

1 Attachment(s)
Quote:

Originally Posted by MrAd (Post 2200657)
first Bug, I get the following Error

Fatal error: Class 'vB_Template_Runtime' not found in xxxx/public_html/admincp/inactivitylog.php on line 112

Quote:

Originally Posted by MrAd (Post 2200662)
one more bug, when a user want to opt himself out

Fatal error: Call to undefined function render_navbar_template() /public_html/optout-reminders.php on line 40

Bah!! :) I had a feeling like I was forgetting something. Ok. Thanks for letting me know. I'll fix these tonight when I get home.

In the meantime, see if these work. I did a quick patch. ;)

MrAd 05-27-2011 07:03 PM

Quote:

Originally Posted by TalkVirginia (Post 2200664)
Bah!! :) I had a feeling like I was forgetting something. Ok. Thanks for letting me know. I'll fix these tonight when I get home.

Thank you Sir! for this great mod!

MrAd 05-27-2011 08:22 PM

bot fixes works smooth Jim,

just a quick question, how would you check if a mail is bounced or not, I know some of my members mails are not valid and eventually should return back. But it s still highlighted as green which makes me abit suspicious...

TalkVirginia 05-27-2011 10:42 PM

Quote:

Originally Posted by MrAd (Post 2200677)
bot fixes works smooth Jim,

just a quick question, how would you check if a mail is bounced or not, I know some of my members mails are not valid and eventually should return back. But it s still highlighted as green which makes me abit suspicious...

Disregard the bounce column for now. The bounce detection is not in this version and something I am working on incorporating. I have permission to add functionality that Antivirus used in his product:
EZ Bounced Email Management
https://vborg.vbsupport.ru/showthrea...nce+management

and I have permission from tamarian to incorporate similar functionality that was in:
vBouncer: reduce server load by unsubscribing bouncing members from threads
https://vborg.vbsupport.ru/showthread.php?t=83486

microbob 05-28-2011 10:48 PM

I'd like to install the 2.1.5 version of this hack on my vBulletin 3.8.4 version. Problem is that my web host is telling me that the downloaded files say for vB4 but the page here on vBulletin.org says it's OK for 3.8.x.

Which is it??? :confused:

Bob

TalkVirginia 05-28-2011 10:55 PM

Quote:

Originally Posted by microbob (Post 2201041)
I'd like to install the 2.1.5 version of this hack on my vBulletin 3.8.4 version. Problem is that my web host is telling me that the downloaded files say for vB4 but the page here on vBulletin.org says it's OK for 3.8.x.

Which is it??? :confused:

Bob

v2.1.5 under the vBulletin 3.8 mods section is fine for v3.8.4. I made a couple quick patches recently that I uploaded to this thread that you will need to drop in since I didn't get a chance to update the zip file. Drop those in and you will be good to go. :) :up:

TalkVirginia 05-28-2011 11:02 PM

1 Attachment(s)
Here are a couple fixes for the queries I missed where missed adding the condition for usergroups so it didn't matter what groups you selected in the mod settings. This was pointed out to me today on the 4.0 version.

Here's where you need to drop these files:

functions_remindermail.php => forumroot/includes folder
process_inactive_members.php => forumroot/includes/cron folder

TalkVirginia 05-28-2011 11:22 PM

The product zip file is now includes the recent bug fixes.

microbob 05-31-2011 02:10 PM

Bob here again. So at this point, and based on your response in #19, I now only have to download the zip file as it has been updated with all current fixes? Please confirm. Thanks.

TalkVirginia 06-02-2011 11:49 AM

Quote:

Originally Posted by microbob (Post 2202094)
Bob here again. So at this point, and based on your response in #19, I now only have to download the zip file as it has been updated with all current fixes? Please confirm. Thanks.

Yes. you should download the zip. It has all the updated files. If you have made any changes to the email templates(phrases) you should back them up before updating otherwise dropping the files in place should be fine.

FIM 06-02-2011 06:51 PM

thanks man

TalkVirginia 06-02-2011 07:00 PM

Quote:

Originally Posted by FIM (Post 2202796)
thanks man

Sure thing! Let me know if you have questions.

microbob 06-14-2011 02:30 PM

Jim,

Installed your hack via vBulletin V3.8.4 PL2. The hack itself is actually located under my vB Options. I put something together (in terms of a message for the inactive members) and saved it. Is that it? Do I have to do anything else?

Something else that I noticed is that there is no new, drop-down menu for the reports which are mentioned in your attachment materials.

Not sure where I'm supposed to get the activity/inactivity reports?

Please help.

Bob

TalkVirginia 06-19-2011 05:35 PM

1 Attachment(s)
Quote:

Originally Posted by microbob (Post 2207635)
Jim,

Installed your hack via vBulletin V3.8.4 PL2. The hack itself is actually located under my vB Options. I put something together (in terms of a message for the inactive members) and saved it. Is that it? Do I have to do anything else?

Something else that I noticed is that there is no new, drop-down menu for the reports which are mentioned in your attachment materials.

Not sure where I'm supposed to get the activity/inactivity reports?

Please help.

Bob

It should work fine for v3.8.4. I've tested it on 3.8.6. Settings screen does appear under Vb Options, however make sure you upload the cpnav_remindermail.xml file to your xml folder under your forum's include folder. (example: <forumroot>\includes\xml ), then refresh your admincp page and it will be right above the users menu on the left as shown in the attachment below. The only feature in the way of reports this mod has is an Inactivity log viewer.

One thing I strongly recommend is that if you have had a previous version of this addon installed (that was written by someone else). You must uninstall it, remove any files that came with the previous addon, then reinstall this addon. If you don't, there is a great chance that any files left from the previous addon will conflict and this addon will not work correctly.

You can find the email templates by going to the addon settings. There is a link there to modify the subject and the email body. Your forum must be in DEBUG mode in order to modify the base version. You can only translate them when in non-debug mode.

Let me know if you have more questions,

Jim

Shaheen 07-12-2011 02:55 PM

Thanks for the mod

Shaheen 07-12-2011 03:45 PM

i am getting error when i check inactivity log --- > click on username and on top i get this error
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/admincp/user.php(545) : eval()'d code on line 29

i dono why any idea?

tandy 07-14-2011 02:53 AM

I have the same problem at the same place.

tandy 07-14-2011 09:50 AM

In the inactivity log viewer the userid is 0.

TalkVirginia 07-14-2011 12:02 PM

Thanks. I'll take a look at this as soon as I can, probably this weekend.

blackberry 07-15-2011 03:48 PM

it shows userid 0 for all users??

TalkVirginia 07-15-2011 05:06 PM

Quote:

Originally Posted by blackberry (Post 2220883)
it shows userid 0 for all users??

Yes, it's only in the inactivity log. I will fix that tonight.

tandy 07-18-2011 06:21 AM

Quote:

Originally Posted by TalkVirginia (Post 2220916)
Yes, it's only in the inactivity log. I will fix that tonight.

Is it a good idea to wait for a new revision?

waynne 07-19-2011 05:58 AM

Would it be possible to add a "consider user 'Dead' option at..." So when they haven't logged in for 365 days we stop sending them reminder emails.

Also I have 2 questions.

1) If I install this I presume it will then email all my inactive users, some of these are over 5 years old and inactive and this will certainly get me flagged up as a spammer as there email addresses are probably inactive. Can I exclude users that have not been recently active ie in the last year or two? Is there a MYSQL statement I can run for example to set them to "not receive reminder emails".

2) If I set the reminder emails to 10 - does this mean that the user will only get 10 reminder emails ever or does the counter reset when they become active again?

Ideally I'd like to email a reminder out at 30, 90, 120 and 365 days each time someone goes inactive, can this be done? After this period I don't think the user is coming back to me.

I look forward to the bounce handling option.

microbob 07-21-2011 07:13 PM

Jim,

I'm s-t-i-l-l trying to get your hack installed on V3.8.5 (although planning on upgrade to 3.8.7 soon for security purposes). Everything is up in the Admin CP with the exception of the drop down menu on the left illustrated here:

https://vborg.vbsupport.ru/attachmen...6&d=1308509227

Note: /includes/xml/cpnav_remindermail.xml is as instructed but when I refresh, there is no dropdown menu showing up.

I'm not sure about the sequence of activities (regarding DEBUG MODE) to get this wrapped up and actually working. I have the following questions:


-I have a file sitting in my cPanel public FTP root: optout-reminders.php. Where does this belong?
-When should the the missing menu appear in the AdminCP?
-After I modify the subject and body of the e-mail template?
-Is this [below] the sequence of events to do that?
-Can I get all (3) things done in one shot?

1) Add the following line to config.php located in /includes to enter into DEBUG mode:

$config['Misc']['debug'] = 1;

2) Change the subject and body of the e-mail template to my individualized message

3) Save the Subject and Body

4) Go back into the config.php located in /includes and remove $config['Misc']['debug'] = 1;

5) Click on "Yes" on "Enable Product?":

6) Save

Is that all that's required?confused:

Please help.

Bob

TalkVirginia 07-21-2011 07:32 PM

Quote:

Originally Posted by waynne (Post 2222319)
Would it be possible to add a "consider user 'Dead' option at..." So when they haven't logged in for 365 days we stop sending them reminder emails.

Also I have 2 questions.

1) If I install this I presume it will then email all my inactive users, some of these are over 5 years old and inactive and this will certainly get me flagged up as a spammer as there email addresses are probably inactive. Can I exclude users that have not been recently active ie in the last year or two? Is there a MYSQL statement I can run for example to set them to "not receive reminder emails".

2) If I set the reminder emails to 10 - does this mean that the user will only get 10 reminder emails ever or does the counter reset when they become active again?

Ideally I'd like to email a reminder out at 30, 90, 120 and 365 days each time someone goes inactive, can this be done? After this period I don't think the user is coming back to me.

I look forward to the bounce handling option.

I am working on resolving these issues.. I've just been limited on time to go around. Some of this I've already resolved in the 4.0 version I just need to add it to the 3.8.x version.

TalkVirginia 07-21-2011 07:37 PM

Quote:

Originally Posted by microbob (Post 2223322)
Jim,

I'm s-t-i-l-l trying to get your hack installed on V3.8.5 (although planning on upgrade to 3.8.7 soon for security purposes). Everything is up in the Admin CP with the exception of the drop down menu on the left illustrated here:

https://vborg.vbsupport.ru/attachmen...6&d=1308509227

Note: /includes/xml/cpnav_remindermail.xml is as instructed but when I refresh, there is no dropdown menu showing up.

I'm not sure about the sequence of activities (regarding DEBUG MODE) to get this wrapped up and actually working. I have the following questions:


-I have a file sitting in my cPanel public FTP root: optout-reminders.php. Where does this belong?
-When should the the missing menu appear in the AdminCP?
-After I modify the subject and body of the e-mail template?
-Is this [below] the sequence of events to do that?
-Can I get all (3) things done in one shot?

1) Add the following line to config.php located in /includes to enter into DEBUG mode:

$config['Misc']['debug'] = 1;

2) Change the subject and body of the e-mail template to my individualized message

3) Save the Subject and Body

4) Go back into the config.php located in /includes and remove $config['Misc']['debug'] = 1;

5) Click on "Yes" on "Enable Product?":

6) Save

Is that all that's required?confused:

Please help.

Bob

Sorry Bob, that sequence of events doesn't apply to the left side menu. It sounds like you may have 2 separate versions competing with each other possibly. Please make sure you don't have an old cpnav_remindermail file by chance. Compare with the one in the zip file. If it's in there it should work.

microbob 07-21-2011 11:33 PM

Please attach the updated file here so I can download and overwrite the one that in there now.

Also, where does this file go? optout-reminders.php

It's sitting in my FTP folder and I know that's not where it belongs. Maybe that's the cause?

Please advise.
Bob

TalkVirginia 07-21-2011 11:47 PM

Quote:

Originally Posted by microbob (Post 2223389)
Please attach the updated file here so I can download and overwrite the one that in there now.

Also, where does this file go? optout-reminders.php

It's sitting in my FTP folder and I know that's not where it belongs. Maybe that's the cause?

Please advise.
Bob

I haven't updated anything yet.

The optout-reminders.php file goes in your forum root folder.

microbob 07-22-2011 12:52 AM

OK Jim...I seem to have gotten everything straightened out with the help of my web host. Got the drop down menu installed after reloading the product install file and moving "optout-reminders.php" as recommended.

Now, I would like to test this out on my board which currently has about 875 registered members and a lot of inactive users. How do I get it to send out the reminder e-mail NOW, and then reset it afterward, so I can see the inactivity log? What settings do I apply to have it send the message out tomorrow [Friday]?

Thanks again.
Bob


All times are GMT. The time now is 07:14 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.01716 seconds
  • Memory Usage 1,896KB
  • 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
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete