diff --git a/ext/image/main.php b/ext/image/main.php index 15b08f87..6db78525 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -307,6 +307,8 @@ class ImageIO extends Extension { return null; } else { + $merged = array_merge($image->get_tag_array(), $existing->get_tag_array()); //TODO: Make this only work if &update=1 is set + send_event(new TagSetEvent($existing, $merged)); //Update tags even if image exists $error = "Image {$existing->id} ". "already has hash {$image->hash}:
".Themelet::build_thumb_html($existing);
throw new ImageAdditionException($error);
diff --git a/ext/tag_list/main.php b/ext/tag_list/main.php
index 58d8b24e..20fcdfd7 100644
--- a/ext/tag_list/main.php
+++ b/ext/tag_list/main.php
@@ -14,6 +14,8 @@ class TagList extends Extension {
$config->set_default_int("tags_min", 3);
$config->set_default_string("info_link", 'http://en.wikipedia.org/wiki/$tag');
$config->set_default_string("tag_list_image_type", 'related');
+ $config->set_default_string("tag_list_related_sort", 'alphabetical');
+ $config->set_default_string("tag_list_popular_sort", 'tagcount');
$config->set_default_bool("tag_list_pages", false);
}
@@ -98,6 +100,14 @@ class TagList extends Extension {
"Image's tags only" => "tags",
"Show related" => "related"
), "
Image tag list: ");
+ $sb->add_choice_option("tag_list_related_sort", array(
+ "Tag Count" => "tagcount",
+ "Alphabetical" => "alphabetical"
+ ), "
Sort related list by: ");
+ $sb->add_choice_option("tag_list_popular_sort", array(
+ "Tag Count" => "tagcount",
+ "Alphabetical" => "alphabetical"
+ ), "
Sort popular list by: ");
$sb->add_bool_option("tag_list_numbers", "
Show tag counts: ");
$event->panel->add_block($sb);
}
diff --git a/ext/tag_list/theme.php b/ext/tag_list/theme.php
index a0684041..2ed81e74 100644
--- a/ext/tag_list/theme.php
+++ b/ext/tag_list/theme.php
@@ -36,6 +36,8 @@ class TagListTheme extends Themelet {
$html = "";
$n = 0;
+ if($config->get_string('tag_list_related_sort') == 'alphabetical') asort($tag_infos);
+
foreach($tag_infos as $row) {
$tag = $row['tag'];
$h_tag = html_escape($tag);
@@ -77,6 +79,7 @@ class TagListTheme extends Themelet {
$html = "";
$n = 0;
+ if($config->get_string('tag_list_popular_sort') == 'alphabetical') asort($tag_infos);
foreach($tag_infos as $row) {
$tag = $row['tag'];
diff --git a/ext/upload/bookmarklet.js b/ext/upload/bookmarklet.js
index 590adaef..b16dcd94 100644
--- a/ext/upload/bookmarklet.js
+++ b/ext/upload/bookmarklet.js
@@ -1,16 +1,19 @@
/* Imageboard to Shimmie */
// This should work with "most" sites running Danbooru/Gelbooru/Shimmie
+//TODO: Make this use jQuery!
var maxsze = (maxsze.match("(?:\.*[0-9])")) * 1024; //This assumes we are only working with MB.
var toobig = "The file you are trying to upload is too big to upload!";
var notsup = "The file you are trying to upload is not supported!";
if (CA === 0 || CA > 2){ //Default
if (confirm("OK = Use Current tags.\nCancel = Use new tags.")==true){
+ //Do nothing
}else{
var tag=prompt("Enter Tags","");
var chk=1; //This makes sure it doesn't use current tags.
}
}else if (CA === 1){ //Current Tags
+ //Do nothing
}else if (CA === 2){ //New Tags
var tag=prompt("Enter Tags","");
var chk=1;
@@ -19,6 +22,7 @@ if (CA === 0 || CA > 2){ //Default
// Danbooru | oreno.imouto | konachan | sankakucomplex
if(document.getElementById("post_tags") !== null){
if (typeof tag !=="ftp://ftp." && chk !==1){var tag=document.getElementById("post_tags").value;}
+ tag = tag.replace(/\+/g, "%2B"); //This should stop + not showing in tags :x
var srx="http://" + document.location.hostname + document.location.href.match("\/post\/show\/[0-9]+");
if(srx.search("oreno\\.imouto") >= 0 || srx.search("konachan\\.com") >= 0){
var rtg=document.getElementById("stats").innerHTML.match("