Popup by Supsystic - Version 1.10.9

Version Description

/ 10.03.2021 = * Minor fixes * Fixes for controller

Download this release

Release Info

Developer supsystic.com
Plugin Icon 128x128 Popup by Supsystic
Version 1.10.9
Comparing to
See all releases

Code changes from version 1.10.8 to 1.10.9

classes/controller.php CHANGED
@@ -5,9 +5,18 @@ abstract class controllerPps {
5
  protected $_task = '';
6
  protected $_defaultView = '';
7
  protected $_code = '';
 
8
  public function __construct($code) {
9
  $this->setCode($code);
10
  $this->_defaultView = $this->getCode();
 
 
 
 
 
 
 
 
11
  }
12
  public function init() {
13
  /*load model and other preload data goes here*/
@@ -53,7 +62,7 @@ abstract class controllerPps {
53
  if(importPps($parentModule->getModDir(). 'models'. DS. $name. '.php')) {
54
  $className = toeGetClassNamePps($name. 'Model');
55
  }
56
-
57
  if($className) {
58
  $model = new $className();
59
  $model->setCode( $this->getCode() );
@@ -65,11 +74,11 @@ abstract class controllerPps {
65
  if(empty($name)) $name = $this->getCode();
66
  $parentModule = framePps::_()->getModule( $this->getCode() );
67
  $className = '';
68
-
69
  if(importPps($parentModule->getModDir(). 'views'. DS. $name. '.php')) {
70
  $className = toeGetClassNamePps($name. 'View');
71
  }
72
-
73
  if($className) {
74
  $view = new $className();
75
  $view->setCode( $this->getCode() );
@@ -137,7 +146,7 @@ abstract class controllerPps {
137
  $res = new responsePps();
138
  $res->ignoreShellData();
139
  $model = $this->getModel();
140
-
141
  $page = (int) reqPps::getVar('page');
142
  $rowsLimit = (int) reqPps::getVar('rows');
143
  $orderBy = reqPps::getVar('sidx');
@@ -185,14 +194,14 @@ abstract class controllerPps {
185
  $limitStart = $rowsLimit * $page - $rowsLimit; // do not put $limit*($page - 1)
186
  if($limitStart < 0)
187
  $limitStart = 0;
188
-
189
  $data = $model
190
  ->setLimit($limitStart. ', '. $rowsLimit)
191
  ->setOrderBy( $this->_prepareSortOrder($orderBy) )
192
  ->setSortOrder( $sortOrder )
193
  ->setSimpleGetFields()
194
  ->getFromTbl();
195
-
196
  $data = $this->_prepareListForTbl( $data );
197
  $res->addData('page', $page);
198
  $res->addData('total', $totalPages);
5
  protected $_task = '';
6
  protected $_defaultView = '';
7
  protected $_code = '';
8
+ protected $_permissions = '';
9
  public function __construct($code) {
10
  $this->setCode($code);
11
  $this->_defaultView = $this->getCode();
12
+ $this->_permissions = array(
13
+ PPS_USERLEVELS => array(
14
+ PPS_ADMIN => array('getListForTbl', 'removeGroup', 'clear')
15
+ ),
16
+ );
17
+ }
18
+ public function getBasePermissions() {
19
+ return $this->_permissions;
20
  }
21
  public function init() {
22
  /*load model and other preload data goes here*/
62
  if(importPps($parentModule->getModDir(). 'models'. DS. $name. '.php')) {
63
  $className = toeGetClassNamePps($name. 'Model');
64
  }
65
+
66
  if($className) {
67
  $model = new $className();
68
  $model->setCode( $this->getCode() );
74
  if(empty($name)) $name = $this->getCode();
75
  $parentModule = framePps::_()->getModule( $this->getCode() );
76
  $className = '';
77
+
78
  if(importPps($parentModule->getModDir(). 'views'. DS. $name. '.php')) {
79
  $className = toeGetClassNamePps($name. 'View');
80
  }
81
+
82
  if($className) {
83
  $view = new $className();
84
  $view->setCode( $this->getCode() );
146
  $res = new responsePps();
147
  $res->ignoreShellData();
148
  $model = $this->getModel();
149
+
150
  $page = (int) reqPps::getVar('page');
151
  $rowsLimit = (int) reqPps::getVar('rows');
152
  $orderBy = reqPps::getVar('sidx');
194
  $limitStart = $rowsLimit * $page - $rowsLimit; // do not put $limit*($page - 1)
195
  if($limitStart < 0)
196
  $limitStart = 0;
197
+
198
  $data = $model
199
  ->setLimit($limitStart. ', '. $rowsLimit)
200
  ->setOrderBy( $this->_prepareSortOrder($orderBy) )
201
  ->setSortOrder( $sortOrder )
202
  ->setSimpleGetFields()
203
  ->getFromTbl();
204
+
205
  $data = $this->_prepareListForTbl( $data );
206
  $res->addData('page', $page);
207
  $res->addData('total', $totalPages);
classes/frame.php CHANGED
@@ -152,6 +152,8 @@ class framePps {
152
  $action = strtolower($action);
153
  if($mod) {
154
  $permissions = $mod->getController()->getPermissions();
 
 
155
  if(!empty($permissions)) { // Special permissions
156
  if(isset($permissions[PPS_METHODS])
157
  && !empty($permissions[PPS_METHODS])
152
  $action = strtolower($action);
153
  if($mod) {
154
  $permissions = $mod->getController()->getPermissions();
155
+ $permissionsBase = $mod->getController()->getBasePermissions();
156
+ $permissions = array_merge($permissions, $permissionsBase);
157
  if(!empty($permissions)) { // Special permissions
158
  if(isset($permissions[PPS_METHODS])
159
  && !empty($permissions[PPS_METHODS])
config.php CHANGED
@@ -48,7 +48,7 @@
48
  define('PPS_EOL', "\n");
49
 
50
  define('PPS_PLUGIN_INSTALLED', true);
51
- define('PPS_VERSION', '1.10.8');
52
  define('PPS_USER', 'user');
53
 
54
  define('PPS_CLASS_PREFIX', 'ppsc');
48
  define('PPS_EOL', "\n");
49
 
50
  define('PPS_PLUGIN_INSTALLED', true);
51
+ define('PPS_VERSION', '1.10.9');
52
  define('PPS_USER', 'user');
53
 
54
  define('PPS_CLASS_PREFIX', 'ppsc');
modules/popup/controller.php CHANGED
@@ -20,7 +20,7 @@ class popupControllerPps extends controllerPps {
20
  }
21
  $data[ $i ]['conversion'] = $conversion;
22
  $data[ $i ]['active'] = $data[ $i ]['active'] ? '<span class="alert alert-success">'. __('Yes', PPS_LANG_CODE). '</span>' : '<span class="alert alert-danger">'. __('No', PPS_LANG_CODE). '</span>';
23
-
24
  //$data[ $i ]['action'] = '<a class="button" style="margin-right: 10px;" href="'. $this->getModule()->getEditLink($data[ $i ]['id']). '"><i class="fa fa-fw fa-2x fa-pencil" style="margin-top: 2px;"></i></a>';
25
  //$data[ $i ]['action'] .= '<button href="#" onclick="ppsPopupRemoveRow('. $data[ $i ]['id']. ', this); return false;" title="'. __('Remove', PPS_LANG_CODE). '" class="button"><i class="fa fa-fw fa-2x fa-trash-o" style="margin-top: 5px;"></i></button>';
26
  }
@@ -77,7 +77,7 @@ class popupControllerPps extends controllerPps {
77
  $this->_prepareGoogleMapAssetsForPreview( $this->_prevPopupId );
78
  $popup = $this->getModel()->getById( $this->_prevPopupId );
79
  $assetsStr = '<link rel="stylesheet" href="'. $this->getModule()->getModPath(). 'css/frontend.popup.css" type="text/css" media="all" />';
80
- if((isset($popup['params']['tpl']['enb_contact_form'])
81
  && !empty($popup['params']['tpl']['enb_contact_form']))
82
  && $this->getModule()->contactFormsSupported()
83
  ) {
@@ -92,8 +92,8 @@ class popupControllerPps extends controllerPps {
92
  . $this->_generateSocSharingAssetsForPreview( $this->_prevPopupId )
93
  . $this->_generateGoogleMapAssetsForPreview( $this->_prevPopupId )
94
  . $assetsStr
95
- . '<style type="text/css">
96
- html { overflow: visible !important; }
97
  .ppsPopupPreloadImg {
98
  width: 1px !important;
99
  height: 1px !important;
@@ -121,8 +121,8 @@ class popupControllerPps extends controllerPps {
121
  $res = '';
122
  if(class_exists('SupsysticSocialSharing')) {
123
  global $supsysticSocialSharing;
124
- if(isset($supsysticSocialSharing)
125
- && !empty($supsysticSocialSharing)
126
  && method_exists($supsysticSocialSharing, 'getEnvironment')
127
  && ($uiMod = $supsysticSocialSharing->getEnvironment()->getModule('Ui'))
128
  ) {
@@ -345,8 +345,8 @@ class popupControllerPps extends controllerPps {
345
  public function getPermissions() {
346
  return array(
347
  PPS_USERLEVELS => array(
348
- PPS_ADMIN => array('createFromTpl', 'getListForTbl', 'remove', 'removeGroup', 'clear',
349
- 'save', 'getPreviewHtml', 'exportForDb', 'changeTpl', 'saveAsCopy', 'switchActive',
350
  'outPreviewHtml', 'updateLabel')
351
  ),
352
  );
@@ -355,4 +355,3 @@ class popupControllerPps extends controllerPps {
355
  return array('save');
356
  }
357
  }
358
-
20
  }
21
  $data[ $i ]['conversion'] = $conversion;
22
  $data[ $i ]['active'] = $data[ $i ]['active'] ? '<span class="alert alert-success">'. __('Yes', PPS_LANG_CODE). '</span>' : '<span class="alert alert-danger">'. __('No', PPS_LANG_CODE). '</span>';
23
+
24
  //$data[ $i ]['action'] = '<a class="button" style="margin-right: 10px;" href="'. $this->getModule()->getEditLink($data[ $i ]['id']). '"><i class="fa fa-fw fa-2x fa-pencil" style="margin-top: 2px;"></i></a>';
25
  //$data[ $i ]['action'] .= '<button href="#" onclick="ppsPopupRemoveRow('. $data[ $i ]['id']. ', this); return false;" title="'. __('Remove', PPS_LANG_CODE). '" class="button"><i class="fa fa-fw fa-2x fa-trash-o" style="margin-top: 5px;"></i></button>';
26
  }
77
  $this->_prepareGoogleMapAssetsForPreview( $this->_prevPopupId );
78
  $popup = $this->getModel()->getById( $this->_prevPopupId );
79
  $assetsStr = '<link rel="stylesheet" href="'. $this->getModule()->getModPath(). 'css/frontend.popup.css" type="text/css" media="all" />';
80
+ if((isset($popup['params']['tpl']['enb_contact_form'])
81
  && !empty($popup['params']['tpl']['enb_contact_form']))
82
  && $this->getModule()->contactFormsSupported()
83
  ) {
92
  . $this->_generateSocSharingAssetsForPreview( $this->_prevPopupId )
93
  . $this->_generateGoogleMapAssetsForPreview( $this->_prevPopupId )
94
  . $assetsStr
95
+ . '<style type="text/css">
96
+ html { overflow: visible !important; }
97
  .ppsPopupPreloadImg {
98
  width: 1px !important;
99
  height: 1px !important;
121
  $res = '';
122
  if(class_exists('SupsysticSocialSharing')) {
123
  global $supsysticSocialSharing;
124
+ if(isset($supsysticSocialSharing)
125
+ && !empty($supsysticSocialSharing)
126
  && method_exists($supsysticSocialSharing, 'getEnvironment')
127
  && ($uiMod = $supsysticSocialSharing->getEnvironment()->getModule('Ui'))
128
  ) {
345
  public function getPermissions() {
346
  return array(
347
  PPS_USERLEVELS => array(
348
+ PPS_ADMIN => array('createFromTpl', 'getListForTbl', 'remove', 'removeGroup', 'clear',
349
+ 'save', 'getPreviewHtml', 'exportForDb', 'changeTpl', 'saveAsCopy', 'switchActive',
350
  'outPreviewHtml', 'updateLabel')
351
  ),
352
  );
355
  return array('save');
356
  }
357
  }
 
modules/subscribe/controller.php CHANGED
@@ -16,8 +16,8 @@ class subscribeControllerPps extends controllerPps {
16
  $lastPopup = $this->getModel()->getLastPopup();
17
  $withoutConfirm = (isset($lastPopup['params']['tpl']['sub_ignore_confirm']) && $lastPopup['params']['tpl']['sub_ignore_confirm'])
18
  || (isset($lastPopup['params']['tpl']['sub_dsbl_dbl_opt_id']) && $lastPopup['params']['tpl']['sub_dsbl_dbl_opt_id'] && $dest == 'mailchimp');
19
- if(isset($lastPopup['params']['tpl']['sub_dest'])
20
- && $lastPopup['params']['tpl']['sub_dest'] == 'mailpoet'
21
  && $this->getModel()->getMailPoetVer()
22
  ) {
23
  $withoutConfirm = !$this->getModel()->mailPoetRequireConfirm();
@@ -32,8 +32,8 @@ class subscribeControllerPps extends controllerPps {
32
  $forceRequireConfirm = framePps::_()->getModule($dest)->getModel()->requireConfirm();
33
  }
34
  if(($destData && isset($destData['require_confirm']) && $destData['require_confirm'] && !$withoutConfirm) || $forceRequireConfirm)
35
- $res->addMessage(isset($lastPopup['params']['tpl']['sub_txt_confirm_sent'])
36
- ? $lastPopup['params']['tpl']['sub_txt_confirm_sent'] :
37
  __('Confirmation link was sent to your email address. Check your email!', PPS_LANG_CODE));
38
  else
39
  $res->addMessage(isset($lastPopup['params']['tpl']['sub_txt_success'])
@@ -47,8 +47,8 @@ class subscribeControllerPps extends controllerPps {
47
  }
48
  } else {
49
  $lastPopup = $this->getModel()->getLastPopup();
50
- if($lastPopup
51
- && isset($lastPopup['params']['tpl']['sub_redirect_email_exists'])
52
  && !empty($lastPopup['params']['tpl']['sub_redirect_email_exists'])
53
  && $this->getModel()->getEmailExists()
54
  ) {
@@ -85,7 +85,7 @@ class subscribeControllerPps extends controllerPps {
85
  $res->pushError ($this->getModel()->getErrors());
86
  $haveErrors = true;
87
  }
88
-
89
  $lastPopup = $this->getModel()->getLastPopup();
90
  $subscribedUrl = '';
91
  if(!$haveErrors) {
@@ -123,12 +123,12 @@ class subscribeControllerPps extends controllerPps {
123
  $forReg = (int) reqPps::getVar('for_reg');
124
  $popup = $id ? framePps::_()->getModule('popup')->getModel()->getById( $id ) : NULL;
125
  $label = $popup ? $popup['label'] : get_bloginfo('name');
126
-
127
  importClassPps('filegeneratorPps');
128
  importClassPps('csvgeneratorPps');
129
 
130
- $fileTitle = $forReg
131
- ? sprintf(__('Registered from %s', PPS_LANG_CODE), htmlspecialchars( $label ))
132
  : sprintf(__('Subscribed to %s', PPS_LANG_CODE), htmlspecialchars( $label ));
133
 
134
  $csvGenerator = new csvgeneratorPps( $fileTitle );
@@ -213,13 +213,13 @@ class subscribeControllerPps extends controllerPps {
213
  }
214
  } else {
215
  $cell = 0;
216
- $noUsersMsg = $forReg
217
- ? __('There are no members for now', PPS_LANG_CODE)
218
  : __('There are no subscribers for now', PPS_LANG_CODE);
219
  $csvGenerator->addCell($row, $cell, $noUsersMsg);
220
  }
221
  $csvGenerator->generate();
222
-
223
  }
224
  public function getPermissions() {
225
  return array(
@@ -229,4 +229,3 @@ class subscribeControllerPps extends controllerPps {
229
  );
230
  }
231
  }
232
-
16
  $lastPopup = $this->getModel()->getLastPopup();
17
  $withoutConfirm = (isset($lastPopup['params']['tpl']['sub_ignore_confirm']) && $lastPopup['params']['tpl']['sub_ignore_confirm'])
18
  || (isset($lastPopup['params']['tpl']['sub_dsbl_dbl_opt_id']) && $lastPopup['params']['tpl']['sub_dsbl_dbl_opt_id'] && $dest == 'mailchimp');
19
+ if(isset($lastPopup['params']['tpl']['sub_dest'])
20
+ && $lastPopup['params']['tpl']['sub_dest'] == 'mailpoet'
21
  && $this->getModel()->getMailPoetVer()
22
  ) {
23
  $withoutConfirm = !$this->getModel()->mailPoetRequireConfirm();
32
  $forceRequireConfirm = framePps::_()->getModule($dest)->getModel()->requireConfirm();
33
  }
34
  if(($destData && isset($destData['require_confirm']) && $destData['require_confirm'] && !$withoutConfirm) || $forceRequireConfirm)
35
+ $res->addMessage(isset($lastPopup['params']['tpl']['sub_txt_confirm_sent'])
36
+ ? $lastPopup['params']['tpl']['sub_txt_confirm_sent'] :
37
  __('Confirmation link was sent to your email address. Check your email!', PPS_LANG_CODE));
38
  else
39
  $res->addMessage(isset($lastPopup['params']['tpl']['sub_txt_success'])
47
  }
48
  } else {
49
  $lastPopup = $this->getModel()->getLastPopup();
50
+ if($lastPopup
51
+ && isset($lastPopup['params']['tpl']['sub_redirect_email_exists'])
52
  && !empty($lastPopup['params']['tpl']['sub_redirect_email_exists'])
53
  && $this->getModel()->getEmailExists()
54
  ) {
85
  $res->pushError ($this->getModel()->getErrors());
86
  $haveErrors = true;
87
  }
88
+
89
  $lastPopup = $this->getModel()->getLastPopup();
90
  $subscribedUrl = '';
91
  if(!$haveErrors) {
123
  $forReg = (int) reqPps::getVar('for_reg');
124
  $popup = $id ? framePps::_()->getModule('popup')->getModel()->getById( $id ) : NULL;
125
  $label = $popup ? $popup['label'] : get_bloginfo('name');
126
+
127
  importClassPps('filegeneratorPps');
128
  importClassPps('csvgeneratorPps');
129
 
130
+ $fileTitle = $forReg
131
+ ? sprintf(__('Registered from %s', PPS_LANG_CODE), htmlspecialchars( $label ))
132
  : sprintf(__('Subscribed to %s', PPS_LANG_CODE), htmlspecialchars( $label ));
133
 
134
  $csvGenerator = new csvgeneratorPps( $fileTitle );
213
  }
214
  } else {
215
  $cell = 0;
216
+ $noUsersMsg = $forReg
217
+ ? __('There are no members for now', PPS_LANG_CODE)
218
  : __('There are no subscribers for now', PPS_LANG_CODE);
219
  $csvGenerator->addCell($row, $cell, $noUsersMsg);
220
  }
221
  $csvGenerator->generate();
222
+
223
  }
224
  public function getPermissions() {
225
  return array(
229
  );
230
  }
231
  }
 
modules/user/mod.php CHANGED
@@ -3,7 +3,7 @@ class userPps extends modulePps {
3
  protected $_data = array();
4
  protected $_curentID = 0;
5
  protected $_dataLoaded = false;
6
-
7
  public function loadUserData() {
8
  return $this->getCurrent();
9
  }
@@ -18,13 +18,13 @@ class userPps extends modulePps {
18
  return PPS_ADMIN;
19
  else if($this->getCurrentID())
20
  return PPS_LOGGED;
21
- else
22
  return PPS_GUEST;
23
  }
24
  public function getCurrent() {
25
  return wp_get_current_user();
26
  }
27
-
28
  public function getCurrentID() {
29
  $this->_loadUserData();
30
  return $this->_curentID;
@@ -40,7 +40,7 @@ class userPps extends modulePps {
40
  }
41
  public function getAdminsList() {
42
  global $wpdb;
43
- $admins = dbPps::get('SELECT * FROM #__users
44
  INNER JOIN #__usermeta ON #__users.ID = #__usermeta.user_id
45
  WHERE #__usermeta.meta_key = "#__capabilities" AND #__usermeta.meta_value LIKE "%administrator%"');
46
  return $admins;
@@ -49,4 +49,3 @@ class userPps extends modulePps {
49
  return is_user_logged_in();
50
  }
51
  }
52
-
3
  protected $_data = array();
4
  protected $_curentID = 0;
5
  protected $_dataLoaded = false;
6
+
7
  public function loadUserData() {
8
  return $this->getCurrent();
9
  }
18
  return PPS_ADMIN;
19
  else if($this->getCurrentID())
20
  return PPS_LOGGED;
21
+ else
22
  return PPS_GUEST;
23
  }
24
  public function getCurrent() {
25
  return wp_get_current_user();
26
  }
27
+
28
  public function getCurrentID() {
29
  $this->_loadUserData();
30
  return $this->_curentID;
40
  }
41
  public function getAdminsList() {
42
  global $wpdb;
43
+ $admins = dbPps::get('SELECT * FROM #__users
44
  INNER JOIN #__usermeta ON #__users.ID = #__usermeta.user_id
45
  WHERE #__usermeta.meta_key = "#__capabilities" AND #__usermeta.meta_value LIKE "%administrator%"');
46
  return $admins;
49
  return is_user_logged_in();
50
  }
51
  }
 
pps.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup by Supsystic
4
  * Plugin URI: https://supsystic.com/plugins/popup-plugin/
5
  * Description: The Best WordPress popup plugin to help you gain more subscribers, social followers or advertisement. Responsive popups with friendly options
6
- * Version: 1.10.8
7
  * Author: supsystic.com
8
  * Author URI: https://supsystic.com
9
  * Text Domain: popup-by-supsystic
3
  * Plugin Name: Popup by Supsystic
4
  * Plugin URI: https://supsystic.com/plugins/popup-plugin/
5
  * Description: The Best WordPress popup plugin to help you gain more subscribers, social followers or advertisement. Responsive popups with friendly options
6
+ * Version: 1.10.9
7
  * Author: supsystic.com
8
  * Author URI: https://supsystic.com
9
  * Text Domain: popup-by-supsystic
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: supsystic.com
3
  Donate link: https://supsystic.com/plugins/popup-plugin
4
  Tags: popup, popup WordPress plugin, marketing, popover, pop-up, popup builder, social popup, facebook popup, popup builder, popup maker
5
- Tested up to: 5.8
6
- Stable tag: 1.10.8
7
 
8
  Create elegant popup easily with Popup Builder by Supsystic. Popup with Subscription Forms, Facebook popup, Optin and Social locks, Contact Forms etc.
9
 
@@ -116,6 +116,10 @@ Enable “Redirect after close” option in Appearance setting on the Design tab
116
  Leave us a nice review 🙂
117
 
118
  == Changelog ==
 
 
 
 
119
  = 1.10.8 / 13.12.2021 =
120
  * Minor fixes
121
 
2
  Contributors: supsystic.com
3
  Donate link: https://supsystic.com/plugins/popup-plugin
4
  Tags: popup, popup WordPress plugin, marketing, popover, pop-up, popup builder, social popup, facebook popup, popup builder, popup maker
5
+ Tested up to: 5.9
6
+ Stable tag: 1.10.9
7
 
8
  Create elegant popup easily with Popup Builder by Supsystic. Popup with Subscription Forms, Facebook popup, Optin and Social locks, Contact Forms etc.
9
 
116
  Leave us a nice review 🙂
117
 
118
  == Changelog ==
119
+ = 1.10.9 / 10.03.2021 =
120
+ * Minor fixes
121
+ * Fixes for controller
122
+
123
  = 1.10.8 / 13.12.2021 =
124
  * Minor fixes
125