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)

Tize. 03-28-2010 04:48 PM

I am understand you TalkVirginia.
Thank you very much for your reply and for your help.

Regards from canary Islands in Spain.
:)

TalkVirginia 03-28-2010 05:30 PM

Quote:

Originally Posted by Tize. (Post 2011717)
I am understand you TalkVirginia.
Thank you very much for your reply and for your help.

Regards from canary Islands in Spain.
:)

Great! If you have additional questions, please feel free to ask. I'm happy to help. :)

Tize. 03-28-2010 06:30 PM

Thank you very much friend, you are very kind and a great programmer.
Greetings.

Alibass 03-28-2010 10:37 PM

@TalkVirginia

Check your PM's

shyguy82 03-29-2010 01:52 AM

Quote:

Originally Posted by TalkVirginia (Post 2011429)
You're correct to a point. It's not 1 hour and 30 mins, it actually means that the cron job will run every day at 1:30 in the morning.

Based on a tutorial I checked out just to confirm my understanding. If you look at this chart, it will show that the cron job is laid out like this:

minute hour [day of month] [Month] [Day of Week]

Field Locations and Meaning:

1.Minute (0-59)
2.Hour (0-23)
3.Day of month (1-31)
4.Month (1-12, Jan, Feb, ...)
5.Day of week (0-6) 0 = Sunday, 1 = Monday, ... or Sun, Mon, etc)
6.Command to execute

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



I would strongly recommend resetting it back to process at midnight or in the early morning hours. You may want to check with your host provider and see if there is a limit to now many emails you can send at one time. I imagine it would also depend on how you have vBulletin itself configured. Do you use the mailqueue or do you send email out immediately? I haven't worked with large amounts like that before so I don't know what your hosting situation you have or what it will support. To be on the safe side till more can be determined I'd try small batches of maybe 100 - 200 then increase it by 100 or so.


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

Members get an inactivity grace period... which a site admin would set to 1 or more days. This means that a user would have to be inactive for that number of days before they would receive their first reminder email. In the example above, users would have to be inactive for 30 days. They would receive an email reminder on their 31st day.

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

Depending on what you have set in this field. If for instance you have 7, this would send out a reminder every 7 days until that user logs back in and/or posts a message.

Does this answer your questions and/or concerns? Please let me know if you have any other questions.

WOW!!!! What a detailed response, thank you SO much, now this makes sense. I've set the number of emails to be 150 for now, I have a dedicated server. I already spoke to my provider and they said, as long as your users are opt-in, this shouldn't be an issue. So I'll try this setting for a few days, see how it goes and maybe gradually increase the number of emails.

Again, thank you SO much for your response and this MOD. Rating this mod as +++++++ al the way.

By the way, do you write any mods for hire by any chance? I have a requirement and unfortunately Im not proficient in PHP, my background is .NET.

TalkVirginia 03-29-2010 04:48 AM

Quote:

Originally Posted by shyguy82 (Post 2012002)
WOW!!!! What a detailed response, thank you SO much, now this makes sense. I've set the number of emails to be 150 for now, I have a dedicated server. I already spoke to my provider and they said, as long as your users are opt-in, this shouldn't be an issue. So I'll try this setting for a few days, see how it goes and maybe gradually increase the number of emails.

Again, thank you SO much for your response and this MOD. Rating this mod as +++++++ al the way.

By the way, do you write any mods for hire by any chance? I have a requirement and unfortunately Im not proficient in PHP, my background is .NET.

You're very welcome! :) Sounds like it's all on the right track. Regarding the opt-in part, v2.1.0 defaults all users to opt-in, so they receive the initial reminder emails. If they decide they want to opt-out they can do so under General Settings in there usercp down at the bottom. Uncheck the option to receive reminder emails from administrator and they are good to go. Also, there is an unsubscribe link in the footer of the default reminder email template. There is a slight bug in it however. It says $bburl/misc.php?do=unsub&u=$userid The $bburl should be $forumurl instead. Anyway, users can click this to optout as well.

As for mods for hire, I've been interested in going that route, but shoot me a pm with your requirements, etc and I'd be happy to talk with you about it. We can go from there.

TalkVirginia 03-29-2010 07:06 AM

1 Attachment(s)
Thanks to Alibass to for pointing this out to me. An bug was found in the script that is executed during the cron job. If you have your reminder emails based on last post the script will crash due to an extra "Where" clause in the update query. An oversight on my part. I guess that is what happens when you have only had 4 hours sleep in the last couple days. If you would like to apply the fix, it's very easy to do. I'll apply the fix on my end and release an update as soon as I can.

Here the fix:

1. In your favorite text editor, open the reminderemail.php file in your forumroot/includes/cron/ folder.

2. Scroll down to line 210 where you will see this:

PHP Code:


$sql 
.= " WHERE lastactivity < '$inactivity_graceperiod' AND emailDate < '$lastemail' "

Remove the line and resave. You should be good to go at that point.

For those of you that don't feel comfortable modifying the file, I've attached a fixed file here. Just download and drop it into your cron folder overwriting the old one.

If you have any questions, or need assistance, as always feel free to ask.

Tize. 03-29-2010 07:22 AM

Item supremme!!
Works good!! 100% Fine, today i am received the eMail .

Thank you very much TalkVirginia. :) ;)

Tize. 03-29-2010 07:24 AM

Nominate!!!!

;)

TalkVirginia 03-29-2010 07:39 AM

Quote:

Originally Posted by Tize. (Post 2012105)
Nominate!!!!

;)

Thank you! :D


All times are GMT. The time now is 09:06 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.01607 seconds
  • Memory Usage 1,752KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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