Changeset 17468


Ignore:
Timestamp:
08/07/12 20:59:45 (7 years ago)
Author:
rvelices
Message:

rv_gmaps: better compatibility with 2.4

File:
1 edited

Legend:

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

    r14181 r17468  
    119119rvo( "\nimage_clusters:[\n" ); 
    120120$i=0; 
     121$thumb_params = ImageStdParams::get_by_type(IMG_THUMB); 
    121122foreach( $clusters as $c ) 
    122123{ 
     
    143144    $img = $page['items'] [ $c->items[$j] ]; 
    144145    $img['file'] = basename( $img['path'] ); 
    145     if (!empty( $img['name'] ) ) 
    146       $title = $img['name']; 
    147     else 
    148       $title = str_replace('_', ' ', get_filename_wo_extension($img['file'])); 
    149146 
    150147    $params = array( 
     
    157154    if ($j) rvo( "," ); 
    158155    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']) ) ); 
     156    rvo( "tn:".jsgm_str( DerivativeImage::url( $thumb_params,$img ) ) ); 
     157    rvo( ",name:".jsgm_str( render_element_name($img) ) ); 
     158    rvo( ",comment:".jsgm_str( render_element_description($img) ) ); 
    162159    rvo( ",page_url:".jsgm_str( $page_url ) ); 
    163160    rvo( "}" ); 
Note: See TracChangeset for help on using the changeset viewer.