vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Email reminder for inactive users (https://vborg.vbsupport.ru/showthread.php?t=138946)

Iceman62 06-08-2007 02:40 PM

Quote:

Originally Posted by djbaxter (Post 1263768)
Post the error, please.

I tried both versions and got the following errors.
Quote:

1.1.1
Warning: include_once(/home/xxxxxx/public_html/forums/./includes/cron/remindermail.php) [function.include-once]: failed to open stream: No such file or directory in /admincp/cronadmin.php on line 110

Warning: include_once() [function.include]: Failed opening '/home/xxxxxxx/public_html/forums/./includes/cron/remindermail.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /admincp/cronadmin.php on line 110
Quote:

1.0.9
Warning: include_once(/home/xxxxxxx/public_html/forums/./includes/cron/remindermail.php) [function.include-once]: failed to open stream: No such file or directory in /admincp/cronadmin.php on line 110

Warning: include_once() [function.include]: Failed opening '/home/xxxxxxx/public_html/forums/./includes/cron/remindermail.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /admincp/cronadmin.php on line 110
Done
I understand what you're saying about the path. Why would it do that? :confused:

djbaxter 06-08-2007 02:46 PM

Quote:

Originally Posted by Iceman62 (Post 1264170)
I tried both versions and got the following errors.


I understand what you're saying about the path. Why would it do that? :confused:

Can you post EXACTLY what appears in the Filename text box in the scheduled task for this add-on?

Iceman62 06-08-2007 03:06 PM

Quote:

Originally Posted by djbaxter (Post 1264172)
Can you post EXACTLY what appears in the Filename text box in the scheduled task for this add-on?

It says= ./includes/cron/remindermail.php

djbaxter 06-08-2007 03:17 PM

Odd. That's what it should say.

Try this:

Code:

/forums/includes/cron/remindermail.php
If that doesn't work, try:

Code:

http://www.yoursite.com/forums/includes/cron/remindermail.php
replacing the bolded red part with your actual URL.

If that doesn't work, try:

Code:

/home/xxxxxxx/public_html/forums/includes/cron/remindermail.php
of course, replacing the "xxxxxxx" part with something meaningful.

C Braithwaite 06-08-2007 03:26 PM

Quote:

Originally Posted by djbaxter (Post 1264193)
Odd. That's what it should say.

Try this:

Code:

/forums/includes/cron/remindermail.php
If that doesn't work, try:

Code:

http://www.yoursite.com/forums/includes/cron/remindermail.php
replacing the bolded red part with your actual URL.

If that doesn't work, try:

Code:

/home/xxxxxxx/public_html/forums/includes/cron/remindermail.php
of course, replacing the "xxxxxxx" part with something meaningful.

and just to add to that, the "something meaningful" part is usually your cpanel username (on servers running cpanel anyway)

daemon_ 06-08-2007 05:54 PM

i had modified the text to be sent but the mod sent its default text :/ i hope next time it will send the new one. is this a bug or smth?

C Braithwaite 06-08-2007 06:04 PM

Quote:

Originally Posted by daemon_ (Post 1264284)
i had modified the text to be sent but the mod sent its default text :/ i hope next time it will send the new one. is this a bug or smth?

it will send out the text you set next time.

testebr 06-08-2007 09:01 PM

Thanks, version 1.0.9 work finde instead 1.1.1 :)

lebmobile 06-11-2007 08:38 AM

hello

Everything is fine and it is really the best hack that i've ever used

*How to change the Email address that is sending to the users??? thax

cheekymonk3y 06-11-2007 09:28 AM

have a little question that you probably have been asked a hundred times.
Quote:

Originally Posted by Email Frequency
How often to send a reminder email once a member has become inactive in days. Please note, this is HOW OFTEN, not TOTAL. If you enter 1 in here, your users will be reminded EVERY DAY. Try setting this to something higher such as 30 if you wish emails to be sent out less often.

If i set this option to 0, it disables it right?

C Braithwaite 06-11-2007 10:26 AM

Quote:

Originally Posted by cheekymonk3y (Post 1266104)
have a little question that you probably have been asked a hundred times.If i set this option to 0, it disables it right?

no. it will either give an error, or send emails out non stop. I forget which.

djbaxter 06-11-2007 10:48 AM

Quote:

Originally Posted by lebmobile (Post 1266083)
hello

Everything is fine and it is really the best hack that i've ever used

*How to change the Email address that is sending to the users??? thax

It uses the email address you set for your forum. Change it in basic vBulletin options.

