Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2005, 07:30 PM
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Posts: 645
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Forgot I Registered Hack

We all have numerous forums we've all registered on. But how many do we actually visit? How many have we forgotten about? Not that they weren't good, but we just never had anything to post at the time. Could your forum be forgotten?

How about a hack that emails users that haven't visited in X number of days a default email that could be changed. I've searched for something like this, but mainly all I found was the auto-prune users hacks. I think a lot of those users just forgot they registered.
Reply With Quote
  #2  
Old 08-25-2005, 07:39 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've released a Hack for vBulletin 3.5 that does that (although it was originally meant to prune inactive Users).
But you can use it just as a reminder too if you set the time between notification and deletion very high (eg. won't ever happen).
Reply With Quote
  #3  
Old 08-25-2005, 07:41 PM
Thug Thug is offline
 
Join Date: Feb 2004
Location: Sheffield : uk
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anything like this for
3.0.7
Reply With Quote
  #4  
Old 08-26-2005, 12:23 AM
G0F0RBR0KE G0F0RBR0KE is offline
 
Join Date: Mar 2005
Posts: 987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yea, is there a version for 3.0.0 and up
Reply With Quote
  #5  
Old 08-26-2005, 06:58 AM
SamirDarji SamirDarji is offline
 
Join Date: Apr 2004
Posts: 645
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KirbyDE
I've released a Hack for vBulletin 3.5 that does that (although it was originally meant to prune inactive Users).
But you can use it just as a reminder too if you set the time between notification and deletion very high (eg. won't ever happen).
Not a bad system. As others are asking, how hard would it be to port it to vb3? What about just porting the part that does the reminder email rather than the whole pruning thing?
Reply With Quote
  #6  
Old 08-26-2005, 06:59 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Samir, do you just want it to email users after being inactive for X ammount of days?

I wrote this up pretty quickly, so let me know how it works.
Add it to your scheduled tasks, and only have it run once a day.
PHP Code:
<?php

// #############################################################################
// Email Inactive Users
// #############################################################################

error_reporting(E_ALL & ~E_NOTICE);

// Ensure Connection
if (!is_object($DB_site))
{
    exit;
}

$days 30;
$time time();
$xdaysago $time - ((86400 * ($days 1));
$ydaysago $time - (86400 $days);  

$users $DB_site->query("
    SELECT userid, username, lastactivity, email
    FROM " 
TABLE_PREFIX "user
    WHERE lastactivity < " 
$xdaysago " AND lastactivity > " $ydaysago "
"
);

while (
$user $DB_site->fetch_array($users))
{
    
$message 'Hello ' $user['username'] . ', ';
    
$message .= "We have noticed that you havn't visited our board in over " $days " days.\n";
    
$message .= "You may ignore this email, consider it a friendly reminder that you have ";
    
$message .= "registered at our board.\n";
    
$message .= "Thank you,\n";
    
$message .= $vboptions['bbtitle'] . "\n";
    
$message .= $vboptions['homeurl'];
    
    
vbmail($user['email'], 'Inactivity Notice'$messagetrue);
    echo 
"Inactivity email successfully sent to  " $user['username'] . ".<br />";
}



?>
Reply With Quote
  #7  
Old 08-26-2005, 09:50 PM
Thug Thug is offline
 
Join Date: Feb 2004
Location: Sheffield : uk
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i got this error on that
PHP Code:

Parse error
parse errorunexpected ';' in /home/ohtwadi/public_html/forum/includes/cron/reminder.php on line 18 
what do i add for this
PHP Code:
line 18

$time 
time(); 
also how do i make it email users who have been inactive for 10days and how do i set it to run once a day
Reply With Quote
  #8  
Old 08-26-2005, 11:25 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I fixed the script above.
change the $xdaysago = and $ydaysago = lines to:
PHP Code:
$xdaysago $time - ((86400 * ($days 1));
$ydaysago $time - (86400 $days); 
to change the days before emailing them, change this line
PHP Code:
$days 30
Call it something like cron_emailinactiveusers.php and place it in ./includes/cron/, then under scheduled tasks add the file.
Reply With Quote
  #9  
Old 08-27-2005, 12:48 PM
Fallback Fallback is offline
 
Join Date: May 2005
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SirAdrian
I fixed the script above.
change the $xdaysago = and $ydaysago = lines to:
PHP Code:
$xdaysago $time - ((86400 * ($days 1));
$ydaysago $time - (86400 $days); 

I actually had to change that to the following... to get it to work...

PHP Code:
$xdaysago $time - (86400 * ($days 1));
$ydaysago $time - (86400 $days); 
Reply With Quote
  #10  
Old 08-29-2005, 11:56 AM
Thug Thug is offline
 
Join Date: Feb 2004
Location: Sheffield : uk
Posts: 783
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i did this i ran it worked fine but only emailed abt 8ppl and the ppl it mailed r active anway
how do i get it to email all those who havent been active for 1day since there last post
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:55 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.04820 seconds
  • Memory Usage 2,280KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete