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)

djbaxter 11-17-2007 08:34 PM

Quote:

Originally Posted by brvheart (Post 1384596)
Anyone help me on 3.6.8 please?

What happens when you try to install and/or run it? If you're getting an error message, what does it say?

brvheart 11-17-2007 08:59 PM

sorry, I posted it, and forgot to reference it:

https://vborg.vbsupport.ru/showpost....&postcount=945

Quote:

Originally Posted by Greivog View Post
Hello

When I install, I get the following when I run the script:

Inactive User Reminder Emails

db)) { exit; } error_reporting(E_ALL & ~E_NOTICE); if($vbulletin->options['reminder_active']){ $now = time(); $datetime = array(); $quantity = $vbulletin->options['quantity']; $datetime[lastpost] = $now - (60 * 60 * 24 * $vbulletin->options['inactivity']); $datetime[lastemail] = $now - (60 * 60 * 24 * $vbulletin->options['frequency']); $usergroups = explode(",",$vbulletin->options['usergroups']); if($vbulletin->options['reminder_posts']){ $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); } else { $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); } print("Found " . mysql_num_rows($result) . " Inactive Users.

"); while($row = $vbulletin->db->fetch_array($result)){ if(is_member_of($row, $usergroups)){ print("Sent To: $row[username]
"); $username = $row[username]; $toemail = $row[email]; $userid = $row[userid]; $bbtitle = $vbulletin->options['bbtitle']; $homeurl = $vbulletin->options['homeurl']; $forumurl = $vbulletin->options['bburl']; $hometitle = $vbulletin->options['hometitle']; eval('$message = "' . addslashes($vbulletin->options['message']) . '";'); $message = stripslashes($message); //$headers = "MIME-Version: 1.0" . "\r\nContent-type: text/html; charset=iso-8859-1" . "\r\n"; $uheaders .= "To: $username <$email>" . "\r\n"; $uheaders .= "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n"; eval('$subject = "' . addslashes($vbulletin->options['subject']) . '";'); $subject = stripslashes($subject); if($vbulletin->options['reminder_emailfooter']){ $message = $message . "Email Reminder System Provided By Mished.co.uk"; } /*if(@mail($email, $subject, $message, $headers)){ print("mailing $email (done)
"); } else { print("mailing $email (failed)
"); }*/ if(is_valid_email($toemail)){ $sentlist .= "$username "; vbmail($toemail, $subject, $message, $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = '', $username = ''); } else { $failedlist .= "$username "; } } } if($sentlist == ""){ log_cron_action("No Emails to send", $nextitem); vbmail($vbulletin->options['webmasteremail'], "Inactive User Reminder Email Report", "This email shows that the product is installed and working as it should be.\n\n\nThere were no inactive users at this time.", $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n", $username = ''); } else { log_cron_action("Emails sent to:$sentlist. We tried to email the following users, but their email address was invalid:$failedlist", $nextitem); vbmail($vbulletin->options['webmasteremail'], "Inactive User Reminder Email Report", "This email shows that the product is installed and working as it should be.\n\n\nEmails sent to:" . $sentlist . ". We tried to email the following users, but their email address was invalid:" . $failedlist . "", $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n", $username = ''); } } else { print("Product is inactive at this time!"); } ?>
Done



The script dosnt sent out any emails if i run it myself or let it run itsself.

djbaxter 11-17-2007 09:05 PM

You get all that? When? When you try to install it?

brvheart 11-17-2007 09:11 PM

When I run the cron job, that is what it shows...

And no emails are sent....

brvheart 11-19-2007 01:16 AM

fixed, well the jiberish cron page that I was getting, the email still has not sent to the test user even though it said it did

in reminderemail.php find (first line at top:

PHP Code:

<?

Change to:

PHP Code:

<?php


djbaxter 11-19-2007 01:25 AM

I'll be damned. Sharp eyes!

By the way, my apologies. I wasn't ignoring you - I didn't get a notification that you had replied to my last question. Strange, because I got the notification for your latest post. :confused:

brvheart 11-19-2007 01:42 AM

no worries :)

And it did send the email, jsut delayed, all works perfect now!!! Clicking installed :)

You might want to update the zip file ;)

djbaxter 11-19-2007 02:00 AM

Only Chris can do that but I'll add them as attachments here.

Additionally, if you use the great EZBounce add-on for invalid (bounced) emails, you will find the lines to add the EZBounce headers in the attached remindermail.php files, commented out and ready for uncommenting at lines 51-54:

Code:

// add EZBounce headers - uncomment the following if you use EZBounce
//                        $bounceurl                = $vbulletin->options['ezb_admincpurl'] . "/ezbounce.php?u=" . $userid;
//                        $bouncestring        = "<a href=\"$bounceurl\" target=\"_blank\">$bounceurl</a>";
//                        $headers .= 'X-EZbouncer: ' . $bouncestring . $delimiter;

Please note that I have uploaded the files for version 1.09 and 1.11. Before uploading these to your ./includes/cron/ folder, make sure you rename the file to simply remindermail.php for the version you have installed.

popowich 11-19-2007 10:07 AM

Quote:

From: Discuss New York <"Discuss New York"@mail.wnypoker.com>,
Discuss New York Reminder Service <fake-for-this-post@discussny.com>
To: fake-for-this-post@discussny.com
Subject: Inactive User Reminder Email Report
Hello,

I am getting duplicate from: links. Other e-mails directly from my server are OK. I have two sites with this product and only one of them has this behavior. For the Discuss New York it puts the title of my site @ the name of the mail server (it's tagged to my first domain). It's not like I'm trying to reply, but I'd like to know where it is looking or if it's on my end how to fix this. I'm also wondering if they are going out to inactive members that way or if it's just my report.

-Raymond

BadgerDog 11-19-2007 10:28 AM

Quote:

Originally Posted by djbaxter (Post 1385279)
I'll be damned. Sharp eyes!

I'm a little confused.... :confused:


I'm running v1.09 without any problems on v3.6.7pl1 of vBulletin....

My reminder.php says this on top two lines:

Code:

<?
if (!is_object($vbulletin->db))

Should I be changing it to:

Code:

<?php
if (!is_object($vbulletin->db))

Thanks ... :)

Regards,
Badger


All times are GMT. The time now is 07:27 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.01908 seconds
  • Memory Usage 1,761KB
  • 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
  • (3)bbcode_code_printable
  • (2)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