GeoMashup
[ class tree: GeoMashup ] [ index: GeoMashup ] [ all elements ]

Source for file options.php

Documentation is available at options.php

  1. <?php
  2. /**
  3.  * Geo Mashup Options Page HTML Management
  4.  *
  5.  * @package GeoMashup
  6.  */
  7.  
  8. /**
  9.  * Print Geo Mashup Options HTML
  10.  * 
  11.  * @since 1.2
  12.  * @access public
  13.  */
  14.     global $geo_mashup_options;
  15.  
  16.     $activated_copy_geodata = false;
  17.     if (isset($_POST['submit'])) {
  18.         // Process option updates
  19.         check_admin_referer('geo-mashup-update-options');
  20.         // Missing add_map_type_control means empty array
  21.         if ( empty( $_POST['global_map']['add_map_type_control'] ) ) {
  22.             $_POST['global_map']['add_map_type_control']  = array();
  23.         }
  24.         if ( empty( $_POST['single_map']['add_map_type_control'] ) ) {
  25.             $_POST['single_map']['add_map_type_control']  = array();
  26.         }
  27.         if ( empty( $_POST['context_map']['add_map_type_control'] ) ) {
  28.             $_POST['context_map']['add_map_type_control']  = array();
  29.         }
  30.         if ( empty( $_POST['overall']['located_post_types'] ) ) {
  31.             $_POST['overall']['located_post_types']  = array();
  32.         }
  33.         if ( 'true' != $geo_mashup_options->get( 'overall', 'copy_geodata' ) and isset( $_POST['overall']['copy_geodata'] ) )
  34.             $activated_copy_geodata = true;
  35.         $geo_mashup_options->set_valid_options ( $_POST );
  36.         if ($geo_mashup_options->save()) {
  37.             echo '<div class="updated fade"><p>'.__('Options updated.', 'GeoMashup').'</p></div>';
  38.         }
  39.     }
  40.  
  41.     if ( $activated_copy_geodata ) {
  42.         GeoMashupDB::duplicate_geodata();
  43.         echo '<div class="updated fade"><p>' . __( 'Copied existing geodata, see log for details.', 'GeoMashup' ) . '</p></div>';
  44.     }
  45.  
  46.     if ( isset( $_POST['bulk_reverse_geocode'] ) ) {
  47.         check_admin_referer('geo-mashup-update-options');
  48.         $log = GeoMashupDB::bulk_reverse_geocode( ); 
  49.         echo '<div class="updated fade">' . $log . '</div>';
  50.     }
  51.  
  52.     if ( GEO_MASHUP_DB_VERSION != GeoMashupDB::installed_version() ) {
  53.         if ( GeoMashupDB::install() ) {
  54.             echo '<div class="updated fade"><p>'.__('Database upgraded, see log for details.', 'GeoMashup').'</p></div>';
  55.         }
  56.     }
  57.  
  58.     if ( isset( $_POST['delete_log'] ) ) {
  59.         check_admin_referer('geo-mashup-delete-log');
  60.         if ( update_option( 'geo_mashup_activation_log', '' ) ) {
  61.             echo '<div class="updated fade"><p>'.__('Log deleted.', 'GeoMashup').'</p></div>';
  62.         }
  63.     }
  64.  
  65.     if ( !empty ( $geo_mashup_options->corrupt_options ) ) {
  66.         // Options didn't load correctly
  67.         $message .= ' ' . __('Saved options may be corrupted, try updating again. Corrupt values: ') . 
  68.             '<code>' . $geo_mashup_options->corrupt_options . '</code>';
  69.         echo '<div class="updated"><p>'.$message.'</p></div>';
  70.     }
  71.  
  72.     if ( !empty ( $geo_mashup_options->validation_errors ) ) {
  73.         // There were invalid options
  74.         echo '<div class="updated"><p>' .
  75.             __('Some invalid options will not be used. If you\'ve just upgraded, do an update to initialize new options.', 'GeoMashup');
  76.         echo '<ul>';
  77.         foreach ( $geo_mashup_options->validation_errors as $message ) {
  78.             echo "<li>$message</li>";
  79.         }
  80.         echo '</ul></p></div>';
  81.     }
  82.  
  83.     // Create marker and color arrays
  84.     $colorNames = Array(
  85.         'aqua' => '#00ffff',
  86.         'black' => '#000000',
  87.         'blue' => '#0000ff',
  88.         'fuchsia' => '#ff00ff',
  89.         'gray' => '#808080',
  90.         'green' => '#008000',
  91.         'lime' => '#00ff00',
  92.         'maroon' => '#800000',
  93.         'navy' => '#000080',
  94.         'olive' => '#808000',
  95.         'orange' => '#ffa500',
  96.         'purple' => '#800080',
  97.         'red' => '#ff0000',
  98.         'silver' => '#c0c0c0',
  99.         'teal' => '#008080',
  100.         'white' => '#ffffff',
  101.         'yellow' => '#ffff00');
  102.     
  103.     $mapTypes = Array(
  104.         'G_NORMAL_MAP' => __('Roadmap', 'GeoMashup'), 
  105.         'G_SATELLITE_MAP' => __('Satellite', 'GeoMashup'),
  106.         'G_HYBRID_MAP' => __('Hybrid', 'GeoMashup'),
  107.         'G_PHYSICAL_MAP' => __('Terrain', 'GeoMashup'),
  108.         'G_SATELLITE_3D_MAP' => __('Earth Plugin', 'GeoMashup'));
  109.  
  110.     $mapControls = Array(
  111.         'GSmallZoomControl' => __('Small Zoom', 'GeoMashup'),
  112.         'GSmallZoomControl3D' => __('Small Zoom 3D', 'GeoMashup'),
  113.         'GSmallMapControl' => __('Small Pan/Zoom', 'GeoMashup'),
  114.         'GLargeMapControl' => __('Large Pan/Zoom', 'GeoMashup'),
  115.         'GLargeMapControl3D' => __('Large Pan/Zoom 3D', 'GeoMashup'));
  116.  
  117.     $futureOptions = Array(
  118.         'true' => __('Yes', 'GeoMashup'),
  119.         'false' => __('No', 'GeoMashup'),
  120.         'only' => __('Only', 'GeoMashup'));
  121.  
  122.     $mapApis = Array(
  123.         'google' => __( 'Google v2', 'GeoMashup' ),
  124.         'googlev3' => __( 'Google v3', 'GeoMashup' ),
  125.         'openlayers' => __( 'OpenLayers', 'GeoMashup' )
  126.     );
  127.  
  128.     $zoomOptions = Array( 'auto' => __( 'auto', 'GeoMashup' ) );
  129.     for ( $i = 0; $i < GEO_MASHUP_MAX_ZOOM; $i++ ) {
  130.         $zoomOptions[$i] = $i;
  131.     }
  132.  
  133.     $clusterOptions = Array( 
  134.         'clustermarker' => __( 'Cluster Marker', 'GeoMashup' ),
  135.         'markerclusterer' => __( 'Marker Clusterer', 'GeoMashup' )
  136.     );
  137.  
  138.     $selected_tab = ( empty( $_POST['geo_mashup_selected_tab'] ) ) ? 0 : $_POST['geo_mashup_selected_tab']; 
  139.     $google_key = $geo_mashup_options->get( 'overall', 'google_key' );
  140.     $map_api = $geo_mashup_options->get( 'overall', 'map_api' );
  141.     // Now for the HTML
  142. ?>
  143.     <script type="text/javascript"> 
  144.     jQuery(function( $ ) { 
  145.         var selector = '#geo-mashup-settings-form';
  146.         $( selector ).tabs( {
  147.             selected: <?php echo $selected_tab ?>,
  148.             select: function ( event, ui ) {
  149.                 $( '#geo-mashup-selected-tab' ).val( ui.index );
  150.             }
  151.         } );
  152.         $( '#import_custom_field' ).suggest( ajaxurl + '?action=geo_mashup_suggest_custom_keys' );
  153.         $( '#map_api' ).change( function() {
  154.             $( '#overall-submit' ).click();
  155.         } );
  156.      } ); 
  157.     </script>
  158.     <div class="wrap">
  159.         <h2><?php _e('Geo Mashup Options', 'GeoMashup'); ?></h2>
  160.         <form method="post" id="geo-mashup-settings-form" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
  161.             <ul>
  162.             <li><a href="#geo-mashup-overall-settings"><span><?php _e('Overall', 'GeoMashup'); ?></span></a></li>
  163.             <li><a href="#geo-mashup-single-map-settings"><span><?php _e('Single Maps', 'GeoMashup'); ?></span></a></li>
  164.             <li><a href="#geo-mashup-global-map-settings"><span><?php _e('Global Maps', 'GeoMashup'); ?></span></a></li>
  165.             <li><a href="#geo-mashup-context-map-settings"><span><?php _e('Contextual Maps', 'GeoMashup'); ?></span></a></li>
  166.             </ul>
  167.             <fieldset id="geo-mashup-overall-settings">
  168.                 <?php wp_nonce_field('geo-mashup-update-options'); ?>
  169.                 <input id="geo-mashup-selected-tab" 
  170.                     name="geo_mashup_selected_tab" 
  171.                     type="hidden" 
  172.                     value="<?php echo $selected_tab; ?>" />
  173.                 <p><?php _e('Overall Geo Mashup Settings', 'GeoMashup'); ?></p>
  174.                 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
  175.                     <tr>
  176.                         <th scope="row">
  177.                             <?php _e('Map Provider', 'GeoMashup'); ?>
  178.                         </th>
  179.                         <td>
  180.                             <select id="map_api" name="overall[map_api]"><?php
  181.                                 foreach ( $mapApis as $value => $label ) : ?>
  182.                                     <option value="<?php echo $value; ?>"<?php
  183.                                         if ( $geo_mashup_options->get( 'overall', 'map_api' ) == $value ) {
  184.                                             echo ' selected="selected"';
  185.                                         }
  186.                                     ?>><?php echo esc_html( $label ); ?></option>
  187.                                 <?php endforeach; ?>
  188.                             </select>
  189.                             <span class="description"><?php
  190.                                 _e( 'Some features still work only with Google v2.', 'GeoMashup' );
  191.                             ?></span>
  192.                         </td>
  193.                     </tr>
  194.                     <?php if ( 'google' == $map_api ) : ?>
  195.                     <tr>
  196.                         <th width="33%" scope="row"><?php _e('Google API Key', 'GeoMashup'); ?></th>
  197.                         <td<?php if ( empty( $google_key ) ) echo ' class="error"'; ?>>
  198.                             <input id="google_key" 
  199.                                 name="overall[google_key]" 
  200.                                 type="text" 
  201.                                 size="40" 
  202.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'overall', 'google_key' ) ); ?>" />
  203.                             <a href="http://maps.google.com/apis/maps/signup.html"><?php _e('Get yours here', 'GeoMashup'); ?></a>
  204.                             <?php if ( empty( $google_key ) ) : ?>
  205.                             <p class="description">
  206.                             <?php _e( 'This setting is required for Geo Mashup to work.', 'GeoMashup' ); ?>
  207.                             </p>
  208.                             <?php endif; ?>
  209.                         </td>
  210.                     </tr>
  211.                     <?php endif; ?>
  212.                     <tr>
  213.                         <th scope="row" title="<?php _e('Generated links go here','GeoMashup'); ?>">
  214.                             <?php _e('Global Mashup Page', 'GeoMashup'); ?>
  215.                         </th>
  216.                         <td>
  217.                             <select id="mashup_page" name="overall[mashup_page]"><?php 
  218.                                 $pages = get_pages(); 
  219.                                 if ( $pages ) : 
  220.                                     foreach ( $pages as $page ) : ?>
  221.                                     <option value="<?php echo esc_attr( $page->ID ); ?>"<?php
  222.                                         if ( $geo_mashup_options->get( 'overall', 'mashup_page' ) == $page->ID ) { 
  223.                                             echo ' selected="selected"';
  224.                                         }
  225.                                     ?>><?php echo esc_html( $page->post_name ); ?></option>
  226.                                 <?php endforeach; ?>
  227.                             <?php else : ?>
  228.                                 <option value=""><?php _e( 'No pages available.', 'GeoMashup' ); ?></option>
  229.                             <?php endif; ?>
  230.                             </select>
  231.                             <span class="description"><?php
  232.                                 _e( 'Geo Mashup will use this page for generated location links', 'GeoMashup' );
  233.                             ?></span>
  234.                         </td>
  235.                     </tr>
  236.                     <tr>
  237.                         <th scope="row"><?php _e('Collect Location For', 'GeoMashup'); ?></th>
  238.                         <td>
  239.                             <?php foreach( get_post_types( array( 'show_ui' => true ), 'objects' ) as $post_type) : ?>
  240.                             <input id="locate_posts" name="overall[located_post_types][]" type="checkbox" value="<?php echo $post_type->name; ?>"<?php
  241.                                 if ( in_array( $post_type->name, $geo_mashup_options->get( 'overall', 'located_post_types' ) ) ) {
  242.                                     echo ' checked="checked"';
  243.                                 }
  244.                             ?> /> <?php echo $post_type->labels->name; ?>
  245.                             <?php endforeach; ?>
  246.                             <input id="locate_users" name="overall[located_object_name][user]" type="checkbox" value="true"<?php
  247.                                 if ( $geo_mashup_options->get( 'overall', 'located_object_name', 'user' ) == 'true' ) {
  248.                                     echo ' checked="checked"';
  249.                                 }
  250.                             ?> /> <?php _e( 'Users', 'GeoMashup' ); ?>
  251.                             <input id="locate_comments" name="overall[located_object_name][comment]" type="checkbox" value="true"<?php
  252.                                 if ($geo_mashup_options->get( 'overall', 'located_object_name', 'comment' ) == 'true' ) {
  253.                                     echo ' checked="checked"';
  254.                                 }
  255.                             ?> /> <?php _e( 'Comments', 'GeoMashup' ); ?>
  256.                         </td>
  257.                     </tr>
  258.                     <tr>
  259.                         <th width="33%" scope="row"><?php _e('Copy Geodata Meta Fields', 'GeoMashup'); ?></th>
  260.                         <td>
  261.                             <input id="copy_geodata"
  262.                                 name="overall[copy_geodata]"
  263.                                 type="checkbox"
  264.                                 value="true"<?php
  265.                                     if ( $geo_mashup_options->get( 'overall', 'copy_geodata' ) == 'true' ) {
  266.                                         echo ' checked="checked"';
  267.                                     }
  268.                                 ?> />
  269.                             <span class="description"><?php
  270.                                 printf( __( 'Copy coordinates to and from %sgeodata meta fields%s, for integration with the Geolocation and other plugins.', 'GeoMashup' ),
  271.                                         '<a href="http://codex.wordpress.org/Geodata" title="">', '</a>' );
  272.                             ?></span>
  273.                         </td>
  274.                     </tr>
  275.                     <tr>
  276.                         <th scope="row"><?php _e('Geocode Custom Field', 'GeoMashup'); ?></th>
  277.                         <td>
  278.                             <input id="import_custom_field"
  279.                                 name="overall[import_custom_field]"
  280.                                 type="text"
  281.                                 size="35"
  282.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'overall', 'import_custom_field' ) ); ?>" /><br/>
  283.                             <span class="description"><?php
  284.                                 _e('Custom fields with this key will be geocoded and the resulting location saved for the post.', 'GeoMashup');
  285.                             ?></span>
  286.                         </td>
  287.                     </tr>
  288.                     <tr>
  289.                         <th scope="row"><?php _e('Enable Reverse Geocoding', 'GeoMashup'); ?></th>
  290.                         <td>
  291.                             <input id="enable_reverse_geocoding" name="overall[enable_reverse_geocoding]" type="checkbox" value="true"<?php
  292.                                 if ($geo_mashup_options->get ( 'overall', 'enable_reverse_geocoding' ) == 'true' ) {
  293.                                     echo ' checked="checked"';
  294.                                 }
  295.                             ?> />
  296.                             <span class="description"><?php
  297.                                 _e('Try to look up missing address fields for new locations.', 'GeoMashup');
  298.                             ?></span>
  299.                         </td>
  300.                     </tr>
  301.                     <?php if ( $geo_mashup_options->get( 'overall', 'enable_reverse_geocoding' ) == 'true' ) : ?>
  302.                     <tr>
  303.                         <th scope="row"><?php _e('Bulk Reverse Geocode', 'GeoMashup'); ?></th>
  304.                         <td>
  305.                             <input type="submit" name="bulk_reverse_geocode" value="<?php _e('Start', 'GeoMashup'); ?>" class="button" />
  306.                             <span class="description"><?php
  307.                                 _e('Try to look up missing address fields for existing locations. Could be slow.', 'GeoMashup');
  308.                             ?></span>
  309.                         </td>
  310.                     </tr>
  311.                     <?php endif; ?>
  312.                     <tr>
  313.                         <th scope="row"><?php _e('Use Theme Style Sheet with Maps', 'GeoMashup'); ?></th>
  314.                         <td>
  315.                             <input id="theme_stylesheet_with_maps" 
  316.                                 name="overall[theme_stylesheet_with_maps]" 
  317.                                 type="checkbox" 
  318.                                 value="true"<?php 
  319.                                     if ( $geo_mashup_options->get( 'overall', 'theme_stylesheet_with_maps' ) == 'true' ) { 
  320.                                         echo ' checked="checked"'; 
  321.                                     }
  322.                                 ?> />
  323.                         </td>
  324.                     </tr>
  325.                     <tr>
  326.                         <th scope="row"><?php _e('Add Category Links', 'GeoMashup'); ?></th>
  327.                         <td>
  328.                             <input id="add_category_links" name="overall[add_category_links]" type="checkbox" value="true"<?php 
  329.                                 if ( $geo_mashup_options->get( 'overall', 'add_category_links' ) == 'true' ) { 
  330.                                     echo ' checked="checked"';
  331.                                 }
  332.                             ?> />
  333.                             <span class="description"><?php
  334.                                 _e( 'Add map links to category lists. Categories must have descriptions for this to work.', 'GeoMashup'); 
  335.                             ?></span>
  336.                         </td>
  337.                     </tr>
  338.                     <tr>
  339.                         <th scope="row"><?php _e('Category Link Separator', 'GeoMashup'); ?></th>
  340.                         <td>
  341.                             <input id="category_link_separator" 
  342.                                 name="overall[category_link_separator]" 
  343.                                 class="add-category-links-dep" 
  344.                                 type="text" 
  345.                                 size="3" 
  346.                                 value="<?php echo esc_attr( $geo_mashup_options->get( 'overall', 'category_link_separator' ) ); ?>" />
  347.                         </td>
  348.                     </tr>
  349.                     <tr>
  350.                         <th scope="row"><?php _e('Category Link Text', 'GeoMashup'); ?></th>
  351.                         <td>
  352.                             <input id="category_link_text" 
  353.                                 name="overall[category_link_text]" 
  354.                                 type="text" 
  355.                                 size="5" 
  356.                                 value="<?php echo esc_attr( $geo_mashup_options->get( 'overall', 'category_link_text' ) ); ?>" />
  357.                         </td>
  358.                     </tr>
  359.                     <tr>
  360.                         <th scope="row"><?php _e('Category Link Zoom Level', 'GeoMashup'); ?></th>
  361.                         <td>
  362.                             <select id="category_zoom" name="overall[category_zoom]">
  363.                                 <?php foreach ( $zoomOptions as $value => $label ) : ?>
  364.                                 <option value="<?php echo esc_attr( $value ); ?>"<?php
  365.                                     if ( strcmp( $value, $geo_mashup_options->get( 'overall', 'category_zoom' ) ) == 0 ) {
  366.                                         echo ' selected="selected"';
  367.                                     }
  368.                                 ?>><?php echo esc_attr( $label ); ?></option>
  369.                                 <?php endforeach; ?>
  370.                             </select>
  371.                             <span class="description"><?php
  372.                                 _e( '0 is zoomed all the way out.', 'GeoMashup' ); 
  373.                             ?></span>
  374.                         </td>
  375.                     </tr>
  376.                     <tr>
  377.                         <th scope="row"><?php _e('GeoNames ID', 'GeoMashup'); ?></th>
  378.                         <td>
  379.                             <input id="geonames_username_text"
  380.                                 name="overall[geonames_username]"
  381.                                 type="text"
  382.                                 size="35"
  383.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'overall', 'geonames_username' ) ); ?>" /><br/>
  384.                             <span class="description"><?php
  385.                                 printf( __('Your %sGeoNames username%s, used with GeoNames API requests. Leave the default value to use Geo Mashup\'s.', 'GeoMashup'),
  386.                                     '<a href="http://geonames.wordpress.com/2011/01/28/application-identification-for-free-geonames-web-services/" title="">', '</a>' );
  387.                             ?></span>
  388.                         </td>
  389.                     </tr>
  390.                     <?php if ( 'google' == $map_api ) : ?>
  391.                     <tr>
  392.                         <th scope="row"><?php _e('AdSense For Search ID', 'GeoMashup'); ?></th>
  393.                         <td>
  394.                             <input id="adsense_code_text" 
  395.                                 name="overall[adsense_code]" 
  396.                                 type="text" 
  397.                                 size="35" 
  398.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'overall', 'adsense_code' ) ); ?>" /><br/>
  399.                             <span class="description"><?php
  400.                                 _e('Your client ID, used with the Google Bar. Leave the default value to use Geo Mashup\'s :).', 'GeoMashup'); 
  401.                             ?></span>
  402.                         </td>
  403.                     </tr>
  404.                     <?php endif; ?>
  405.                 </table>
  406.                 <div class="submit"><input id="overall-submit" type="submit" name="submit" value="<?php _e('Update Options', 'GeoMashup'); ?>" /></div>
  407.             </fieldset>
  408.             <fieldset id="geo-mashup-single-map-settings">
  409.                 <p><?php _e('Default settings for maps of a single located post.', 'GeoMashup'); ?></p>
  410.                 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
  411.                     <tr>
  412.                         <th scope="row"><?php _e('Map Width', 'GeoMashup'); ?></th>
  413.                         <td>
  414.                             <input id="in_post_map_width" 
  415.                                 name="single_map[width]" 
  416.                                 type="text" 
  417.                                 size="5" 
  418.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'single_map', 'width' ) ); ?>" />
  419.                             <?php _e('Pixels, or append %.', 'GeoMashup'); ?>
  420.                         </td>
  421.                     </tr>
  422.                     <tr>
  423.                         <th scope="row"><?php _e('Map Height', 'GeoMashup'); ?></th>
  424.                         <td>
  425.                             <input id="in_post_map_height" 
  426.                                 name="single_map[height]" 
  427.                                 type="text" 
  428.                                 size="5" 
  429.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'single_map', 'height' ) ); ?>" />
  430.                             <?php _e('px', 'GeoMashup'); ?>
  431.                         </td>
  432.                     </tr>
  433.                     <tr>
  434.                         <th scope="row"><?php _e('Map Control', 'GeoMashup'); ?></th>
  435.                         <td>
  436.                             <select id="in_post_map_control" name="single_map[map_control]">
  437.                             <?php foreach($mapControls as $type => $label) : ?>
  438.                                 <option value="<?php echo esc_attr( $type ); ?>"<?php
  439.                                     if ( $type == $geo_mashup_options->get( 'single_map', 'map_control' ) ) {
  440.                                         echo ' selected="selected"';
  441.                                     }
  442.                                 ?>><?php echo esc_html( $label ); ?></option>
  443.                             <?php endforeach; ?>
  444.                             </select>
  445.                         </td>
  446.                     </tr>
  447.                     <tr>
  448.                         <th scope="row"><?php _e('Default Map Type', 'GeoMashup'); ?></th>
  449.                         <td>
  450.                             <select id="in_post_map_type" name="single_map[map_type]">
  451.                             <?php foreach ( $mapTypes as $type => $label ) : ?>
  452.                                 <option value="<?php echo esc_attr( $type ); ?>"<?php
  453.                                     if ( $type == $geo_mashup_options->get ( 'single_map', 'map_type' ) ) {
  454.                                         echo ' selected="selected"';
  455.                                     }
  456.                                 ?>><?php echo esc_html( $label ); ?></option>
  457.                             <?php endforeach; ?>
  458.                             </select>
  459.                         </td>
  460.                     </tr>
  461.                     <tr>
  462.                         <th scope="row"><?php _e('Add Map Type Control', 'GeoMashup'); ?></th>
  463.                         <td>
  464.                         <?php foreach ( $mapTypes as $type => $label ) : ?>
  465.                         <input id="in_post_add_map_type_<?php echo esc_attr( $type ); ?>" 
  466.                             name="single_map[add_map_type_control][]" 
  467.                             type="checkbox" 
  468.                             value="<?php echo esc_attr( $type ); ?>" <?php 
  469.                                 if ( in_array( $type, $geo_mashup_options->get ( 'single_map', 'add_map_type_control' ) ) ) {
  470.                                     echo ' checked="checked"';
  471.                                 }
  472.                                 ?> /> <?php echo esc_html( $label ); ?>
  473.                             <?php endforeach; ?>
  474.                         </td>
  475.                     </tr>
  476.                     <tr>
  477.                         <th scope="row"><?php _e('Add Overview Control', 'GeoMashup'); ?></th>
  478.                         <td><input id="in_post_add_overview_control" name="single_map[add_overview_control]" type="checkbox" value="true"<?php 
  479.                             if ( $geo_mashup_options->get( 'single_map', 'add_overview_control' ) == 'true' ) {
  480.                                 echo ' checked="checked"';
  481.                             }
  482.                         ?> /></td>
  483.                     </tr>
  484.                     <?php if ( 'google' == $map_api ) : ?>
  485.                     <tr>
  486.                         <th scope="row"><?php _e('Add Google Bar', 'GeoMashup'); ?></th>
  487.                         <td><input id="in_post_add_google_bar" name="single_map[add_google_bar]" type="checkbox" value="true"<?php 
  488.                             if ( $geo_mashup_options->get ( 'single_map', 'add_google_bar' ) == 'true' ) {
  489.                                 echo ' checked="checked"';
  490.                             }
  491.                         ?> /></td>
  492.                     </tr>
  493.                     <?php endif; ?>
  494.                     <tr>
  495.                         <th scope="row"><?php _e('Enable Scroll Wheel Zoom', 'GeoMashup'); ?></th>
  496.                         <td><input id="in_post_enable_scroll_wheel_zoom" name="single_map[enable_scroll_wheel_zoom]" type="checkbox" value="true"<?php 
  497.                             if ( $geo_mashup_options->get ( 'single_map', 'enable_scroll_wheel_zoom' ) == 'true' ) {
  498.                                 echo ' checked="checked"';
  499.                             }
  500.                         ?> /></td>
  501.                     </tr>
  502.                     <tr>
  503.                         <th scope="row"><?php _e('Default Zoom Level', 'GeoMashup'); ?></th>
  504.                         <td>
  505.                             <select id="in_post_zoom" name="single_map[zoom]">
  506.                                 <?php foreach ( $zoomOptions as $value => $label ) : ?>
  507.                                 <option value="<?php echo esc_attr( $value ); ?>"<?php
  508.                                     if ( strcmp( $value, $geo_mashup_options->get( 'single_map', 'zoom' ) ) == 0 ) {
  509.                                         echo ' selected="selected"';
  510.                                     }
  511.                                 ?>><?php echo esc_html( $label ); ?></option>
  512.                                 <?php endforeach; ?>
  513.                             </select>
  514.                             <span class="description"><?php
  515.                                 _e( '0 is zoomed all the way out.', 'GeoMashup' ); 
  516.                             ?></span>
  517.                         </td>
  518.                     </tr>
  519.                     <tr>
  520.                         <th scope="row"><?php _e('Click To Load', 'GeoMashup'); ?></th>
  521.                         <td>
  522.                             <input id="in_post_click_to_load" name="single_map[click_to_load]" type="checkbox" value="true"<?php 
  523.                                 if ( $geo_mashup_options->get( 'single_map', 'click_to_load' ) == 'true' ) {
  524.                                     echo ' checked="checked"';
  525.                                 }
  526.                             ?> />
  527.                         </td>
  528.                     </tr>
  529.                     <tr>
  530.                         <th scope="row"><?php _e('Click To Load Text', 'GeoMashup'); ?></th>
  531.                         <td>
  532.                             <input id="in_post_click_to_load_text" 
  533.                                 name="single_map[click_to_load_text]" 
  534.                                 type="text" 
  535.                                 size="50" 
  536.                                 value="<?php echo esc_attr( $geo_mashup_options->get( 'single_map', 'click_to_load_text' ) ); ?>" />
  537.                         </td>
  538.                     </tr>
  539.                 </table>
  540.                 <div class="submit"><input type="submit" name="submit" value="<?php _e('Update Options', 'GeoMashup'); ?>" /></div>
  541.             </fieldset>
  542.             <fieldset id="geo-mashup-global-map-settings">
  543.                 <p><?php _e('Default settings for global maps of located items.', 'GeoMashup'); ?></p>
  544.                 <div class="submit"><input type="submit" name="submit" value="<?php _e('Update Options', 'GeoMashup'); ?>" /></div>
  545.                 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
  546.                     <tr>
  547.                         <th scope="row"><?php _e('Map Width', 'GeoMashup'); ?></th>
  548.                         <td>
  549.                             <input id="map_width" 
  550.                                 name="global_map[width]" 
  551.                                 type="text" 
  552.                                 size="5" 
  553.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'global_map', 'width' ) ); ?>" />
  554.                             <?php _e('Pixels, or append %.', 'GeoMashup'); ?>
  555.                         </td>
  556.                     </tr>
  557.                     <tr>
  558.                         <th scope="row"><?php _e('Map Height', 'GeoMashup'); ?></th>
  559.                         <td>
  560.                             <input id="map_height" 
  561.                                 name="global_map[height]" 
  562.                                 type="text" 
  563.                                 size="5" 
  564.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'global_map', 'height' ) ); ?>" />
  565.                             <?php _e('px', 'GeoMashup'); ?>
  566.                         </td>
  567.                     </tr>
  568.                     <tr>
  569.                         <th scope="row"><?php _e('Map Control', 'GeoMashup'); ?></th>
  570.                         <td>
  571.                             <select id="map_control" name="global_map[map_control]">
  572.                             <?php    foreach($mapControls as $type => $label) : ?>
  573.                                 <option value="<?php echo esc_attr( $type ); ?>"<?php 
  574.                                     if ( $type == $geo_mashup_options->get( 'global_map', 'map_control' ) ) {
  575.                                         echo ' selected="selected"';
  576.                                     }
  577.                                 ?>><?php echo esc_html( $label ); ?></option>
  578.                             <?php    endforeach; ?>
  579.                             </select>
  580.                         </td>
  581.                     </tr>
  582.                     <tr>
  583.                         <th scope="row"><?php _e('Default Map Type', 'GeoMashup'); ?></th>
  584.                         <td>
  585.                             <select id="map_type" name="global_map[map_type]">
  586.                             <?php foreach($mapTypes as $type => $label) : ?>
  587.                                 <option value="<?php echo esc_attr( $type ); ?>"<?php 
  588.                                     if ($type == $geo_mashup_options->get ( 'global_map', 'map_type' )) {
  589.                                         echo ' selected="selected"';
  590.                                     }
  591.                                 ?>><?php echo esc_html( $label ); ?></option>
  592.                             <?php endforeach; ?>
  593.                             </select>
  594.                         </td>
  595.                     </tr>
  596.                     <tr>
  597.                         <th scope="row"><?php _e('Add Map Type Control', 'GeoMashup'); ?></th>
  598.                         <td>
  599.                         <?php foreach ( $mapTypes as $type => $label ) : ?>
  600.                         <input id="add_map_type_<?php echo esc_attr( $type ); ?>" 
  601.                             name="global_map[add_map_type_control][]" 
  602.                             type="checkbox" 
  603.                             value="<?php echo esc_attr( $type ); ?>" <?php 
  604.                                 if ( in_array( $type, $geo_mashup_options->get ( 'global_map', 'add_map_type_control' ) ) ) {
  605.                                     echo ' checked="checked"';
  606.                                 }
  607.                                 ?> /> <?php echo esc_html( $label ); ?>
  608.                             <?php endforeach; ?>
  609.                         </td>
  610.                     </tr>
  611.                     <tr>
  612.                         <th scope="row"><?php _e('Add Overview Control', 'GeoMashup'); ?></th>
  613.                         <td>
  614.                             <input id="add_overview_control" name="global_map[add_overview_control]" type="checkbox" value="true"<?php 
  615.                                 if ($geo_mashup_options->get ( 'global_map', 'add_overview_control' ) == 'true') {
  616.                                     echo ' checked="checked"';
  617.                                 }
  618.                             ?> />
  619.                         </td>
  620.                     </tr>
  621.                     <?php if ( 'google' == $map_api ) : ?>
  622.                     <tr>
  623.                         <th scope="row"><?php _e('Add Google Bar', 'GeoMashup'); ?></th>
  624.                         <td>
  625.                             <input id="add_google_bar" name="global_map[add_google_bar]" type="checkbox" value="true"<?php 
  626.                                 if ($geo_mashup_options->get ( 'global_map', 'add_google_bar' ) == 'true') {
  627.                                     echo ' checked="checked"';
  628.                                 }
  629.                             ?> />
  630.                         </td>
  631.                     </tr>
  632.                     <?php endif; ?>
  633.                     <tr>
  634.                         <th scope="row"><?php _e('Enable Scroll Wheel Zoom', 'GeoMashup'); ?></th>
  635.                         <td><input id="enable_scroll_wheel_zoom" name="global_map[enable_scroll_wheel_zoom]" type="checkbox" value="true"<?php 
  636.                             if ( $geo_mashup_options->get ( 'global_map', 'enable_scroll_wheel_zoom' ) == 'true' ) {
  637.                                 echo ' checked="checked"';
  638.                             }
  639.                         ?> /></td>
  640.                     </tr>
  641.                     <tr>
  642.                         <th scope="row"><?php _e('Default Zoom Level', 'GeoMashup'); ?></th>
  643.                         <td>
  644.                             <select id="zoom" name="global_map[zoom]">
  645.                                 <?php foreach ( $zoomOptions as $value => $label ) : ?>
  646.                                 <option value="<?php echo esc_attr( $value ); ?>"<?php
  647.                                     if ( strcmp( $value, $geo_mashup_options->get( 'global_map', 'zoom' ) ) == 0 ) {
  648.                                         echo ' selected="selected"';
  649.                                     }
  650.                                 ?>><?php echo esc_html( $label ); ?></option>
  651.                                 <?php endforeach; ?>
  652.                             </select>
  653.                             <span class="description"><?php
  654.                                 _e( '0 is zoomed all the way out.', 'GeoMashup' ); 
  655.                             ?></span>
  656.                         </td>
  657.                     </tr>
  658.                     <?php if ( 'google' == $map_api ) : ?>
  659.                     <tr>
  660.                         <th scope="row"><?php _e('Cluster Markers Until Zoom Level', 'GeoMashup'); ?></th>
  661.                         <td>
  662.                             <input id="cluster_library" name="global_map[cluster_lib]" type="hidden" value="clustermarker" />
  663.                             <input id="cluster_max_zoom" 
  664.                                 name="global_map[cluster_max_zoom]" 
  665.                                 type="text" 
  666.                                 size="2" 
  667.                                 value="<?php echo esc_attr( $geo_mashup_options->get( 'global_map', 'cluster_max_zoom' ) ); ?>" />
  668.                             <span class="description"><?php
  669.                                 _e( 'Highest zoom level to cluster markers, or blank for no clustering.', 'GeoMashup'); 
  670.                             ?></span>
  671.                         </td>
  672.                     </tr>
  673.                     <?php endif; ?>
  674.                     <tr>
  675.                         <th scope="row"><?php _e('Marker Selection Behaviors', 'GeoMashup'); ?></th>
  676.                         <td>
  677.                             <input id="global_marker_select_info_window" name="global_map[marker_select_info_window]" type="checkbox" value="true"<?php 
  678.                                 echo ( $geo_mashup_options->get( 'global_map', 'marker_select_info_window' ) == 'true' ) ? ' checked="checked"' : ''; 
  679.                             ?> />
  680.                             <?php _e( 'Open info window', 'GeoMashup' ); ?>
  681.                             <input id="global_marker_select_highlight" name="global_map[marker_select_highlight]" type="checkbox" value="true"<?php 
  682.                                 echo ( $geo_mashup_options->get( 'global_map', 'marker_select_highlight' ) == 'true' ) ? ' checked="checked"' : ''; 
  683.                             ?> />
  684.                             <?php _e( 'Highlight', 'GeoMashup' ); ?>
  685.                             <input id="global_marker_select_center" name="global_map[marker_select_center]" type="checkbox" value="true"<?php 
  686.                                 echo ( $geo_mashup_options->get( 'global_map', 'marker_select_center' ) == 'true' ) ? ' checked="checked"' : ''; 
  687.                             ?> />
  688.                             <?php _e( 'Center', 'GeoMashup' ); ?>
  689.                             <input id="global_marker_select_attachments" name="global_map[marker_select_attachments]" type="checkbox" value="true"<?php 
  690.                                 echo ( $geo_mashup_options->get( 'global_map', 'marker_select_attachments' ) == 'true' ) ? ' checked="checked"' : ''; 
  691.                             ?> />
  692.                             <?php _e( 'Show Geo Attachments', 'GeoMashup' ); ?>
  693.                         </td>
  694.                     </tr>
  695.                     <tr>
  696.                         <th scope="row"><?php _e('Automatic Selection', 'GeoMashup'); ?></th>
  697.                         <td>
  698.                             <input id="auto_info_open" name="global_map[auto_info_open]" type="checkbox" value="true"<?php
  699.                                 if ($geo_mashup_options->get ( 'global_map', 'auto_info_open' ) == 'true') {
  700.                                     echo ' checked="checked"';
  701.                                 }
  702.                             ?> />
  703.                             <span class="description"><?php
  704.                                 _e( 'Selects the linked or most recent item when the map loads.', 'GeoMashup'); 
  705.                             ?></span>
  706.                         </td>
  707.                     </tr>
  708.                     <tr>
  709.                         <th scope="row"><?php _e('Show Only Most Recent Items', 'GeoMashup'); ?></th>
  710.                         <td>
  711.                             <input id="max_posts" 
  712.                                 name="global_map[max_posts]" 
  713.                                 type="text" 
  714.                                 size="4" 
  715.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'global_map', 'max_posts' ) ); ?>" />
  716.                             <span class="description"><?php _e('Number of items to show, leave blank for all', 'GeoMashup'); ?></span>
  717.                         </td>
  718.                     </tr>
  719.                     <tr>
  720.                         <th scope="row"><?php _e('Show Future Posts', 'GeoMashup'); ?></th>
  721.                         <td><select id="show_future" name="global_map[show_future]">
  722.                             <?php foreach($futureOptions as $value => $label) : ?>
  723.                             <option value="<?php echo esc_attr( $value ); ?>"<?php
  724.                                 if ($value == $geo_mashup_options->get ( 'global_map', 'show_future' )) {
  725.                                     echo ' selected="selected"';
  726.                                 }
  727.                             ?>><?php echo esc_html( $label ); ?></option>
  728.                             <?php endforeach; ?>
  729.                         </select></td>
  730.                     </tr>
  731.                     <tr>
  732.                         <th scope="row"><?php _e('Click To Load', 'GeoMashup'); ?></th>
  733.                         <td>
  734.                             <input id="click_to_load" name="global_map[click_to_load]" type="checkbox" value="true"<?php 
  735.                                 if ($geo_mashup_options->get ( 'global_map', 'click_to_load' ) == 'true') {
  736.                                     echo ' checked="checked"';
  737.                                 }
  738.                             ?> />
  739.                         </td>
  740.                     </tr>
  741.                     <tr>
  742.                         <th scope="row"><?php _e('Click To Load Text', 'GeoMashup'); ?></th>
  743.                         <td>
  744.                             <input id="click_to_load_text" 
  745.                                 name="global_map[click_to_load_text]" 
  746.                                 type="text" 
  747.                                 size="50" 
  748.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'global_map', 'click_to_load_text' ) ); ?>" />
  749.                         </td>
  750.                     </tr>
  751.                     <tr><td colspan="2" align="center">
  752.                         <table>
  753.                             <tr><th><?php _e('Category', 'GeoMashup'); ?></th><th><?php _e('Color'); ?></th>
  754.                                 <th><?php _e('Show Connecting Line Until Zoom Level (0-20 or none)','GeoMashup'); ?></th></tr>
  755.                             <?php $categories = get_categories( array( 'hide_empty' => false ) ); ?>
  756.                             <?php if (is_array($categories)) : ?>
  757.                                 <?php foreach($categories as $category) : ?>
  758.                                 <tr><td><?php echo esc_html( $category->name ); ?></td>
  759.                                     <td>
  760.                                         <select id="category_color_<?php echo esc_attr( $category->slug ); ?>" 
  761.                                             name="global_map[category_color][<?php echo esc_attr( $category->slug ); ?>]">
  762.                                         <?php foreach($colorNames as $name => $rgb) : ?>
  763.                                             <option value="<?php echo esc_attr( $name ); ?>"<?php
  764.                                                 if ($name == $geo_mashup_options->get ( 'global_map', 'category_color', $category->slug ) ) {
  765.                                                     echo ' selected="selected"';
  766.                                                 }
  767.                                             ?> style="background-color:<?php echo esc_attr( $rgb ); ?>'"><?php echo esc_html( $name ); ?></option>
  768.                                         <?php endforeach; ?>    
  769.                                         </select>
  770.                                     </td><td>
  771.                                     <input id="category_line_zoom_<?php 
  772.                                         echo esc_attr( $category->slug ); ?>" name="global_map[category_line_zoom][<?php 
  773.                                         echo esc_attr( $category->slug ); ?>]" value="<?php 
  774.                                         echo esc_attr( $geo_mashup_options->get( 'global_map', 'category_line_zoom', $category->slug ) );
  775.                                     ?>" type="text" size="2" maxlength="2" /></td></tr>
  776.                                 <?php endforeach; ?>    
  777.                             <?php endif; ?>
  778.                         </table>
  779.                     </td></tr>
  780.                 </table>
  781.                 <div class="submit"><input type="submit" name="submit" value="<?php _e('Update Options', 'GeoMashup'); ?>" /></div>
  782.             </fieldset>
  783.             <fieldset id="geo-mashup-context-map-settings">
  784.                 <p><?php _e('Default settings for contextual maps, which include just the items shown on a page, for example.', 'GeoMashup'); ?></p>
  785.                 <table width="100%" cellspacing="2" cellpadding="5" class="editform">
  786.                     <tr>
  787.                         <th scope="row"><?php _e('Map Width', 'GeoMashup'); ?></th>
  788.                         <td>
  789.                             <input id="context_map_width" 
  790.                                 name="context_map[width]" 
  791.                                 type="text" 
  792.                                 size="5" 
  793.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'context_map', 'width' ) ); ?>" />
  794.                             <?php _e('Pixels, or append %.', 'GeoMashup'); ?>
  795.                         </td>
  796.                     </tr>
  797.                     <tr>
  798.                         <th scope="row"><?php _e('Map Height', 'GeoMashup'); ?></th>
  799.                         <td>
  800.                             <input id="context_map_height" 
  801.                                 name="context_map[height]" 
  802.                                 type="text" 
  803.                                 size="5" 
  804.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'context_map', 'height' ) ); ?>" />
  805.                             <?php _e('px', 'GeoMashup'); ?>
  806.                         </td>
  807.                     </tr>
  808.                     <tr>
  809.                         <th scope="row"><?php _e('Map Control', 'GeoMashup'); ?></th>
  810.                         <td>
  811.                             <select id="context_map_control" name="context_map[map_control]">
  812.                             <?php foreach ( $mapControls as $type => $label ) : ?>
  813.                                 <option value="<?php echo esc_attr( $type ); ?>"<?php 
  814.                                     if ($type == $geo_mashup_options->get ( 'context_map', 'map_control' )) {
  815.                                         echo ' selected="selected"';
  816.                                     }
  817.                                 ?>><?php echo esc_html( $label ); ?></option>
  818.                             <?php endforeach; ?>    
  819.                             </select>
  820.                         </td>
  821.                     </tr>
  822.                     <tr>
  823.                         <th scope="row"><?php _e('Default Map Type', 'GeoMashup'); ?></th>
  824.                         <td>
  825.                             <select id="context_map_type" name="context_map[map_type]">
  826.                             <?php    foreach($mapTypes as $type => $label) : ?>
  827.                                 <option value="<?php echo esc_attr( $type ); ?>"<?php
  828.                                     if ($type == $geo_mashup_options->get ( 'context_map', 'map_type' )) {
  829.                                         echo ' selected="selected"';
  830.                                     }
  831.                                 ?>><?php echo esc_html( $label ); ?></option>
  832.                             <?php endforeach; ?>
  833.                             </select>
  834.                         </td>
  835.                     </tr>
  836.                     <tr>
  837.                         <th scope="row"><?php _e('Add Map Type Control', 'GeoMashup'); ?></th>
  838.                         <td>
  839.                         <?php foreach ( $mapTypes as $type => $label ) : ?>
  840.                         <input id="context_add_map_type_<?php echo esc_attr( $type ); ?>" 
  841.                             name="context_map[add_map_type_control][]" 
  842.                             type="checkbox" 
  843.                             value="<?php echo esc_attr( $type ); ?>" <?php 
  844.                                 if ( in_array( $type, $geo_mashup_options->get ( 'context_map', 'add_map_type_control' ) ) ) {
  845.                                     echo ' checked="checked"';
  846.                                 }
  847.                                 ?> /> <?php echo esc_html( $label ); ?>
  848.                             <?php endforeach; ?>
  849.                         </td>
  850.                     </tr>
  851.                     <tr>
  852.                         <th scope="row"><?php _e('Add Overview Control', 'GeoMashup'); ?></th>
  853.                         <td>
  854.                             <input id="context_add_overview_control" name="context_map[add_overview_control]" type="checkbox" value="true"<?php 
  855.                                 if ($geo_mashup_options->get ( 'context_map', 'add_overview_control' ) == 'true') {
  856.                                     echo ' checked="checked"';
  857.                                 }
  858.                             ?> />
  859.                         </td>
  860.                     </tr>
  861.                     <?php if ( 'google' == $map_api ) : ?>
  862.                     <tr>
  863.                         <th scope="row"><?php _e('Add Google Bar', 'GeoMashup'); ?></th>
  864.                         <td>
  865.                             <input id="context_add_google_bar" name="context_map[add_google_bar]" type="checkbox" value="true"<?php 
  866.                             if ($geo_mashup_options->get ( 'context_map', 'add_google_bar' ) == 'true') {
  867.                                 echo ' checked="checked"';
  868.                             }
  869.                         ?> />
  870.                         </td>
  871.                     </tr>
  872.                     <?php endif; ?>
  873.                     <tr>
  874.                         <th scope="row"><?php _e('Enable Scroll Wheel Zoom', 'GeoMashup'); ?></th>
  875.                         <td><input id="context_enable_scroll_wheel_zoom" name="context_map[enable_scroll_wheel_zoom]" type="checkbox" value="true"<?php
  876.                             if ( $geo_mashup_options->get ( 'context_map', 'enable_scroll_wheel_zoom' ) == 'true' ) {
  877.                                 echo ' checked="checked"';
  878.                             }
  879.                         ?> /></td>
  880.                     </tr>
  881.                     <tr>
  882.                         <th scope="row"><?php _e('Default Zoom Level', 'GeoMashup'); ?></th>
  883.                         <td>
  884.                             <select id="zoom" name="context_map[zoom]">
  885.                                 <?php foreach ( $zoomOptions as $value => $label ) : ?>
  886.                                 <option value="<?php echo esc_attr( $value ); ?>"<?php
  887.                                     if ( strcmp( $value, $geo_mashup_options->get( 'context_map', 'zoom' ) ) == 0 ) {
  888.                                         echo ' selected="selected"';
  889.                                     }
  890.                                 ?>><?php echo esc_html( $label ); ?></option>
  891.                                 <?php endforeach; ?>
  892.                             </select>
  893.                             <span class="description"><?php
  894.                                 _e( '0 is zoomed all the way out.', 'GeoMashup' ); 
  895.                             ?></span>
  896.                         </td>
  897.                     </tr>
  898.                     <tr>
  899.                         <th scope="row"><?php _e('Marker Selection Behaviors', 'GeoMashup'); ?></th>
  900.                         <td>
  901.                             <input id="context_marker_select_info_window" name="context_map[marker_select_info_window]" type="checkbox" value="true"<?php 
  902.                                 echo ( $geo_mashup_options->get( 'context_map', 'marker_select_info_window' ) == 'true' ) ? ' checked="checked"' : ''; 
  903.                             ?> />
  904.                             <?php _e( 'Open info window', 'GeoMashup' ); ?>
  905.                             <input id="context_marker_select_highlight" name="context_map[marker_select_highlight]" type="checkbox" value="true"<?php 
  906.                                 echo ( $geo_mashup_options->get( 'context_map', 'marker_select_highlight' ) == 'true' ) ? ' checked="checked"' : ''; 
  907.                             ?> />
  908.                             <?php _e( 'Highlight', 'GeoMashup' ); ?>
  909.                             <input id="context_marker_select_center" name="context_map[marker_select_center]" type="checkbox" value="true"<?php 
  910.                                 echo ( $geo_mashup_options->get( 'context_map', 'marker_select_center' ) == 'true' ) ? ' checked="checked"' : ''; 
  911.                             ?> />
  912.                             <?php _e( 'Center', 'GeoMashup' ); ?>
  913.                             <input id="context_marker_select_attachments" name="context_map[marker_select_attachments]" type="checkbox" value="true"<?php 
  914.                                 echo ( $geo_mashup_options->get( 'context_map', 'marker_select_attachments' ) == 'true' ) ? ' checked="checked"' : ''; 
  915.                             ?> />
  916.                             <?php _e( 'Show Geo Attachments', 'GeoMashup' ); ?>
  917.                         </td>
  918.                     </tr>
  919.                     <tr>
  920.                         <th scope="row"><?php _e('Click To Load', 'GeoMashup'); ?></th>
  921.                         <td>
  922.                             <input id="context_click_to_load" name="context_map[click_to_load]" type="checkbox" value="true"<?php 
  923.                                 if ($geo_mashup_options->get ( 'context_map', 'click_to_load' ) == 'true') {
  924.                                     echo ' checked="checked"';
  925.                                 }
  926.                             ?> />
  927.                         </td>
  928.                     </tr>
  929.                     <tr>
  930.                         <th scope="row"><?php _e('Click To Load Text', 'GeoMashup'); ?></th>
  931.                         <td>
  932.                             <input id="context_click_to_load_text" 
  933.                                 name="context_map[click_to_load_text]" 
  934.                                 type="text" 
  935.                                 size="50" 
  936.                                 value="<?php echo esc_attr( $geo_mashup_options->get ( 'context_map', 'click_to_load_text' ) ); ?>" />
  937.                         </td>
  938.                     </tr>
  939.                 </table>
  940.                 <div class="submit"><input type="submit" name="submit" value="<?php _e('Update Options', 'GeoMashup'); ?>" /></div>
  941.             </fieldset>
  942.         </form>
  943.         <?php if ( isset( $_GET['view_activation_log'] ) ) : ?>
  944.         <div class="updated">
  945.             <p><strong><?php _e( 'Update Log', 'GeoMashup' ); ?></strong></p>
  946.             <pre><?php echo get_option( 'geo_mashup_activation_log' ) ?></pre>
  947.             <form method="post" id="geo-mashup-log-form" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
  948.                 <?php wp_nonce_field('geo-mashup-delete-log'); ?>
  949.                 <input type="submit" name="delete_log" value="<?php _e('Delete Log', 'GeoMashup'); ?>" class="button" />
  950.                 <p><?php _e( 'You can keep this log as a record, future entries will be appended.', 'GeoMashup' ); ?></p>
  951.             </form>
  952.         </div>
  953.         <?php else : ?>
  954.         <p>Geo Mashup needs you: <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=11045324">donate</a>,
  955.         contribute <a href="http://wiki.geo-mashup.org/guides">a guide</a>
  956.         or <a href="http://code.google.com/p/wordpress-geo-mashup/source/checkout">code</a>,
  957.         answer a question in the <a href="http://groups.google.com/group/wordpress-geo-mashup-plugin">community support group</a>,
  958.         or use this HTML to add a link to your site:
  959.         <input id="geo-mashup-credit-input" type="text" size="80" value="<?php 
  960.             echo esc_attr( '<a href="http://code.google.com/p/wordpress-geo-mashup/" title="Geo Mashup"><img src="' . path_join( GEO_MASHUP_URL_PATH, 'images/gm-credit.png' ) . '" alt="Geo Mashup" /></a>' );
  961.             ?>" /><br />
  962.         Thanks!
  963.         </p>
  964.         <script type="text/javascript"> jQuery( function( $ ) { $( '#geo-mashup-credit-input' ).focus( function() { this.select(); } ) } ); </script>
  965.         <p><a href="<?php echo $_SERVER['REQUEST_URI']; ?>&amp;view_activation_log=1"><?php _e('View Update Log', 'GeoMashup'); ?></a></p>
  966.         <?php endif; ?>
  967.         <p><a href="http://code.google.com/p/wordpress-geo-mashup/wiki/Documentation"><?php _e('Geo Mashup Documentation', 'GeoMashup'); ?></a></p>
  968.     </div>
  969. <?php
  970. }
  971. ?>

Documentation generated on Sat, 09 Jul 2011 21:54:58 -0700 by phpDocumentor 1.4.3