Commit graph

73 commits

Author SHA1 Message Date
Carl Chenet 3f6646d87b if a user has a linked twitter account, give them attribution 2017-05-23 10:44:20 +02:00
Carl Chenet 04d6084d74 eager-load comment votes and their users when showing threads 2017-05-20 15:36:33 +02:00
Carl Chenet d2a873a4e9 when highlighting a comment, force it and its parents to show 2017-05-16 18:41:52 +02:00
Carl Chenet 3fa29e39d7 fix flash messages 2017-02-08 07:59:29 +01:00
Carl Chenet 050ce74871 translate moderation messages related to stories 2016-12-06 17:56:26 +01:00
Carl Chenet fac9efc706 translate suggest view and controller. fixes #6 2016-11-21 11:59:38 +01:00
Carl Chenet 8def5c46da fix bad path to stories_controller 2016-11-15 17:14:37 +01:00
Carl Chenet 516edc5038 i18n of controllers/stories_controllers 2016-11-15 17:11:32 +01:00
joshua stein d8c7f98cfd prevent users with much negative karma from submitting new stories 2016-06-22 15:30:44 -05:00
joshua stein 4c5cf4a542 require a minimum karma to suggest story title/tag suggestions 2016-05-02 17:57:19 -05:00
joshua stein 0e90347956 stories: include url to big icon in twitter card 2016-04-14 11:18:44 -05:00
joshua stein 9e238647e0 print any meta tags in @meta_tags in layout, add twitter ones for story pages 2015-12-31 09:13:34 -06:00
joshua stein 9f9e608fc8 fix fetched_attributes fallout 2015-12-03 14:57:33 -06:00
joshua stein 45b63935af Story: move fetched_* stuff into a single fetched_attributes 2015-12-02 13:46:19 -06:00
joshua stein d44d43e551 fix dup/clone confusion 2015-10-18 15:09:39 -05:00
joshua stein 77568760a2 don't show suggestion flash if user didn't do anything 2015-10-17 10:43:11 -05:00
joshua stein 1d30378877 clone, not dup 2015-10-17 08:03:33 -05:00
joshua stein a4e3f04d2d Story: do automatic user suggestion promotion for story titles too
It's much less likely that users will all agree on an exact title
name, but try it anyway.
2015-10-16 18:28:57 -05:00
joshua stein e940601a2f start on automated story title and tagging suggestions
Rather than keep "poorly titled" and "poorly tagged" as reasons for
flagging, make the user do the work of suggesting new ones.

At some point, suggested taggings will flip to real taggings once
they reach a certain count (to be determined later).  This also has
to take into account tagging sets that don't contain current tags,
for when they need to be removed.

For titles, I'm not yet sure how to handle this in an automated
fashion except for the (probably rare) case of multiple users
submitting the same exact thing, but at least collect them for now.

Issue #207
2015-10-14 20:32:24 -05:00
joshua stein 0d61e0cf68 add "i am the author of this" checkbox for stories
Highlights username in a different color and says "authored by"
instead of just "by".

Move html class printing into a method in Story to use in the future
for friends, admin posts, etc.

Closes #171
2015-07-30 17:15:48 -05:00
joshua stein 6695480fdb when auto-detecting story titles, try to find a canonical url and use it
should remedy duplicate stories being submitted under all of their
stupid blogspot.* domains instead of the canonical url represented
in the <link> tag
2015-03-10 17:41:40 -05:00
joshua stein 7f3adc0e9d fix some fallout from previous 2015-02-13 11:26:28 -06:00
joshua stein f9b309d342 separate story hiding from voting
A story downvote is considered a flag, just meaning the story has
problems and not necessarily that the user wants to ignore it.  By
moving hiding out of Vote and into a new HiddenStory model, a user
can now both downvote/flag and hide separately, or just one or the
other.
2015-02-11 11:37:03 -06:00
joshua stein 8771afc5f5 try a bit harder at finding a submitted story's real title
Ignore the title presented by the user unless we couldn't find
anything, but start out by fetching the URL and trying some <meta>
tags first, then <title>, then use the title the user brought.
2015-02-03 11:20:07 -06:00
joshua stein 9c73c87d28 add story cache showing for manually-specified unavailable stories 2015-01-06 17:31:09 -06:00
joshua stein 624096a481 use _path instead of _url in a few redirect_to's 2015-01-02 18:33:13 -06:00
joshua stein 31d4e97858 implement hats
https://lobste.rs/s/bkeYe9/about_lobsters/comments/ZD2tL3#c_ZD2tL3
2014-11-14 14:12:29 -06:00
joshua stein 73b8df5eb7 implement story merging
closes #137
2014-04-08 17:51:12 -05:00
joshua stein 7f9c227ed0 bring back story downvoting, remove low quality option
story hiding is still here, so hopefully this will result in less
bogus story downvotes
2014-03-24 10:26:06 -05:00
joshua stein 285fd82c16 check story tag permissions on editor, not creator 2014-03-06 13:54:30 -06:00
joshua stein 9535b05490 remove story downvoting, add story hiding
stories should either be reported for spam (coming later), upvoted,
or left alone rather than being downvoted for being uninteresting.
since users don't like leaving uninteresting things alone, they can
now hide stories from their view without affecting the story's
score.

