Example #1
0
 public function displayDeactivatePage()
 {
     $this->assign('GET', reqGmp::get('get'));
     $this->assign('POST', reqGmp::get('post'));
     $this->assign('REQUEST_METHOD', strtoupper(reqGmp::getVar('REQUEST_METHOD', 'server')));
     $this->assign('REQUEST_URI', basename(reqGmp::getVar('REQUEST_URI', 'server')));
     parent::display('deactivatePage');
 }
Example #2
0
 public function init()
 {
     $this->_file = __FILE__;
     //
     $this->_options = array(array('title' => langGmp::_('Add New Map'), 'capability' => 'manage_options', 'menu_slug' => $this->_mainSlug . '&tab=gmpAddNewMap', 'function' => array(frameGmp::_()->getModule('gmap')->getController(), 'getAllMaps')), array('title' => langGmp::_('All Maps'), 'capability' => 'manage_options', 'menu_slug' => $this->_mainSlug . '&tab=gmpAllMaps', 'function' => array(frameGmp::_()->getModule('gmap')->getController(), 'getAllMaps')), array('title' => langGmp::_('Markers'), 'capability' => 'manage_options', 'menu_slug' => $this->_mainSlug . '&tab=gmpMarkerList', 'function' => array(frameGmp::_()->getModule('gmap')->getController(), 'getAllMaps')), array('title' => langGmp::_('Marker Groups'), 'capability' => 'manage_options', 'menu_slug' => $this->_mainSlug . '&tab=gmpMarkerGroups', 'function' => array(frameGmp::_()->getModule('gmap')->getController(), 'getAllMaps')), array('title' => langGmp::_('Plugin Settings'), 'capability' => 'manage_options', 'menu_slug' => $this->_mainSlug . '&tab=gmpPluginSettings', 'function' => array(frameGmp::_()->getModule('gmap')->getController(), 'getAllMaps')));
     add_action('admin_menu', array($this, 'initMenu'), 9);
     parent::init();
 }
Example #3
0
 public function getSettingsTabContent()
 {
     frameGmp::_()->addScript('admin.settings', $this->getModule()->getModPath() . 'js/admin.settings.js');
     frameGmp::_()->addStyle('admin.settings', $this->getModule()->getModPath() . 'css/admin.settings.css');
     frameGmp::_()->getModule('templates')->loadJqueryUi();
     $options = frameGmp::_()->getModule('options')->getAll();
     $this->assign('options', $options);
     return parent::getContent('optionsSettingsTabContent');
 }
Example #4
0
 public function showGroupsTab($groupsList, $isAjaxRequest = false)
 {
     $this->assign('groupsList', $groupsList);
     if ($isAjaxRequest) {
         return parent::getContent('groupsTable');
     }
     $this->assign("tableContent", parent::getContent('groupsTable'));
     return parent::getContent('groupsList');
 }
Example #5
0
 public function getPasswordRecoverConfirm()
 {
     $errors = array();
     if (!$this->_passwordResetSuccess) {
         $errors[] = langGmp::_('Password Reset Error');
     }
     $this->_passwordResetSuccess = false;
     $this->assign('errorsGmp', $errors);
     return parent::getContent('passwordRecoverConfirm');
 }
Example #6
0
 /**
  * Get the content for templates module tab
  * 
  * @return type 
  */
 public function getTabContent()
 {
     $templates = frameGmp::_()->getModule('templatesGmp')->getModel()->get();
     if (empty($templates)) {
         $tpl = 'noTemplates';
     } else {
         $this->assign('templatesGmp', $templates);
         $this->assign('default_theme', frameGmp::_()->getModule('optionsGmp')->getModel()->get('default_theme'));
         $tpl = 'templatesTab';
     }
     return parent::getContent($tpl);
 }
