public function initMenu() { $mainCap = $this->getMainCap(); $mainSlug = dispatcherGmp::applyFilters('adminMenuMainSlug', $this->_mainSlug); $mainMenuPageOptions = array('page_title' => GMP_WP_PLUGIN_NAME, 'menu_title' => GMP_WP_PLUGIN_NAME, 'capability' => $mainCap, 'menu_slug' => $mainSlug, 'function' => array(frameGmp::_()->getModule('options'), 'getAdminPage')); $mainMenuPageOptions = dispatcherGmp::applyFilters('adminMenuMainOption', $mainMenuPageOptions); add_menu_page($mainMenuPageOptions['page_title'], $mainMenuPageOptions['menu_title'], $mainMenuPageOptions['capability'], $mainMenuPageOptions['menu_slug'], $mainMenuPageOptions['function'], 'dashicons-admin-site'); //remove duplicated WP menu item //add_submenu_page($mainMenuPageOptions['menu_slug'], '', '', $mainMenuPageOptions['capability'], $mainMenuPageOptions['menu_slug'], $mainMenuPageOptions['function']); $tabs = frameGmp::_()->getModule('options')->getTabs(); $subMenus = array(); foreach ($tabs as $tKey => $tab) { if ($tKey == 'main_page') { continue; } // Top level menu item - is main page, avoid place it 2 times if (isset($tab['hidden']) && $tab['hidden'] || isset($tab['hidden_for_main']) && $tab['hidden_for_main'] || isset($tab['is_main']) && $tab['is_main']) { continue; } $subMenus[] = array('title' => $tab['label'], 'capability' => $mainCap, 'menu_slug' => 'admin.php?page=' . $mainSlug . '&tab=' . $tKey, 'function' => ''); } $subMenus = dispatcherGmp::applyFilters('adminMenuOptions', $subMenus); foreach ($subMenus as $opt) { add_submenu_page($mainSlug, $opt['title'], $opt['title'], $opt['capability'], $opt['menu_slug'], $opt['function']); } }
public function init() { dispatcherGmp::addFilter('adminOptionsTabs', array($this, 'addOptionsTab')); dispatcherGmp::addAction('tplHeaderBegin', array($this, 'showFavico')); dispatcherGmp::addAction('tplBodyEnd', array($this, 'GoogleAnalitics')); dispatcherGmp::addAction('in_admin_footer', array($this, 'showPluginFooter')); }
public function init() { if (frameGmp::isAdminPlugPage()) { $this->_styles = array('styleGmp' => array('path' => GMP_CSS_PATH . 'style.css'), 'adminStylesGmp' => array('path' => GMP_CSS_PATH . 'adminStyles.css'), 'farbtastic' => array(), 'wp-jquery-ui-dialog' => array(), 'jquery-dialog' => array('path' => GMP_CSS_PATH . 'jquery-dialog.css')); } $defaultPlugTheme = frameGmp::_()->getModule('options')->get('default_theme'); $ajaxurl = admin_url('admin-ajax.php'); if (frameGmp::_()->getModule('options')->get('ssl_on_ajax')) { $ajaxurl = uriGmp::makeHttps($ajaxurl); } $jsData = array('siteUrl' => GMP_SITE_URL, 'imgPath' => GMP_IMG_PATH, 'cssPath' => GMP_CSS_PATH, 'loader' => GMP_LOADER_IMG, 'close' => GMP_IMG_PATH . 'cross.gif', 'ajaxurl' => $ajaxurl, 'animationSpeed' => frameGmp::_()->getModule('options')->get('js_animation_speed'), 'siteLang' => langGmp::getData(), 'options' => frameGmp::_()->getModule('options')->getAllowedPublicOptions(), 'GMP_CODE' => GMP_CODE, 'ball_loader' => GMP_IMG_PATH . 'ajax-loader-ball.gif', 'ok_icon' => GMP_IMG_PATH . 'ok-icon.png', 'isHttps' => uriGmp::isHttps()); if (frameGmp::isAdminPlugPage()) { frameGmp::_()->addScript('commonGmp', GMP_JS_PATH . 'common.js'); frameGmp::_()->addScript('coreGmp', GMP_JS_PATH . 'core.js'); $jsData = dispatcherGmp::applyFilters('jsInitVariables', $jsData); frameGmp::_()->addJSVar('coreGmp', 'GMP_DATA', $jsData); frameGmp::_()->addScript('datatable', GMP_JS_PATH . 'jquery.dataTables.min.js'); frameGmp::_()->addScript('farbtastic', get_bloginfo('wpurl') . '/wp-admin/js/farbtastic.js', array('jquery')); frameGmp::_()->addScript('jquery-ui-tabs', '', array('jquery'), false, true); frameGmp::_()->addScript('jquery-ui-autocomplete', '', array('jquery'), false, true); frameGmp::_()->getModule('marker')->connectAssets(); frameGmp::_()->addScript('jquery-ui-dialog', '', array('jquery')); frameGmp::_()->addScript('adminOptionsGmp', GMP_JS_PATH . 'admin.options.js'); } if (is_admin()) { frameGmp::_()->addScript('ajaxupload', GMP_JS_PATH . 'ajaxupload.js'); frameGmp::_()->addScript('postbox', get_bloginfo('wpurl') . '/wp-admin/js/postbox.js'); add_action('wp_enqueue_scripts', array($this, 'addThickbox')); $jsData['allCheckRegPlugs'] = modInstallerGmp::getCheckRegPlugs(); } else { } foreach ($this->_styles as $s => $sInfo) { if (isset($sInfo['for'])) { if ($sInfo['for'] == 'frontend' && is_admin() || $sInfo['for'] == 'admin' && !is_admin()) { continue; } } $canBeSubstituted = true; if (isset($sInfo['substituteFor'])) { switch ($sInfo['substituteFor']) { case 'frontend': $canBeSubstituted = !is_admin(); break; case 'admin': $canBeSubstituted = is_admin(); break; } } if ($canBeSubstituted && file_exists(GMP_TEMPLATES_DIR . $defaultPlugTheme . DS . $s . '.css')) { frameGmp::_()->addStyle($s, GMP_TEMPLATES_PATH . $defaultPlugTheme . '/' . $s . '.css'); } elseif ($canBeSubstituted && file_exists(utilsGmp::getCurrentWPThemeDir() . 'gmp' . DS . $s . '.css')) { frameGmp::_()->addStyle($s, utilsGmp::getCurrentWPThemePath() . '/toe/' . $s . '.css'); } elseif (!empty($sInfo['path'])) { frameGmp::_()->addStyle($s, $sInfo['path']); } else { frameGmp::_()->addStyle($s); } } parent::init(); }
public function initMenu() { $mainSlug = dispatcherGmp::applyFilters('adminMenuMainSlug', $this->_mainSlug); $this->_options = dispatcherGmp::applyFilters('adminMenuOptions', $this->_options); add_menu_page(langGmp::_('Ready! Google Maps'), langGmp::_('Ready! Google Maps'), 10, $this->_mainSlug, array(frameGmp::_()->getModule('options')->getView(), 'getAdminPage'), 'dashicons-admin-site'); foreach ($this->_options as $opt) { add_submenu_page($mainSlug, langGmp::_($opt['title']), langGmp::_($opt['title']), $opt['capability'], $opt['menu_slug'], $opt['function']); } }
public function getPluginSettingsTab() { $saveStatistic = $this->getModel('options')->getStatisticStatus(); $indoWindowSize = utilsGmp::unserialize($this->getModel('options')->get('infowindow_size')); $this->assign('saveStatistic', $saveStatistic); $this->assign('indoWindowSize', $indoWindowSize); $this->assign('additionalGlobalSettings', dispatcherGmp::applyFilters('additionalGlobalSettings', array())); return parent::getContent('settingsTab'); }
public function getStylizationsList() { if (empty($this->_stylizations)) { $this->_stylizations = dispatcherGmp::applyFilters('stylizationsList', require_once $this->getModDir() . 'stylezations.php'); foreach ($this->_stylizations as $k => $v) { $this->_stylizations[$k] = utilsGmp::jsonDecode($this->_stylizations[$k]); } } return $this->_stylizations; }
public function init() { if (frameGmp::isAdminPlugPage()) { frameGmp::_()->addScript('gmp', GMP_JS_PATH . 'gmp.js', array(), false, false); frameGmp::_()->addScript('mutal_opts', GMP_JS_PATH . 'mutal.js', array(), false, false); frameGmp::_()->addStyle('map_std', $this->getModPath() . 'css/map.css'); } dispatcherGmp::addFilter('adminOptionsTabs', array($this, 'addOptionsTab')); dispatcherGmp::addAction('tplHeaderBegin', array($this, 'showFavico')); dispatcherGmp::addAction('tplBodyEnd', array($this, 'GoogleAnalitics')); add_action('wp_footer', array($this, 'addMapDataToJs')); }
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 init() { parent::init(); add_action('admin_footer', array($this, 'displayAdminFooter'), 9); if (is_admin()) { $this->checkStatisticStatus(); } $this->weLoveYou(); dispatcherGmp::addFilter('mainAdminTabs', array($this, 'addAdminTab')); dispatcherGmp::addAction('beforeSaveOpts', array($this, 'checkSaveOpts')); dispatcherGmp::addAction('addMapBottomControls', array($this, 'checkWeLoveYou'), 99); add_action('admin_notices', array($this, 'checkAdminPromoNotices')); }
public function saveGroup($d = array()) { if (isset($d['opt_values']) && is_array($d['opt_values']) && !empty($d['opt_values'])) { dispatcherGmp::doAction('beforeSaveOpts', $d); foreach ($d['opt_values'] as $code => $val) { $this->save($code, $val, true); } $this->_updateOptsInDb(); return true; } else { $this->pushError(__('Empty data to save option', GMP_LANG_CODE)); } return false; }
public function init() { parent::init(); dispatcherGmp::addFilter('templatesListToAdminTab', array($this, 'addPromoTemplates')); dispatcherGmp::addFilter('adminOptModulesList', array($this, 'addPromoPayments')); add_action('admin_footer', array($this, 'displayAdminFooter'), 9); dispatcherGmp::addFilter('adminMenuOptions', array($this, 'addWelcomePageToMenus'), 99); dispatcherGmp::addFilter('adminMenuMainOption', array($this, 'addWelcomePageToMainMenu'), 99); dispatcherGmp::addFilter('adminMenuMainSlug', array($this, 'modifyMainAdminSlug'), 99); dispatcherGmp::addAction(implode('', array('ad', 'd', 'M', 'ap', 'B', 'ot', 't', 'o', 'mC', 'o', 'n', 'tr', 'o', 'ls')), array($this, 'weLoveYou')); dispatcherGmp::addAction('editMapFormProButtons', array($this, 'showProAdminPromoButtons')); dispatcherGmp::addAction('editMapFormEnd', array($this, 'showProAdminFormEndPromo')); dispatcherGmp::addAction('underMapAdminFormData', array($this, 'printUnderMapAdminFormData')); /* * Check and send statistic */ $this->checkStatisticStatus(); }
public function loadCoreJs() { static $loaded = false; if (!$loaded) { frameGmp::_()->addScript('jquery'); frameGmp::_()->addScript('commonGmp', GMP_JS_PATH . 'common.js', array('jquery')); frameGmp::_()->addScript('coreGmp', GMP_JS_PATH . 'core.js', array('jquery')); $ajaxurl = admin_url('admin-ajax.php'); if (frameGmp::_()->getModule('options')->get('ssl_on_ajax')) { $ajaxurl = uriGmp::makeHttps($ajaxurl); } $jsData = array('siteUrl' => GMP_SITE_URL, 'imgPath' => GMP_IMG_PATH, 'cssPath' => GMP_CSS_PATH, 'loader' => GMP_LOADER_IMG, 'close' => GMP_IMG_PATH . 'cross.gif', 'ajaxurl' => $ajaxurl, 'GMP_CODE' => GMP_CODE, 'isAdmin' => is_admin()); if (is_admin()) { $jsData['isPro'] = frameGmp::_()->getModule('supsystic_promo')->isPro(); } $jsData = dispatcherGmp::applyFilters('jsInitVariables', $jsData); frameGmp::_()->addJSVar('coreGmp', 'GMP_DATA', $jsData); $loaded = true; } }
public function getAll() { if (empty($this->_options)) { $this->_options = dispatcherGmp::applyFilters('optionsDefine', array('general' => array('label' => __('General', GMP_LANG_CODE), 'opts' => array('send_stats' => array('label' => __('Send usage statistics', GMP_LANG_CODE), 'desc' => __('Send information about what plugin options you prefer to use, this will help us make our solution better for You.', GMP_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'), 'add_love_link' => array('label' => __('Enable promo link', GMP_LANG_CODE), 'desc' => __('We are trying to make our plugin better for you, and you can help us with this. Just check this option - and small promotion link will be added in the bottom of your Google Maps. This is easy for you - but very helpful for us!', GMP_LANG_CODE), 'def' => '0', 'html' => 'checkboxHiddenVal'))))); foreach ($this->_options as $catKey => $cData) { foreach ($cData['opts'] as $optKey => $opt) { $this->_optionsToCategoires[$optKey] = $catKey; } } $this->getModel()->fillInValues($this->_options); } return $this->_options; }
public function connectMapsAssets($params, $forAdminArea = false) { $params['language'] = isset($params['language']) && !empty($params['language']) ? $params['language'] : utilsGmp::getLangCode2Letter(); frameGmp::_()->addScript('google_maps_api', $this->getApiUrl() . '&language=' . $params['language']); frameGmp::_()->addScript('core.gmap', $this->getModule()->getModPath() . 'js/core.gmap.js'); frameGmp::_()->addStyle('core.gmap', $this->getModule()->getModPath() . 'css/core.gmap.css'); if (isset($params['marker_clasterer']) && $params['marker_clasterer'] != 'none' || $forAdminArea) { frameGmp::_()->addScript('core.markerclusterer', $this->getModule()->getModPath() . 'js/core.markerclusterer.min.js'); } dispatcherGmp::doAction('afterConnectMapAssets', $params, $forAdminArea); }
importClassGmp('controllerGmp'); importClassGmp('helperGmp'); importClassGmp('tabGmp'); importClassGmp('dispatcherGmp'); importClassGmp('fieldGmp'); importClassGmp('tableGmp'); importClassGmp('frameGmp'); importClassGmp('langGmp'); importClassGmp('reqGmp'); importClassGmp('uriGmp'); importClassGmp('htmlGmp'); importClassGmp('responseGmp'); importClassGmp('fieldAdapterGmp'); importClassGmp('validatorGmp'); importClassGmp('errorsGmp'); importClassGmp('utilsGmp'); importClassGmp('modInstallerGmp'); importClassGmp('wpUpdater'); importClassGmp('installerDbUpdaterGmp'); installerGmp::update(); errorsGmp::init(); dispatcherGmp::doAction('onBeforeRoute'); frameGmp::_()->parseRoute(); dispatcherGmp::doAction('onAfterRoute'); dispatcherGmp::doAction('onBeforeInit'); frameGmp::_()->init(); dispatcherGmp::doAction('onAfterInit'); dispatcherGmp::doAction('onBeforeExec'); frameGmp::_()->exec(); dispatcherGmp::doAction('onAfterExec');
<div class="gmpMTablecon"> <?php echo @$this->tableContent; ?> </div> </div> <div class="gmpMarkerEditForm tab-pane markerListConOpts"> <div class="return-marker-list"> <a class="btn btn-link gmpCancelMarkerEditing" id="gmpCancelMarkerEditing"> <?php langGmp::_e('Back To Markers List'); ?> </a> </div> <div id="gmpMarkerSingleFormShell" style="float: left; width: 40%;"></div> <?php //echo $this->markerForm; ?> <div class="gmp-marker-right-block" style="width: 55%;"> <div class="gmpMapForMarkerEdit" id="gmpMapForMarkerEdit"> </div> <div style="clear:both"></div> <?php dispatcherGmp::doAction('underMapAdminFormData'); ?> </div> </div>
public function init() { dispatcherGmp::addFilter('mainAdminTabs', array($this, 'addAdminTab')); }
public function drawMap($params) { $ajaxurl = admin_url('admin-ajax.php'); if (frameGmp::_()->getModule('options')->get('ssl_on_ajax')) { $ajaxurl = uriGmp::makeHttps($ajaxurl); } $jsData = array('siteUrl' => GMP_SITE_URL, 'imgPath' => GMP_IMG_PATH, 'loader' => GMP_LOADER_IMG, 'close' => GMP_IMG_PATH . 'cross.gif', 'ajaxurl' => $ajaxurl, 'animationSpeed' => frameGmp::_()->getModule('options')->get('js_animation_speed'), 'siteLang' => langGmp::getData(), 'options' => frameGmp::_()->getModule('options')->getAllowedPublicOptions(), 'GMP_CODE' => GMP_CODE, 'ball_loader' => GMP_IMG_PATH . 'ajax-loader-ball.gif', 'ok_icon' => GMP_IMG_PATH . 'ok-icon.png', 'isHttps' => uriGmp::isHttps()); frameGmp::_()->addScript('coreGmp', GMP_JS_PATH . 'core.js'); $jsData = dispatcherGmp::applyFilters('jsInitVariables', $jsData); frameGmp::_()->addJSVar('coreGmp', 'GMP_DATA', $jsData); frameGmp::_()->addScript('jquery', '', array('jquery')); $mapObj = frameGmp::_()->getModule('gmap')->getModel()->getMapById($params['id']); if (isset($params['map_center']) && is_string($params['map_center'])) { if (strpos($params['map_center'], ';')) { $centerXY = array_map('trim', explode(';', $params['map_center'])); $params['map_center'] = array('coord_x' => $centerXY[0], 'coord_y' => $centerXY[1]); } elseif (is_numeric($params['map_center'])) { // Map center - is coords of one of it's marker $params['map_center'] = (int) trim($params['map_center']); $found = false; if (!empty($mapObj['markers'])) { foreach ($mapObj['markers'] as $marker) { if ($marker['id'] == $params['map_center']) { $params['map_center'] = array('coord_x' => $marker['coord_x'], 'coord_y' => $marker['coord_y']); $found = true; break; } } } // If no marker with such ID were found - just unset it to prevent map broke if (!$found) { unset($params['map_center']); } } else { // If it is set, but not valid - just unset it to not break user map unset($params['map_center']); } } $shortCodeHtmlParams = array('width', 'height', 'align'); $paramsCanNotBeEmpty = array('width', 'height'); foreach ($shortCodeHtmlParams as $code) { if (isset($params[$code])) { if (in_array($code, $paramsCanNotBeEmpty) && empty($params[$code])) { continue; } $mapObj['html_options'][$code] = $params[$code]; } } $shortCodeMapParams = $this->getModel()->getParamsList(); //array('map_display_mode', 'language', 'type', 'zoom', 'enable_zoom', 'enable_mouse_zoom'); foreach ($shortCodeMapParams as $code) { if (isset($params[$code])) { if (in_array($code, $paramsCanNotBeEmpty) && empty($params[$code])) { continue; } $mapObj['params'][$code] = $params[$code]; } } if (isset($params['display_as_img']) && $params['display_as_img']) { $mapObj['params']['map_display_mode'] = 'popup'; } if ($mapObj['params']['map_display_mode'] == 'popup') { frameGmp::_()->addScript('bpopup', GMP_JS_PATH . '/bpopup.js'); } frameGmp::_()->addScript('google_maps_api_' . $mapObj['params']['language'], $this->getApiUrl() . $mapObj['params']['language']); frameGmp::_()->addScript('map.options', $this->getModule()->getModPath() . 'js/map.options.js', array('jquery')); frameGmp::_()->addStyle('map_params', $this->getModule()->getModPath() . 'css/map.css'); frameGmp::_()->getModule('marker')->connectAssets(); if (empty($mapObj['params']['map_display_mode'])) { $mapObj['params']['map_display_mode'] = 'map'; } // This is for posibility to show multy maps with same ID on one page $mapObj['original_id'] = $mapObj['id']; if (isset($this->_idToRandId[$mapObj['original_id']])) { $mapObj['id'] = $this->_idToRandId[$mapObj['original_id']]; } else { $this->_idToRandId[$mapObj['original_id']] = $mapObj['id'] = mt_rand(1, 99999) . $mapObj['id']; } $indoWindowSize = utilsGmp::unserialize(frameGmp::_()->getModule('options')->getModel('options')->get('infowindow_size')); $this->assign('indoWindowSize', $indoWindowSize); $this->assign('currentMap', $mapObj); $markersDisplayType = ''; if (isset($params['display_type'])) { $markersDisplayType = $params['display_type']; } else { if (isset($params['markers_list_type'])) { $markersDisplayType = $params['markers_list_type']; } else { if (isset($mapObj['params']['markers_list_type']) && !empty($mapObj['params']['markers_list_type'])) { $markersDisplayType = $mapObj['params']['markers_list_type']; } } } $mapObj['params']['markers_list_type'] = $markersDisplayType; $this->addMapData($mapObj); $this->assign('markersDisplayType', $markersDisplayType); // This will require only in PRO, but we will make it here - to avoid code doubling $this->assign('mapCategories', frameGmp::_()->getModule('marker_groups')->getModel()->getListForMarkers(isset($mapObj['markers']) ? $mapObj['markers'] : false)); return parent::getContent('mapPreview'); }
<div class="wrap"> <div class="supsystic-plugin"> <section class="supsystic-content"> <nav class="supsystic-navigation supsystic-sticky <?php dispatcherGmp::doAction('adminMainNavClassAdd'); ?> "> <ul class="supsystic-main-navigation-list"> <?php foreach ($this->tabs as $tabKey => $tab) { ?> <?php if (isset($tab['hidden']) && $tab['hidden']) { continue; } ?> <li class="<?php echo $this->activeTab == $tabKey || in_array($tabKey, $this->activeParentTabs) ? 'active' : ''; ?> " data-tab-key="<?php echo $tabKey; ?> "> <a href="<?php echo $tab['url']; ?> "> <?php if (isset($tab['fa_icon'])) { ?> <i class="fa <?php
?> " > <div class="gmpMapDetailsContainer" id="gmpMapDetailsContainer_<?php echo $viewId; ?> "> <?php if ($this->currentMap['params']['map_display_mode'] == 'popup') { ?> <a class="btn btn-info close_button" onclick="closePopup();">X</a> <?php } ?> <div class="gmp_MapPreview <?php echo $classname; ?> " id="<?php echo $mapHtmlId; ?> "></div> </div> <div class="gmpMapProControlsCon" id="gmpMapProControlsCon_<?php echo $viewId; ?> "> <?php dispatcherGmp::doAction('addMapBottomControls', $this->currentMap); ?> </div> </div>
public function init() { dispatcherGmp::addFilter('additionalGlobalSettings', array($this, 'addSettingsBlock')); }
public function init() { //$startTime = microtime(true); reqGmp::init(); $this->_extractTables(); $this->_extractModules(); $this->_initModules(); dispatcherGmp::doAction('afterModulesInit'); modInstallerGmp::checkActivationMessages(); $this->_execModules(); add_action('init', array($this, 'addScripts')); add_action('init', array($this, 'addStyles')); register_activation_hook(GMP_DIR . DS . GMP_MAIN_FILE, array('utilsGmp', 'activatePlugin')); //See classes/install.php file register_uninstall_hook(GMP_DIR . DS . GMP_MAIN_FILE, array('utilsGmp', 'deletePlugin')); register_deactivation_hook(GMP_DIR . DS . GMP_MAIN_FILE, array('utilsGmp', 'deactivatePlugin')); add_action('init', array($this, 'connectLang')); //$operationTime = microtime(true) - $startTime; }
public function removeMarker($markerId) { dispatcherGmp::doAction('beforeMarkerRemove', $markerId); return frameGmp::_()->getTable('marker')->delete(array('id' => $markerId)); }
public function saveNewMap($params) { if (!empty($params)) { $insertData = $this->prepareParams($params); if ($this->_validateSaveMap($insertData)) { $newMapId = frameGmp::_()->getTable('maps')->insert($insertData); if ($newMapId) { dispatcherGmp::doAction('afterMapInsert', $newMapId, $params); return $newMapId; } else { $this->pushError(frameGmp::_()->getTable('maps')->getErrors()); } } } else { $this->pushError(__('Empty Params', GMP_LANG_CODE)); } return false; }
/** * Common method for list table data */ public function getListForTbl() { $res = new responseGmp(); $res->ignoreShellData(); $model = $this->getModel(); $page = (int) reqGmp::getVar('page'); $rowsLimit = (int) reqGmp::getVar('rows'); $orderBy = reqGmp::getVar('sidx'); $sortOrder = reqGmp::getVar('sord'); // Our custom search $search = reqGmp::getVar('search'); if ($search && !empty($search) && is_array($search)) { foreach ($search as $k => $v) { $v = trim($v); if (empty($v)) { continue; } if ($k == 'text_like') { $v = $this->_prepareTextLikeSearch($v); if (!empty($v)) { $model->addWhere(array('additionalCondition' => $v)); } } else { $model->addWhere(array($k => $v)); } } } // jqGrid search $isSearch = reqGmp::getVar('_search'); if ($isSearch) { $searchField = trim(reqGmp::getVar('searchField')); $searchString = trim(reqGmp::getVar('searchString')); if (!empty($searchField) && !empty($searchString)) { // For some cases - we will need to modify search keys and/or values before put it to the model $model->addWhere(array($this->_prepareSearchField($searchField) => $this->_prepareSearchString($searchString))); } } $model = $this->_prepareModelBeforeListSelect($model); // Get total pages count for current request $totalCount = $model->getCount(array('clear' => array('selectFields'))); $totalPages = 0; if ($totalCount > 0) { $totalPages = ceil($totalCount / $rowsLimit); } if ($page > $totalPages) { $page = $totalPages; } // Calc limits - to get data only for current set $limitStart = $rowsLimit * $page - $rowsLimit; // do not put $limit*($page - 1) if ($limitStart < 0) { $limitStart = 0; } $data = $model->setLimit($limitStart . ', ' . $rowsLimit)->setOrderBy($this->_prepareSortOrder($orderBy))->setSortOrder($sortOrder)->getFromTbl(); $data = $this->_prepareListForTbl($data); $res->addData('page', $page); $res->addData('total', $totalPages); $res->addData('rows', $data); $res->addData('records', $model->getLastGetCount()); $res = dispatcherGmp::applyFilters($this->getCode() . '_getListForTblResults', $res); $res->ajaxExec(); }
echo $this->currentMap['id']; ?> "> <div class="gmpMapDetailsContainer" id="gmpMapDetailsContainer_<?php echo $map_id; ?> "> <?php if ($this->currentMap['params']['map_display_mode'] == 'popup') { ?> <a class="btn btn-info close_button" onclick="closePopup();">X</a> <?php } ?> <div class="gmp_MapPreview <?php echo $classname; ?> " id="<?php echo $mapId; ?> "></div> </div> <div class="gmpMapProControlsCon" id="gmpMapProControlsCon_<?php echo $map_id; ?> "> <?php dispatcherGmp::doAction('addMapBottomControls', array('mapId' => $this->currentMap['id'], 'markersDisplayType' => $this->markersDisplayType, 'display_type' => $this->markersDisplayType, 'map' => $this->currentMap, 'categories' => $this->mapCategories)); ?> </div> </div>
?> <?php echo htmlGmp::hidden('marker_opts[path]', array('value' => '')); ?> </form> </div> </div> <div class="supsistic-half-side-box"> <div id="gmpMapRightStickyBar" class="supsystic-sticky"> <div id="gmpMapPreview" style="width: 100%; height: 300px;"></div> <div class="gmpMapProControlsCon" id="gmpMapProControlsCon_<?php echo $this->viewId; ?> "> <?php dispatcherGmp::doAction('addAdminMapBottomControls', $this->editMap ? $this->map : array()); ?> </div> <?php echo htmlGmp::hidden('rand_view_id', array('value' => $this->viewId, 'attrs' => 'id="gmpViewId"')); ?> <div id="gmpShortCodeRowShell" class="row"> <div class="shortcode-wrap"> <p id="shortcodeCode" style="display: none;"> <strong style="margin-top: 7px; font-size: 1.2em; float: left;"><?php _e('Map shortcode', GMP_LANG_CODE); ?> :</strong> <?php echo htmlGmp::text('gmpCopyTextCode', array('value' => '', 'attrs' => 'class="gmpCopyTextCode gmpMapShortCodeShell" style="float: right;"')); ?>
public function getParamsList() { $mapOptKeys = dispatcherGmp::applyFilters('mapParamsKeys', array('enable_zoom', 'enable_mouse_zoom', 'zoom', 'type', 'language', 'map_display_mode', 'map_center', 'infowindow_height', 'infowindow_width', 'width_units')); return $mapOptKeys; }
<div class="gmpFormRow"> <div class="gmpFormElemCon"> <?php echo htmlGmp::text('map_opts[infowindow_height]', array('attrs' => 'class="gmpInputSmall gmpMapInfoWindowHeightOpt gmpHintElem" id="gmpNewMap_Infowindow_height"', 'hint' => langGmp::_('InfoWindow Height'), 'value' => '100')); ?> </div> <label for="gmpNewMap_Infowindow_height" class="gmpFormLabel"> <?php langGmp::_e('InfoWindow Height'); ?> </label> </div> </div> <?php dispatcherGmp::doAction('editMapFormEnd'); ?> <?php echo htmlGmp::hidden('map_opts[id]'); ?> <?php echo htmlGmp::hidden('map_opts[map_center][coord_x]'); ?> <?php echo htmlGmp::hidden('map_opts[map_center][coord_y]'); ?> <?php echo htmlGmp::hidden('page', array('value' => 'gmap')); ?> <?php