Small update to include the code by green-ponies in issue #51.

This commit is contained in:
Daku 2011-12-14 07:53:48 +00:00
parent 2b717063eb
commit 583de3fe6a

View File

@ -62,22 +62,31 @@ class UploadTheme extends Themelet {
"; ";
if($tl_enabled) { if($tl_enabled) {
$link = make_http(make_link("upload")); $link = make_http(make_link("upload"));
if($config->get_bool('nice_urls')){
$delimiter = '?';
} else {
$delimiter = '&';
}
{
$title = "Upload to " . $config->get_string('title'); $title = "Upload to " . $config->get_string('title');
$html .= '<p><a href="javascript:location.href=&quot;' . $html .= '<p><a href="javascript:location.href=&quot;' .
$link . '?url=&quot;+location.href+&quot;&amp;tags=&quot;+prompt(&quot;enter tags&quot;)">' . $link . $delimiter . 'url=&quot;+location.href+&quot;&amp;tags=&quot;+prompt(&quot;enter tags&quot;)">' .
$title . '</a> (Drag & drop onto your bookmarks toolbar, then click when looking at an image)'; $title . '</a> (Drag & drop onto your bookmarks toolbar, then click when looking at an image)';
} }
if($tl_enabled) { {
$link = make_http(make_link("upload"));
$title = "Danbooru to " . $config->get_string('title'); $title = "Danbooru to " . $config->get_string('title');
$html .= '<p><a href="javascript:var img=document.getElementById(&quot;highres&quot;).href;var ste=&quot;' . $html .= '<p><a href="javascript:var img=document.getElementById(&quot;highres&quot;).href;var ste=&quot;' .
$link . '?url=&quot;;var tag=document.getElementById(&quot;post_old_tags&quot;).value;if (confirm(&quot;OK = Use Current tags.\nCancel = Use new tags.&quot;)==true)' . $link . $delimiter . 'url=&quot;;var tag=document.getElementById(&quot;post_old_tags&quot;).value;if (confirm(&quot;OK = Use Current tags.\nCancel = Use new tags.&quot;)==true)' .
'{if(tag.search(/\bflash\b/)==-1){location.href=ste+img+&quot;&amp;tags=&quot;+tag;}else{location.href=ste+document.getElementsByName(&quot;movie&quot;)[0].value' . '{if(tag.search(/\bflash\b/)==-1){location.href=ste+img+&quot;&amp;tags=&quot;+tag;}else{location.href=ste+document.getElementsByName(&quot;movie&quot;)[0].value' .
'+&quot;&amp;tags=&quot;+tag;}}else{var p=prompt(&quot;Enter Tags&quot;,&quot;&quot;);if(tag.search(/\bflash\b/)==-1){location.href=ste+img+&quot;&amp;tags=&quot;+p;}' . '+&quot;&amp;tags=&quot;+tag;}}else{var p=prompt(&quot;Enter Tags&quot;,&quot;&quot;);if(tag.search(/\bflash\b/)==-1){location.href=ste+img+&quot;&amp;tags=&quot;+p;}' .
'else{location.href=ste+document.getElementsByName(&quot;movie&quot;)[0].value+&quot;&amp;tags=&quot;+p;}}">' . 'else{location.href=ste+document.getElementsByName(&quot;movie&quot;)[0].value+&quot;&amp;tags=&quot;+p;}}">' .
$title . '</a> (As above, Click on a Danbooru-run image page. (This also grabs the tags!))'; $title . '</a> (As above, Click on a Danbooru-run image page. (This also grabs the tags!))';
}
} }
$page->set_title("Upload"); $page->set_title("Upload");
$page->set_heading("Upload"); $page->set_heading("Upload");
$page->add_block(new NavBlock()); $page->add_block(new NavBlock());
@ -188,4 +197,4 @@ class UploadTheme extends Themelet {
"; ";
} }
} }
?> ?>