Rev | Line | |
---|
[19804] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: URL Uploader |
---|
| 4 | Version: auto |
---|
| 5 | Description: Add photos from remote URL (see Admin->Photos->Add) |
---|
| 6 | Plugin URI: auto |
---|
| 7 | Author: Mistic |
---|
| 8 | Author URI: http://www.strangeplanet.fr |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | // +-----------------------------------------------------------------------+ |
---|
| 15 | // | Define plugin constants | |
---|
| 16 | // +-----------------------------------------------------------------------+ |
---|
| 17 | defined('URLUPLOADER_ID') or define('URLUPLOADER_ID', basename(dirname(__FILE__))); |
---|
| 18 | define('URLUPLOADER_PATH' , PHPWG_PLUGINS_PATH . URLUPLOADER_ID . '/'); |
---|
| 19 | define('URLUPLOADER_ADMIN', get_root_url() . 'admin.php?page=plugin-' . URLUPLOADER_ID); |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | // +-----------------------------------------------------------------------+ |
---|
| 23 | // | Add event handlers | |
---|
| 24 | // +-----------------------------------------------------------------------+ |
---|
| 25 | if (defined('IN_ADMIN')) |
---|
| 26 | { |
---|
| 27 | // new tab on photo page |
---|
| 28 | add_event_handler('tabsheet_before_select', 'urluploader_tabsheet_before_select', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | // add API function |
---|
| 32 | add_event_handler('ws_add_methods', 'urluploader_ws_add_methods'); |
---|
| 33 | |
---|
| 34 | include_once(URLUPLOADER_PATH . 'include/functions.inc.php'); |
---|
| 35 | include_once(URLUPLOADER_PATH . 'include/ws_functions.inc.php'); |
---|
| 36 | |
---|
| 37 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.