/** * Setup and render the info tab. */ function display() { $this->cache_expired = $this->is_cache_expired(); $this->settings->add_section(array('name' => __('Navigation', 'store-locator-le'), 'div_id' => 'navbar_wrapper', 'description' => $this->adminui->create_Navbar(), 'innerdiv' => false, 'is_topmenu' => true, 'auto' => false, 'headerbar' => false)); $this->settings->add_section(array('name' => __('How to Use', 'store-locator-le'), 'div_id' => 'how_to_use', 'description' => $this->createstring_HowToUse())); $this->settings->add_section(array('name' => __('Plugin News', 'store-locator-le'), 'div_id' => 'plugin_news', 'description' => $this->get_broadcast())); $this->settings->add_section(array('name' => __('Plugin Environment', 'store-locator-le'), 'div_id' => 'plugin_environment', 'description' => $this->create_EnvironmentPanel())); $this->settings->render_settings_page(); $this->adminui->render_rate_box(); if ($this->cache_expired) { $this->update_cache_timestamp(); } }
/** * Render the manage locations admin page. * */ function render_adminpage() { $this->slplus->debugMP('slp.managelocs', 'msg', __FUNCTION__); $this->slplus->helper->loadPluginData(); $this->slplus->AdminUI->initialize_variables(); $this->process_Actions(); //------------------------------------------------------------------------ // CHANGE UPDATER // Changing Updater //------------------------------------------------------------------------ if (isset($_GET['changeUpdater']) && $_GET['changeUpdater'] == 1) { if (get_option('sl_location_updater_type') == "Tagging") { update_option('sl_location_updater_type', 'Multiple Fields'); $updaterTypeText = "Multiple Fields"; } else { update_option('sl_location_updater_type', 'Tagging'); $updaterTypeText = "Tagging"; } $_SERVER['REQUEST_URI'] = preg_replace('/&changeUpdater=1/', '', $_SERVER['REQUEST_URI']); print "<script>location.replace('" . $_SERVER['REQUEST_URI'] . "');</script>"; } //------------------------------------------------------------------------ // Reload Variables - anything that my have changed //------------------------------------------------------------------------ $this->slplus->helper->getData('sl_admin_locations_per_page', 'get_option', null, '10', true, true); //-------------------------------------- // Setup the Location panel navigation //-------------------------------------- $subtabs = apply_filters('slp_locations_subtabs', array(__('Manage', 'csa-slplus'), __('Add', 'csa-slplus'))); //------------------------------------ // Create Location Panels // add_action('slp_build_locations_panels', array($this, 'create_settings_section_Manage'), 10); add_action('slp_build_locations_panels', array($this, 'create_settings_section_Add'), 20); //------------------------- // Setup Navigation Bar // $this->settings->add_section(array('name' => 'Navigation', 'div_id' => 'navbar_wrapper', 'description' => $this->slplus->AdminUI->create_Navbar(), 'innerdiv' => false, 'is_topmenu' => true, 'auto' => false, 'headerbar' => false)); //------------------------------------ // Render It // do_action('slp_build_locations_panels'); $this->settings->render_settings_page(); }
/** * Render the map settings admin page. */ function render_adminpage() { // If we are updating settings... // if (isset($_REQUEST['action']) && $_REQUEST['action'] === 'update' && isset($_REQUEST['_wpnonce']) && !empty($_REQUEST['_wpnonce'])) { $this->save_Settings(); } // Setup and render settings page // $this->settings = new wpCSL_settings__slplus(array('prefix' => $this->plugin->prefix, 'css_prefix' => $this->plugin->prefix, 'url' => $this->plugin->url, 'name' => $this->plugin->name . ' - ' . __('General Settings', 'csa-slplus'), 'plugin_url' => $this->plugin->plugin_url, 'render_csl_blocks' => false, 'form_action' => admin_url() . 'admin.php?page=' . $this->slug)); $this->settings->add_section(array('name' => 'Navigation', 'div_id' => 'navbar_wrapper', 'description' => $this->plugin->AdminUI->create_Navbar(), 'innerdiv' => false, 'is_topmenu' => true, 'auto' => false, 'headerbar' => false)); // Panel building actions // add_action('slp_build_general_settings_panels', array($this, 'build_UserSettingsPanel'), 10); add_action('slp_build_general_settings_panels', array($this, 'build_GoogleSettingsPanel'), 20); add_action('slp_build_general_settings_panels', array($this, 'build_AdminSettingsPanel'), 30); //------------------------------------ // Render It // do_action('slp_build_general_settings_panels'); $this->settings->render_settings_page(); }
/** * Render the manage locations admin page. * */ function render_adminpage() { $this->process_Actions(); //------------------------------------------------------------------------ // CHANGE UPDATER // Changing Updater //------------------------------------------------------------------------ if (isset($_GET['changeUpdater']) && $_GET['changeUpdater'] == 1) { if (get_option('sl_location_updater_type') == "Tagging") { update_option('sl_location_updater_type', 'Multiple Fields'); $updaterTypeText = "Multiple Fields"; } else { update_option('sl_location_updater_type', 'Tagging'); $updaterTypeText = "Tagging"; } $_SERVER['REQUEST_URI'] = preg_replace('/&changeUpdater=1/', '', $_SERVER['REQUEST_URI']); print "<script>location.replace('" . $_SERVER['REQUEST_URI'] . "');</script>"; } //------------------------------------ // Create Location Panels // add_action('slp_build_locations_panels', array($this, 'create_settings_section_Manage'), 10); add_action('slp_build_locations_panels', array($this, 'create_settings_section_Add'), 20); //------------------------- // Setup Navigation Bar // $this->settings->add_section(array('name' => 'Navigation', 'div_id' => 'navbar_wrapper', 'description' => $this->slplus->AdminUI->create_Navbar(), 'innerdiv' => false, 'is_topmenu' => true, 'auto' => false, 'headerbar' => false)); /** * Hook executes when building the locations panels, before rendering. * * @action slp_build_locations_panels */ do_action('slp_build_locations_panels'); $this->enqueue_scripts(); $this->settings->render_settings_page(); }
/** * Render the map settings admin page. */ function render_adminpage() { if (!$this->set_Plugin()) { return; } $update_msg = ''; // We Have a POST - Save Settings // if ($_POST) { add_action('slp_save_map_settings', array($this, 'save_settings'), 10); do_action('slp_save_map_settings'); $update_msg = "<div class='highlight'>" . __('Successful Update', 'csa-slplus'); foreach ($this->update_info as $info_msg) { $update_msg .= '<br/>' . $info_msg; } $update_msg .= '</div>'; } // Initialize Plugin Settings Data // $this->plugin->AdminUI->initialize_variables(); $this->plugin->helper->loadPluginData(); /** * @see http://goo.gl/UAXly - endIcon - the default map marker to be used for locations shown on the map * @see http://goo.gl/UAXly - endIconPicker - the icon selection HTML interface * @see http://goo.gl/UAXly - homeIcon - the default map marker to be used for the starting location during a search * @see http://goo.gl/UAXly - homeIconPicker - the icon selection HTML interface * @see http://goo.gl/UAXly - iconNotice - the admin panel message if there is a problem with the home or end icon * @see http://goo.gl/UAXly - siteURL - get_site_url() WordPress call */ if (!isset($this->plugin->data['homeIconPicker'])) { $this->plugin->data['homeIconPicker'] = $this->plugin->AdminUI->CreateIconSelector('sl_map_home_icon', 'home_icon_preview'); } if (!isset($this->plugin->data['endIconPicker'])) { $this->plugin->data['endIconPicker'] = $this->plugin->AdminUI->CreateIconSelector('sl_map_end_icon', 'end_icon_preview'); } // Icon is the old path, notify them to re-select // $this->plugin->data['iconNotice'] = ''; if (!isset($this->plugin->data['siteURL'])) { $this->plugin->data['siteURL'] = get_site_url(); } if (!(strpos($this->plugin->data['sl_map_home_icon'], 'http') === 0)) { $this->plugin->data['sl_map_home_icon'] = $this->plugin->data['siteURL'] . $this->plugin->data['sl_map_home_icon']; } if (!(strpos($this->plugin->data['sl_map_end_icon'], 'http') === 0)) { $this->plugin->data['sl_map_end_icon'] = $this->plugin->data['siteURL'] . $this->plugin->data['sl_map_end_icon']; } if (!$this->plugin->helper->webItemExists($this->plugin->data['sl_map_home_icon'])) { $this->plugin->data['iconNotice'] .= sprintf(__('Your home marker %s cannot be located, please select a new one.', 'csa-slplus'), $this->plugin->data['sl_map_home_icon']) . '<br/>'; } if (!$this->plugin->helper->webItemExists($this->plugin->data['sl_map_end_icon'])) { $this->plugin->data['iconNotice'] .= sprintf(__('Your destination marker %s cannot be located, please select a new one.', 'csa-slplus'), $this->plugin->data['sl_map_end_icon']) . '<br/>'; } if ($this->plugin->data['iconNotice'] != '') { $this->plugin->data['iconNotice'] = "<div class='highlight' style='background-color:LightYellow;color:red'><span style='color:red'>" . $this->plugin->data['iconNotice'] . "</span></div>"; } //------------------------- // Navbar Section //------------------------- $this->settings->add_section(array('name' => 'Navigation', 'div_id' => 'navbar_wrapper', 'description' => $this->plugin->AdminUI->create_Navbar(), 'innerdiv' => false, 'is_topmenu' => true, 'auto' => false, 'headerbar' => false)); //------------------------------------ // Create The Search Form Settings Panel // add_action('slp_build_map_settings_panels', array($this, 'search_form_settings'), 10); add_action('slp_build_map_settings_panels', array($this, 'map_settings'), 20); add_action('slp_build_map_settings_panels', array($this, 'results_settings'), 30); add_action('slp_build_map_settings_panels', array($this, 'action_AddUXViewSection'), 40); //------------------------------------ // Render It // print $update_msg; do_action('slp_build_map_settings_panels'); $this->settings->render_settings_page(); }
} if (!$slplus_plugin->helper->webItemExists($slplus_plugin->data['homeicon'])) { $slplus_plugin->data['iconNotice'] .= sprintf(__('Your home icon %s cannot be located, please select a new one.', 'csl-slplus'), $slplus_plugin->data['homeicon']) . '<br/>'; } if (!$slplus_plugin->helper->webItemExists($slplus_plugin->data['endicon'])) { $slplus_plugin->data['iconNotice'] .= sprintf(__('Your destination icon %s cannot be located, please select a new one.', 'csl-slplus'), $slplus_plugin->data['endicon']) . '<br/>'; } if ($slplus_plugin->data['iconNotice'] != '') { $slplus_plugin->data['iconNotice'] = "<div class='highlight' style='background-color:LightYellow;color:red'><span style='color:red'>" . $slplus_plugin->data['iconNotice'] . "</span></div>"; } // Instantiate the form rendering object // global $slpMapSettings; $slpMapSettings = new wpCSL_settings__slplus(array('no_license' => true, 'prefix' => $slplus_plugin->prefix, 'url' => $slplus_plugin->url, 'name' => $slplus_plugin->name . ' - Map Settings', 'plugin_url' => $slplus_plugin->plugin_url, 'render_csl_blocks' => false, 'form_action' => SLPLUS_ADMINPAGE . 'map-designer.php', 'save_text' => 'Save Settings')); //------------------------- // Navbar Section //------------------------- $slpMapSettings->add_section(array('name' => 'Navigation', 'div_id' => 'slplus_navbar', 'description' => get_string_from_phpexec(SLPLUS_COREDIR . '/templates/navbar.php'), 'is_topmenu' => true, 'auto' => false, 'headerbar' => false)); //------------------------------------ // Create The Search Form Settings Panel // add_action('slp_build_map_settings_panels', array('SLPlus_AdminUI', 'slp_add_search_form_settings_panel'), 10); add_action('slp_build_map_settings_panels', array('SLPlus_AdminUI', 'slp_add_map_settings_panel'), 20); add_action('slp_build_map_settings_panels', array('SLPlus_AdminUI', 'slp_add_results_settings_panel'), 30); //------------------------------------ // Render It // print $update_msg; do_action('slp_build_map_settings_panels'); $slpMapSettings->render_settings_page();
?> var chart = new google.visualization.<?php echo $slpGoogleChartType; ?> (document.getElementById('chart_div')); chart.draw(data, {width: 800, height: 400, pointSize: 4}); } </script> <?php // No Data Yet - Tell Them // } else { ?> <script type="text/javascript"> jQuery(document).ready( function($) { $("#chart_div").html("<p>No data recorded yet. Chart will be available after a Store Locator Plus search has been performed.</p>"); } ); </script> <?php } //------------------------------------ // Render It // if ($slplus_plugin->license->packages['Pro Pack']->isenabled) { $slpReportSettings->render_settings_page(); } else { $slplus_plugin->notifications->add_notice(9, __('This is a Pro Pack feature.', SLPLUS_PREFIX)); $slplus_plugin->notifications->display(); }