vb.org Archive

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

TalkVirginia 05-26-2011 02:22 AM

I've decided to make things a bit easier with the mod so I'm planning on stripping out the logic that will base inactivity on last post and last visit. I'll be basing inactivity on last activity.

doobiefillin 05-26-2011 07:56 PM

Quote:

Originally Posted by TalkVirginia (Post 2197992)
Thank you for the info - I'll look into this and post a fix as soon as I can.

EDIT: AH, Ok.. I see the problem. If you don't mind and feel like you can make the change yourself. Here's how you can do it.

1. Open the <forum>\includes\functions_remindermail.php
2. Find:

Lines 91 and 212.
PHP Code:

"SET rmEmailDate = UNIX_TIMESTAMP(), "

3. Remove the comma at the end of TIMESTAMP() on both lines.

4. Save the file and you should be good to go.

If you decide you don't want to edit it yourself, I've attached a fixed file to this post. Just drop it in your forum includes folder.

Let me know if you have any other issues.

Thanks,
Jim

just uploaded the file, will let you know how it goes. thanks!

TalkVirginia 05-27-2011 03:23 AM

Uploaded a new version with the following changes/additions:

UpDate 2.2.0
=================
  • Removed logic to base inactivity on Last Post or Last Visit date. Inactivity is now based on Last Activity Date.
  • Removed option to select what to base inactivity on from the mod settings screen.
  • Fixed a couple typos in SQL update queries.
  • Exporting the following additional values which can be used in reminder email templates if desired:
    • $lastvisit - Formatted Date/Time Value - members last visit to the site.
    • $lastactivity - Formatted Date/Time Value - members last activity on the site.
    • $lastpost - Formatted Date/Time Value - members last post date on the site.
    • $lastreminder - Formatted Date/Time Value - Date member was sent last reminder email.
    • $days_since_lastpost - Number of days since member last posted.
    • $days_since_lastreminder - Number of days since last reminder was sent.
Please let me know if you would like other values made available.

Gene Steinberg 05-28-2011 04:57 AM

We got one serious, serious problem with your new version.

This option:

Usergroups
Which usergroups do you want to monitor for inactivity?

It doesn't work. I've been manually moving bounced messages to another usergroup, since you don't seem to have a proper bounce management system. But that group, although not checked, was sent email anyway. So suddenly I've got hundreds of bounces.

Ouch.

The only group that I checked is Registered Users, by the way.

You gotta fix that one ASAP, and then handle bounce management somehow, such as automatically moving bounced messages to a different usergroup.

Peace,
Gene

P.S. I'm curious about your paranormal research since I happen to host a nationally syndicated radio show, The Paracast, which covers the subject. :)

TalkVirginia 05-28-2011 07:47 AM

Ok will jump on fixing that now. Thanks.

As far as the paranormal research goes... what would you like to know?

TalkVirginia 05-28-2011 09:17 AM

1 Attachment(s)
Ok.. give these a whirl. :) This should fix the monitored usergroups issue.


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


Please let me know if you run into anything else. Thanks

Gene Steinberg 05-28-2011 02:06 PM

Thanks.

As to the paranormal stuff, I suppose we can take that to my forum. :)

Peace,
Gene

Stefan118 05-29-2011 10:50 PM

1 Attachment(s)
I have given this mod another try with the newest update. (2.2.0)

Regarding the problem I had...
Could it be an old bug?
I have read all the posts of this mod, and found 2 other people who had the same problem.
https://vborg.vbsupport.ru/showpost....&postcount=194
https://vborg.vbsupport.ru/showpost....&postcount=296

I also have a question.
I have set the "Only send once?" at Yes.

What happens if a inactive user reads the mail, decides to log in again and then in a while becomes inactive again?

Thanks,
Stefan.

P.S.
Might want to take a look at this...
All my members have ID 0?

TalkVirginia 05-29-2011 11:25 PM

Quote:

Originally Posted by Stefan118 (Post 2201436)
I have given this mod another try with the new update.

Regarding the problem I had...
Could it be an old bug?
I have read all the posts of this mod, and found 2 other people who had the same problem.
https://vborg.vbsupport.ru/showpost....&postcount=194
https://vborg.vbsupport.ru/showpost....&postcount=296

Those errors should be fixed already. Also, did you drop in these fixed files?
https://vborg.vbsupport.ru/showpost....&postcount=406

Quote:

Originally Posted by Stefan118 (Post 2201436)
I also have a question...
I have set the "Only send once?" at Yes.

What happens if a inactive user reads the mail, decides to log in again and then in a while becomes inactive again?

