vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Disable paid subscription email reminder (https://vborg.vbsupport.ru/showthread.php?t=278556)

Danny-E 02-14-2012 11:16 AM

Disable paid subscription email reminder
 
I want to disable email reminders for paid subscriptions.

I know I need to edit (./includes/cron/subscriptions.php) but don't know what to remove and what to keep.

Please can someone tell me what would need removing.
Thanks

kh99 02-15-2012 02:56 PM

I think you want to comment out a block of code like this:


PHP Code:

    // time for the reminders
/*
    $subscriptions_reminders = $vbulletin->db->query_read("
        SELECT subscriptionlog.subscriptionid, subscriptionlog.userid, subscriptionlog.expirydate, user.username, user.email, user.languageid
        FROM " . TABLE_PREFIX . "subscriptionlog AS subscriptionlog
....
    }
    vbmail_end();
*/
    
($hook vBulletinHook::fetch_hook('cron_script_subscriptions')) ? eval($hook) : false


(I didn't show the complete block, just where to put the comment start/end).

scottelkin 08-24-2012 06:06 PM

Thank you for this! I have been wanting to do this for a long, long time!

Jennifer2010 10-12-2012 08:41 PM

Thanks kh99!

KC WEIRDWOLF 04-10-2018 07:54 PM

This is my code. How much of this do I comment out?

// time for the reminders
$subscriptions_reminders = vB::getDbAssertor()->assertQuery('getSubscriptionsReminders', array('time1' => vB::getRequest()->getTimeNow() + (86400 * 2), 'time2' => vB::getRequest()->getTimeNow() + (86400 * 3)));

vB_Mail::vbmailStart();
foreach ($subscriptions_reminders as $subscriptions_reminder)
{
$phraseAux = vB_Api::instanceInternal('phrase')->fetch(array('sub' . $subscriptions_reminder['subscriptionid'] . '_title', 'subscription'));
$subscription_title = $phraseAux['sub' . $subscriptions_reminder['subscriptionid'] . '_title'];

$username = unhtmlspecialchars($subscriptions_reminder['username']);
$maildata = vB_Api::instanceInternal('phrase')
->fetchEmailPhrases('paidsubscription_reminder', array($username, $subscription_title, $vbulletin->options['bburl'], $vbulletin->options['bbtitle']), array(), $subscriptions_reminder['languageid']);
vB_Mail::vbmail($subscriptions_reminder['email'], $maildata['subject'], $maildata['message']);
}
vB_Mail::vbmailEnd();

// Legacy Hook 'cron_script_subscriptions' Removed //
}

log_cron_action('', $nextitem, 1);

snakes1100 04-11-2018 07:13 AM

from /* $subscriptions_reminders to vB_Mail::vbmailEnd(); */


All times are GMT. The time now is 06:49 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.01027 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete