diff --git a/ext/upload/main.php b/ext/upload/main.php index e1d4580c..379c16dc 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -40,6 +40,21 @@ class Upload extends Extension { $this->theme->display_error($event->page, "Upload Denied", "Anonymous posting is disabled"); } } + else if(!empty($_GET['url'])) { + global $user; + if($this->can_upload($user)) { + $url = $_GET['url']; + $tags = array('tagme'); + if(!empty($_GET['tags']) && $_GET['tags'] != "null") { + $tags = tag_explode($_GET['tags']); + } + $ok = $this->try_transload($url, $tags, $url); + $this->theme->display_upload_status($event->page, $ok); + } + else { + $this->theme->display_error($event->page, "Upload Denied", "Anonymous posting is disabled"); + } + } else { $this->theme->display_page($event->page); } diff --git a/ext/upload/theme.php b/ext/upload/theme.php index 0b50aa13..3deab52b 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -42,6 +42,15 @@ class UploadTheme extends Themelet {
(Max file size is $max_kb)
"; + if($tl_enabled) { + global $config; + $link = make_link("upload"); + $title = "Upload to " . $config->get_string('title'); + $html .= '

' . + $title . ' (Drag & drop onto your bookmarks toolbar, then click when looking at an image)'; + } + $page->set_title("Upload"); $page->set_heading("Upload"); $page->add_block(new NavBlock());