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 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; }
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>
?> <?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;"')); ?>
?> " > <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() { //$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)); }
<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
<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
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>