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)

birdie 11-04-2007 02:10 AM

Installed 1.1.1 and set it up and got this error when went to scheduled tasks and hit run now:
Quote:

Inactive User Reminder Emails
Found 3927 Inactive Users.
Sent To: <removed name>

Fatal error: Call to a member function on a non-object in /home/po/pod/<forum name>/public/www/<forum name>/includes/class_mail.php(266) : eval()'d code on line 12
Anyone know what it means. I do note the previous posts re 1.1.1 v 1.09 ...

Phongvanlau 11-04-2007 04:44 AM

Hi,

Sorry to ask this kind of question here, please fogive me, I am new to all of this. Do have have to change this $bbtitle, $homeurl, $forumurl/login.php?do=lostpw to anything.

walidaly 11-04-2007 06:07 AM

thanks for the hack
please do not use short php tags <? instead use the default <?php
thanks again ;)

shepherdblake 11-06-2007 12:00 AM

I have this installed on vbulletin 2.6.8 SP1. It runs fine (even manually), but doesn't actually send an email.

My scheduled task log looks like this:

658 Inactive User Reminder Emails 18:48, 5th Nov 2007 Emails sent to:John Hartsel . We tried to email the following users, but their email address was invalid:

that is my test user and I know I have his email address correct. that email account is able to receive other emails from the board.

How can I start troubleshooting this?

thanks!

brvheart 11-06-2007 01:55 AM

I get the below as well on 3.6.8, I have tried both versions....can someone help me please?

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.

brvheart 11-07-2007 12:08 PM

Anyone?? This is a great mod, very useful...if I could just get it to work...

mask31 11-12-2007 12:30 PM

hi, on the email body, how do we skip lines?

when i receive the email everything is on one line, there's no line break. how do we do that?

thanks for your help

djbaxter 11-12-2007 12:52 PM

Quote:

Originally Posted by mask31 (Post 1380962)
hi, on the email body, how do we skip lines?

when i receive the email everything is on one line, there's no line break. how do we do that?

thanks for your help

Use <p> and <br> or <br /> tags to separate paragraphs and insert line breaks respectively - standard HTML.

Here's a sample:

Code:

Hello, $username!

<p>You are receiving this email because you previously registered at {name of forum} 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 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://{your forum URL}/login.php?do=lostpw">http://{your forum URL}/login.php?do=lostpw</a>.</p>

<p>You can now keep up to date with new topics at $bbtitle by subscribing to the Forum Newsletter. Click on your UserCP link (<a href="http://{your forum URL}/usercp.php">http://{your forum URL}/usercp</a>) in the top navigation bar of any forum page and select Edit Options ( <a href="http://{your forum URL}/profile.php?do=editoptions">http://{your forum URL}/profile.php?do=editoptions</a> ). Then scroll down to the Messaging & Notification section and check the box next to Subscribe to Forum Newsletter.</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://{your forum URL}/profile.php?do=editoptions">http://{your forum URL}/profile.php?do=editoptions</a> and uncheck the box next to Receive Email from Administrators.</p>

<p>Administrator<br>
<a href="http://{your forum URL}">Name of Your Forum</a><br>
http://{your forum URL}</p>


mask31 11-12-2007 01:26 PM

thanks mate :)

brvheart 11-17-2007 08:11 PM

Quote:

Originally Posted by brvheart (Post 1376716)
I get the below as well on 3.6.8, I have tried both versions....can someone help me please?

Anyone help me on 3.6.8 please?


All times are GMT. The time now is 03:52 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.02792 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
  • (1)bbcode_code_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