1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10:
11: $plugin_is_filter = 5 | ADMIN_PLUGIN;
12: $plugin_description = gettext('<em>http</em> image upload handler.');
13: $plugin_author = 'Stephen Billard (sbillard)';
14:
15: if (OFFSET_PATH == 2)
16: setoptiondefault('zp_plugin_uploader_http', $plugin_is_filter);
17:
18: if (zp_loggedin(UPLOAD_RIGHTS)) {
19: zp_register_filter('upload_handlers', 'httpUploadHandler');
20: zp_register_filter('admin_tabs', 'httpUploadHandler_admin_tabs', 10);
21: }
22:
23: function httpUploadHandler($uploadHandlers) {
24: $uploadHandlers['http'] = SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/uploader_http';
25: return $uploadHandlers;
26: }
27:
28: function httpUploadHandler_admin_tabs($tabs) {
29: $me = sprintf(gettext('images (%s)'), 'http');
30: $mylink = 'admin-upload.php?page=upload&tab=http&type=' . gettext('images');
31: if (is_null($tabs['upload'])) {
32: $tabs['upload'] = array('text' => gettext("upload"),
33: 'link' => WEBPATH . "/" . ZENFOLDER . '/admin-upload.php',
34: 'subtabs' => NULL);
35: }
36: $tabs['upload']['subtabs'][$me] = $mylink;
37: if (zp_getcookie('uploadtype') == 'http')
38: $tabs['upload']['link'] = $mylink;
39: return $tabs;
40: }
41:
42: ?>