Changeset 18951


Ignore:
Timestamp:
Nov 6, 2012, 9:55:00 PM (12 years ago)
Author:
rvelices
Message:

rv_gmaps ready for piwigo 2.5

Location:
extensions/rv_gmaps/trunk
Files:
3 edited

Legend:

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

    r18728 r18951  
    172172
    173173  $template->set_prefilter('batch_manager_unit', 'rvm_prefilter_batch_manager_unit');
    174 
    175   if (empty($page['cat_elements_id']))
    176     return;
    177 
    178   $query = '
    179 SELECT id,lat,lon
    180   FROM '.IMAGES_TABLE;
    181 
    182   if ($is_category)
    183   {
    184     $category_info = get_cat_info($_SESSION['bulk_manager_filter']['category']);
    185 
    186     $conf['order_by'] = $conf['order_by_inside_category'];
    187     if (!empty($category_info['image_order']))
    188     {
    189       $conf['order_by'] = ' ORDER BY '.$category_info['image_order'];
    190     }
    191 
    192     $query.= '
    193     JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id';
    194   }
    195 
    196   $query.= '
    197   WHERE id IN ('.implode(',', $page['cat_elements_id']).')';
    198 
    199   if ($is_category)
    200   {
    201     $query.= '
    202     AND category_id = '.$_SESSION['bulk_manager_filter']['category'];
    203   }
    204 
    205   $query.= '
    206   '.$conf['order_by'].'
    207   LIMIT '.$page['nb_images'].' OFFSET '.$page['start'].'
    208 ;';
    209   $result = pwg_query($query);
    210 
    211   $tpl_vars = array();
    212   while ($row = pwg_db_fetch_assoc($result))
    213   {
    214     // remove last zeros for better display
    215     $row['lat'] = preg_replace('#\.([0-9]*?)([0]+)$#', '.$1', $row['lat']);
    216     $row['lon'] = preg_replace('#\.([0-9]*?)([0]+)$#', '.$1', $row['lon']);
    217 
    218     $tpl_vars[ $row['id'] ] = array(
    219       'LAT' => rtrim($row['lat'], '.'),
    220       'LON' => rtrim($row['lon'], '.'),
    221       );
    222   }
    223 
    224   $template->assign('GEOTAG', $tpl_vars);
    225174}
    226175
     
    234183      <td>
    235184        <label>{\'Latitude\'|@translate}
    236           <input type="text" size="8" name="lat-{$element.ID}" value="{$GEOTAG[$element.ID].LAT}">
     185          <input type="text" size="8" name="lat-{$element.id}" value="{$element.lat}">
    237186        </label>
    238187        <label>{\'Longitude\'|@translate}
    239           <input type="text" size="9" name="lon-{$element.ID}" value="{$GEOTAG[$element.ID].LON}">
     188          <input type="text" size="9" name="lon-{$element.id}" value="{$element.lon}">
    240189        </label>
    241190      </td>
  • extensions/rv_gmaps/trunk/changelog.txt

    r18928 r18951  
     12.5.a
     2- piwigo 2.5
     3
    142.4.g
    25- added missing trigger on category name translation...
  • extensions/rv_gmaps/trunk/main.inc.php

    r18928 r18951  
    11<?php /*
    22Plugin Name: RV Maps&Earth
    3 Version: 2.4.g
     3Version: 2.5.a
    44Description: Extend your gallery with Google Maps and Google Earth ...
    55Plugin URI: http://piwigo.org/ext/extension_view.php?eid=122
     
    77Author URI: http://www.modusoptimus.com/
    88*/
    9 define( 'RVM_PLUGIN_VERSION', '2.4.f');
     9define( 'RVM_PLUGIN_VERSION', '2.5.a');
    1010defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
    1111
     
    101101                        global $rvm_dir;
    102102                        $map_url = rvm_duplicate_map_picture_url();
    103                         $link_title = sprintf( l10n('displays %s on a map'), strip_tags($pictures['current']['name']) );
     103                        $link_title = sprintf( l10n('displays %s on a map'), strip_tags($pictures['current']['TITLE']) );
    104104                        $template->concat( 'PLUGIN_PICTURE_ACTIONS' , sprintf(RVM_ACTION_MODEL,
    105105                                        $map_url, $link_title, ' target="_top"', 'map', l10n('Map')
Note: See TracChangeset for help on using the changeset viewer.