Commit Graph

8784 Commits

Author SHA1 Message Date
evazion
aa442121bb views: refactor open graph / twitter <meta> tags.
* Fix og:site to og:site_name.
* Fix open graph properties to use <meta property="...">, not <meta name="...">>
* Set og:type, og:site_name, twitter:site globally (not just on post pages).
* Set og:url.
* Remove unused always-resize-images, report-server <meta> tags from
  post show pages.
2020-01-27 00:47:24 -06:00
evazion
aeec46b212 views: move inline javascript to app bundle. 2020-01-26 19:16:38 -06:00
evazion
2265721cb2 forum: move inline css to stylesheet. 2020-01-26 19:16:38 -06:00
evazion
c36c0b9e7a views: refactor atom feed links.
* Fix comment & forum feeds to include search params.
* Remove global post feeds (only include post feeds on post index).
2020-01-26 19:16:38 -06:00
evazion
815703a922 views: adjust more <meta> descriptions.
* Add <meta> descriptions to more pages.
* Adjust wiki/pool/forum pages to use an excerpt of the first paragraph.
2020-01-26 19:16:38 -06:00
evazion
fbe39148cd users: remove opt_out_tracking account setting.
This setting doesn't do anything any more. It was only ever used to
disable tracking of some (but not all) data in Mixpanel, then later in
Matomo.
2020-01-26 19:16:38 -06:00
evazion
e10bb0aab1 views: remove old matomo analytics code.
This is no longer used and shouldn't have been hardcoded anyway.
2020-01-26 19:16:38 -06:00
evazion
1a3ce17bf0 Merge pull request #4270 from BrokenEagle/universal-index-redirect
Add universal index redirect
2020-01-25 14:52:52 -06:00
BrokenEagle
217f5e6c81 Added redirect parameter to quick search function
- Also fixed quick search parameter on wiki pages
2020-01-25 20:48:01 +00:00
BrokenEagle
75ac11166c Added universal redirect on the index action
- Only controllers with show actions will redirect on the index action
- Parameter checking is individualized per controller for the redirect check
2020-01-25 20:48:01 +00:00
evazion
688b0c5a2b Merge pull request #4271 from BrokenEagle/embedded-notes-search
Add search for embedded notes status
2020-01-25 13:40:52 -06:00
evazion
fb9b2bb014 views: update seo title and description of post index page.
Change the title of the post index page to look like this:

    "Danbooru: Anime Image Board" (for the front page)
    "Kantai Collection Art | Danbooru" (for a tag search)

Change the meta description of the front page to look like this:

    Danbooru is the original anime image 'booru. Find over 3.75 million
    anime pictures categorized by over 100 million tags.

Change the meta description for a tag search to look like this:

    Find over 37,168 Azur Lane images on Danbooru. Azur Lane (碧蓝航线)
    (벽람항로) is a Chinese shipgirl-themed side-scrolling shoot 'em up
    mobile game developed by Shanghai Manjuu and Xiamen Yongshi...
2020-01-25 05:44:38 -06:00
evazion
9f40d31748 views: set twitter:title, og:title on all pages. 2020-01-25 05:10:12 -06:00
evazion
6a984de3d5 views: refactor page titles.
Refactor `page_title` helper to automatically include site name.
2020-01-25 01:52:18 -06:00
evazion
95e424ad80 views: remove unused artists/banned template. 2020-01-25 01:33:21 -06:00
evazion
ec163f96a8 posts: remove unused appeal! method. 2020-01-24 23:51:37 -06:00
evazion
a3e16c167f posts: remove unused undelete! method. 2020-01-24 04:08:56 -06:00
BrokenEagle
76082debf6 Fix has bit flags module query 2020-01-23 03:30:38 +00:00
BrokenEagle
d9e5b94838 Added search for posts with the embedded flag enabled 2020-01-23 03:30:38 +00:00
evazion
fcb6f96979 forum: add /forum_topic_visits.{json,xml} endpoint.
For debugging purposes only.
2020-01-22 21:30:00 -06:00
evazion
cc96f30e47 forum: fix topics being incorrectly marked as unread (again).
Second attempt at 71690cacc. Fix topics on page 2+ being still marked as
unread after the user has marked all topics as read.
2020-01-22 21:09:32 -06:00
evazion
22cb0ea322 models: replace raw LIKE queries with where_like. 2020-01-22 13:21:31 -06:00
evazion
9d71c77524 autocomplete: fix favgroup:<name> returning favgroups for other users.
* Fix favgroup:<name> autocompletion to only return favgroups for the
  current user.
* Add favgroup autocomplete to the /favorite_groups search form.
2020-01-22 11:21:16 -06:00
evazion
edaf6323fd /favorite_groups: add search, creators, timestamps, edit/delete links. 2020-01-22 02:03:19 -06:00
evazion
1aadd19663 BURs: fix broken [bur:<id>] links in forum posts.
Fix bulk update requests generating invalid [bur:<id>] links in forum
posts. The id was missing because the BUR created the forum topic in a
before_create hook, which created the post before the BUR was saved so
the BUR didn't have an id yet. Fix regression caused by b4ce2d83.
2020-01-21 19:56:04 -06:00
evazion
0a3d038df9 autocomplete: fix broken wiki page autocomplete.
Fix breakage from 34368272e.
2020-01-21 18:44:02 -06:00
evazion
20b2c28126 posts/show: fix tag search in navbar not being bolded. 2020-01-21 17:30:57 -06:00
evazion
60bf21ff80 twitter: fix preview_urls when source url is a direct image.
Fix preview_urls returning an empty array when the source url is a
direct image from Twitter.