Iceman62 06-12-2007 07:04 AM

Quote:

Originally Posted by djbaxter (Post 1264193)
Odd. That's what it should say.

Try this:

Code:

/forums/includes/cron/remindermail.php
If that doesn't work, try:

Code:

http://www.yoursite.com/forums/includes/cron/remindermail.php
replacing the bolded red part with your actual URL.

If that doesn't work, try:

Code:

/home/xxxxxxx/public_html/forums/includes/cron/remindermail.php
of course, replacing the "xxxxxxx" part with something meaningful.

I tried all those with both versions and still getting the error. :o

djbaxter 06-12-2007 10:51 AM

Contact your host and ask him why you're getting a path error.

chkdgate 06-13-2007 09:10 AM

I'm finding this mod to be the most effective tool for my forum. In just one week, I have seen almost 75-80% of my registered users come back and 20% of those who did return, posted. I swear by this and I was specially surprised to see that email reports were built into the program. This gives you so many new ways to market and strategize your forum.

C Braithwaite 06-13-2007 04:51 PM

Quote:

Originally Posted by chkdgate (Post 1267512)
I'm finding this mod to be the most effective tool for my forum. In just one week, I have seen almost 75-80% of my registered users come back and 20% of those who did return, posted. I swear by this and I was specially surprised to see that email reports were built into the program. This gives you so many new ways to market and strategize your forum.



Glad to hear it! :D

ehsanix 06-17-2007 07:52 AM

is it possible to send HTML emails to inactive users?
thianks for this great hack https://vborg.vbsupport.ru/external/2008/10/9.gif

djbaxter 06-17-2007 11:39 AM

Quote:

Originally Posted by ehsanix (Post 1270209)
is it possible to send HTML emails to inactive users?]

Yes. Use version 1.09.

bbcentral 06-17-2007 05:32 PM

Bugs I found:
1) When emailing for the first time, I had several thousand members to contact. The script stopped after 30 seconds, and I had no way to tell who had been emailed because the script sets everyone as being sent before it's actually done. No way to resume this, but not sure how to fix this either. Same thing will happen again in 30 days, because the same people will be contacted.
2) The $uheaders variable messed up the header of the email, it was from Site Title <"Site Title"> rather than Site Title <"email@site.com">. I removed this section to make it match the default vBulletin email cron scripts.

I've done some testing and I think I've managed to fix it, or at least get it to a standard that I'm personally happy with.

So my changes:
1) I add the list of sent and failed emails to an array which has the userid in it, to make it easier to troubleshoot and read when you receive the Report by email.
2) For the failed emails in the report, it shows the email address after the username. This is so you can see exactly why they failed (eg username.hotmail.com, username@email, etc).
3) I've added a quick summary at the top which tells you how many reminders were sent, how many failed, and the total number of inactive users that were found (successful+failed).
4) Made some changes to the script so it adds the emails to the queue rather than trying to send them all at once. So it may take a couple of hours to send 10,000 emails (using the CRON system), but at least the script won't fail half way.
5) Fixed the headers so now the email actually comes from the correct address. Before it was being rejected by a whole bunch of servers because the sending address was "Forum Name" instead of the email address.

I've attached my version to this post. Install the original script first, but upload my remindermail.php file into includes/cron/ instead of the default.

I'm not sure how this will work if you aren't using the mail queue, but I think it should be fine. And if you want to integrate my changes back into the original then go right ahead :)

If anyone uses my code, please don't bug the original author about it, he's not obligated to support someone else's modifications.

By the way, the Report email that I received listing 10,000 users that were emailed, it was 180KB. That's not a big problem though :)

bbcentral 06-17-2007 05:45 PM

OK, well I feel like an idiot now. My script changes didn't fix the timeout issue (the rest of it was worth doing though).

But this time I opened the vb_mailqueue table, found the last email address that was queued up. I found the userid of that account, and ran the following query:
UPDATE vb_user SET `emailDate`=0 WHERE userid>=9245
So the last 2000 accounts were set back to 0, and then I just ran the script again, this time it picked up from where it left off.

I wish there was a more elegant way of doing it, but unfortunately not without running a lot more SQL queries. And it's not a regular thing anyway.