Thanks,
Stefan.


They would get only one email regardless. Here's why:
  • If only sending once
    • Get members that have been inactive and have never received a inactive reminder.
  • else (Send emails more than once based on the following criteria)
    • Get members who have become inactive and have never received a reminder.
    • Get members who have been inactive and have not received an email since the last reminder was received. This is based on the number of days set in the frequency at which reminders go out ("How often should we send reminder email" setting.
    • SendReminders
  • If admin reminder report is enabled
    • Send Admin reminder report
That's all there is to it. Any questions? :)

In other words...

If you set the grace period for them to become inactive 60 days from their last activity date. On their 61st day they should get a reminder if they've never received one. This will set a flag so that the next time they become inactive for 60 days they won't get anymore emails if the mod is set to send only one email.

If set to send more than one.. same as above except the mod will look to see if they received an email previously.. and how many days it's been. For instances. If they have been inactive for greater than 60 days, let's say they have been inactive for 150 days and you have the "How often should we send reminder emails" setting set to 30 days, they should recieve an email every 30 days within that 150 day period which would be 2 times (150 - 61 = 89 / 30 = 2.966).

Make sense?

Stefan118 05-29-2011 11:31 PM

Ok, thank you.

I did also upload the 2 modified files.

I modified my last post... you were just ahead of me with posting.

Whow...
Not only the ID is 0...
When I click their names, all the data is gone!!!

TalkVirginia 05-29-2011 11:45 PM

Quote:

Originally Posted by Stefan118 (Post 2201450)
Ok, thank you.

I did also upload the 2 modified files.

I modified my last post... you were just ahead of me with posting.

Whow...
Not only the ID is 0...
When I click their names, all the data is gone!!!

Sorry I was adding a bit more of an example. :)

Ok.. need to give more info.. I don't know what ID you're referring to. What names are you clicking?

Stefan118 05-29-2011 11:48 PM

I added a thumbnail 4 posts up...

The data of the usernames is gone when I click them in the reminder mail log.

Edit:

Pfffff, luckely when i do a search of the email address, all the data of the user shows up.
So only when I click on their names in the log, I get an empty user info.
Exactly the same as when i manualy should add an user. That field I get.

TalkVirginia 05-30-2011 12:02 AM

1 Attachment(s)
Quote:

Originally Posted by Stefan118 (Post 2201458)
I added a thumbnail 4 posts up...

The data of the usernames is gone when I click them in the reminder mail log.

Edit:

Pfffff, luckely when i do a search of the email address, all the data of the user shows up.
So only when I click on their names in the log, I get an empty user info.
Exactly the same as when i manualy should add an user. That field I get.

Easy fix... replace this file. upload and overwrite the existing one in your includes folder.

Originially I was doing a "SELECT * .... " in my queries... but I changed it to grab specific fields and forgot about the userid. Thank you for pointing that out. :)

I'll update the zip file now.

Alan_SP 05-30-2011 12:05 AM

Quote:

Originally Posted by TalkVirginia (Post 2201449)
If you set the grace period for them to become inactive 60 days from their last activity date. On their 61st day they should get a reminder if they've never received one. This will set a flag so that the next time they become inactive for 60 days they won't get anymore emails if the mod is set to send only one email.

If set to send more than one.. same as above except the mod will look to see if they received an email previously.. and how many days it's been. For instances. If they have been inactive for greater than 60 days, let's say they have been inactive for 150 days and you have the "How often should we send reminder emails" setting set to 30 days, they should recieve an email every 30 days within that 150 day period which would be 2 times (150 - 61 = 89 / 30 = 2.966).

If I understand correctly, mod will send only one email. Even if they return and become inactive again. Can you change this behavior? I'd like that this settings mean that my users are bothered whenever they become inactive after certain period of time I define.

If they come back, they are active. After some time they may become inactive and I want them to remind again.

Stefan118 05-30-2011 12:12 AM

I uploaded the new file...
However, the ID's still are 0, and still no data when I click names.
I even logged out and logged back in.

Anyway...
To improve this mod..

Maybee you can add this in a next update?

A member is inactive for 60 days.
He'll be send an email on day 61.
Member becomes active again.
---------
Member becomes inactive again after several months.
Member gets a reminder again.

That was what I ment a few posts ago.
I only want to send a member 1 reminder mail when they become inactive(I want to bother my members as less as possible)

TalkVirginia 05-30-2011 12:35 AM

1 Attachment(s)
Inactivity Log Bug:

