Commit Graph

23 Commits

Author SHA1 Message Date
evazion
101e8a13b8 /posts: fix blank tag sidebars.
Fix the sidebar on the /posts index page sometimes being blank. This
could happen when either the related tag calculation was too slow and
timed out, or when Reporbooru was unavailable and we couldn't fetch the
list of popular tags.

In the tag list would otherwise be blank, we fall back to frequent tags
(the most common tags on the current page of results).

Also change it so that if Reportbooru is unconfigured, we fail
gracefully by returning blank results instead of failing with an
exception. This is so we can still view the popular searches and missed
searches pages during testing (even though they'll be blank).
2020-06-16 12:58:41 -05:00
evazion
a4df18e650 Refactor Reportbooru API clients.
* Combine MissedSearchService, PostViewCountService, and
  PopularSearchService into single ReportbooruService class.
* Use Danbooru::Http for these services instead of HTTParty.
2020-06-14 00:32:42 -05:00
evazion
dd0d9dff4a search: move misc search parsing helpers to PostQueryBuilder.
* Move various search parser helper methods (`has_metatag?`,
  `is_single_tag?` et al) from PostSets and the Tag model to
  PostQueryBuilder.

* Fix various minor bugs stemming from trying to check if a search query
  contains certain metatags using regexes or other adhoc techniques.
2020-04-23 01:51:30 -05:00
evazion
463b1b734e Add curated posts page.
Add a curated posts page at /explore/posts/curated. Curated posts are
the most favorited posts by contributor-level users (users with
unlimited upload permissions).

Also add an order:curated tag using for use in regular searches.
2020-02-23 17:52:38 -06:00
evazion
7ebf6ed9d7 Remove rel="nofollow" from internal links.
This was used to discourage crawlers from crawling certain pages we
didn't want them to crawl, primarily post searches.

Remove because there are better ways to control crawling. Some of these
links weren't even visible to crawlers anyway. This lets us be
consistent about only applying rel="nofollow" to external links.
2019-10-13 18:53:46 -05:00
evazion
2b4ee0ee8f post versions: add ability to search post versions by tags.
* Add ability to search /post_versions by added tags, removed tags, or
  changed tags (added or removed).

* Add 'History' link to the sidebar of the /posts index. This is a
  shortcut for a /post_versions search of the current tag.
2019-09-26 22:14:29 -05:00
evazion
bbaadda1e3 Convert keyboard shortcuts to use data-shortcut. 2018-08-12 12:09:58 -05:00
r888888888
36948bbf33 move explore links to sidebar, fix popular searches action 2017-11-13 11:14:09 -08:00
r888888888
792d95227b remove mobile version links 2017-09-07 18:37:51 -07:00
r888888888
97da8f8647 deprecate tag subscriptions with warnings 2017-04-14 16:00:20 -07:00
r888888888
da06bee0ab revamp saved search implementation 2017-03-15 15:36:48 -07:00
Albert Yi
0ab45ebc42 add postarchive model, fixes #2831: Replace Subscriptions Link With Search:All Link 2017-01-11 11:39:14 -08:00
r888888888
504674b288 add rel=nofollow in more places 2016-02-03 23:47:17 -08:00
Toks
6187d9b483 Add ui for accessing search post counts
fixes #2528
2015-11-13 00:41:06 -05:00
r888888888
903e744ae4 remove deleted post query 2014-10-27 14:42:17 -07:00
Toks
abfd48d58a #1938: Add random post keyboard shortcut 2014-06-08 14:34:36 -04:00
r888888888
da12a5e8a5 fix mobile link 2013-11-26 17:07:03 -08:00
r888888888
1304912ee1 link to mobile versions 2013-11-21 14:38:42 -08:00
Toks
ab7d3f69a4 #1938: Add random post link 2013-09-17 15:51:41 -04:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
85a832cb5d layout tweaks 2013-02-22 15:21:53 -05:00
albert
23c0cb5529 add post previews to user profile, improved ui for tag subscriptions 2013-02-21 18:18:08 -05:00
albert
bfe0af7649 add shortcut to deleted posts 2013-02-18 14:51:17 -05:00