Ignore:
Timestamp:
Dec 7, 2011, 5:39:56 AM (12 years ago)
Author:
rvelices
Message:

rv_gmaps towards full maps api v3 migration

Location:
extensions/rv_gmaps/trunk/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/admin/admin.php

    r3447 r12700  
    2626$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
    2727
    28 if ( empty($conf['gmaps_api_key']) )
    29   $page['infos'][] = 'Please define the Google maps api key';
     28/*if ( empty($conf['gmaps_api_key']) )
     29  $page['infos'][] = 'Please define the Google maps api key';*/
    3030
    3131?>
  • extensions/rv_gmaps/trunk/admin/admin_config.php

    r8367 r12700  
    66if ( isset($_POST['submit']) )
    77{
    8   $query = '
     8  if (isset($_POST['gmaps_api_key']))
     9  {
     10    $query = '
    911UPDATE '.CONFIG_TABLE.'
    1012  SET value="'.$_POST['gmaps_api_key'].'"
    1113  WHERE param="gmaps_api_key"
    1214  LIMIT 1';
    13   pwg_query($query);
    14   list($conf['gmaps_api_key']) = array_from_query('SELECT value FROM '.CONFIG_TABLE.' WHERE param="gmaps_api_key"', 'value');
     15    pwg_query($query);
     16    list($conf['gmaps_api_key']) = array_from_query('SELECT value FROM '.CONFIG_TABLE.' WHERE param="gmaps_api_key"', 'value');
     17  }
    1518
     19  if (isset($_POST['gmaps_auto_sync']))
     20  {
     21    conf_update_param('gmaps_auto_sync', "1");
     22    $conf['gmaps_auto_sync']=1;
     23  }
     24  else
     25  {
     26    $query = 'DELETE FROM '.CONFIG_TABLE.' WHERE param="gmaps_auto_sync"';
     27    pwg_query($query);
     28    unset($conf['gmaps_auto_sync']);
     29  }
     30 
    1631  $gm_config = rvm_get_config();
    1732
     
    4257      'NB_GEOTAGGED' => $nb_geotagged,
    4358      'GMAPS_API_KEY' => $conf['gmaps_api_key'],
     59      'GMAPS_AUTO_SYNC' => isset($conf['gmaps_auto_sync']) ? 1:0,
    4460      'NB_MARKERS' => rvm_get_config_var('nb_markers',40),
    4561      'NB_IMAGES_PER_MARKER' => rvm_get_config_var('nb_images_per_marker',20),
  • extensions/rv_gmaps/trunk/admin/admin_config.tpl

    r8471 r12700  
    44<form method="post" action="" class="properties">
    55<fieldset>
    6   <legend>Map configuration</legend>
    7   <ul>
    8  
    9   <li>
    10   <label>
    11     Google Maps API Key:
    12     <input type="text" size="48" name="gmaps_api_key" value="{$GMAPS_API_KEY}" />
    13   </label>
    14     <br/>Signup for the key here: <a href="http://www.google.com/apis/maps/signup.html" target="_blank">http://www.google.com/apis/maps/signup.html</a>.
    15   </li>
    16  
    17   <br/>
    18  
     6        <legend>Map configuration</legend>
     7        <ul>
     8
     9        <!--<li>
     10         <label>
     11                Google Maps API Key:
     12                <input type="text" size="48" name="gmaps_api_key" value="{$GMAPS_API_KEY}" />
     13        </label>
     14                <br/>Signup for the key here: <a href="http://www.google.com/apis/maps/signup.html" target="_blank">http://www.google.com/apis/maps/signup.html</a>.
     15        </li>
     16        <br/> -->
     17
     18        <li>
     19         <label>
     20                Automatically sync from exif
     21                <input type="checkbox" name="gmaps_auto_sync" {if $GMAPS_AUTO_SYNC}checked="checked"{/if} />
     22                </label>
     23                <br/><small>When metadata is synchronized, tour manual set coordinates might be overriden.</small>
     24        </li>
     25        <br/>
     26
    1927  <li>
    2028  <label>
     
    2432    <br/><small>The images will be "clustered" based on this number and the visible region on the map.</small>
    2533  </li>
    26  
     34
    2735  <br/>
    28  
     36
    2937  <li>
    3038  <label>
Note: See TracChangeset for help on using the changeset viewer.