Ignore:
Timestamp:
Feb 23, 2013, 8:40:48 AM (11 years ago)
Author:
rvelices
Message:

rv_gmaps add a link to the global map in the menubar

File:
1 edited

Legend:

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

    r18951 r20983  
    1515
    1616add_event_handler('picture_pictures_data', 'rvm_picture_pictures_data' );
     17add_event_handler('blockmanager_apply', 'rvm_blockmanager_apply');
    1718
    1819global $rvm_dir;
     
    113114}
    114115
     116function rvm_blockmanager_apply($mb_arr)
     117{
     118        if ($mb_arr[0]->get_id() != 'menubar' )
     119                return;
     120        if ( ($block=$mb_arr[0]->get_block('mbMenu')) != null )
     121        {
     122                include_once( dirname(__FILE__) .'/include/functions.php');
     123                rvm_load_language();
     124                global $conf;
     125                $link_title = sprintf( l10n('displays %s on a map'), strip_tags($conf['gallery_title']) );
     126                $block->data['rv_gmaps'] = array(
     127                        'URL' => rvm_make_map_index_url( array('section'=>'categories') ),
     128                        'TITLE' => $link_title,
     129                        'NAME' => l10n('World map'),
     130                        'REL'=> 'rel=nofollow'
     131                );
     132        }
     133}
     134
    115135function rvm_format_exif($exif, $file, $map)
    116136{
Note: See TracChangeset for help on using the changeset viewer.