diff --git a/controller/Session.class.php b/controller/Session.class.php index c300d5b4..e91cd460 100644 --- a/controller/Session.class.php +++ b/controller/Session.class.php @@ -7,7 +7,8 @@ */ class Session { - const KEY_MAILCHIMP_LIST_IDS = 'mailchimp_list_ids'; + const KEY_MAILCHIMP_LIST_IDS = 'mailchimp_list_ids', + KEY_LIST_SUB_SUCCESS = 'list_success'; public static function init() { diff --git a/controller/action/MailActions.class.php b/controller/action/MailActions.class.php index e5d094b3..b0b88813 100644 --- a/controller/action/MailActions.class.php +++ b/controller/action/MailActions.class.php @@ -32,7 +32,7 @@ class MailActions extends Actions if ($success) { Session::set(Session::KEY_MAILCHIMP_LIST_IDS, array_merge(Session::get(Session::KEY_MAILCHIMP_LIST_IDS, []), [$mcListId])); - Session::set('list_success', __('Great success! Welcome to LBRY.')); + Session::set(Session::KEY_LIST_SUB_SUCCESS, __('Great success! Welcome to LBRY.')); } else { @@ -48,9 +48,9 @@ class MailActions extends Actions { $vars += ['btnClass' => 'btn-primary', 'returnUrl' => $_SERVER['REQUEST_URI']]; $vars['error'] = Session::get('list_error'); - $vars['success'] = Session::get('list_success'); + $vars['success'] = Session::get(Session::KEY_LIST_SUB_SUCCESS); Session::unsetKey('list_error'); - Session::unsetKey('list_success'); + Session::unsetKey(Session::KEY_LIST_SUB_SUCCESS); return $vars; } diff --git a/view/Response.class.php b/view/Response.class.php index 7a3d0286..5adb1c9d 100644 --- a/view/Response.class.php +++ b/view/Response.class.php @@ -9,6 +9,13 @@ class Response protected static $metaDescription = '', $metaTitle = '', $jsCalls = [], + $assets = [ + 'js' => [ + '/js/jquery-2.1.3.min.js', + '/js/global.js' + ], + 'css' => [] + ], // $bodyCssClasses = [], $metaImg = ''; @@ -71,6 +78,16 @@ class Response return ''; } + public static function addJsAsset($src) + { + static::$assets['js'][] = $src; + } + + public static function getJsAssets() + { + return static::$assets['js']; + } + // public static function addBodyCssClass($classOrClasses) // { // static::$bodyCssClasses = array_unique(array_merge(static::$bodyCssClasses, (array)$classOrClasses)); diff --git a/view/analytics/subTwitter.php b/view/analytics/subTwitter.php new file mode 100644 index 00000000..b35fb054 --- /dev/null +++ b/view/analytics/subTwitter.php @@ -0,0 +1,8 @@ + + + twttr.conversion.trackPid('nty1x', { tw_sale_amount: 0, tw_order_quantity: 0 }); + + \ No newline at end of file diff --git a/view/layout/basic.php b/view/layout/basic.php index ad39cd97..2c7bbb08 100644 --- a/view/layout/basic.php +++ b/view/layout/basic.php @@ -1,91 +1,92 @@ - - - - - - - - - <?php echo $title ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
- - - - -
-
- + + + + + + + + + <?php echo $title ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + +
+
+ \ No newline at end of file diff --git a/view/mail/joinList.php b/view/mail/joinList.php index 395c78ac..15c92b5c 100644 --- a/view/mail/joinList.php +++ b/view/mail/joinList.php @@ -7,6 +7,7 @@
+