%s');
function rvm_end_index()
{
global $page, $filter, $template, $rvm_dir;
//if ( !is_admin() ) return; // TEMP
if ( isset($page['chronology_field']) || $filter['enabled'] )
return;
if ( 'categories' == @$page['section'])
{ // flat or no flat ; has subcats or not; ?
if ( ! @$page['rvm_cat_thumbs_displayed'] and empty($page['items']) )
return;
}
else
{
if (
!in_array( @$page['section'], array('tags','search','recent_pics','list') )
)
return;
if ( empty($page['items']) )
return;
}
include_once( dirname(__FILE__) .'/include/functions.php');
if ( !empty($page['items']) )
{
if (!@$page['rvm_items_have_latlon'] and ! rvm_items_have_latlon( $page['items'] ) )
return;
}
rvm_load_language();
$map_url = rvm_duplicate_map_index_url( array(), array('start') );
$link_title = sprintf( l10n('displays %s on a map'), strip_tags($page['title']) );
$template->concat( 'PLUGIN_INDEX_ACTIONS' , "\n".sprintf(RVM_ACTION_MODEL,
$map_url, $link_title, '', 'map', l10n('Map')
).'');
}
function rvm_picture_pictures_data($pictures)
{
if ( isset($pictures['current']['lat']) and isset($pictures['current']['lon']) )
{
global $template;
$template->append('head_elements', '' );
include_once( dirname(__FILE__) .'/include/functions.php');
rvm_load_language();
if ( isset($_GET['map']) )
include_once( dirname(__FILE__) .'/include/picture_map.inc.php');
else
{
global $rvm_dir;
$map_url = rvm_duplicate_map_picture_url();
$link_title = sprintf( l10n('displays %s on a map'), strip_tags($pictures['current']['TITLE']) );
$template->concat( 'PLUGIN_PICTURE_ACTIONS' , sprintf(RVM_ACTION_MODEL,
$map_url, $link_title, ' target="_top"', 'map', l10n('Map')
));
}
}
elseif ( isset($_GET['map']) )
redirect( duplicate_picture_url() );
return $pictures;
}
function rvm_blockmanager_apply($mb_arr)
{
if ($mb_arr[0]->get_id() != 'menubar' )
return;
if ( ($block=$mb_arr[0]->get_block('mbMenu')) != null )
{
include_once( dirname(__FILE__) .'/include/functions.php');
rvm_load_language();
global $conf;
$link_title = sprintf( l10n('displays %s on a map'), strip_tags($conf['gallery_title']) );
$block->data['rv_gmaps'] = array(
'URL' => rvm_make_map_index_url( array('section'=>'categories') ),
'TITLE' => $link_title,
'NAME' => l10n('World map'),
'REL'=> 'rel=nofollow'
);
}
}
function rvm_format_exif($exif, $file, $map)
{
if (isset($map['lat']))
{
include_once( dirname(__FILE__) .'/include/functions_metadata.php');
$ll = exif_to_lat_lon($exif);
if (is_array($ll))
{
$exif[$map['lat']] = $ll[0];
$exif[$map['lon']] = $ll[1];
}
}
return $exif;
}
if (defined('IN_ADMIN')) {
include_once(dirname(__FILE__).'/admin/admin_boot.php');
}
?>