function __construct()
 {
     $this->ybuy_id = 0;
     $this->name = 'GetResponse';
     $this->safe_name = 'getresponse';
     $this->description = 'You can use GetResponse to Send your Newsletter!';
     $this->logo = YM_MM_GATEWAY_URL . $this->safe_name . '/gr_logo_blue_solved.png';
     $this->settings = TRUE;
     $this->option_name = 'ym_other_mm_' . $this->safe_name;
     $this->options = get_option($this->option_name);
     if (mailmanager_active_gateway() == $this->safe_name) {
         if (!$this->options->apikey) {
             // no key
             if ($_GET['mm_action'] != 'gateway') {
                 add_action('mailmanager_precontent', array($this, 'noapikey'));
             }
         } else {
             if (!$this->getresponse) {
                 if (!$this->class_construct()) {
                     ym_box_top('Error');
                     echo '<p>GetResponse Error: ' . $this->getresponse->error . '</p>';
                     ym_box_bottom();
                 }
             }
             //hooks
             if ($_GET['mm_action'] == 'welcome') {
                 add_action('mailmanager_precontent', array($this, 'welcome_sorry'));
             }
             // broadcast
             add_action('mailmanager_broadcast_precontent', array($this, 'broadcast_pre'));
             add_action('mailmanager_broadcast_create', array($this, 'broadcast_create'), 10, 5);
             // create
             add_action('mailmanager_create_form', array($this, 'create_form'), 10, 1);
             add_action('mailmanager_create_create', array($this, 'create_form'), 10, 1);
             // view
             add_action('mailmanager_view_emails', array($this, 'view_emails'), 10, 1);
             // filter
             add_filter('mailmanager_adjust_recipients', array($this, 'mm_adjust_recipients'), 10, 1);
             // series
             add_filter('mailmanager_series_replace', array($this, 'series_replace'), 10);
             // EPIC OVERRIDE
             remove_all_actions('mm_scheduled_email');
             add_action('mm_scheduled_email', array($this, 'mailmanager_go_send_email'), 10, 2);
         }
     }
 }
 function __construct()
 {
     $this->ybuy_id = 43;
     $this->name = 'Campaign Monitor';
     $this->safe_name = 'campaign_monitor';
     $this->description = 'Send beautiful email campaigns, track the results';
     $this->logo = YM_MM_GATEWAY_URL . $this->safe_name . '/campaignMonitor.png';
     $this->settings = TRUE;
     $this->option_name = 'ym_other_mm_campaign_monitor';
     $this->options = get_option($this->option_name);
     $this->construct = '';
     if (mailmanager_active_gateway() == $this->safe_name) {
         if (!$this->options->apikey) {
             add_action('mailmanager_precontent', array($this, 'noapikey'));
         } else {
             if (!$this->options->client) {
                 if (!$this->construct) {
                     if (!$this->class_construct()) {
                         ym_box_top('Error');
                         echo '<p>Error: ' . $this->construct->return . '</p>';
                         ym_box_bottom();
                     }
                 }
                 add_action('mailmanager_precontent', array($this, 'noclient'));
             } else {
                 // success
                 if (!$this->construct) {
                     if (!$this->class_construct()) {
                         ym_box_top('Error');
                         echo '<p>CM Error: ' . $this->construct->return . '</p>';
                         ym_box_bottom();
                     }
                 }
                 $this->associations = get_option($this->option_name . '_associations');
                 // hooks
                 add_filter('mailmanager_adjust_recipients', array($this, 'filter_lists_add_name'), 10, 1);
                 add_action('mailmanager_broadcast_precontent', array($this, 'broadcast_precontent'));
                 add_action('mailmanager_series_precontent', array($this, 'series_precontent'));
                 add_action('mailmanager_broadcast_create', array($this, 'broadcast_create'), 10, 5);
                 add_action('mailmanager_series_create', array($this, 'series_create'), 10, 4);
                 add_action('mailmanager_cron_check', array($this, 'sync_with_gateway'));
             }
         }
     }
 }
