Line | |
---|
1 | <?php |
---|
2 | /* |
---|
3 | Version: 1.0 |
---|
4 | Plugin Name: Synchronize local directory |
---|
5 | Plugin URI: |
---|
6 | Author: RMM |
---|
7 | Description: Synchronizes the piwigo gallery structure with a directory structure outside from piwigo and creates the necessay thumbnails and websized pictures. No Pictures are copied, the directories are only symlinked. |
---|
8 | */ |
---|
9 | |
---|
10 | // Chech whether we are indeed included by Piwigo. |
---|
11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
12 | |
---|
13 | // Define the path to our plugin. |
---|
14 | define('SKELETON_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
15 | |
---|
16 | // Hook on to an event to show the administration page. |
---|
17 | add_event_handler('get_admin_plugin_menu_links', 'synchronize_local_directory_admin_menu'); |
---|
18 | |
---|
19 | // Add an entry to the 'Plugins' menu. |
---|
20 | function synchronize_local_directory_admin_menu($menu) { |
---|
21 | array_push( |
---|
22 | $menu, |
---|
23 | array( |
---|
24 | 'NAME' => 'Synchronize local directory', |
---|
25 | 'URL' => get_admin_plugin_menu_link(dirname(__FILE__)).'/admin.php' |
---|
26 | ) |
---|
27 | ); |
---|
28 | return $menu; |
---|
29 | } |
---|
30 | |
---|
31 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.