Example #7
0
 public function getComingSoonPageHtml()
 {
     $this->_beforeShow();
     $this->assign('msgTitle', frameGmp::_()->getModule('options')->get('msg_title'));
     $this->assign('msgTitleColor', frameGmp::_()->getModule('options')->get('msg_title_color'));
     $this->assign('msgTitleFont', frameGmp::_()->getModule('options')->get('msg_title_font'));
     $msgTitleStyle = array();
     if (!empty($this->msgTitleColor)) {
         $msgTitleStyle['color'] = $this->msgTitleColor;
     }
     if (!empty($this->msgTitleFont)) {
         $msgTitleStyle['font-family'] = $this->msgTitleFont;
         $this->_styles[] = 'http://fonts.googleapis.com/css?family=' . $this->msgTitleFont . '&subset=latin,cyrillic-ext';
     }
     $this->assign('msgTitleStyle', utilsGmp::arrToCss($msgTitleStyle));
     $this->assign('msgText', frameGmp::_()->getModule('options')->get('msg_text'));
     $this->assign('msgTextColor', frameGmp::_()->getModule('options')->get('msg_text_color'));
     $this->assign('msgTextFont', frameGmp::_()->getModule('options')->get('msg_text_font'));
     $msgTextStyle = array();
     if (!empty($this->msgTextColor)) {
         $msgTextStyle['color'] = $this->msgTextColor;
     }
     if (!empty($this->msgTextFont)) {
         $msgTextStyle['font-family'] = $this->msgTextFont;
         if ($this->msgTitleFont != $this->msgTextFont) {
             $this->_styles[] = 'http://fonts.googleapis.com/css?family=' . $this->msgTextFont . '&subset=latin,cyrillic-ext';
         }
     }
     $this->assign('msgTextStyle', utilsGmp::arrToCss($msgTextStyle));
     if ($this->_useSubscribeForm && frameGmp::_()->getModule('options')->get('sub_enable')) {
         $this->_scripts[] = frameGmp::_()->getModule('subscribe')->getModPath() . 'js/frontend.subscribe.js';
         $this->assign('subscribeForm', frameGmp::_()->getModule('subscribe')->getController()->getView()->getUserForm());
     }
     $this->assign('countDownTimerHtml', dispatcherGmp::applyFilters('countDownTimerHtml', ''));
     $this->assign('progressBarHtml', dispatcherGmp::applyFilters('progressBarHtml', ''));
     $this->assign('contactFormHtml', dispatcherGmp::applyFilters('contactFormHtml', ''));
     $this->assign('googleMapsHtml', dispatcherGmp::applyFilters('googleMapsHtml', ''));
     if ($this->_useSocIcons) {
         $this->assign('socIcons', frameGmp::_()->getModule('social_icons')->getController()->getView()->getFrontendContent());
     }
     if (file_exists($this->getModule()->getModDir() . 'css/style.css')) {
         $this->_styles[] = $this->getModule()->getModPath() . 'css/style.css';
     }
     $this->assign('logoPath', $this->getModule()->getLogoImgPath());
     $this->assign('bgCssAttrs', dispatcherGmp::applyFilters('tplBgCssAttrs', $this->getModule()->getBgCssAttrs()));
     $this->assign('styles', dispatcherGmp::applyFilters('tplStyles', $this->_styles));
     $this->assign('scripts', dispatcherGmp::applyFilters('tplScripts', $this->_scripts));
     $this->assign('initJsVars', dispatcherGmp::applyFilters('tplInitJsVars', $this->initJsVars()));
     $this->assign('messages', frameGmp::_()->getRes()->getMessages());
     $this->assign('errors', frameGmp::_()->getRes()->getErrors());
     return parent::getContent($this->getCode() . 'GMPHtml');
 }
 public function getOverviewTabContent()
 {
     frameGmp::_()->getModule('templates')->loadJqueryUi();
     frameGmp::_()->getModule('templates')->loadSlimscroll();
     frameGmp::_()->addScript('admin.overview', $this->getModule()->getModPath() . 'js/admin.overview.js');
     frameGmp::_()->addStyle('admin.overview', $this->getModule()->getModPath() . 'css/admin.overview.css');
     $this->assign('mainLink', $this->getModule()->getMainLink());
     $this->assign('faqList', $this->getFaqList());
     $this->assign('serverSettings', $this->getServerSettings());
     $this->assign('news', $this->getNewsContent());
     $this->assign('contactFields', $this->getModule()->getContactFormFields());
     return parent::getContent('overviewTabContent');
 }
