Changeset 8304


Ignore:
Timestamp:
Dec 26, 2010, 7:18:25 AM (10 years ago)
Author:
rvelices
Message:

rv_gmaps co;patible with piwigo trunk (future 2.2)

Location:
extensions/rv_gmaps/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/admin/admin_edit.tpl

    r6472 r8304  
    66    {html_options options=$specials}
    77  </optgroup>
    8   <optgroup label="{'Categories'|@translate}">
     8  <optgroup label="{'Albums'|@translate}">
    99        {html_options options=$categories selected=$categories_selected}
    1010  </optgroup>
  • extensions/rv_gmaps/trunk/admin/admin_sync.tpl

    r7033 r8304  
    3232
    3333  <fieldset id="catSubset">
    34     <legend>{'reduce to single existing categories'|@translate}</legend>
     34    <legend>{'reduce to single existing albums'|@translate}</legend>
    3535    <ul>
    3636    <li>
     
    4040    </li>
    4141
    42     <li><label><input type="checkbox" name="subcats_included" value="1" {$SUBCATS_INCLUDED_CHECKED} /> {'Search in subcategories'|@translate}</label></li>
     42    <li><label><input type="checkbox" name="subcats_included" value="1" {$SUBCATS_INCLUDED_CHECKED} /> {'Search in sub-albums'|@translate}</label></li>
    4343    </ul>
    4444  </fieldset>
  • extensions/rv_gmaps/trunk/changelog.txt

    r8039 r8304  
     12.2.a
     2- compatible with piwigo core 2.2
     3
    142.1.c
    25- do not use prototype anymore (replaced by jQuery + jQuery nyromodal)
  • extensions/rv_gmaps/trunk/include/picture_map.inc.php

    r8013 r8304  
    22global $page, $template, $conf, $rvm_dir;
    33
    4 $template->concat('PLUGIN_PICTURE_ACTIONS', '
    5   <a href="'.duplicate_picture_url().'" title="'.l10n('return to normal view mode').'"><img src="'.get_absolute_root_url(false).'plugins/'.$rvm_dir.'/icons/map_m.png" class="button" alt="map"></a>
    6   ');
     4$template->concat( 'PLUGIN_PICTURE_ACTIONS' , sprintf(RVM_ACTION_MODEL,
     5        duplicate_picture_url(), l10n('return to normal view mode'), '', 'map', 'map'
     6));
    77
    88$template->assign(
     
    1111    'GMAPS_API_KEY' => $conf['gmaps_api_key'],
    1212    'PLUGIN_ROOT_URL' => get_absolute_root_url().'plugins/'.$rvm_dir,
     13                'PLUGIN_LOCATION' => 'plugins/'.$rvm_dir,
    1314  )
    1415  );
  • extensions/rv_gmaps/trunk/main.inc.php

    r8013 r8304  
    11<?php /*
    22Plugin Name: RV Maps&Earth
    3 Version: 2.1.b
     3Version: 2.2.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.1.b');
     9define( 'RVM_PLUGIN_VERSION', '2.2.a');
    1010if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    1111
     
    3939        }
    4040}
     41
     42define('RVM_ACTION_MODEL', '<a href="%s" title="%s" rel="nofollow" class="pwg-state-default pwg-button" %s>
     43        <span class="pwg-icon pwg-icon-%s">&nbsp;</span><span class="pwg-button-text">%s</span>
     44</a>');
    4145
    4246function rvm_end_index()
     
    7680        {
    7781                $link_title = sprintf( l10n('displays %s on a map'), strip_tags($page['title']) );
    78                 $template->concat( 'PLUGIN_INDEX_ACTIONS' ,'
    79 <li><a href="'.$map_url.'" title="'.$link_title.'" rel="nofollow"><img src="'.get_absolute_root_url(false).'plugins/'.$rvm_dir.'/icons/map_m.png" class="button" alt="map"></a></li>
    80 ');
     82                $template->concat( 'PLUGIN_INDEX_ACTIONS' , '<li>'.sprintf(RVM_ACTION_MODEL,
     83                        $map_url, $link_title, '', 'map', 'map'
     84                        ).'</li>');
    8185        }
    8286
    83 //  if ( empty($map_url) )
    8487        {
    8588                $kml_url = rvm_duplicate_kml_index_url( array(), array('start') );
    8689                $link_title = sprintf( l10n('opens %s in Google Earth'), strip_tags($page['title']) );
    87                 $template->concat( 'PLUGIN_INDEX_ACTIONS' ,'
    88 <li><a href="'.$kml_url.'" title="'.$link_title.'" rel="nofollow" type="application/vnd.google-earth.kml+xml"><img src="'.get_absolute_root_url(false).'plugins/'.$rvm_dir.'/icons/earth_m.png" class="button" alt="earth"></a></li>
    89 ');
     90                $template->concat( 'PLUGIN_INDEX_ACTIONS' , '<li>'.sprintf(RVM_ACTION_MODEL,
     91                        $kml_url, $link_title, 'type="application/vnd.google-earth.kml+xml"', 'globe', 'earth'
     92                        ).'</li>');
    9093        }
    9194}
     
    108111                        {
    109112                                $link_title = sprintf( l10n('displays %s on a map'), strip_tags($pictures['current']['name']) );
    110                                 $template->concat('PLUGIN_PICTURE_ACTIONS', '
    111 <a href="'.$map_url.'" title="'.$link_title.'" rel="nofollow" target="_top"><img src="'.get_absolute_root_url(false).'plugins/'.$rvm_dir.'/icons/map_m.png" class="button" alt="map"></a>
    112 ');
     113                                $template->concat( 'PLUGIN_PICTURE_ACTIONS' , sprintf(RVM_ACTION_MODEL,
     114                                        $map_url, $link_title, 'target="_top"', 'map', 'map'
     115                                ));
    113116                        }
    114117                }
  • extensions/rv_gmaps/trunk/map.php

    r3447 r8304  
    6767    'GMAPS_API_KEY' => $conf['gmaps_api_key'],
    6868    'PLUGIN_ROOT_URL' => get_absolute_root_url().'plugins/'.$rvm_dir,
     69                'PLUGIN_LOCATION' => 'plugins/'.$rvm_dir,
    6970    'U_MAP_DATA' => $map_data_url,
    7071    'GALLERY_TITLE' => $conf['gallery_title'],
  • extensions/rv_gmaps/trunk/template/map.tpl

    r8220 r8304  
    55<meta name="robots" content="noindex,nofollow" />
    66<title>{$GALLERY_TITLE}</title>
    7 <link rel="stylesheet" type="text/css" href="{$PLUGIN_ROOT_URL}/template/style.css?v={$RVM_PLUGIN_VERSION}" />
     7
     8<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key={$GMAPS_API_KEY}&amp;hl={$lang_info.code}" type="text/javascript"></script>
     9
     10{combine_script id='jquery' load='header' path='http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'}
     11{combine_script id='jquery.nyroModal' load='async' path="`$PLUGIN_LOCATION`/template/nyroModal/jquery.nyroModal-1.6.2.js" version='1.6.2'}
     12{combine_css path="`$PLUGIN_LOCATION`/template/style.css" version=$RVM_PLUGIN_VERSION}
     13{combine_css path="`$PLUGIN_LOCATION`/template/nyroModal/nyroModal.css" version=$RVM_PLUGIN_VERSION}
     14
     15{combine_script id='rvm.dl' load='header' path="`$PLUGIN_LOCATION`/template/data_loader.js" version=$RVM_PLUGIN_VERSION}
     16{combine_script id='rvm.dh' load='header' path="`$PLUGIN_LOCATION`/template/data_handler.js" version=$RVM_PLUGIN_VERSION}
     17{combine_script id='rvm.pl' load='header' path="`$PLUGIN_LOCATION`/template/page_linker.js" version=$RVM_PLUGIN_VERSION}
     18{combine_script id='core.scripts' load='header' path='themes/default/js/scripts.js'}
     19
     20{get_combined_css}
     21{get_combined_scripts load='header'}
     22
    823<!--[if IE]>
    924<style type="text/css">
     
    1934<![endif]-->
    2035
    21 <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key={$GMAPS_API_KEY}&amp;hl={$lang_info.code}" type="text/javascript"></script>
    22 
    23 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
    24 <script type="text/javascript">jQuery.noConflict();</script>
    25 <script src="{$PLUGIN_ROOT_URL}/template/nyroModal/jquery.nyroModal-1.6.2.js" type="text/javascript"></script>
    26 <link href="{$PLUGIN_ROOT_URL}/template/nyroModal/nyroModal.css" rel="stylesheet" type="text/css">
    27 
    28 <script src="{$PLUGIN_ROOT_URL}/template/data_loader.js?v={$RVM_PLUGIN_VERSION}" type="text/javascript"></script>
    29 <script src="{$PLUGIN_ROOT_URL}/template/data_handler.js?v={$RVM_PLUGIN_VERSION}" type="text/javascript"></script>
    30 <script src="{$PLUGIN_ROOT_URL}/template/page_linker.js?v={$RVM_PLUGIN_VERSION}" type="text/javascript"></script>
    31 
    32 <script src="{$ROOT_URL}themes/default/js/scripts.js" type="text/javascript"></script>
     36
    3337
    3438<script type="text/javascript">{literal}
     
    226230<div id="map"> </div>
    227231</body>
     232{get_combined_scripts load='footer'}
    228233</html>
  • extensions/rv_gmaps/trunk/template/mapl.tpl

    r6245 r8304  
    1515        <div class="titrePage">
    1616                <ul class="categoryActions">
    17                         <li><a href="{$U_KML}" title="{$KML_LINK_TITLE}" rel="nofollow" type="application/vnd.google-earth.kml+xml"><img src="{$PLUGIN_ROOT_URL}/icons/earth_m.png" class="button" alt="earth"></a></li>
    18                         <li><a target="_top" href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'Home'|@translate}"/></a></li>
     17                        <li><a href="{$U_KML}" title="{$KML_LINK_TITLE}" class="pwg-state-default pwg-button" rel="nofollow" type="application/vnd.google-earth.kml+xml">
     18                                <span class="pwg-icon pwg-icon-globe">&nbsp;</span><span class="pwg-button-text">earth</span>
     19                        </a><li>
     20                        <li><a target="_top" href="{$U_HOME}" title="{'return to homepage'|@translate}" class="pwg-state-default pwg-button">
     21                                <span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
     22                        </a><li>
    1923                </ul>
    2024                <h2>{$TITLE}</h2>
     
    2428{if not empty($related_categories)}
    2529        <ul class="fullTagCloud">
    26                 <li>{'Categories'|@translate}:</li>
     30                <li>{'Albums'|@translate}:</li>
    2731                {foreach from=$related_categories item=cat}
    2832                <li>{strip}
  • extensions/rv_gmaps/trunk/template/picture_map_content.tpl

    r8220 r8304  
     1
    12{html_head}
    23<script src="http://maps.google.com/maps/api/js?sensor=false&amp;hl={$lang_info.code}" type="text/javascript"></script>
    3 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
    4 <script src="{$PLUGIN_ROOT_URL}/template/nyroModal/jquery.nyroModal-1.6.2.js" type="text/javascript"></script>
     4{combine_script id='jquery' load='header' path='http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'}
     5{combine_script id='jquery.nyroModal' load='async' path="`$PLUGIN_LOCATION`/template/nyroModal/jquery.nyroModal-1.6.2.js" version='1.6.2'}
    56<link href="{$PLUGIN_ROOT_URL}/template/nyroModal/nyroModal.css" rel="stylesheet" type="text/css">
    67
Note: See TracChangeset for help on using the changeset viewer.