hiding is implemented as a Vote with its vote set to 0 and the
reason set to "H"

add a /hidden url which shows all of a user's hidden stories

while i'm here, simplify Vote guts and add some tests to make sure
all the flip-flopping stuff works right
2014-03-03 17:20:21 -06:00
joshua stein 99c551cbfe move initial upvote of submitted story to Story model 2014-03-03 17:13:00 -06:00
joshua stein 67fc2cc75c set maximum time during which comments and stories can be downvoted
always allow a user to "unvote" if they're previously downvoted, but
after a certain number of days, don't accept new downvotes

there isn't really any benefit in downvoting old stuff that is
already off the front pages or on a dead comment thread, other than
to maliciously strip karma for particular users
2014-02-17 12:08:01 -06:00
joshua stein a85fbe4ff1 bring back moderation_reason for moderators 2014-02-05 21:01:49 -06:00
Serge Paquet 9013afa43b do not permit story moderation_reason to pass mass assignment security 2014-02-03 17:14:49 -05:00
Serge Paquet 519427586a use Rails4-style strong parameters mass assignment protection 2014-02-02 15:41:38 -05:00
joshua stein e6ce3a5d68 show full story threads when highlighting a comment
we're not paginating (yet) so just show the whole thread like normal
and highlight the specific comment which gets scrolled to

closes #107
2014-01-20 23:30:46 -06:00
joshua stein 5f6c13b26b Merge pull request #98 from srgpqt/master
remove redundant "story" variable in comment templates
2014-01-14 18:34:07 -08:00
joshua stein e12d91cd43 allow users to delete their own accounts
not much can actually be deleted, but it can be put into a deleted
state
2014-01-13 10:12:17 -06:00
Serge Paquet aabe4ceed7 remove redundant "story" variable in comment templates 2014-01-13 02:11:34 -05:00
joshua stein 4cfa2dae27 Merge pull request #86 from srgpqt/master
refactor Comment#ordered_for_story_or_thread_for_user method
2014-01-12 22:30:27 -08:00
joshua stein f1f6b3c7e0 alert the user when submitting a long-ago-submitted story
show the user a link to the previous story and let them know they
can submit it again if they want to (just by submitting the form
again)
2014-01-13 00:10:31 -06:00
joshua stein 22b77573a5 prevent new users from downvoting
don't show downvote arrows for logged-out and new users

color comments from new users in green like in the user tree,
and banned users in gray
2014-01-12 23:17:09 -06:00
Serge Paquet 5988038071 make Comment#ordered_for_story_or_thread_for_user work on query scope 2014-01-08 23:48:24 -05:00
Serge Paquet 8fbf76b484 use activerecord query interface instead of deprecated finder methods 2013-12-25 16:43:50 -05:00
joshua stein 2d18a3529d check for recently submitted urls before showing the story submission page
this is already done after submitting, which turns it into an
upvote, but now it will catch it when hitting the page from the
bookmarklet so the user doesn't have to fill out tags and stuff
first just to find out it's already submitted.

since this requires no confirmation, don't count it as an upvote
automatically, just redirect to the story page
2013-07-29 15:31:57 -05:00
joshua stein a471eb180a don't hardcode "Lobsters" and "lobste.rs" everywhere, use Rails.application.{name,domain} 2013-06-30 01:50:23 -05:00
joshua stein 5e357f5684 allow moderators to edit story urls if they ever had one 2013-03-26 12:23:47 -05:00
joshua stein d0459974cd so long whitespace 2013-02-13 18:50:51 -06:00
joshua stein 75570194ac sprinkle some to_s paranoia on params where it matters 2013-02-08 10:39:51 -06:00