Last change
on this file since 3799 was
3609,
checked in by patdenice, 15 years ago
|
Convert all php and tpl files in Unix format for my plugins.
|
File size:
1.1 KB
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: PWG Stuffs |
---|
4 | Version: 2.0.q |
---|
5 | Description: Insert modules on your gallery |
---|
6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=190 |
---|
7 | Author: P@t |
---|
8 | Author URI: http://www.gauchon.com |
---|
9 | */ |
---|
10 | |
---|
11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
12 | |
---|
13 | global $prefixeTable; |
---|
14 | |
---|
15 | define('STUFFS_DIR' , basename(dirname(__FILE__))); |
---|
16 | define('STUFFS_PATH' , PHPWG_PLUGINS_PATH . STUFFS_DIR . '/'); |
---|
17 | define('STUFFS_TABLE' , $prefixeTable . 'stuffs'); |
---|
18 | |
---|
19 | function stuffs_admin_menu($menu) |
---|
20 | { |
---|
21 | array_push($menu, array( |
---|
22 | 'NAME' => 'PWG Stuffs', |
---|
23 | 'URL' => get_admin_plugin_menu_link(STUFFS_PATH . 'admin/admin.php'))); |
---|
24 | return $menu; |
---|
25 | } |
---|
26 | |
---|
27 | function set_stuffs_on_index() |
---|
28 | { |
---|
29 | global $page; |
---|
30 | |
---|
31 | if (isset($page['section']) and $page['section'] == 'categories') |
---|
32 | { |
---|
33 | include_once(STUFFS_PATH . 'include/stuffs.inc.php'); |
---|
34 | } |
---|
35 | } |
---|
36 | |
---|
37 | function set_stuffs_on_picture() |
---|
38 | { |
---|
39 | include_once(STUFFS_PATH . 'include/stuffs.inc.php'); |
---|
40 | } |
---|
41 | |
---|
42 | add_event_handler('get_admin_plugin_menu_links', 'stuffs_admin_menu'); |
---|
43 | add_event_handler('loc_begin_index', 'set_stuffs_on_index'); |
---|
44 | add_event_handler('loc_begin_picture', 'set_stuffs_on_picture'); |
---|
45 | |
---|
46 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.