Last change
on this file since 24559 was
19815,
checked in by julien1311, 12 years ago
|
first working version
|
-
Property svn:eol-style set to
LF
|
File size:
1.3 KB
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Mobile Theme for Tablets |
---|
4 | Version: auto |
---|
5 | Description: Allow to apply the mobile theme by default for tablets |
---|
6 | Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=666 |
---|
7 | Author: Julien1311 |
---|
8 | */ |
---|
9 | |
---|
10 | //Check whether we are indeed included by Piwigo. |
---|
11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
12 | |
---|
13 | global $conf; |
---|
14 | |
---|
15 | define('MTT_DIR' , basename(dirname(__FILE__))); |
---|
16 | define('MTT_PATH' , PHPWG_PLUGINS_PATH.MTT_DIR.'/'); |
---|
17 | define('MTT_ADMIN', get_root_url() . 'admin.php?page=plugin-'.MTT_DIR); |
---|
18 | |
---|
19 | /* +-----------------------------------------------------------------------+ |
---|
20 | * | Plugin admin | |
---|
21 | * +-----------------------------------------------------------------------+ */ |
---|
22 | |
---|
23 | // Add an entry to the plugins menu |
---|
24 | add_event_handler('get_admin_plugin_menu_links', 'mtt_admin_menu'); |
---|
25 | |
---|
26 | function mtt_admin_menu($menu) { |
---|
27 | array_push( |
---|
28 | $menu, array( |
---|
29 | 'NAME' => 'Mobile Theme for Tablets', |
---|
30 | 'URL' => MTT_ADMIN, |
---|
31 | ) |
---|
32 | ); |
---|
33 | return $menu; |
---|
34 | } |
---|
35 | |
---|
36 | /* +-----------------------------------------------------------------------+ |
---|
37 | * | Plugin code | |
---|
38 | * +-----------------------------------------------------------------------+ */ |
---|
39 | include_once(MTT_PATH.'include/functions.inc.php'); |
---|
40 | add_event_handler('loading_lang', 'mtt_activate_mobile_theme'); |
---|
41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.