diff --git a/contrib/admin/theme.php b/contrib/admin/theme.php index edd9877d..038b9be7 100644 --- a/contrib/admin/theme.php +++ b/contrib/admin/theme.php @@ -32,12 +32,36 @@ class AdminPageTheme extends Themelet { "; $page->add_block(new Block("Misc Admin Tools", $html)); - + + /* First check + Requires you to click the checkbox to enable the delete by query form */ + $dbqcheck = " + if(document.getElementById("dbqcheck").checked == false){ + document.getElementById("dbqtags").disabled = true; + document.getElementById("dbqsubmit").disabled = true; + }else{ + document.getElementById("dbqtags").disabled = false; + document.getElementById("dbqsubmit").disabled = false; + }"; + + /* Second check + Requires you to confirm the deletion by clicking ok. */ $html = " - ".make_form(make_link("admin_utils"))." + " + + .make_form(make_link("admin_utils"),"post",false,false,"return checkform()")." + - - + + "; $page->add_block(new Block("Delete by Query", $html)); diff --git a/contrib/home/theme.php b/contrib/home/theme.php index 1fe601ff..21364625 100644 --- a/contrib/home/theme.php +++ b/contrib/home/theme.php @@ -47,7 +47,7 @@ EOD $counter_html diff --git a/core/util.inc.php b/core/util.inc.php index 71a317f3..6c727710 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -254,13 +254,16 @@ function make_http($link) { * * @retval string */ -function make_form($target, $method="POST", $multipart=False, $form_id="") { +function make_form($target, $method="POST", $multipart=False, $form_id="", $onsubmit="") { global $user; $auth = $user->get_auth_html(); $extra = empty($form_id) ? '' : " id='$form_id'"; if($multipart) { $extra .= " enctype='multipart/form-data'"; } + if($onsubmit) { + $extra .= " onsubmit='$onsubmit'"; + } return "
$auth"; } diff --git a/ext/tag_list/theme.php b/ext/tag_list/theme.php index f0fac49b..99d83664 100644 --- a/ext/tag_list/theme.php +++ b/ext/tag_list/theme.php @@ -52,8 +52,12 @@ class TagListTheme extends Themelet { $html .= " $count"; } } - - $page->add_block(new Block("Related", $html, "left")); + + if($config->get_string('tag_list_image_type')=="tags"){ + $page->add_block(new Block("Tags", $html, "left", 10));} + else{ + $page->add_block(new Block("Related Tags", $html, "left", 10)); + } } diff --git a/ext/upload/theme.php b/ext/upload/theme.php index 50895783..fae6501f 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -27,11 +27,11 @@ class UploadTheme extends Themelet { if($i==0){ $upload_list .= "
" . - "". + "". "
"; }else{ $upload_list .="
- "; }else{ $upload_list .= - "". ""; @@ -113,15 +113,31 @@ class UploadTheme extends Themelet { { /* Danbooru > Shimmie Bookmarklet. This "should" work on any site running danbooru, unless for some odd reason they switched around the id's or aren't using post/list. + Most likely this will stop working when Danbooru updates to v2, all depends if they switch the ids or not >_>. + Clicking the link on a danbooru image page should give you something along the lines of: + 'http://www.website.com/shimmie/upload?url="http://sonohara.donmai.us/data/crazylongurl.jpg&tags="too many tags"&rating="s"&source="http://danbooru.donmai.us/post/show/012345/"' + TODO: Possibly make the entire/most of the script into a .js file, and just make the bookmarklet load it on click (Something like that?) */ $title = "Danbooru to " . $config->get_string('title'); - $html .= '

' . - $title . ' (As above, Click on a Danbooru-run image page. (This also grabs the tags, rating & source!))'; + $html .= '

' . + $title . ' (As above, Click on a Danbooru-run image page. (This also grabs the tags/rating/source!))'; } diff --git a/themes/danbooru/layout.class.php b/themes/danbooru/layout.class.php index 5045adcc..cfdcc91f 100644 --- a/themes/danbooru/layout.class.php +++ b/themes/danbooru/layout.class.php @@ -88,7 +88,7 @@ class Layout { $debug = get_debug_info(); - $contact = empty($contact_link) ? "" : "
Contact"; + $contact = empty($contact_link) ? "" : "
Contact"; if(empty($this->subheading)) { $subheading = ""; diff --git a/themes/danbooru/view.theme.php b/themes/danbooru/view.theme.php index e9538640..49663fa4 100644 --- a/themes/danbooru/view.theme.php +++ b/themes/danbooru/view.theme.php @@ -6,7 +6,7 @@ class CustomViewImageTheme extends ViewImageTheme { $page->set_title("Image {$image->id}: ".html_escape($image->get_tag_list())); $page->set_heading(html_escape($image->get_tag_list())); $page->add_block(new Block("Navigation", $this->build_navigation($image), "left", 0)); - $page->add_block(new Block("Statistics", $this->build_stats($image), "left", 10)); + $page->add_block(new Block("Statistics", $this->build_stats($image), "left", 15)); $page->add_block(new Block(null, $this->build_image_editor($image, $editor_parts), "main", 10)); $page->add_block(new Block(null, $this->build_pin($image), "main", 11)); } diff --git a/themes/default/layout.class.php b/themes/default/layout.class.php index 3ee91b82..0c733c1b 100644 --- a/themes/default/layout.class.php +++ b/themes/default/layout.class.php @@ -42,7 +42,7 @@ class Layout { $debug = get_debug_info(); - $contact = empty($contact_link) ? "" : "
Contact"; + $contact = empty($contact_link) ? "" : "
Contact"; $wrapper = ""; if(strlen($page->heading) > 100) { diff --git a/themes/flat/layout.class.php b/themes/flat/layout.class.php index f0e9a95b..c4fe7a05 100644 --- a/themes/flat/layout.class.php +++ b/themes/flat/layout.class.php @@ -42,7 +42,7 @@ class Layout { $debug = get_debug_info(); - $contact = empty($contact_link) ? "" : "
Contact"; + $contact = empty($contact_link) ? "" : "
Contact"; $subheading = empty($page->subheading) ? "" : "

{$page->subheading}
"; $wrapper = ""; diff --git a/themes/futaba/layout.class.php b/themes/futaba/layout.class.php index 51f76716..21dacbc5 100644 --- a/themes/futaba/layout.class.php +++ b/themes/futaba/layout.class.php @@ -37,7 +37,7 @@ class Layout { $debug = get_debug_info(); - $contact = empty($contact_link) ? "" : "
Contact"; + $contact = empty($contact_link) ? "" : "
Contact"; if(empty($page->subheading)) { $subheading = ""; diff --git a/themes/lite/layout.class.php b/themes/lite/layout.class.php index c7273ab3..5053515f 100644 --- a/themes/lite/layout.class.php +++ b/themes/lite/layout.class.php @@ -138,7 +138,7 @@ class Layout { $debug = get_debug_info(); - $contact = empty($contact_link) ? "" : "
Contact"; + $contact = empty($contact_link) ? "" : "
Contact"; $subheading = empty($page->subheading) ? "" : "
{$page->subheading}
"; $wrapper = ""; diff --git a/themes/lite/view.theme.php b/themes/lite/view.theme.php index 0bb17d06..5eb9d195 100644 --- a/themes/lite/view.theme.php +++ b/themes/lite/view.theme.php @@ -3,6 +3,7 @@ class CustomViewImageTheme extends ViewImageTheme { public function display_page($image, $editor_parts) { global $page; + $metatags = str_replace(" ", ", ", html_escape($image->get_tag_list())); $page->set_title("Image {$image->id}: ".html_escape($image->get_tag_list())); $page->set_heading(html_escape($image->get_tag_list())); $page->add_html_header(""); @@ -11,7 +12,7 @@ class CustomViewImageTheme extends ViewImageTheme { $page->add_html_header("get_thumb_link())."\">"); $page->add_html_header("id}"))."\">"); $page->add_block(new Block("Navigation", $this->build_navigation($image), "left", 0)); - $page->add_block(new Block("Statistics", $this->build_stats($image), "left", 10)); + $page->add_block(new Block("Statistics", $this->build_stats($image), "left", 15)); $page->add_block(new Block(null, $this->build_image_editor($image, $editor_parts), "main", 10)); $page->add_block(new Block(null, $this->build_pin($image), "main", 11)); } diff --git a/themes/old_default/layout.class.php b/themes/old_default/layout.class.php index cb4e6952..5dff2b59 100644 --- a/themes/old_default/layout.class.php +++ b/themes/old_default/layout.class.php @@ -37,7 +37,7 @@ class Layout { $debug = get_debug_info(); - $contact = empty($contact_link) ? "" : "
Contact"; + $contact = empty($contact_link) ? "" : "
Contact"; $subheading = empty($page->subheading) ? "" : "
{$page->subheading}
"; $wrapper = ""; diff --git a/themes/warm/layout.class.php b/themes/warm/layout.class.php index c843eb3a..680bdcc4 100644 --- a/themes/warm/layout.class.php +++ b/themes/warm/layout.class.php @@ -47,7 +47,7 @@ class Layout { $debug = get_debug_info(); - $contact = empty($contact_link) ? "" : "
Contact"; + $contact = empty($contact_link) ? "" : "
Contact"; $subheading = empty($page->subheading) ? "" : "
{$page->subheading}
"; $wrapper = "";