Last change
on this file since 29866 was
27092,
checked in by plg, 11 years ago
|
new plugin to export data from database in spreadsheet
|
File size:
1.3 KB
|
Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Plugin Name: Export Data |
---|
4 | Version: auto |
---|
5 | Description: Export data from database into a spreadsheet |
---|
6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid= |
---|
7 | Author: plg |
---|
8 | Author URI: http://le-gall.net/pierrick |
---|
9 | */ |
---|
10 | |
---|
11 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
12 | |
---|
13 | global $prefixeTable; |
---|
14 | |
---|
15 | // +-----------------------------------------------------------------------+ |
---|
16 | // | Define plugin constants | |
---|
17 | // +-----------------------------------------------------------------------+ |
---|
18 | |
---|
19 | defined('EXPORT_DATA_ID') or define('EXPORT_DATA_ID', basename(dirname(__FILE__))); |
---|
20 | define('EXPORT_DATA_PATH' , PHPWG_PLUGINS_PATH . EXPORT_DATA_ID . '/'); |
---|
21 | define('EXPORT_DATA_ADMIN', get_root_url() . 'admin.php?page=plugin-' . EXPORT_DATA_ID); |
---|
22 | |
---|
23 | // +-----------------------------------------------------------------------+ |
---|
24 | // | Add event handlers | |
---|
25 | // +-----------------------------------------------------------------------+ |
---|
26 | |
---|
27 | // admin plugins menu link |
---|
28 | add_event_handler('get_admin_plugin_menu_links', 'export_data_admin_plugin_menu_links'); |
---|
29 | |
---|
30 | /** |
---|
31 | * admin plugins menu link |
---|
32 | */ |
---|
33 | function export_data_admin_plugin_menu_links($menu) |
---|
34 | { |
---|
35 | array_push( |
---|
36 | $menu, |
---|
37 | array( |
---|
38 | 'NAME' => 'Export Data', |
---|
39 | 'URL' => EXPORT_DATA_ADMIN, |
---|
40 | ) |
---|
41 | ); |
---|
42 | |
---|
43 | return $menu; |
---|
44 | } |
---|
45 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.