source: extensions/pdf2tab/main.inc.php @ 32472

Last change on this file since 32472 was 20081, checked in by julien1311, 12 years ago

[pdf2tab] deactivate mobile theme

  • Property svn:eol-style set to LF
File size: 1.7 KB
Line 
1<?php
2/*
3Plugin Name: pdf2tab
4Version: 2.4.e
5Description: open pdf files in new tab instead of downloading it
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=655
7Author: Julien1311
8*/
9
10//Check whether we are indeed included by Piwigo.
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13if (mobile_theme())
14        return;
15
16define('PDF2TAB_ABSOLUTE_PATH' , dirname(__FILE__).'/');
17define('PDF2TAB_DIR' , basename(dirname(__FILE__)));
18define('PDF2TAB_PATH' , PHPWG_PLUGINS_PATH.PDF2TAB_DIR.'/');
19define('PDF2TAB_ADMIN' , get_root_url() . 'admin.php?page=plugin-'.PDF2TAB_DIR);
20
21/* +-----------------------------------------------------------------------+
22 * | Plugin admin                                                          |
23 * +-----------------------------------------------------------------------+ */
24
25// Add an entry to the plugins menu
26add_event_handler('get_admin_plugin_menu_links', 'pdf2tab_admin_menu');
27
28function pdf2tab_admin_menu($menu) {
29                array_push($menu, array(
30                                'NAME'  => 'PDF2Tab',
31                                'URL'   => PDF2TAB_ADMIN,
32                )
33        );     
34        return $menu;
35}
36
37/* +-----------------------------------------------------------------------+
38 * | Plugin code                                                          |
39 * +-----------------------------------------------------------------------+ */
40
41include_once(PDF2TAB_PATH.'include/thumbnails.inc.php');
42include_once(PDF2TAB_PATH.'include/picture.inc.php');
43
44add_event_handler('loc_begin_admin_page', 'pdf2tab_css');
45
46function pdf2tab_css() {
47        global $template, $conf;
48
49        if (defined('IN_ADMIN') and IN_ADMIN)
50                $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.PDF2TAB_PATH.'css/admin.css">');
51}
52?>
Note: See TracBrowser for help on using the repository browser.