From d3d395c3472c62fcc96e4a300c326f10c3474250 Mon Sep 17 00:00:00 2001 From: Daku Date: Wed, 1 Feb 2012 19:16:55 +0000 Subject: [PATCH 01/12] reset image id function for admin this basically grabs all the image_id's > sets them all from 1-whatever (so it would be like you never deleted an image) --- contrib/admin/main.php | 43 +++++++++++++++++++++++++++++++++++++++++ contrib/admin/theme.php | 1 + 2 files changed, 44 insertions(+) diff --git a/contrib/admin/main.php b/contrib/admin/main.php index 3d03915d..de3bf10a 100644 --- a/contrib/admin/main.php +++ b/contrib/admin/main.php @@ -78,6 +78,10 @@ class AdminPage extends SimpleExtension { case 'database dump': $this->dbdump($page); break; + case 'reset image ids': + $this->reset_imageids(); + $redirect = true; + break; } if($redirect) { @@ -175,5 +179,44 @@ class AdminPage extends SimpleExtension { } } */ + + private function reset_imageids() { + global $database; + //This might be a bit laggy on boards with lots of images (?) + //Seems to work fine with 1.2k~ images though. + $i = 0; + $image = $database->get_all("SELECT * FROM images ORDER BY images.id ASC"); + /*$score_log = $database->get_all("SELECT message FROM score_log");*/ + foreach($image as $img){ + $xid = $img[0]; + $i = $i + 1; + $table = array( //Might be missing some tables? + "image_tags", "tag_histories", "image_reports", "comments", "user_favorites", "tag_histories", + "numeric_score_votes", "pool_images", "slext_progress_cache", "notes"); + + $sql = + "SET FOREIGN_KEY_CHECKS=0; + UPDATE images + SET id=".$i. + " WHERE id=".$xid.";"; //id for images + + foreach($table as $tbl){ + $sql .= " + UPDATE ".$tbl." + SET image_id=".$i." + WHERE image_id=".$xid.";"; + } + + /*foreach($score_log as $sl){ + //This seems like a bad idea. + //TODO: Might be better for log_info to have an $id option (which would then affix the id to the table?) + preg_replace(".Image \\#[0-9]+.", "Image #".$i, $sl); + }*/ + $sql .= " SET FOREIGN_KEY_CHECKS=1;"; + $database->execute($sql); + } + $count = (count($image)) + 1; + $database->execute("ALTER TABLE images AUTO_INCREMENT=".$count); + } } ?> diff --git a/contrib/admin/theme.php b/contrib/admin/theme.php index 18cc9687..37d1f7e2 100644 --- a/contrib/admin/theme.php +++ b/contrib/admin/theme.php @@ -26,6 +26,7 @@ class AdminPageTheme extends Themelet { + From 26b688fe9b6d19c7d8b5ef354c2b6eb5003db817 Mon Sep 17 00:00:00 2001 From: Daku Date: Thu, 2 Feb 2012 00:56:17 +0000 Subject: [PATCH 02/12] bookmarklet now supports oreno.imouto --- ext/upload/bookmarklet.js | 40 ++++++++++++++++++++++++++++++--------- ext/upload/theme.php | 8 ++++---- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/ext/upload/bookmarklet.js b/ext/upload/bookmarklet.js index 2838bdca..86710973 100644 --- a/ext/upload/bookmarklet.js +++ b/ext/upload/bookmarklet.js @@ -4,22 +4,45 @@ 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){ + }else{ + var tag=prompt("Enter Tags",""); + var chk=1; //This makes sure it doesn't use current tags. + } +}else if (CA === 1){ //Current Tags +}else if (CA === 2){ //New Tags + var tag=prompt("Enter Tags",""); + var chk=1; +} -if (confirm("OK = Use Current tags.\nCancel = Use new tags.")==true){}else{var tag=prompt("Enter Tags","");var chk=1;}; - -// Danbooru +// Danbooru | oreno.imouto if(document.getElementById("post_tags") !== null){ if (typeof tag !=="ftp://ftp." && chk !==1){var tag=document.getElementById("post_tags").value;} - var rtg=document.getElementById("stats").innerHTML.match("
  • Rating: (.*)<\/li>")[1]; var srx="http://" + document.location.hostname + document.location.href.match("\/post\/show\/[0-9]+\/"); + var hrs=document.getElementById("highres").href; + if(srx.search("oreno\\.imouto") >= 0){ + var rtg=document.getElementById("stats").innerHTML.match("
  • Rating: (.*) Rating: (.*)<\/li>")[1]; + } if(tag.search(/\bflash\b/)===-1){ - var filesze=document.getElementById("stats").innerHTML.match("[0-9] \\(((?:\.*[0-9])) ([a-zA-Z]+)"); + if(srx.search("oreno\\.imouto") >= 0){ //oreno's theme seems to have moved the filesize + var filesze = document.getElementById("highres").innerHTML.match("[a-zA-Z0-9]+ \\(+([0-9]+\\.[0-9]+) ([a-zA-Z]+)"); + }else{ + var filesze=document.getElementById("stats").innerHTML.match("[0-9] \\(((?:\.*[0-9])) ([a-zA-Z]+)"); + } if(filesze[2] == "MB"){var filesze = filesze[1] * 1024;}else{var filesze = filesze[2].match("[0-9]+");} - if(supext.search(document.getElementById("highres").href.match("http\:\/\/.*\\.([a-z0-9]+)")[1]) !== -1){ + if(supext.search(hrs.match("http\:\/\/.*\\.([a-z0-9]+)")[1]) !== -1){ if(filesze <= maxsze){ - location.href=ste+document.getElementById("highres").href+"&tags="+tag+"&rating="+rtg+"&source="+srx; + if(srx.search("oreno\\.imouto") >= 0){ + //this regex tends to be a bit picky with tags -_-;; + var hrs=hrs.match("(http\:\/\/[a-z0-9]+\.[a-z]+\.org\/[a-z0-9]+\/[a-z0-9]+)\/[a-z0-9A-Z%_]+(\.[a-zA-Z0-9]+)"); + var hrs=hrs[1]+hrs[2]; //this should bypass hotlink protection + } + location.href=ste+hrs+"&tags="+tag+"&rating="+rtg+"&source="+srx; }else{alert(toobig);} }else{alert(notsup);} }else{ @@ -29,6 +52,7 @@ if(document.getElementById("post_tags") !== null){ } } /* Shimmie +One problem with shimmie is each theme does not show the same info as other themes (I.E only the danbooru & lite themes show statistics) Shimmie doesn't seem to have any way to grab tags via id unless you have the ability to edit tags. Have to go the round about way of checking the title for tags. This crazy way of checking "should" work with older releases though (Seems to work with 2009~ ver) */ @@ -36,7 +60,6 @@ else if(document.getElementsByTagName("title")[0].innerHTML.search("Image [0-9.- if (typeof tag !=="ftp://ftp." && chk !==1){var tag=document.getElementsByTagName("title")[0].innerHTML.match("Image [0-9.-]+\: (.*)")[1];} //TODO: Make rating show in statistics. var srx="http://" + document.location.hostname + document.location.href.match("\/post\/view\/[0-9]+"); - /*TODO: Figure out regex for shortening file link. I.E http://blah.net/_images/1234abcd/everysingletag.png > http://blah.net/_images/1234abcd.png*/ /*TODO: Make file size show on all themes (Only seems to show in lite/Danbooru themes.)*/ if(tag.search(/\bflash\b/)==-1){ var img = document.getElementById("main_image").src; @@ -52,7 +75,6 @@ else if(document.getElementsByTagName("title")[0].innerHTML.search("Image [0-9.- } // Gelbooru else if(document.getElementById("tags") !== null){ - //Gelbooru has an annoying anti-hotlinking thing which doesn't seem to like the bookmarklet. if (typeof tag !=="ftp://ftp." && chk !==1){var tag=document.getElementById("tags").value;} var rtg=document.getElementById("stats").innerHTML.match("
  • Rating: (.*)<\/li>")[1]; //Can't seem to grab source due to url containing a & diff --git a/ext/upload/theme.php b/ext/upload/theme.php index 9e66e457..0e5e7127 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -145,8 +145,7 @@ class UploadTheme extends Themelet { { /* Imageboard > Shimmie Bookmarklet This is more or less, an upgraded version of the "Danbooru>Shimmie" bookmarklet. - At the moment this works with Shimmie & Danbooru. - It would also work with Gelbooru but unless someone can figure out how to bypass their hotlinking..meh. + At the moment this works with Shimmie/Danbooru/Gelbooru/oreno.imouto. The bookmarklet is now also loaded via the .js file in this folder. */ //Bookmarklet checks if shimmie supports ext. If not, won't upload to site/shows alert saying not supported. @@ -156,8 +155,9 @@ class UploadTheme extends Themelet { if(file_exists("ext/handle_mp3")){$supported_ext .= " mp3";} if(file_exists("ext/handle_svg")){$supported_ext .= " svg";} $title = "Booru to " . $config->get_string('title'); - $html .= '

    '. - $title . ' (Click when looking at an image page. Works on sites running Shimmie/Danbooru/Gelbooru. (This also grabs the tags/rating/source!))'; + //CA=0: Ask to use current or new tags | CA=1: Always use current tags | CA=2: Always use new tags + $html .= '

    '. + $title . ' (Click when looking at an image page. Works on sites running Shimmie/Danbooru/Gelbooru/oreno.imouto. (This also grabs the tags/rating/source!))'; } } From a25f4054707a691b2ad06683c41d8ecaaded8895 Mon Sep 17 00:00:00 2001 From: Daku Date: Thu, 2 Feb 2012 13:01:40 +0000 Subject: [PATCH 03/12] bookmarklet now supports sankaku and konachan --- ext/upload/bookmarklet.js | 14 +++++++++----- ext/upload/theme.php | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ext/upload/bookmarklet.js b/ext/upload/bookmarklet.js index 86710973..5f45c6fc 100644 --- a/ext/upload/bookmarklet.js +++ b/ext/upload/bookmarklet.js @@ -16,19 +16,19 @@ if (CA === 0 || CA > 2){ //Default var chk=1; } -// Danbooru | oreno.imouto +// 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;} var srx="http://" + document.location.hostname + document.location.href.match("\/post\/show\/[0-9]+\/"); var hrs=document.getElementById("highres").href; - if(srx.search("oreno\\.imouto") >= 0){ + if(srx.search("oreno\\.imouto") >= 0 || srx.search("konachan\\.com") >= 0){ var rtg=document.getElementById("stats").innerHTML.match("

  • Rating: (.*) Rating: (.*)<\/li>")[1]; } if(tag.search(/\bflash\b/)===-1){ - if(srx.search("oreno\\.imouto") >= 0){ //oreno's theme seems to have moved the filesize + if(srx.search("oreno\\.imouto") >= 0 || srx.search("konachan\\.com") >= 0){ //oreno's theme seems to have moved the filesize var filesze = document.getElementById("highres").innerHTML.match("[a-zA-Z0-9]+ \\(+([0-9]+\\.[0-9]+) ([a-zA-Z]+)"); }else{ var filesze=document.getElementById("stats").innerHTML.match("[0-9] \\(((?:\.*[0-9])) ([a-zA-Z]+)"); @@ -39,10 +39,14 @@ if(document.getElementById("post_tags") !== null){ if(filesze <= maxsze){ if(srx.search("oreno\\.imouto") >= 0){ //this regex tends to be a bit picky with tags -_-;; - var hrs=hrs.match("(http\:\/\/[a-z0-9]+\.[a-z]+\.org\/[a-z0-9]+\/[a-z0-9]+)\/[a-z0-9A-Z%_]+(\.[a-zA-Z0-9]+)"); + var hrs=hrs.match("(http\:\/\/[a-z0-9]+\.[a-z]+\.[a-z]\/[a-z0-9]+\/[a-z0-9]+)\/[a-z0-9A-Z%_-]+(\.[a-zA-Z0-9]+)"); var hrs=hrs[1]+hrs[2]; //this should bypass hotlink protection + }else if(srx.search("konachan\\.com") >= 0){ + //konachan affixs konachan.com to the start of the tags, this requires different regex + var hrs=hrs.match("(http\:\/\/[a-z0-9]+\.[a-z]+\.[a-z]\/[a-z0-9]+\/[a-z0-9]+)\/[a-z0-9A-Z%_]+\.[a-zA-Z0-9%_-]+(\.[a-z0-9A-Z]+)") + var hrs=hrs[1]+hrs[2]; } - location.href=ste+hrs+"&tags="+tag+"&rating="+rtg+"&source="+srx; + location.href="|"+ste+hrs+"&tags="+tag+"&rating="+rtg+"&source="+srx; }else{alert(toobig);} }else{alert(notsup);} }else{ diff --git a/ext/upload/theme.php b/ext/upload/theme.php index 0e5e7127..47cc9147 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -145,7 +145,7 @@ class UploadTheme extends Themelet { { /* Imageboard > Shimmie Bookmarklet This is more or less, an upgraded version of the "Danbooru>Shimmie" bookmarklet. - At the moment this works with Shimmie/Danbooru/Gelbooru/oreno.imouto. + At the moment this is known to work with Shimmie/Danbooru/Gelbooru/oreno.imouto/konachan/sankakucomplex. The bookmarklet is now also loaded via the .js file in this folder. */ //Bookmarklet checks if shimmie supports ext. If not, won't upload to site/shows alert saying not supported. @@ -157,7 +157,7 @@ class UploadTheme extends Themelet { $title = "Booru to " . $config->get_string('title'); //CA=0: Ask to use current or new tags | CA=1: Always use current tags | CA=2: Always use new tags $html .= '

    '. - $title . ' (Click when looking at an image page. Works on sites running Shimmie/Danbooru/Gelbooru/oreno.imouto. (This also grabs the tags/rating/source!))'; + $title . ' (Click when looking at an image page. Works on sites running Shimmie/Danbooru/Gelbooru. (This also grabs the tags/rating/source!))'; } } From 1f871a69e14e50c88c439acfd6e811880f533a6a Mon Sep 17 00:00:00 2001 From: Daku Date: Thu, 2 Feb 2012 13:22:33 +0000 Subject: [PATCH 04/12] fixing flash again :x --- ext/upload/bookmarklet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/upload/bookmarklet.js b/ext/upload/bookmarklet.js index 5f45c6fc..ba0f79ed 100644 --- a/ext/upload/bookmarklet.js +++ b/ext/upload/bookmarklet.js @@ -20,7 +20,6 @@ if (CA === 0 || CA > 2){ //Default if(document.getElementById("post_tags") !== null){ if (typeof tag !=="ftp://ftp." && chk !==1){var tag=document.getElementById("post_tags").value;} var srx="http://" + document.location.hostname + document.location.href.match("\/post\/show\/[0-9]+\/"); - var hrs=document.getElementById("highres").href; if(srx.search("oreno\\.imouto") >= 0 || srx.search("konachan\\.com") >= 0){ var rtg=document.getElementById("stats").innerHTML.match("

  • Rating: (.*) = 0 || srx.search("konachan\\.com") >= 0){ //oreno's theme seems to have moved the filesize var filesze = document.getElementById("highres").innerHTML.match("[a-zA-Z0-9]+ \\(+([0-9]+\\.[0-9]+) ([a-zA-Z]+)"); }else{ From 6e602aa430491b45dd6baadf2a91d31d57463c97 Mon Sep 17 00:00:00 2001 From: Daku Date: Thu, 2 Feb 2012 13:25:27 +0000 Subject: [PATCH 05/12] forgot to remove this... --- ext/upload/bookmarklet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/upload/bookmarklet.js b/ext/upload/bookmarklet.js index ba0f79ed..687d0c20 100644 --- a/ext/upload/bookmarklet.js +++ b/ext/upload/bookmarklet.js @@ -46,7 +46,7 @@ if(document.getElementById("post_tags") !== null){ var hrs=hrs.match("(http\:\/\/[a-z0-9]+\.[a-z]+\.[a-z]\/[a-z0-9]+\/[a-z0-9]+)\/[a-z0-9A-Z%_]+\.[a-zA-Z0-9%_-]+(\.[a-z0-9A-Z]+)") var hrs=hrs[1]+hrs[2]; } - location.href="|"+ste+hrs+"&tags="+tag+"&rating="+rtg+"&source="+srx; + location.href=ste+hrs+"&tags="+tag+"&rating="+rtg+"&source="+srx; }else{alert(toobig);} }else{alert(notsup);} }else{ From 9efce5378cee5ed5eac90d8b3ae6f19a8306cd11 Mon Sep 17 00:00:00 2001 From: Daku Date: Thu, 2 Feb 2012 21:00:00 +0000 Subject: [PATCH 06/12] small fix for bookmarklet image url --- ext/upload/bookmarklet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/upload/bookmarklet.js b/ext/upload/bookmarklet.js index 687d0c20..cf951acd 100644 --- a/ext/upload/bookmarklet.js +++ b/ext/upload/bookmarklet.js @@ -19,7 +19,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;} - var srx="http://" + document.location.hostname + document.location.href.match("\/post\/show\/[0-9]+\/"); + 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("
  • Rating: (.*) Date: Sat, 4 Feb 2012 23:58:19 +0000 Subject: [PATCH 07/12] this should fix bookmarklet not working with nice urls --- ext/upload/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/upload/theme.php b/ext/upload/theme.php index 47cc9147..17410a96 100644 --- a/ext/upload/theme.php +++ b/ext/upload/theme.php @@ -156,7 +156,7 @@ class UploadTheme extends Themelet { if(file_exists("ext/handle_svg")){$supported_ext .= " svg";} $title = "Booru to " . $config->get_string('title'); //CA=0: Ask to use current or new tags | CA=1: Always use current tags | CA=2: Always use new tags - $html .= '

    '. + $html .= '

    '. $title . ' (Click when looking at an image page. Works on sites running Shimmie/Danbooru/Gelbooru. (This also grabs the tags/rating/source!))'; } From 1fd565fa87a2c7ce25fd847030ee499261df585c Mon Sep 17 00:00:00 2001 From: Daku Date: Mon, 6 Feb 2012 05:23:37 +0000 Subject: [PATCH 08/12] can't check if rating is null if it doesn't exist... --- themes/danbooru/view.theme.php | 2 +- themes/lite/view.theme.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/danbooru/view.theme.php b/themes/danbooru/view.theme.php index 31c553e9..ae5895e6 100644 --- a/themes/danbooru/view.theme.php +++ b/themes/danbooru/view.theme.php @@ -38,7 +38,7 @@ class CustomViewImageTheme extends ViewImageTheme { $html .= "
    Source: link"; } - if(!is_null($image->rating) && file_exists("ext/rating")) { + if(file_exists("ext/rating")) { if($image->rating == null || $image->rating == "u"){ $image->rating = "u"; } diff --git a/themes/lite/view.theme.php b/themes/lite/view.theme.php index 70fd4583..1327b33a 100644 --- a/themes/lite/view.theme.php +++ b/themes/lite/view.theme.php @@ -44,7 +44,7 @@ class CustomViewImageTheme extends ViewImageTheme { $html .= "
    Source: link"; } - if(!is_null($image->rating) && file_exists("ext/rating")) { + if(file_exists("ext/rating")) { if($image->rating == null || $image->rating == "u"){ $image->rating = "u"; } From 07e786101d40318426a78aa8c335359eedf5e760 Mon Sep 17 00:00:00 2001 From: Daku Date: Mon, 6 Feb 2012 06:52:04 +0000 Subject: [PATCH 09/12] download all images function for admin --- .gitignore | 4 +++- contrib/admin/main.php | 26 ++++++++++++++++++++++++++ contrib/admin/theme.php | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6dd0495a..1258151b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ .svn +backup +data config.php images +imgdump-*.zip thumbs -data sql.log shimmie.log !lib/images diff --git a/contrib/admin/main.php b/contrib/admin/main.php index de3bf10a..c7e5b1a1 100644 --- a/contrib/admin/main.php +++ b/contrib/admin/main.php @@ -82,6 +82,9 @@ class AdminPage extends SimpleExtension { $this->reset_imageids(); $redirect = true; break; + case 'image dump': + $this->imgdump($page); + break; } if($redirect) { @@ -218,5 +221,28 @@ class AdminPage extends SimpleExtension { $count = (count($image)) + 1; $database->execute("ALTER TABLE images AUTO_INCREMENT=".$count); } + + private function imgdump($page) { + global $database; + $zip = new ZipArchive; + $images = $database->get_all("SELECT * FROM images"); + $filename = 'imgdump-'.date('Ymd').'.zip'; + + if($zip->open($filename, 1 ? ZIPARCHIVE::OVERWRITE:ZIPARCHIVE::CREATE)===TRUE){ + foreach($images as $img){ + $hash = $img["hash"]; + preg_match("^[A-Za-z0-9]{2}^", $hash, $matches); + $img_loc = "images/".$matches[0]."/".$hash; + if(file_exists($img_loc)){ + $zip->addFile($img_loc, $hash.".".$img["ext"]); + } + + } + $zip->close(); + } + $page->set_mode("redirect"); + $page->set_redirect(make_link($filename)); //Fairly sure there is better way to do this.. + //TODO: Delete file after downloaded? + } } ?> diff --git a/contrib/admin/theme.php b/contrib/admin/theme.php index 37d1f7e2..c1126fdb 100644 --- a/contrib/admin/theme.php +++ b/contrib/admin/theme.php @@ -27,6 +27,7 @@ class AdminPageTheme extends Themelet { + From 80970f924ebc6398e39fd6ecd114cab4d19ddf14 Mon Sep 17 00:00:00 2001 From: Daku Date: Mon, 6 Feb 2012 07:08:38 +0000 Subject: [PATCH 10/12] this should be here >_< --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1258151b..57872564 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .svn backup -data config.php +data images imgdump-*.zip thumbs From e92d4f6809e2b3e2a942543f06e214203368c60a Mon Sep 17 00:00:00 2001 From: Daku Date: Mon, 6 Feb 2012 10:22:57 +0000 Subject: [PATCH 11/12] fixes gelbooru with bookmarklet --- ext/upload/bookmarklet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/upload/bookmarklet.js b/ext/upload/bookmarklet.js index cf951acd..590adaef 100644 --- a/ext/upload/bookmarklet.js +++ b/ext/upload/bookmarklet.js @@ -87,6 +87,6 @@ else if(document.getElementById("tags") !== null){ //Since Gelbooru does not allow flash, no need to search for flash tag. //Gelbooru doesn't show file size in statistics either... if(supext.search(gmi.match("http\:\/\/.*\\.([a-z0-9]+)")[1]) !== -1){ - location.href=ste+gmi+"&tags="+tag+"&rating="+rtg[1];//+"&source="+srx; + location.href=ste+gmi+"&tags="+tag+"&rating="+rtg;//+"&source="+srx; }else{alert(notsup);} } From cca3ce513ad3d2e80232b505e097b87c7c36c6f1 Mon Sep 17 00:00:00 2001 From: Daku Date: Tue, 7 Feb 2012 00:02:30 +0000 Subject: [PATCH 12/12] added confirm/warning to resetting image ids --- contrib/admin/theme.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/contrib/admin/theme.php b/contrib/admin/theme.php index c1126fdb..e72a372a 100644 --- a/contrib/admin/theme.php +++ b/contrib/admin/theme.php @@ -19,9 +19,20 @@ class AdminPageTheme extends Themelet { public function display_form(Page $page) { global $user; - $html = " - ".make_form(make_link("admin_utils"))." -