When you go to prune the inactivity log, it can not find the
"pruned_inactivitylog_successfully" phrase. In addition, it is unable to locate the redirect page.

This has been fixed in the attached file. Upload the attached file to your AdminCP folder and overwrite. I'll update the product and update the zip in a later release.

To fix the phrase issue manually do this:

Note: It may be necessary to place your site in debug mode for this.

1: Go to Languages & Phrases....
2: Search in Phrases...
3: In the search form, leave all fields at there default except the following:

Search for Text: pruned_inactivitylog_successfully

Search in... Phrase Text and Phrase Variable Name

Click "Find"...

Click Edit in the Phrase Search Results

In the Phrase edit form, change the Phrase Type to "Error Messages".

Leave all other fields as they are.

Click "Save"

If you placed your site in debug mode, take your site out of debug mode now.

You're done.

Stefan118 05-30-2011 12:57 AM

Well done.
I uploaded (overwritten) the inactivitylog.php with the new file...

Pruned the log, and have send 10 mails again...

Thanks,
You fixed it! :up:

TalkVirginia 05-30-2011 04:09 AM

Quote:

Originally Posted by Stefan118 (Post 2201495)
Well done.
I uploaded (overwritten) the inactivitylog.php with the new file...

Pruned the log, and have send 10 mails again...

Thanks,
You fixed it! :up:

Good to hear! :) Now on to the next feature set. ;) Detect bouncing emails :up:

TalkVirginia 05-30-2011 11:28 AM

Quote:

Originally Posted by Alan_SP (Post 2201466)
If I understand correctly, mod will send only one email. Even if they return and become inactive again. Can you change this behavior? I'd like that this settings mean that my users are bothered whenever they become inactive after certain period of time I define.

If they come back, they are active. After some time they may become inactive and I want them to remind again.

Hi Alan,

You have the option to set the mod to send either a single reminder or if you want, you can send multiple reminders. There is also the option to set a maximum limit of reminders. For instance, you only want to send 20 reminders, and they member will not receive anymore after they get the 20th reminder. If the member becomes active, the mod will not reset the reminder count. In addition to this, the inactivity grace period or how long should a member be away from your site to be considered inactive? Some say 30 days, others say 60 days, or maybe 90 days. To completment this setting as I've mentioned in other posts the setting to define how often an member will receive a reminder after they have become inactive.

Does this answer your question?

socialteenz 05-30-2011 12:27 PM

Thank you ;)

Installed & *****

barmen_1982 05-30-2011 12:31 PM

Thank you master

Charlie98902 05-30-2011 01:11 PM

I'm getting this error after uploading all the files then I install the product:

Code:

