id: 63 name: GoodNewsConfirmSubscription description: 'Handles activation of user subscriptions.' category: GoodNews properties: 'a:8:{s:21:"sendSubscriptionEmail";a:7:{s:4:"name";s:21:"sendSubscriptionEmail";s:4:"desc";s:59:"prop_goodnewsconfirmsubscription.sendsubscriptionemail_desc";s:4:"type";s:13:"combo-boolean";s:7:"options";s:0:"";s:5:"value";b:0;s:7:"lexicon";s:19:"goodnews:properties";s:4:"area";s:0:"";}s:21:"unsubscribeResourceId";a:7:{s:4:"name";s:21:"unsubscribeResourceId";s:4:"desc";s:59:"prop_goodnewsconfirmsubscription.unsubscriberesourceid_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:19:"goodnews:properties";s:4:"area";s:0:"";}s:17:"profileResourceId";a:7:{s:4:"name";s:17:"profileResourceId";s:4:"desc";s:55:"prop_goodnewsconfirmsubscription.profileresourceid_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:19:"goodnews:properties";s:4:"area";s:0:"";}s:24:"subscriptionEmailSubject";a:7:{s:4:"name";s:24:"subscriptionEmailSubject";s:4:"desc";s:62:"prop_goodnewsconfirmsubscription.subscriptionemailsubject_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:19:"goodnews:properties";s:4:"area";s:0:"";}s:20:"subscriptionEmailTpl";a:7:{s:4:"name";s:20:"subscriptionEmailTpl";s:4:"desc";s:58:"prop_goodnewsconfirmsubscription.subscriptionemailtpl_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:35:"sample.GoodNewsSubscriptionEmailTpl";s:7:"lexicon";s:19:"goodnews:properties";s:4:"area";s:0:"";}s:23:"subscriptionEmailTplAlt";a:7:{s:4:"name";s:23:"subscriptionEmailTplAlt";s:4:"desc";s:61:"prop_goodnewsconfirmsubscription.subscriptionemailtplalt_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:19:"goodnews:properties";s:4:"area";s:0:"";}s:24:"subscriptionEmailTplType";a:7:{s:4:"name";s:24:"subscriptionEmailTplType";s:4:"desc";s:62:"prop_goodnewsconfirmsubscription.subscriptionemailtpltype_desc";s:4:"type";s:4:"list";s:7:"options";a:4:{i:0;a:2:{s:5:"value";s:8:"modChunk";s:4:"text";s:18:"opt_goodnews.chunk";}i:1;a:2:{s:5:"value";s:4:"file";s:4:"text";s:17:"opt_goodnews.file";}i:2;a:2:{s:5:"value";s:6:"inline";s:4:"text";s:19:"opt_goodnews.inline";}i:3;a:2:{s:5:"value";s:8:"embedded";s:4:"text";s:21:"opt_goodnews.embedded";}}s:5:"value";s:8:"modChunk";s:7:"lexicon";s:19:"goodnews:properties";s:4:"area";s:0:"";}s:9:"errorPage";a:7:{s:4:"name";s:9:"errorPage";s:4:"desc";s:47:"prop_goodnewsconfirmsubscription.errorpage_desc";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:19:"goodnews:properties";s:4:"area";s:0:"";}}' ----- /** * GoodNews * * Copyright 2012 by bitego * Based on code from Login add-on * Copyright 2010 by Shaun McCormick * Modified by bitego - 10/2013 * * GoodNews is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * * GoodNews is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this software; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA */ /** * Snippet to confirm and activate the subscription (double opt-in). * Place on an activation page where the user will be sent to via the activation email. * * @var modX $modx * @var GoodNewsSubscription $goodnewssubscription * @var array $scriptProperties * * @property boolean $sendSubscriptionEmail Wether or not to send user an email after successful subscription. * @property string $unsubscribeResourceId The ID of the resource for one-click unsubscription. (default: '') * @property string $profileResourceId The ID of the resource for editing the mailing profile. (default: '') * @property string $subscriptionEmailSubject The subject of the subscription email. (default: a lexicon string) * @property string $subscriptionEmailTpl The template for the subscription email. (default: sample.GoodNewsSubscriptionEmailTpl) * @property string $subscriptionEmailTplAlt If set, will use this template instead of $subscriptionEmailTpl (e.g. for plaintext mails). (default: '') * @property string $subscriptionEmailTplType The type of tpl provided for the subscription email. (default: modChunk) * @property string $errorPage ID of the error page resource. If set, subscriber will be redirected to the resource with this ID if confirmation failed. * * @package goodnews */ require_once $modx->getOption('goodnews.core_path', null, $modx->getOption('core_path').'components/goodnews/').'model/goodnews/goodnewssubscription.class.php'; $goodnewssubscription = new GoodNewsSubscription($modx, $scriptProperties); $controller = $goodnewssubscription->loadController('Confirm'); $output = $controller->run($scriptProperties); return $output;