-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.inc.php
38 lines (29 loc) · 1.01 KB
/
main.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/*
Plugin Name: URL Uploader
Version: auto
Description: Add photos from remote URL (see Admin->Photos->Add)
Plugin URI: auto
Author: Mistic
Author URI: http://www.strangeplanet.fr
*/
defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
if (basename(dirname(__FILE__)) != 'url_uploader')
{
add_event_handler('init', 'urluploader_error');
function urluploader_error()
{
global $page;
$page['errors'][] = 'URL Uploader folder name is incorrect, uninstall the plugin and rename it to "url_uploader"';
}
return;
}
define('URLUPLOADER_PATH' , PHPWG_PLUGINS_PATH . 'url_uploader/');
define('URLUPLOADER_ADMIN', get_root_url() . 'admin.php?page=plugin-url_uploader');
if (defined('IN_ADMIN'))
{
add_event_handler('tabsheet_before_select', 'urluploader_tabsheet_before_select', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
}
add_event_handler('ws_add_methods', 'urluploader_ws_add_methods');
include_once(URLUPLOADER_PATH . 'include/functions.inc.php');
include_once(URLUPLOADER_PATH . 'include/ws_functions.inc.php');