What I might do to make it work next time is:
UPDATE vb_user SET emailDate=(YESTERDAY'S TIMESTAMP) WHERE userid<5000
UPDATE vb_user SET emailDate=(TODAY'S TIMESTAMP) WHERE userid>5000

That way 5000 members will be notified again in 29 days, and the rest (6000) will be notified in 30 days. It fails after about 9000, so this should be safe enough.
And after 37 days (1 week after the second email) I'll be pruning anyone who hasn't logged in in the last 67 days :)

djbaxter 06-17-2007 05:50 PM

Are you using 1.11?

If so, uninstall it and install 1.09.

bbcentral 06-17-2007 06:35 PM

Yeah I'm using 1.11, but now that I've made all these fixes and enhancements, and it's working perfectly, it seems pointless to revert :)

So far I've received 400 bounces, but it's definitely getting through to people. And the report is sitting in the vb_mailqueue table ready to send, once the other 9000 emails are finished.

Quote:

The Inactive User Reminder System successfully ran today.
This report contains more information.

--------------------------------

Reminders Sent: 1637
Not Sent: 0
Total Inactive: 1637

--------------------------------

Reminder Emails sent to:
11377) JoeSmith
11376) JohnDoe
11375) Member1234
etc etc etc...
I'm extremely happy with it, you have no idea how much I love this mod :D

The only thing I need now is another automated script for actually pruning the accounts.
*If you haven't logged in for the last 30 days, you'll get the reminder email.
*If you haven't logged in for the last 53 days, you'll get the reminder email again.
*If you haven't logged in for the last 60 days, and you have never posted, you'll be deleted
*If you haven't logged in for the last 60 days, and you have posted, nothing happens, except you will obviously receive an email reminder every 30 days forever, or until you request removal of your account :)

I'm thinking about customising that part of the mod anyway, so there's 2 different messages based on what the lastactivity was. "Your account will be deleted in 30 days", "Your account will be deleted in 7 days". This needs to be based on their postcount, because I won't be automatically deleting any member who has posted on the forum.

djbaxter 06-18-2007 12:52 AM

Quote:

Originally Posted by bbcentral (Post 1270468)
The only thing I need now is another automated script for actually pruning the accounts.

EZ Bounce

bbcentral 06-18-2007 08:14 AM

Quote:

Originally Posted by djbaxter (Post 1270628)

Nope, that's not what I mean. I don't want to just delete accounts who have bounced emails, I want to delete anyone who hasn't logged in for 60 days and has never made a post.
My site requires a login to download mp3s and videos, same account as the forum. So I have a lot of people who sign up, download my files and never come back. I want to email them after 30 days, then again after 60, and then if they haven't visited or posted I want to delete their account permanently. And it would need to be automated because I don't have time to login every day and manually delete anybody who hasn't logged in for a while.

I think I'll need to write this one myself, but I'm also working on an unsubscription system for my forum. Any emails (like the inactive users one) will contain an unsubscribe link to make it easier for them.

kollam003 06-18-2007 08:57 AM

Installed Thanks :)

djbaxter 06-18-2007 12:44 PM

Quote:

Originally Posted by bbcentral (Post 1270802)
Nope, that's not what I mean. I don't want to just delete accounts who have bounced emails, I want to delete anyone who hasn't logged in for 60 days and has never made a post.
My site requires a login to download mp3s and videos, same account as the forum. So I have a lot of people who sign up, download my files and never come back. I want to email them after 30 days, then again after 60, and then if they haven't visited or posted I want to delete their account permanently. And it would need to be automated because I don't have time to login every day and manually delete anybody who hasn't logged in for a while.

I think I'll need to write this one myself, but I'm also working on an unsubscription system for my forum. Any emails (like the inactive users one) will contain an unsubscribe link to make it easier for them.

1. EZ Bounce will do what you want, with a safety measure. Set up an "Bad email" group. EZ Bounce will move members with bad email addresses to that group. You can then manually inspect and delete those members, or run a simple SL query to delete members of that group.

2. You don't need to write your own add-on to do the unsubscribe thing. Customize the inactive email sent by this add-on to include instructions for unsubscribing (do this in the vBulletin options for the add-on). Here's mine:

Code:

Hello, $username!

<p>You are receiving this email because you previously registered at the YOUR FORUM NAME with the following information:</p>

<p>Member name: $username<br>
User number: $userid<br>
Email address: $email</p>

<p>It's been some time since your last visit to our FORUM community.</p>

<p>You might be interested in having another look. We have added several features and enhancements to the forums, and many new topics and new members are added every day.</p>

<p>If you don't remember your password, you can request it here: <a href="http://WWW.YOURFORUM.COM/login.php?do=lostpw">http://WWW.YOURFORUM.COM/login.php?do=lostpw</a></p>.

<p>We hope to see you back soon.</p>

