Last change
on this file was
32692,
checked in by ddtddt, 2 years ago
|
[pdf2tab] compatybilité piwigo 12
|
-
Property svn:eol-style set to
LF
|
File size:
1.2 KB
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: pdf2tab |
---|
4 | Version: auto |
---|
5 | Description: open pdf files in new tab instead of downloading it |
---|
6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=655 |
---|
7 | Author: Julien1311 |
---|
8 | Has Settings: true |
---|
9 | */ |
---|
10 | |
---|
11 | //Check whether we are indeed included by Piwigo. |
---|
12 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
13 | |
---|
14 | if (mobile_theme()) |
---|
15 | return; |
---|
16 | |
---|
17 | define('PDF2TAB_ABSOLUTE_PATH' , dirname(__FILE__).'/'); |
---|
18 | define('PDF2TAB_DIR' , basename(dirname(__FILE__))); |
---|
19 | define('PDF2TAB_PATH' , PHPWG_PLUGINS_PATH.PDF2TAB_DIR.'/'); |
---|
20 | define('PDF2TAB_ADMIN' , get_root_url() . 'admin.php?page=plugin-'.PDF2TAB_DIR); |
---|
21 | |
---|
22 | /* +-----------------------------------------------------------------------+ |
---|
23 | * | Plugin code | |
---|
24 | * +-----------------------------------------------------------------------+ */ |
---|
25 | |
---|
26 | include_once(PDF2TAB_PATH.'include/thumbnails.inc.php'); |
---|
27 | include_once(PDF2TAB_PATH.'include/picture.inc.php'); |
---|
28 | |
---|
29 | add_event_handler('loc_begin_admin_page', 'pdf2tab_css'); |
---|
30 | |
---|
31 | function pdf2tab_css() { |
---|
32 | global $template, $conf; |
---|
33 | |
---|
34 | if (defined('IN_ADMIN') and IN_ADMIN) |
---|
35 | $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.PDF2TAB_PATH.'css/admin.css">'); |
---|
36 | } |
---|
37 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.