Example #9
0
 public function adminTextEditorPopup()
 {
     $shortcodes = frameGmp::_()->getModule('shortcodesGmp')->getCodes();
     $shortcodesSelectOptions = array('' => langGmp::_('Select'));
     foreach ($shortcodes as $code => $cinfo) {
         if (in_array($code, array('product', 'category'))) {
             continue;
         }
         $shortcodesSelectOptions[$code] = $code;
     }
     $this->assign('shortcodesGmp', $shortcodes);
     $this->assign('shortcodesSelectOptions', $shortcodesSelectOptions);
     return parent::getContent('adminTextEditorPopup');
 }
Example #10
0
 public function getListOperations($map)
 {
     $this->assign('map', $map);
     return parent::getContent('mapListOperations');
 }
Example #11
0
 public function getTabContent()
 {
     return parent::getContent('csvTabContent');
 }
Example #12
0
 public function getEditMap($id = 0)
 {
     $gMapApiParams = array('language' => '');
     frameGmp::_()->addScript('jquery-ui-sortable');
     frameGmp::_()->addScript('wp.tabs', GMP_JS_PATH . 'wp.tabs.js');
     frameGmp::_()->addScript('admin.gmap', $this->getModule()->getModPath() . 'js/admin.gmap.js');
     frameGmp::_()->addScript('admin.gmap.edit', $this->getModule()->getModPath() . 'js/admin.gmap.edit.js');
     frameGmp::_()->addStyle('admin.gmap', $this->getModule()->getModPath() . 'css/admin.gmap.css');
     frameGmp::_()->addJSVar('admin.gmap.edit', 'gmpMapShortcode', GMP_SHORTCODE);
     $allStylizationsList = $this->getModule()->getStylizationsList();
     $allMarkerGroupsList = frameGmp::_()->getModule('marker_groups')->getModel()->getAllMarkerGroups();
     frameGmp::_()->addJSVar('admin.gmap.edit', 'gmpAllStylizationsList', $allStylizationsList);
     frameGmp::_()->addJSVar('admin.gmap.edit', 'gmpMapsListUrl', frameGmp::_()->getModule('options')->getTabUrl('gmap'));
     $stylizationsForSelect = array('none' => __('None', GMP_LANG_CODE));
     foreach ($allStylizationsList as $styleName => $json) {
         $stylizationsForSelect[$styleName] = $styleName;
         // JSON data will be attached on js side
     }
     $markerGroupsForSelect = array('0' => __('None', GMP_LANG_CODE));
     foreach ($allMarkerGroupsList as $key => $value) {
         $markerGroupsForSelect[$value['id']] = $value['title'];
     }
     $editMap = $id ? true : false;
     if ($editMap) {
         $map = $this->getModel()->getMapById($id);
         $this->assign('map', $map);
         $gMapApiParams = $map['params'];
         frameGmp::_()->addJSVar('admin.gmap.edit', 'gmpMainMap', $map);
     }
     $markerLists = $this->getModule()->getMarkerLists();
     $positionsList = $this->getModule()->getControlsPositions();
     $this->connectMapsAssets($gMapApiParams, true);
     $this->assign('editMap', $editMap);
     $this->assign('icons', frameGmp::_()->getModule('icons')->getModel()->getIcons(array('fields' => 'id, path, title')));
     $this->assign('stylizationsForSelect', $stylizationsForSelect);
     $this->assign('positionsList', $positionsList);
     $this->assign('isPro', frameGmp::_()->getModule('supsystic_promo')->isPro());
     $this->assign('mainLink', frameGmp::_()->getModule('supsystic_promo')->getMainLink());
     $this->assign('markerLists', $markerLists);
     $this->assign('markerGroupsForSelect', $markerGroupsForSelect);
     $this->assign('viewId', $editMap ? $map['view_id'] : 'preview_id_' . mt_rand(1, 9999));
     $this->assign('promoModPath', frameGmp::_()->getModule('supsystic_promo')->getModPath());
     return parent::getContent('gmapEditMap');
 }
Example #13
0
 public function getSettitngsBlockHtml()
 {
     return parent::getContent('csvSettitngsBlockHtml');
 }
Example #14
0
 public function getListOperations($markerGroup)
 {
     $this->assign('marker_group', $markerGroup);
     $this->assign('editLink', $this->getModule()->getEditMarkerGroupLink($markerGroup['id']));
     return parent::getContent('mgrListOperations');
 }
Example #15
0
 public function getUnderMapAdminFormData()
 {
     return parent::getContent('underMapAdminFormData');
 }