/** * print subscribe/unsubscribe link */ public function SubscribeLink() { //Requirements::css('forum_subscribe/css/style.css'); $interface = new SSViewer('ForumSubscribe'); $controller = new SubscribeController(); $loggedIn = Member::currentUser() ? true : false; $back_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : false; return $interface->process(new ArrayData(array('LoggedIn' => $loggedIn, 'Subscribed' => $this->IsSubscribed(), 'Parent' => $this->owner, 'SubscribeLink' => $controller->Link('subscribe/' . $this->owner->ID), 'UnSubscribeLink' => $controller->Link('unsubscribe/' . $this->owner->ID), 'Settings' => $controller->Link('settings') . '?RedirectURL=' . urlencode($back_url)))); }
public function createEmail($member) { //error_log("LOG MESSAGE FROM FORUM EMAIL POST DECORATOR LINK IS ".$this->owner->AbsoluteLink()); $controller = new SubscribeController(); $email = new Email(); $from_email = $this->owner->Forum()->parent()->FromEmail; $email->setFrom($from_email); $reply_to = $this->owner->Forum()->parent()->ReplyTo; $email->addCustomHeader('Reply-To', $reply_to); $email->setTo($member->Email); $config = SiteConfig::current_site_config(); $email->setSubject($this->owner->Title . ' | ' . $config->Title . ' ' . $this->owner->Forum()->Title . ' Forum'); $email->setTemplate('Forum_SubscriberNotification'); $email->populateTemplate(array('Recipient' => $member->FirstName, 'Link' => $this->owner->Link(), 'Title' => $this->owner->Title, 'Content' => $this->owner->Content, 'Author' => $this->owner->Author()->Nickname, 'Forum' => $this->owner->Forum()->Title, 'UnsubscribeLinkFromForum' => Director::absoluteBaseURL() . $controller->Link('unsubscribe/' . $this->owner->ForumID))); $email->send(); }
public static function display() { $data = AFormatter::objectiveSettings(Applum::find(1)); View::make('site/head/head'); View::make("site/body/header/header"); IntroController::intro($data); FeatureController::feature($data); AppController::app($data); SubscribeController::subscribe($data); GalleryController::gallery($data); TestimonialController::testimonial($data); PricingController::pricing($data); ContactController::contact($data); FooterController::footer($data); }