<p>If you do not wish to receive further emails of this nature, please log into your UserCP at <a href="http://WWW.YOURFORUM.COM/profile.php?do=editoptions">http://WWW.YOURFORUM.COM/profile.php?do=editoptions</a> and uncheck the box next to Receive Email from Administrators.</p>


bbcentral 06-19-2007 10:47 AM

Quote:

Originally Posted by djbaxter (Post 1270939)
1. EZ Bounce will do what you want, with a safety measure. Set up an "Bad email" group. EZ Bounce will move members with bad email addresses to that group. You can then manually inspect and delete those members, or run a simple SL query to delete members of that group.

But there are more reasons why I would want to delete an account than just a bad email address, that's only a tiny fraction of the problem. I also need to delete people who have not logged in or posted in over a particular amount of time.
I had a good look at EZ Bounce, what it does and how it works, and it just doesn't suit my requirements at all, not even slightly.

Quote:

Originally Posted by djbaxter (Post 1270939)
2. You don't need to write your own add-on to do the unsubscribe thing. Customize the inactive email sent by this add-on to include instructions for unsubscribing (do this in the vBulletin options for the add-on). Here's mine:

It's a nice email, but I really want something much simpler which involves a single click to unsubscribe, like:
website.com/forum/u/?e=user@domain.com&s=hj289h238hsdkjh
That would put their account in the "PendingDeletion" usergroup, send them a confirmation email, and within 24 hours a CRON job would delete the account. They would also be able to cancel the deletion request using the same page.
It doesn't require retrieving passwords or logging in to the forum, I want it to be as simple as possible. I realise this might sound like overkill, but it would fit in with my site a lot better.
If their account has posts on the forum then it wouldn't delete it, but they'd be able to click a button to request deletion (which would simply notify me and I could do it manually for them). But that's not a big problem.

I sent out 12,000 emails to all my members the other night, and while 2000 bounced back to me, I also had a lot of people who wanted their accounts deleted. If they're not ever going to login, never going to post, and never want me to email them, then I may as well just delete them permanently and keep my database clean. The more I can automate, the less time I'll have to waste on daily maintenance.

bryanb 06-20-2007 07:06 AM

Quote:

Originally Posted by djbaxter (Post 1266147)
It uses the email address you set for your forum. Change it in basic vBulletin options.

I've had the same problem - the From: field was "the title of the forum"@myserver.net instead of the email address I use for everything else.

I don't have the SMTP Email enabled - could this be it? I've checked all the other options, and I don't see where I've missed anything.

Used it for the first time this morning, it sent out a little over 7000 emails. I'd like to see which ones bounced (or click here to get through the spam filter) :)

And a previously inactive guy started a new thread. Thanks! :up:

bbcentral 06-20-2007 07:31 AM

Quote:

Originally Posted by bryanb (Post 1272301)
I've had the same problem - the From: field was "the title of the forum"@myserver.net instead of the email address I use for everything else.

I don't have the SMTP Email enabled - could this be it? I've checked all the other options, and I don't see where I've missed anything.

Used it for the first time this morning, it sent out a little over 7000 emails. I'd like to see which ones bounced (or click here to get through the spam filter) :)

And a previously inactive guy started a new thread. Thanks! :up:

You haven't missed anything, it's a bug in the code.
I fixed it by changing line 69 in remindermail.php from this:
Code:

vbmail($toemail, $subject, $message, $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = '', $username = '');
To this:
Code:

vbmail($toemail, $subject, $message);
You don't need the headers or anything like that, even the default vBulletin email scripts in the cron folder don't add custom headers.

If I'd known that the return address was screwed I would have fixed it first before sending out my emails, but all the bounces went to nobody@server.mywebsite.com. So I had to login and forward all those emails to my other account.

My changes to the code are working perfectly, every day since I installed it I've received a summary email like this:
Quote:

The Inactive User Reminder System successfully ran today.
This report contains more information.

--------------------------------

Reminders Sent: 5
Not Sent: 0
Total Inactive: 5

--------------------------------

Reminder Emails sent to:
1951) JoeSmith
4507) JohnSmith
10715) JohnDoe
11545) MikeSmith
11562) Mike Joseph
Also have a fully working unsubscription system now, which is at a much more professional standard.
The remindermail.php script includes an unsubscribe link like this:
http://localhost/unsubscribe/?u=170&s=5a516a0923 (testing on my dev server)
'u' is their vBulletin userid, 's' is an encrypted key based on their password and salt. It won't let them login or do anything except unsubscribe.

