source: extensions/Mobile_Theme_for_Tablets/main.inc.php @ 28577

Last change on this file since 28577 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/*
3Plugin Name: Mobile Theme for Tablets
4Version: auto
5Description: Allow to apply the mobile theme by default for tablets
6Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=666
7Author: Julien1311
8*/
9
10//Check whether we are indeed included by Piwigo.
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13global $conf;
14
15define('MTT_DIR' , basename(dirname(__FILE__)));
16define('MTT_PATH' , PHPWG_PLUGINS_PATH.MTT_DIR.'/');
17define('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
24add_event_handler('get_admin_plugin_menu_links', 'mtt_admin_menu');
25
26function 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 * +-----------------------------------------------------------------------+ */
39include_once(MTT_PATH.'include/functions.inc.php');
40add_event_handler('loading_lang', 'mtt_activate_mobile_theme');
41?>
Note: See TracBrowser for help on using the repository browser.