Commit Graph

100 Commits

Author SHA1 Message Date
Earlopain
c111421303
[Posts] Fix day/week/month not line-breaking on the popular page
This previously had whitespace that I unintentionally removed. This also has the unintentional sideeffect
of not breaking up individual prev/scale/next links which I see as an improvement.

Remove a margin override for the first entry, this wasn't properly centered for some reason.
Still not quite there but much better now.
2024-02-28 20:13:12 +01:00
Earlopain
fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00
Earlopain
3f57ed5c6d
[Posts] Fix popular (and more) for frozen string literals 2024-02-25 13:41:58 +01:00
Earlopain
930b4b905c
[Pools] Fix show/gallery for frozen string literals
Get rid of the presenters/post sets.
2024-02-25 11:38:55 +01:00
Earlopain
8ec4027d58
[Cleanup] Use actual characters instead of html entities
Converts almost all, except a few were they make sense like nbsp
2023-08-06 18:07:15 +02:00
Earlopain
9d1d195fa2
[Cleanup] Remove a bunch of code around is_single_tag?
That method will never return true because status:deleted is getting appended.

Also remove a bunch of related_tags code.
It was either calculate_related_tags_from_post_set or related_tags_for_group.
The results from calculate_related_tags_from_post_set look good in every case,
I can't tell one over the other. This one should be more efficient, since
it doesn't have to do an extra post search.
2023-02-24 23:26:07 +01:00
Earlopain
9a232ec448
[Posts] Remove unused thumbnail_blacklisted preview option
This adds a class that has no styling. Seems to be left over from the
blacklist hiding logic rework.
2022-12-25 19:46:50 +01:00
Earlopain
33dba98cf5
[Cleanup] Simplify/Remove some post set code 2022-09-30 14:23:54 +02:00
Earlopain
e830c11ae9
[Cleanup] Remove raw post index param 2022-09-29 16:10:04 +02:00
Earlopain
34bece584c
[Posts] Simplify tag list generation
There were a bunch of parameters being passed around, now there aren't.
Also gave the methods more descriptive names.
2022-09-17 13:18:33 +02:00
Earlopain
8c842fef7e
[Posts] Move popular posts route to /popular 2022-08-06 11:07:25 +02:00
Earlopain
a135c2a592
[Cleanup] Remove reportbooru 2022-02-09 15:39:07 +01:00
Kira
61c30f79cf [Pools] Fix for gallery view with missing cover pages 2020-08-19 23:28:34 -07:00
Kira
c3e29ebff5 [Pools] Disable post stats on gallery view
To limit the amount of information visible on the page, don't show
post stats below gallery thumbnails.

This is step one of possible future work on improving the gallery page.
2020-06-26 19:18:54 -07:00
Kira
b4e02feabe [Blacklist] Show placeholder on pool pages for blacklisted posts 2020-06-13 23:15:22 -07:00
Kira
c7c6433dfe [Pools] Show deleted pool post thumbnails 2020-04-16 20:25:50 -07:00
Kira
5ce0f20106 Theme pools section 2020-03-31 03:02:33 -07:00
Kira
d679fd7292 Remove most viewed support
This service wasn't something planned to be supported and there
are some links to it. If we add view counts(unlikely) this can be
integrated into the site again.
2019-10-21 23:12:00 -07:00
Kira
160b0cb22e Remove saved searches 2019-10-21 02:57:03 -07:00
Kira
fbe565817b Fix favorites index 2019-09-25 15:52:20 -07:00
Kira
4192bc8f91 Prevent auto tags from showing as user input
The -status:deleted and rating:s tags could be automatically added
by the system. Previously these were treated as user input and
shown as explicit search terms to the user.