Exemple #3
0
 function __construct()
 {
     $this->ybuy_id = 44;
     $this->name = 'Aweber';
     $this->safe_name = 'aweber';
     $this->description = 'You can use Aweber to Syncronise your Subscribers!';
     $this->logo = YM_MM_GATEWAY_URL . $this->safe_name . '/aweber_logo.gif';
     $this->settings = TRUE;
     $this->option_name = 'ym_other_mm_aweber';
     $this->options = get_option($this->option_name);
     $this->construct = '';
     $this->aweber_id = 'c2ade626';
     if (mailmanager_active_gateway() == $this->safe_name) {
         $this->class_construct($this->options->oauth->consumer_key, $this->options->oauth->consumer_secret);
         $this->construct->access_token = $this->options->oauth->access_token;
         $this->construct->access_token_secret = $this->options->oauth->access_token_secret;
         if (!$this->options->oauth->connected) {
             // no key
             if ($_GET['mm_action'] != 'gateway') {
                 add_action('mailmanager_precontent', array($this, 'nopair'));
             }
         } else {
             if (!$this->options->account) {
                 add_action('mailmanager_precontent', array($this, 'noaccount'));
             }
             $this->associations = get_option($this->option_name . '_associations');
             // hooks
             add_filter('mailmanager_adjust_recipients', array($this, 'filter_lists_add_name'), 10, 1);
             add_action('mailmanager_broadcast_precontent', array($this, 'broadcast_precontent'));
             add_action('mailmanager_series_precontent', array($this, 'series_precontent'));
             add_action('mailmanager_broadcast_create', array($this, 'broadcast_create'), 10, 5);
             add_action('mailmanager_series_create', array($this, 'series_create'), 10, 4);
             add_action('mailmanager_cron_check', array($this, 'sync_with_aweber'));
         }
     }
 }
Exemple #4
0
 function __construct()
 {
     $this->ybuy_id = 42;
     $this->name = 'MailChimp';
     $this->safe_name = 'mailchimp';
     $this->description = 'You can use MailChimp to Send your Email Series!';
     $this->logo = YM_MM_GATEWAY_URL . $this->safe_name . '/light_freddiewink.png';
     $this->settings = TRUE;
     $this->option_name = 'ym_other_mm_mailchimp';
     $this->options = get_option($this->option_name);
     if (mailmanager_active_gateway() == $this->safe_name) {
         if (!$this->options->apikey) {
             // no key
             if ($_GET['mm_action'] != 'gateway') {
                 add_action('mailmanager_precontent', array($this, 'noapikey'));
             }
         } else {
             if (!$this->options->list) {
                 if ($_GET['mm_action'] != 'gateway') {
                     add_action('mailmanager_precontent', array($this, 'nolist'));
                 }
             } else {
                 if (!$this->mailchimp) {
                     if ($this->class_construct() != "Everything's Chimpy!") {
                         ym_box_top('Error');
                         echo '<p>MailChimp Error: ' . $this->mailchimp->return . '</p>';
                         ym_box_bottom();
                     }
                 }
             }
             if ($_GET['mm_action'] != 'gateway') {
                 if ($this->options->list && !$this->options->default_template) {
                     add_action('mailmanager_precontent', array($this, 'notemplate'));
                 }
             }
             $this->associations = get_option($this->option_name . '_associations');
             // hooks
             add_action('mailmanager_homepage', array($this, 'promote'));
             if ($_GET['mm_action'] == 'welcome') {
                 add_action('mailmanager_precontent', array($this, 'welcome_sorry'));
             }
             // broadcast
             add_action('mailmanager_broadcast_precontent', array($this, 'broadcast_pre'));
             add_action('mailmanager_broadcast_form', array($this, 'broadcast_form'));
             add_action('mailmanager_broadcast_create', array($this, 'broadcast_create'), 10, 5);
             // create
             add_action('mailmanager_create_form', array($this, 'create_form'));
             add_action('mailmanager_create_create', array($this, 'create_create'), 10, 3);
             // view
             //				add_filter('mailmanager_view_emails_filter', array($this, 'view_emails_filter'), 10, 1);
             add_action('mailmanager_view_emails', array($this, 'view_emails'));
             // preview
             add_action('mailmanager_email_preview', array($this, 'email_preview'), 10, 1);
             // series
             add_action('mailmanager_series_replace', array($this, 'series_replace'));
             // update/downgrade
             //				do_action('ym_membership_transaction_success', array("user_id"=>$user_id));
             add_action('ym_membership_transaction_success', array($this, 'change_user_list'), 10, 1);
             // aditional
             add_action('mailmanager_email_stats', array($this, 'email_stats'));
             add_action('mailmanager_cron_check', array($this, 'sync_with_gateway'));
             // filter
             add_filter('mailmanager_adjust_recipients', array($this, 'mm_adjust_recipients'), 10, 1);
         }
     }
 }