Warning: require_once([path]/includes/functions_remindermail.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/adminfunctions_plugin.php(931) : eval()'d code on line 2

Fatal error: require_once() [function.require]: Failed opening required '/home/dvdnextc/public_html/includes/functions_remindermail.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dvdnextc/public_html/includes/adminfunctions_plugin.php(931) : eval()'d code on line 2


Charlie98902 05-30-2011 01:20 PM

nevermind I forgot one file.

Alan_SP 05-31-2011 02:13 AM

Quote:

Originally Posted by TalkVirginia (Post 2201641)
You have the option to set the mod to send either a single reminder or if you want, you can send multiple reminders. There is also the option to set a maximum limit of reminders. For instance, you only want to send 20 reminders, and they member will not receive anymore after they get the 20th reminder. If the member becomes active, the mod will not reset the reminder count. In addition to this, the inactivity grace period or how long should a member be away from your site to be considered inactive? Some say 30 days, others say 60 days, or maybe 90 days. To completment this setting as I've mentioned in other posts the setting to define how often an member will receive a reminder after they have become inactive.

Does this answer your question?

Ok, you confirmed what I thought you said previously.

Is it possible that you program your mod that if members become active that resets reminder count completely for him?

For example, if I set sending only one mail after 30 days of inactivity, member might get back and after some time again become inactive. But, with mod made this way, second time he becomes inactive he wouldn't receive any reminder emails. This isn't good in my opinion.

I think that every inactivity period should be considered separate from all others inactivity periods and treated as such.

You have it now programmed as only one inactivity period that could be interrupted with periods of activity. And this restricts how we can use this mod very much.

If I want to send 20 reminders, I want to send 20 reminders for every inactivity period my users make, not in total for this user.

TalkVirginia 06-01-2011 12:26 AM

Quote:

Originally Posted by Alan_SP (Post 2201923)
Ok, you confirmed what I thought you said previously.

Is it possible that you program your mod that if members become active that resets reminder count completely for him?

For example, if I set sending only one mail after 30 days of inactivity, member might get back and after some time again become inactive. But, with mod made this way, second time he becomes inactive he wouldn't receive any reminder emails. This isn't good in my opinion.

I think that every inactivity period should be considered separate from all others inactivity periods and treated as such.

You have it now programmed as only one inactivity period that could be interrupted with periods of activity. And this restricts how we can use this mod very much.

If I want to send 20 reminders, I want to send 20 reminders for every inactivity period my users make, not in total for this user.

Agreed. Thank you for pointing this out and suggesting the change. I'll look into this.

CharlieDelta 06-01-2011 12:55 AM

Quote:

Originally Posted by Alan_SP (Post 2201923)
I think that every inactivity period should be considered separate from all others inactivity periods and treated as such.

If I want to send 20 reminders, I want to send 20 reminders for every inactivity period my users make, not in total for this user.

This is a must for me as well. We often have users come back upon their first inactive email and then become inactive again.

Alan_SP 06-02-2011 01:02 AM

Quote:

Originally Posted by TalkVirginia (Post 2202275)
Agreed. Thank you for pointing this out and suggesting the change. I'll look into this.

Thanks. :up:

TalkVirginia 06-02-2011 10:25 AM

1 Attachment(s)
Quote:

Originally Posted by TalkVirginia (Post 2202275)
Agreed. Thank you for pointing this out and suggesting the change. I'll look into this.

Quote:

Originally Posted by CharlieDelta (Post 2202278)
This is a must for me as well. We often have users come back upon their first inactive email and then become inactive again.

Ok here is a new plugin. It will reset returning inactive members.

1. In your admincp, go to Plugins and Products -> Download/Upload Plugins
2. Scroll to the bottom of the main screen and browse for this plugin after saving it to your hard drive.
3. click Import

Done!

This will reset the reminder mail date and reminder mail count to zero when a returning member logs in.

Let me know if you have any questions or issues. I'll update the zip file as soon as I can.

Thanks

CharlieDelta 06-02-2011 02:23 PM

Quote:

Originally Posted by TalkVirginia (Post 2202636)
Ok here is a new plugin. It will reset returning inactive members.

1. In your admincp, go to Plugins and Products -> Download/Upload Plugins
2. Scroll to the bottom of the main screen and browse for this plugin after saving it to your hard drive.
3. click Import

Done!

This will reset the reminder mail date and reminder mail count to zero when a returning member logs in.

Let me know if you have any questions or issues. I'll update the zip file as soon as I can.

Thanks

Thanks Jim.:up:
Great work as always.

cbiweb 06-03-2011 12:15 PM

Could someone please answer my question in post #396?

TalkVirginia 06-03-2011 03:05 PM

Quote:

Originally Posted by cbiweb (Post 2203042)
Could someone please answer my question in post #396?

Hi cbi,

My apologies for missing your post. If I may ask, what version of vb are you using?

Both 3.8.x and 4.x.x versions are very similar in code however the difference is in how templates are rendered. I've also fixed some bugs in the mod so I would recommend updating to the current release if you haven't already.

Things to check on test accounts:
All inactivity now is based on last activity of the member.
Make sure they are able to receive emails from the administrator.

What I did when creating a test account is set the join date to like 1/01/2000
and last activity to 1/01/2005. Again, make sure the test account is set to accept emails from the administrators, then manually run the cron task. I'm pretty sure I have the criteria locked down and working at this point if you're using the current recent. Check the recent posts I've made since there are a few patches though and an additional plugin to reset inactive members when they return.

Try that and let me know if you have any more issues or questions.

Stefan118 06-03-2011 10:04 PM

Thank you for the update!

I hope it is working, the upload was very fast, and i couldn't see what happend :D

I will test it tomorrow.

fwulfers 06-04-2011 03:33 PM

Quote:

Originally Posted by Gene Steinberg (Post 2103107)
For example, the Unsubscribe feature appears to be non-functional.

For example, I got this letter today from one of our forum members:

That member isn't the only one. When will there be a fix?

I am having the same issue and get this message when I click on the Unsubscribe link in the email:
Quote:

Our records indicate that your subscription to our mailing list has already been cancelled. Please contact an Administrator if you believe you've reached this message in error.
It seems the User ID is missing in the Unsubscribe link in the email. Could that be the problem?

http://mysite.com/optout-reminders.php?u=&e=email@mysite.com

When I view the reports in the inactivity log, ID for all users is showing up as 0.

This is an awesome mod but the Unsubscribe feature needs to work.

TalkVirginia 06-04-2011 04:50 PM

Quote:

Originally Posted by fwulfers (Post 2203447)
I am having the same issue and get this message when I click on the Unsubscribe link in the email:


It seems the User ID is missing in the Unsubscribe link in the email. Could that be the problem?

http://mysite.com/optout-reminders.p...ail@mysite.com

When I view the reports in the inactivity log, ID for all users is showing up as 0.

This is an awesome mod but the Unsubscribe feature needs to work.

hmm, I thought I fixed this. I'll check the current zip otherwise I'll post a patch and update the zip.

TalkVirginia 06-04-2011 06:48 PM

The zip file is now updated with the correct files and new plugin to reset inactive members.

TalkVirginia 06-05-2011 06:35 AM

Please let me know if there are any other issues remaining that need to be fixed. Thanks

fwulfers 06-05-2011 02:15 PM

Thanks for the quick update Jim.

The zip file has some duplicate files and folder. It looks like the older .xml product file is still in there in addition to the new file modified yesterday. May be confusing for some.

I tried to update the Product with Add/Import product, tested again but that didn't fix the problem. Do I need to install the existing product first and then install the new one? The instructions for this mod mentions this for older versions only.

Alan_SP 06-06-2011 12:20 AM

I tried to use $lastactivity variable and it doesn't show in email. :( Not to big of a problem, I'll compose mail without it, but probably other variables also don't work.

Also, some emails do get bounced back, but it's not logged. Don't know how to set this up, I'm using qmail on my server (with Plesk CP).

TalkVirginia 06-06-2011 01:27 AM

Quote:

Originally Posted by fwulfers (Post 2203839)
Thanks for the quick update Jim.

The zip file has some duplicate files and folder. It looks like the older .xml product file is still in there in addition to the new file modified yesterday. May be confusing for some.

I tried to update the Product with Add/Import product, tested again but that didn't fix the problem. Do I need to install the existing product first and then install the new one? The instructions for this mod mentions this for older versions only.

OMG!!! :mad: Sometimes I really hate Windows 7. I've updated the zip again and will upload.
Import the product XML in the zip, and upload the files in the zip. Make sure you check the "overwrite" option on the import. Also if you have made any changes to the email template phrases, please back them up first. They will be overwritten. If this doesn't seem to work, uninstall it and reimport the product xml.

Quote:

Originally Posted by Alan_SP (Post 2204078)
I tried to use $lastactivity variable and it doesn't show in email. :( Not to big of a problem, I'll compose mail without it, but probably other variables also don't work.

Also, some emails do get bounced back, but it's not logged. Don't know how to set this up, I'm using qmail on my server (with Plesk CP).

The others should work. Lastactivity wasn't being exported, so that is why. I'll add it to the last. If you want to make the edit yourself, you can do the following:

1. open the functions_remindermail.php in your forum's includes folder.
2. scroll down to line 163 and press enter to make a new line.
3. add the following line:

PHP Code:


$lastactivity 
$row['lastactivity']; 

4. Save the file and upload to your forums includes folder.

Add the variable to your email template.

As for the bounced back emails, ignore that for now. I haven't put that functionality in yet. That will be in a future release.

Alan_SP 06-06-2011 02:53 AM

Thanks, but I found some inconsistencies with actual variables and those in manual.

Here, take a look:

In manual:

Quote:

Exporting the following additional values which can be used in reminder email templates if desired:
$lastvisit - Formatted Date/Time Value - members last visit to the site.
$lastactivity - Formatted Date/Time Value - members last activity on the site.
$lastpost - Formatted Date/Time Value - members last post date on the site.
$lastreminder - Formatted Date/Time Value - Date member was sent last reminder email.
$days_since_lastpost - Number of days since member last posted.
$days_since_lastreminder - number of days since last reminder was sent.
And here's the code I see in php file:

PHP Code:

$lastvisit $row['lastvisit'];
        
$lastactivity $row['lastactivity'];
        
$lastpost $row['lastpost'];  
        
$dayssincelastactivity $row['days_since_lastactivity'];
        
$dayssincelastvisit $row['days_since_lastvisit'];
        
$dayssincelastpost $row['days_since_lastpost']; 

You don't mention $dayssincelastactivity at all, and the spelling in manual is wrong (you use _ between the words in manual). Also $lastreminder is missing in code, or is created somewhere else (didn't checked other files for it, just it's not in this php file).


All times are GMT. The time now is 05:10 AM.

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.02180 seconds
  • Memory Usage 1,901KB
  • 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_code_printable
  • (3)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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