This splits the automatic tags out from what the user entered so
that they don't appear in search boxes as user input.
2019-09-13 09:21:21 -07:00
evazion
459da337c1 pools/show: remove unused related tags calculation. 2019-08-10 05:22:00 -07:00
Kira
5083e6d92e Remove favorite groups 2019-03-23 00:57:37 -07:00
Kira
45394916d8 Sets 2019-03-23 00:40:44 -07:00
evazion
7478c7a913 Fix #4034: Several keyboard shortcuts are missing an ID. 2019-01-03 17:19:16 -06:00
Albert Yi
0508b127fd continue refactoring savedsearch 2018-11-15 12:06:13 -08:00
Albert Yi
8515bf43b4 make popular tags for order:rank higher priority in list 2018-11-07 16:30:14 -08:00
evazion
bd0bb658b8 Fix #3974: Pool galleries: link thumbnails to pools instead of posts. 2018-11-06 14:33:04 -06:00
Albert Yi
08da9e7104 show popular tags when showing order:rank 2018-11-02 16:18:53 -07:00
evazion
99632d5e8a TagSetPresenter: refactor to pass options explicitly.
Refactor tag_list_html, split_tag_list_html, and inline_tag_list_html to
take the `show_extra_links` and `current_query` options explicitly,
rather than implicitly relying on CurrentUser or taking `params[:tags]`
from the template.
2018-09-30 21:52:24 -05:00
evazion
29cdaddd86 PostSetPresenters::Post#related_posts: clean up metatag parsing (#2894).
* Fix `#related_tags` to use `Tag.has_metatag?`.
* Fix Tag::SUBQUERY_METATAGS and Tag::METATAGS to be arrays instead of regexes.
2018-09-20 19:23:47 -05:00
evazion
bbaadda1e3 Convert keyboard shortcuts to use data-shortcut. 2018-08-12 12:09:58 -05:00
Albert Yi
a610111658 switch post previews to use flexbox, add better styling for cropped thumbnails 2018-07-18 11:38:00 -07:00
Albert Yi
64446d49e1 add image cropping support 2018-06-22 14:41:57 -07:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
r888888888
3657cacd17 * post keeper is calculated synchronously
* add fallback mechanism in case archive service is not up
* pass along most recently added tags to any keeper calculation
2018-03-08 16:00:44 -08:00
r888888888
8b1fca4662 add most viewed posts page 2017-11-10 16:21:01 -08:00
r888888888
8458c62e8a eliminate month scale for popular searches (takes up too much space in redis) 2017-11-10 15:40:10 -08:00
r888888888
3b414db844 defer to popular searches for popular tag list 2017-05-01 17:56:34 -07:00
evazion
8404064854 related_tag_calculator.rb: fix memcache lookup in inner loop.
Remove the category constraint option from RelatedTagCalculator.calculate_from_posts.
It slows things down and isn't used.

This method is used to calculate the related tags sidebar during
searches for single metatags. Using Tag.category_for in the inner loop
caused a memcache call on every iteration. At 100 posts per page and
20-30 tags per post, this led to up to 2000-3000 total memcache calls,
which significantly slowed pageloads.
2017-04-23 17:10:20 -05: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
r888888888
8a93fdf18f additional saved search fixes 2017-01-25 12:48:47 -08:00
r888888888
c7b5a4e229 add references to user statistics page about saved searches 2017-01-23 10:56:39 -08:00
Toks
8a9488df94 Fix deleted posts not showing in favgroups 2015-09-07 19:49:30 -04:00
r888888888
86f0db5912 fixes #2488: Pool gallery has pools missing from the list 2015-08-13 11:46:09 -07:00
r888888888
f87c71cf23 remove post view counts, add search counts 2015-07-27 17:27:40 -07:00
r888888888
cc6da3ff89 fixes #2454: Add a new popular posts page for view counts 2015-07-24 15:56:41 -07:00
Toks
04fa5596e2 Favorite groups 2015-06-23 15:25:54 -04:00
r888888888
5c22d8753f Revert "make pool gallery the default view"
This reverts commit 719343cea5.
2014-09-05 22:26:47 -07:00