From e5991259d4f5d684adb212eb42962a8099fe2d3b Mon Sep 17 00:00:00 2001
From: neobooru <50623835+neobooru@users.noreply.github.com>
Date: Thu, 26 Aug 2021 18:37:02 +0200
Subject: [PATCH] Created Customizing Image Search Providers (markdown)

---
 Customizing-Image-Search-Providers.md | 30 +++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Customizing-Image-Search-Providers.md

diff --git a/Customizing-Image-Search-Providers.md b/Customizing-Image-Search-Providers.md
new file mode 100644
index 0000000..e2a68e8
--- /dev/null
+++ b/Customizing-Image-Search-Providers.md
@@ -0,0 +1,30 @@
+#### Warning: the following modification is 'unsupported' and requires you to either understand how to create a local docker image, or how to manually deploy szurubooru. Aka, this is only for advanced users.
+
+All posts have a `Search on ...` in their sidebar. This allows you to search for the current post on other boorus.
+By default szurubooru allows you to search for similar posts on IQDB, Danbooru and Google Images.
+
+It currently is not possible to edit these providers in an easy way. It however is possible to change the providers by editing the client source code.
+
+Open the file `client\html\post_readonly_sidebar.tpl` and search for `<section class='search'>`, this should be around line number 56.
+
+By default the section will look like this:
+```html
+<section class='search'>
+    Search on
+    <a href='http://iqdb.org/?url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>IQDB</a> &middot;
+    <a href='https://danbooru.donmai.us/posts?tags=md5:<%- ctx.post.checksumMD5 %>'>Danbooru</a> &middot;
+    <a href='https://www.google.com/searchbyimage?&image_url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>Google Images</a>
+</section>
+```
+
+You can add or remove as many links as you want. For example, if you want replace the default providers with Yandex and SauceNAO then the section will look like this:
+```html
+<section class='search'>
+    Search on
+    <a href='https://yandex.com/images/search?rpt=imageview&url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>Yandex</a> &middot;
+    <a href='https://saucenao.com/search.php?url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>SauceNAO</a>
+</section>
+```
+###### P.s. instead of `ctx.post.checksumMD5` you can also use `ctx.post.checksumSHA1` if you need the SHA1.
+
+After making your changes make sure to either rebuild your local docker szurubooru/client image, or run `npm run build` when you are not using docker.
\ No newline at end of file