-
Notifications
You must be signed in to change notification settings - Fork 179
Customizing Image Search Providers
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:
<section class='search'>
Search on
<a href='http://iqdb.org/?url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>IQDB</a> ·
<a href='https://danbooru.donmai.us/posts?tags=md5:<%- ctx.post.checksumMD5 %>'>Danbooru</a> ·
<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:
<section class='search'>
Search on
<a href='https://yandex.com/images/search?rpt=imageview&url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>Yandex</a> ·
<a href='https://saucenao.com/search.php?url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>SauceNAO</a>
</section>
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.