Changeset 14181


Ignore:
Timestamp:
Apr 16, 2012, 5:16:27 AM (8 years ago)
Author:
rvelices
Message:

rv_gmaps - small template updates

Location:
extensions/rv_gmaps/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/main.inc.php

    r13092 r14181  
    104104        {
    105105                global $template;
    106                 $template->append('head_elements', '<meta name="geo.position" content="'.$pictures['current']['lat'].';'.$pictures['current']['lon'].'">' );
     106                $template->append('head_elements', '<meta name=geo.position content='.$pictures['current']['lat'].';'.$pictures['current']['lon'].'>' );
    107107                include_once( dirname(__FILE__) .'/include/functions.php');
    108108                rvm_load_language();
  • extensions/rv_gmaps/trunk/map.php

    r12719 r14181  
    1515$section = '';
    1616if ( $conf['question_mark_in_urls']==false and
    17     isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) )
     17                isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) )
    1818{
    19   $section = $_SERVER["PATH_INFO"];
    20   $section = str_replace('//', '/', $section);
    21   $path_count = count( explode('/', $section) );
    22   $page['root_path'] = PHPWG_ROOT_PATH.str_repeat('../', $path_count-1);
     19        $section = $_SERVER["PATH_INFO"];
     20        $section = str_replace('//', '/', $section);
     21        $path_count = count( explode('/', $section) );
     22        $page['root_path'] = PHPWG_ROOT_PATH.str_repeat('../', $path_count-1);
     23        if ( strncmp($page['root_path'], './', 2) == 0 )
     24        {
     25                $page['root_path'] = substr($page['root_path'], 2);
     26        }
    2327}
    2428else
    2529{
    26   foreach ($_GET as $key=>$value)
    27   {
    28     if (!strlen($value)) $section=$key;
    29     break;
    30   }
     30        foreach ($_GET as $key=>$value)
     31        {
     32                if (!strlen($value)) $section=$key;
     33                break;
     34        }
    3135}
    3236
  • extensions/rv_gmaps/trunk/map_data.php

    r13092 r14181  
    9191rvo( '{' );
    9292
    93 rvo( "\ntitle: ".jsgm_str( strip_tags(trigger_event('render_element_description', $page['title']) ) ) );
     93rvo( "\ntitle:".jsgm_str( strip_tags(trigger_event('render_element_description', $page['title']) ) ) );
    9494rvo( ",\n" );
    9595
    96 rvo( "page_url: ".jsgm_str( duplicate_index_url( array('start'=>0) ) ) );
     96rvo( "page_url:".jsgm_str( duplicate_index_url( array('start'=>0) ) ) );
    9797rvo( ",\n" );
    9898
    99 rvo( "blowup_url: ".jsgm_str( rvm_duplicate_blowup_url( array('start'=>0) ) ) );
     99rvo( "blowup_url:".jsgm_str( rvm_duplicate_blowup_url( array('start'=>0) ) ) );
    100100rvo( ",\n" );
    101101
    102 rvo( "kml_url: ".jsgm_str( rvm_duplicate_kml_index_url( array('start'=>0, 'flat'=>1) ) ) );
     102rvo( "kml_url:".jsgm_str( rvm_duplicate_kml_index_url( array('start'=>0, 'flat'=>1) ) ) );
    103103rvo( ",\n" );
    104104
    105 rvo( "nb_items: ".count($page['items']) );
     105rvo( "nb_items:".count($page['items']) );
    106106rvo( ",\n" );
    107107
    108 rvo( "bounds: " );
     108rvo( "bounds:" );
    109109if ( isset($cm) )
    110110  rvo( jsgm_bounds( $cm->bounds ) );
     
    114114
    115115
    116 rvo( "\nnb_clusters: ".count($clusters) );
     116rvo( "\nnb_clusters:".count($clusters) );
    117117rvo( "," );
    118118
    119 rvo( "\nimage_clusters: [\n" );
     119rvo( "\nimage_clusters:[\n" );
    120120$i=0;
    121121foreach( $clusters as $c )
     
    123123  if ($i) rvo( ",\n\n" );
    124124  rvo( "{" );
    125   rvo( 'position: '. jsgm_position( bounds_center($c->bounds) ) );
     125  rvo( 'position:'. jsgm_position( bounds_center($c->bounds) ) );
    126126  rvo( ",\n" );
    127   rvo( 'bounds: '. jsgm_bounds( $c->bounds ) );
     127  rvo( 'bounds:'. jsgm_bounds( $c->bounds ) );
    128128  rvo( ",\n" );
    129   rvo( 'nb_items: '.count($c->items) );
     129  rvo( 'nb_items:'.count($c->items) );
    130130  rvo( ",\n" );
    131131
    132   rvo( 'blowup_url: "'.rvm_duplicate_blowup_url(array('box'=>$c->bounds), array('start') ). '"' );
     132  rvo( 'blowup_url:"'.rvm_duplicate_blowup_url(array('box'=>$c->bounds), array('start') ). '"' );
    133133  rvo( ",\n" );
    134134
     
    138138    $c->items = array_slice($c->items, 0, $max_per_cluster);
    139139  }
    140   rvo( 'items: [' );
     140  rvo( 'items:[' );
    141141  for ($j=0; $j<count($c->items); $j++)
    142142  {
     
    157157    if ($j) rvo( "," );
    158158    rvo( "{" );
    159     rvo( "tn: ".jsgm_str( get_thumbnail_url( $img ) ) );
    160     rvo( ",name: ".jsgm_str( trigger_event('render_element_description', $title) ) );
    161     rvo( ",comment: ".jsgm_str( trigger_event('render_element_description', $img['comment']) ) );
    162     rvo( ",page_url: ".jsgm_str( $page_url ) );
     159    rvo( "tn:".jsgm_str( get_thumbnail_url( $img ) ) );
     160    rvo( ",name:".jsgm_str( trigger_event('render_element_description', $title) ) );
     161    rvo( ",comment:".jsgm_str( trigger_event('render_element_description', $img['comment']) ) );
     162    rvo( ",page_url:".jsgm_str( $page_url ) );
    163163    rvo( "}" );
    164164  }
  • extensions/rv_gmaps/trunk/mapl.php

    r13092 r14181  
    128128$template->assign(
    129129  array(
    130     'PLUGIN_ROOT_URL' => get_absolute_root_url().'plugins/'.$rvm_dir,
     130    'PLUGIN_ROOT_URL' => get_absolute_root_url(false).'plugins/'.$rvm_dir,
    131131    'TITLE'   => $title,
    132132    'U_HOME'  => make_index_url(),
  • extensions/rv_gmaps/trunk/template/map.tpl

    r12719 r14181  
    11<!DOCTYPE html>
    2 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
     2<html>
    33<head>
    44<meta http-equiv="content-type" content="text/html; charset={$CONTENT_ENCODING}" />
     
    88
    99<script src="http://maps.googleapis.com/maps/api/js?sensor=false&amp;language={$lang_info.code}&amp;libraries=places" type="text/javascript"></script>
    10 
    11 {combine_script id='jquery' load='header' path='http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js'}
     10{combine_script id='jquery' load='header' path='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'}
    1211{combine_script id='jquery.nyroModal' load='async' path="`$PLUGIN_LOCATION`/template/nyroModal/jquery.nyroModal-1.6.2.js" version='1.6.2'}
    1312{combine_css path="`$PLUGIN_LOCATION`/template/style.css" version=$RVM_PLUGIN_VERSION}
    1413{combine_css path="`$PLUGIN_LOCATION`/template/nyroModal/nyroModal.css" version=$RVM_PLUGIN_VERSION}
    15 
    1614{combine_script id='rvm.dl' load='header' path="`$PLUGIN_LOCATION`/template/data_loader.js" version=$RVM_PLUGIN_VERSION}
    1715{combine_script id='rvm.dh' load='header' path="`$PLUGIN_LOCATION`/template/data_handler.js" version=$RVM_PLUGIN_VERSION}
     
    1917{combine_script id='rvm.st' load='header' path="`$PLUGIN_LOCATION`/template/styler.js" version=$RVM_PLUGIN_VERSION}
    2018{combine_script id='core.scripts' load='header' path='themes/default/js/scripts.js'}
    21 
    2219{get_combined_css}
    2320{get_combined_scripts load='header'}
    24 
    25 <!--[if IE]>
    26 <style type="text/css">
    27 v\:* {ldelim}
    28   behavior:url(#default#VML);
    29 }
    30 </style>
    31 <![endif]-->
    3221<!--[if lt IE 7]>
    3322<style type="text/css">
     
    3524</style>
    3625<![endif]-->
    37 
    38 
    3926
    4027<script type="text/javascript">{literal}
     
    9683        pwgPageLinker = new PageLinker(map, "aLinkToThisPage" );
    9784
    98         /*var pwgMarkerOptions = (function(){ {/literal}{$MAP_MARKER_ICON_JS}{literal} }).call(null);*/
    9985        var pwgStyler = {/literal}{$MAP_MARKER_ICON_JS}{literal};
    10086
    10187        map.pwgDataLoader = new PwgDataLoader(map, {rectangle_of_confusion: pwgStyler.roc} );
    10288        google.maps.event.addListener(map.pwgDataLoader, "dataloading", function() {
    103                 var pre = '<img src="{/literal}{$PLUGIN_ROOT_URL}{literal}/icons/progress_s.gif" width="16" height="16" alt="~" /> ';
     89                var pre = '<img src="{/literal}{$PLUGIN_ROOT_URL}{literal}/icons/progress_s.gif" width="16" height="16" alt="~"> ';
    10490                document.getElementById("dataLoadStatus").innerHTML = pre + Localization.get("Loading");
    10591                }
     
    190176  <div class="titlebar_links" >
    191177    <span id="dataLoadStatus"></span>
    192     <a id="aKml" href="" type="application/vnd.google-earth.kml+xml" class="gmnoprint"><img src="http://maps.google.com/mapfiles/ms/view_as_kml.png" width="16" height="16" alt="kml" /> <span>KML</span></a>
    193     <a id="aLinkToThisPage" href="" class="gmnoprint"><img src="http://maps.google.com/mapfiles/bar_icon_link.gif" alt="&lt;-&gt;" width="16" height="16" /> <span>{'Link to this page'|@translate}</span></a>
     178    <a id="aKml" href="" type="application/vnd.google-earth.kml+xml" class="gmnoprint"><img src="http://maps.google.com/mapfiles/ms/view_as_kml.png" width="16" height="16" alt="kml"> <span>KML</span></a>
     179    <a id="aLinkToThisPage" href="" class="gmnoprint"><img src="http://maps.google.com/mapfiles/bar_icon_link.gif" alt="&lt;-&gt;" width="16" height="16"> <span>{'Link to this page'|@translate}</span></a>
    194180    <a id="aBlowup" href="" onclick="return PwgDataHandler.blowupUrl(this.href);" class="gmnoprint" title="{'show all photos around this location'|@translate}">
    195                         <img src="{$PLUGIN_ROOT_URL}/icons/pic_s.gif" alt="" title="{'show all photos around this location'|@translate}" />
     181                        <img src="{$PLUGIN_ROOT_URL}/icons/pic_s.gif" alt="" title="{'show all photos around this location'|@translate}">
    196182                        <span>{'Show all'|@translate}</span>
    197183                </a>
    198184    <span class="gmnoprint">
    199                         <input type="text" size="48" id="q" />
     185                        <input type="text" size="48" id="q">
    200186                </span>
    201187  </div>
    202188  <div class="titlebar_title">
    203189    <a href="{$U_HOME}" class="gmnoprint">{'Home'|@translate}</a>
    204     <a href="{$U_HOME_MAP}" title="{'displays all photos on a map'|@translate}"><img src="{$PLUGIN_ROOT_URL}/icons/map_sw.gif" width="32" height="17" alt="map"/></a>
     190    <a href="{$U_HOME_MAP}" title="{'displays all photos on a map'|@translate}"><img src="{$PLUGIN_ROOT_URL}/icons/map_sw.gif" width="32" height="17" alt="map"></a>
    205191    {'Viewing'|@translate}: <a id="aPageUrl" href=""></a>
    206192  </div>
     
    208194
    209195<div id="map"> </div>
     196{get_combined_scripts load='footer'}
    210197</body>
    211 {get_combined_scripts load='footer'}
    212198</html>
  • extensions/rv_gmaps/trunk/template/mapl.tpl

    r13092 r14181  
    33        text-align: justify;
    44        padding: 0;
    5         margin: 0.5em 1em 0.5em 1em;
     5        margin: 0.5em 1em 0.5em 1em
    66}
    77.fullTagCloud LI {ldelim}
     
    1010{/html_style}
    1111
    12 <div id="content" class="content" style="margin: 0;">
     12<div id="content" class="content">
    1313        <div class="titrePage">
    1414                <ul class="categoryActions">
     
    3030                <li>{strip}
    3131                        <a target="_top" href="{$cat.URL}" class="{$cat.CLASS}" title="{$cat.TITLE}">{$cat.NAME}</a>
    32                         <a target="_top" href="{$cat.U_MAP}" title="{$pwg->sprintf($displays_x_on_a_map, $cat.NAME)}" ><img src="{$PLUGIN_ROOT_URL}/icons/map_s.png" alt="map" class="button" /></a>
    33                 {/strip}</li>&nbsp;
     32                        <a target="_top" href="{$cat.U_MAP}" title="{$pwg->sprintf($displays_x_on_a_map, $cat.NAME)}" ><img src="{$PLUGIN_ROOT_URL}/icons/map_s.png" alt="map"></a>
     33                {/strip}&nbsp;</li>
    3434                {/foreach}
    3535        </ul>
     
    4242                <li>{strip}
    4343                        <a target="_top" href="{$tag.URL}" class="tagLevel{$tag.level}{$tag.radu_class|@default}" title="{$tag.TITLE}">{$tag.name}</a>
    44                         <a target="_top" href="{$tag.U_MAP}" title="{$pwg->sprintf($displays_x_on_a_map, $tag.name)}"><img src="{$PLUGIN_ROOT_URL}/icons/map_s.png" alt="map" class="button" /></a>
    45                 {/strip}</li>&nbsp;
     44                        <a target="_top" href="{$tag.U_MAP}" title="{$pwg->sprintf($displays_x_on_a_map, $tag.name)}"><img src="{$PLUGIN_ROOT_URL}/icons/map_s.png" alt="map"></a>
     45                {/strip}&nbsp;</li>
    4646                {/foreach}
    4747        </ul>
Note: See TracChangeset for help on using the changeset viewer.