Assuming that validates, the page will display this:
http://bbhosts.net/bluesbrothers/unsubscribe1.png
The member can then choose to unsubscribe if they wish. It simply adds their userid and timestamp to another database table, and when the unsubscribe CRON script runs it will delete the account if the timestamp is over 24 hours ago.

If they click "Delete Account", they will then see this:
http://bbhosts.net/bluesbrothers/unsubscribe2.png
If they have never made a post then the account is deleted automatically, but if they have made 1 or more posts on the forum I'd much rather do it manually myself through the AdminCP, to make sure their posts are marked as "Guest" etc. In those cases I'm working on a method to have the request emailed to me after 24 hours have passed, and to also move their account to a new usergroup.

If the UserID and encrypted Key in the URL don't match exactly, they will receive a login screen:
http://bbhosts.net/bluesbrothers/unsubscribe3.png
Although this won't actually log them in to the site, it just validates the Username and Password before redirecting back to /unsubscribe/u=$userid&s=$key

bryanb 06-20-2007 01:18 PM

Wow, thanks man. I've uploaded your php file to see what happens :)

Amman-DJ.CoM 06-22-2007 11:18 AM

Hey Man,

How i can delete this copyright ???

it makes the footer look like pig nose

i'll put ur copyright manually , just tell me how to fix this

djbaxter 06-22-2007 11:38 AM

Admin CP | vBulletin Options | Inactive Users Reminder Emails

deezelpope 06-22-2007 12:56 PM

A pig nose??? WHERE do you see that?????:confused::rolleyes: Utter nonsense.

C Braithwaite 06-22-2007 01:07 PM

lol

can be disabled in admincp options.

djbaxter 06-22-2007 01:08 PM

I have no idea what that meant either, deezelpope. I honestly cannot believe the amount of whining that people do about a simple credit to the author. And for anyone who actually bothers to read the instructions for the add-on, removing it is as easy as going into the Admin CP and checking the options. It's not rocket science.

Frankly, I think Chris has gone out of his way to be accommodating - I wouldn't have bothered.

deezelpope 06-22-2007 02:24 PM

I agree 100%! I have both enabled...the copyright and the credit...and I looked at the copyright, and I just don't get it!:mad: The way I see it, and like you said, Chris was nice enough to provide this for us, so I will GLADLY keep the copyright and credit right where they should be...PLUS, I don't think removal should even BE an option.:eek:

So, STOP the whining, PEEPS, cuz some of us grateful people are damn tired of it!:mad:

Ok, someone stick a fork in me, cuz I'm done.:rolleyes:

C Braithwaite 06-22-2007 07:22 PM

I'm just ignoring any complaints from now on - I got MOTM, so that says something about the hack doesn't it?

I had a crack at coding again today on latest version of vbulletin, but didn't get very far i'm sorry to say peeps...

deezelpope 06-23-2007 08:34 AM

Damn straight it does!:up: I agree...just ignore them.

Hey, you've nothing to be sorry for.:)

flindersredclaw 06-24-2007 09:44 AM

Thanks for the hack works well and gets the members to come back and say something lol.

One thing I noticed in the emailed report is it is all one line text so no formating at all. Says everyone it has sent an email to and it is all just bunched up. I am sure there must be a way to set the formating for this to be easier to read. Not high on the priorities though if you do have time can you please assist?

Paying it forward - thank you.

deezelpope 06-24-2007 10:07 AM

How odd...mine came formatted...have a look...

PHP Code:

<p>Hello$username!</p>
<
p>We've noticed that you've not been active on $bbtitle for quite some time now
  and 
we miss you!</p>
<
p>Could we not tempt you back?</p>
<
p>If you don't remember your password, you can request it here: <a href="$forumurl/login.php?do=lostpw">$forumurl/login.php?do=lostpw</a></p>
<p>We hope to see you soon</p>
<p>&nbsp;</p>
<p>Kindest Regards</p>
$bbtitle
<p>&nbsp;</p>
<p>If you have received this email it is because you have elected to "allow this site to contact you via email. If you would like to opt out of future contact from this site, you can change your notification options here: <a href="$forumurl/profile.php?do=editoptions">$forumurl/profile.php?do=editoptions</a> and uncheck the box next to "Receive Email from Administrators." You must be logged in to change your options.</p>
<p><a href="$homeurl">$homeurl</a></p> 



All times are GMT. The time now is 05:17 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.02507 seconds
  • Memory Usage 1,910KB
  • 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
  • (12)bbcode_code_printable
  • (1)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
  • (2)pagenav_pagelinkrel
  • (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