Skip to content

Instantly share code, notes, and snippets.

View yujj's full-sized avatar

Yuri Yurin yujj

View GitHub Profile
@yujj
yujj / subscribeMe.php
Created July 4, 2016 06:37
Sendex snippet for ajaxFrom
<?php
/** @var array $scriptProperties */
/** @var Sendex $Sendex */
$Sendex = $modx->getService('sendex','Sendex',$modx->getOption('sendex_core_path',null,$modx->getOption('core_path').'components/sendex/').'model/sendex/',$scriptProperties);
if (!($Sendex instanceof Sendex)) return '';
if (empty($tplSubscribeAuth)) {$tplSubscribeAuth = 'tpl.Sendex.subscribe.auth';}
if (empty($tplSubscribeGuest)) {$tplSubscribeGuest = 'tpl.Sendex.subscribe.guest';}
if (empty($tplUnsubscribe)) {$tplUnsubscribe = 'tpl.Sendex.unsubscribe';}
if (empty($tplActivate)) {$tplActivate = 'tpl.Sendex.activate';}