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

rv_gmaps co;patible with piwigo trunk (future 2.2)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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                }
Note: See TracChangeset for help on using the changeset viewer.