Commit graph

133 commits

Author SHA1 Message Date
joshua stein
d0711892f6 messages: implement batch-delete function
closes #119
2014-02-19 13:31:48 -06:00
joshua stein
c90486b813 invitation requests: allow moderators to delete confirmed requests 2014-02-19 13:16:23 -06:00
joshua stein
78d9734c26 invitation requests: use a proper form_for, highlight errors 2014-02-19 13:16:16 -06:00
joshua stein
89cdf1101a add a story-only mailing list mode
closes #131
2014-02-19 12:49:12 -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
0d6f4ed60c fix story pagination and caching for logged-out users
use a file store so each unicorn process can share the same set of
files (using redis would probably be cleaner)

put page number into how hash when creating the cache key
2014-02-16 09:57:05 -06:00
joshua stein
2da624e592 use Rails.env.development? 2014-02-05 21:01:49 -06:00
joshua stein
a85fbe4ff1 bring back moderation_reason for moderators 2014-02-05 21:01:49 -06:00
Serge Paquet
70a70096db fix improper usage of strong parameters in FiltersController 2014-02-05 17:02:12 -05: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
9fb9a6f116 fix /recent behavior when there aren't enough stories to fill the list
keep walking back a day at a time
(might want to do this quicker though)
2014-02-01 03:39:58 -06:00
joshua stein
df75c8f787 revert to previous /newest behavior, use new stuff for /recent
/recent is not yet linked to from anywhere
2014-01-25 11:14:21 -06:00
joshua stein
8dbc0e4724 simplify story finding 2014-01-25 10:38:07 -06:00
joshua stein
35f43ea10c start experiment with /newest page
on the first page of /newest, shift out stories that got enough
traction that they're probably on the front page (currently 5
points)

then take the bottom half of the list and fill it with random,
unpopular stories from the past few days (currently 3)
2014-01-24 13:55:21 -06:00
joshua stein
20cf2bab65 show how many stories have been tagged with each on filters page
closes #93
closes #114
2014-01-24 13:53:10 -06: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
Serge Paquet
79b64c3883 use standard create/update comment routes 2014-01-20 16:52:19 -05:00
Serge Paquet
41c9dfad5d fix DOM structure when replying to or updating comments 2014-01-20 16:52:19 -05:00
Serge Paquet
02a30c66b1 optimize database queries for "Your Threads" page 2014-01-20 16:44:14 -05:00
Serge Paquet
cb695a1522 optimize traffic counter queries 2014-01-14 21:42:27 -05: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
65a9a77104 Merge pull request #92 from srgpqt/filters
simplify and optimize Filters controller and template
2014-01-12 22:34:09 -08: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
joshua stein
287be48187 add stuff to deal with banning users 2014-01-12 15:09:32 -06:00
joshua stein
68a1f02a1c name /u/:username route 2014-01-12 14:22:47 -06:00
joshua stein
2b93c1217b log user id when logged in 2014-01-12 13:28:08 -06:00
Serge Paquet
2c906efa7e simplify and optimize Filters controller and template 2014-01-09 01:44:03 -05: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
joshua stein
d578482e3b move story comment counts out of keystore
it would be nice to use AR's built-in counter cache, but the
comments count has to reflect something custom so stick with what
was there
2014-01-08 22:20:56 -06:00
joshua stein
53a6d87ead speed up traffic decrementer 2014-01-08 20:42:25 -06:00
joshua stein
1c3597004f Merge pull request #81 from srgpqt/master
simplify user tree controller action and template
2014-01-07 09:57:09 -08:00
joshua stein
1452e1c34d rip out default filtered tags 2014-01-07 11:42:21 -06:00
Serge Paquet
b8652d80cc simplify user tree controller action and template 2014-01-04 03:14:41 -05:00
Serge Paquet
3757b279ff add karma column to users table 2014-01-01 16:03:01 -05:00
Serge Paquet
9b0294c471 upgrade to rails v4.0.2 2013-12-30 17:40:52 -05:00
Serge Paquet
b42189f45b replace some raw sql with database-agnostic activerecord queries 2013-12-30 16:23:59 -05:00
Serge Paquet
00228bc120 quote column name for mysql 2013-12-27 18:05:38 -05:00
Serge Paquet
8fbf76b484 use activerecord query interface instead of deprecated finder methods 2013-12-25 16:43:50 -05:00
joshua stein
c95f2bfd13 don't need to save invitation request 2013-12-02 11:54:29 -06:00
joshua stein
0aa330d106 user tree: show new users in green 2013-12-02 10:45:21 -06:00
joshua stein
0373bcdadb fix moderation log pagination 2013-10-18 16:05:46 -05:00
joshua stein
aeb25d22b6 add a footer link bar, add /privacy and /about
if these templates (ignored by git) are not present, just show some
text rather than raise an error
2013-10-18 15:55:20 -05:00
joshua stein
66f433176a add an invitiation request queue
the user tree is pretty big to look through now, so let users submit
a request for an invitation, which logged-in users can browse and
instantly send invites to
2013-10-18 15:49:20 -05:00
joshua stein
249dd85ec3 allow non-logged-in users to define tag filters
when not logged in, store the filters in a long-lasting cookie and
do not cache the home page

for that one guy on hacker news that complained about lobste.rs not
having this
2013-08-05 02:19:55 -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