Also return preview_urls in /source.json.
2020-01-21 16:34:03 -06:00
evazion
b60d988790 diff builder: fix bug in wiki page / pool diff generation.
Fixup for c2688e3af.
2020-01-21 15:02:02 -06:00
evazion
71690cacc1 forum: fix topics being incorrectly marked as unread.
This happened when the user marked all topics as read and so didn't have
any forum topic visits. The OR clause wasn't handled correctly for this
case.
2020-01-21 14:31:26 -06:00
evazion
c7b30279b3 mod reports: temp hide ability to create reports.
Temp disable creating reports until we're ready to roll it out all the way.
2020-01-21 11:25:30 -06:00
evazion
c1f2cd8d9d Update ruby gems. 2020-01-21 01:06:45 -06:00
evazion
8881edaf9f post replacements: fix dialog submit not working. 2020-01-21 00:54:07 -06:00
evazion
f2f236c23a mod reports: remove use of belongs_to_creator macro.
Remove use of belongs_to_creator macro as per b4ce2d83a.
2020-01-21 00:25:29 -06:00
evazion
b5603f0d39 forum: optimize unread forum topics on forum index.
Avoid doing one SQL query per topic when checking for new topics on the
forum index.

This also changes it so that forum topics aren't always marked as new
for anonymous users.
2020-01-21 00:12:03 -06:00
evazion
71cf1f65be forum: fix exception when viewing empty forum topics.
* https://danbooru.donmai.us/forum_topics?search[response_count]=0&search[is_deleted]=true
* https://danbooru.donmai.us/forum_topics/11313
2020-01-21 00:11:12 -06:00
evazion
cca3f98765 forum: remove ability to merge forum topics.
* Rarely used (only used ~15 times in total, not used at all since 2015-2016).
* Merging topics didn't properly bump the new topic.
* Merging topics didn't log a modaction when the old topic was deleted.
* Merging topics broke the old topic. Moving all the posts from one topic
  to another leaves the old topic with zero posts. This normally can't
  happen and it causes exceptions when you try to view the empty topic.
* It was technically possible to merge a topic with itself. This would
  break the response_count.
* It was technically possible for a mod to merge a topic into an
  admin-only topic.
2020-01-21 00:10:21 -06:00
evazion
13528ac2d3 Drop forum subscriptions.
Few people used forum subscriptions (only around 100), and even fewer
people were subscribed to active threads. Most subscriptions were for
old threads that will never be bumped again. The implementation also had
a few problems:

* Unsubscribe links in emails didn't work (they unset the user's
  receive_email_notifications flag, but forum subscriptions didn't
  respect this flag).
* Some users had invalid email addresses, which caused notifications to
  bounce. There was no mechanism for preventing bounces.
* The implementation wasn't scalable. It involved a daily linear scan
  over _all_ forum subscriptions looking for any topics that had been updated.
2020-01-21 00:10:21 -06:00
evazion
cae9a5d7e3 Drop dmail filters.
Few people used dmail filters (~900 users in 5 years) and even fewer
used them correctly. Most people used them to try to block dmail spam,
but usually they either blocked too much (by adding common words that
are present in nearly all dmails, causing all mails to them to be
filtered) or too little (blocking specific email addresses or urls,
which usually are never seen again after the spammer is banned).
Nowadays the spam detection system does a better job of filtering spam.
2020-01-21 00:10:20 -06:00
evazion
c2688e3aff Fix #4263: Wiki page differences use the wrong order.
Standardize DiffBuilder to treat the first argument as the new item and
the second argument as the old item. This is the order used in most
other places.
2020-01-21 00:09:38 -06:00
evazion
b62cdc4cfe test: move test/models/* to test/unit/*. 2020-01-21 00:09:38 -06:00
evazion
79015b4341 tests: fix various broken tests. 2020-01-21 00:09:38 -06:00
evazion
cbbeac00df /saved_searches: fix duplicate input_html in label field. 2020-01-21 00:09:38 -06:00
evazion
b4ce2d83a6 models: remove belongs_to_creator macro.
The belongs_to_creator macro was used to initialize the creator_id field
to the CurrentUser. This made tests complicated because it meant you had
to create and set the current user every time you wanted to create an
object, when lead to the current user being set over and over again. It
also meant you had to constantly be aware of what the CurrentUser was in
many different contexts, which was often confusing. Setting creators
explicitly simplifies everything greatly.
2020-01-21 00:09:38 -06:00
evazion
77bf9ac7f3 Merge pull request #4267 from BrokenEagle/add-report-function
Create the ability to send reports to moderators
2020-01-21 00:08:31 -06:00
BrokenEagle
5f746c1a34 Made recommended changes to moderator reports (see #4267) 2020-01-21 01:38:08 +00:00
evazion
1104f87b1f Merge pull request #4268 from BrokenEagle/universal-array-parameters
Add ability to search for multiple name values on the same field
2020-01-20 16:35:45 -06:00
BrokenEagle
34368272e8 Added ability to search for URL array parameters
- Also added in different string splitters for the text fields
- Removed or renamed parameters covered by the main search function
2020-01-19 23:59:23 +00:00
BrokenEagle
29e8b89c93 Use better method for querying moderation reports on posts and topics
- Also moved the control logic out of the views and into the models
2020-01-19 20:16:22 +00:00
BrokenEagle
16100ecfe6 Use better method of querying the moderation reports for an instance
The use of any? and count was forcing new SQL requests for each statement.
Instead, present? and length were used which act on the reports once loaded.
Although unneeded, the comment and forum views were changed as well for consistency.
2020-01-19 00:09:51 +00:00