source: extensions/plugin_lang_analysis/main.inc.php @ 23427

Last change on this file since 23427 was 23427, checked in by mistic100, 11 years ago

make it compatible with Piwigo 2.5

File size: 947 bytes
Line 
1<?php 
2/*
3Plugin Name: Plugin Language Analysis
4Version: auto
5Description: Add a tool to analyse translation strings of plugins
6Plugin URI: auto
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9*/
10
11defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
12
13if (!defined('IN_ADMIN'))
14{
15  return;
16}
17
18
19defined('PLA_ID') or define('PLA_ID', basename(dirname(__FILE__)));
20define('PLA_PATH' , PHPWG_PLUGINS_PATH . PLA_ID . '/');
21define('PLA_ADMIN', get_root_url() . 'admin.php?page=plugin-' . PLA_ID);
22
23add_event_handler('loc_begin_admin', 'pla_begin_admin');
24
25function pla_begin_admin()
26{
27  global $template;
28  $template->set_prefilter('admin', 'pla_add_menu_item');
29}
30
31function pla_add_menu_item($content, &$smarty)
32{
33  $search = 'href="{$U_UPDATES}">{\'Updates\'|@translate}</a></li>';
34  $add = '<li><a class="icon-language" href="'.PLA_ADMIN.'">Plugin Language Analysis</a></li>';
35  return str_replace($search, $search."\n".$add, $content);
36}
37
38?>
Note: See TracBrowser for help on using the repository browser.