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
5497fbd7bb
allow disabling public invitation requests through a setting
2014-10-03 17:19:00 -05:00
joshua stein
dfe6db4849
revert 85cb7c20
, give up on planet rss aggregation
2014-08-31 20:35:41 -05:00
joshua stein
6329041ee8
tweak page title for /upvoted
2014-08-17 19:10:32 -05:00
joshua stein
e3f6a4edd8
Merge pull request #163 from walle/upvoted_fix
...
add /upvoted page to show a logged-in user's upvoted stories
2014-08-17 19:09:04 -05:00
joshua stein
ebdea913bf
Merge pull request #168 from walle/issue_128
...
Add cancel button to comment editing.
2014-08-17 19:05:02 -05:00
Fredrik Wallgren
2ffe322f64
Rename by_user to newest_by_user and sort accordingly.
2014-08-17 14:18:23 +02:00
Fredrik Wallgren
ee8b50f9c0
Add cancel button to comment editing.
...
This should fix issue #128 .
2014-08-16 18:37:36 +02:00
Fredrik Wallgren
ab8f8f3a72
Add upvoted route.
...
Upvoted route shows all stories a logged in user have upvoted
in reverse chronological order, latest upvote first.
It is not shown in the gui, but reachable at /upvoted.
2014-08-16 00:27:18 +02:00
joshua stein
bdbfedfb23
for normal requests to /login, save the referrer and redir back there
...
properly closes #164
2014-08-08 10:31:06 -05:00
joshua stein
243b29240a
when redirecting to /login, save the url and params to redirect back to
...
closes #164
2014-08-08 10:16:06 -05:00
joshua stein
85cb7c2057
first stab at planet rss aggregation
...
could probably use a prettier layout and auto-posting a weblog url
to the main site (carrying tags)
2014-08-03 22:07:57 -05:00
joshua stein
8a3b133d87
style/wrapping
2014-08-03 22:07:56 -05:00
Andrey Chernih
fc52db5424
Refactor HomeController
2014-07-09 22:25:39 +04:00
joshua stein
9554423d4f
tag pages should be ordered by created_at, not hotness
2014-06-30 11:56:40 -05:00
joshua stein
f3f10de295
bingbot is a bot too
2014-06-11 19:34:41 -05:00
joshua stein
1af0edd268
add a flat version of the user tree, ordered by karma
2014-05-06 21:29:45 -05:00
joshua stein
aab34a9936
embed timestamp in password reset token, only work for 24 hours
2014-04-15 00:46:14 -05:00
joshua stein
e152574003
ModerationsController: fix pagination
2014-04-13 22:40:11 -05:00
joshua stein
73b8df5eb7
implement story merging
...
closes #137
2014-04-08 17:51:12 -05:00
joshua stein
9d2253a010
heavily downvoted stories should never be on the home page
2014-04-06 20:43:16 -05:00
joshua stein
025558f6ad
add support for /top and things like /top/3m and /top/2w
...
not linked to from anywhere yet
closes #95
2014-04-03 13:20:24 -05:00
joshua stein
3993e10109
HomeController: sort methods
2014-04-03 10:26:10 -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
6cab668a2f
simplify rss <link> generation
2014-03-12 17:50:51 -05:00
joshua stein
efe1353b87
update a user's unread message count after bulk-delete
...
only count messages that are both unread and undeleted
2014-03-06 15:27:13 -06: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
95202f21b2
add Tag.active scope to deprecate tags without removing them
2014-02-21 10:57:30 -06:00
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
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
7e0fc989d1
move countinual comment logging to model
...
comments can come in from other places than the controller now
2013-06-30 00:54:02 -05:00
joshua stein
ed512cc065
move comment thread_id generation to Comment
2013-06-30 00:54:02 -05:00
joshua stein
04218c8f6c
explicitly to_s the tag description before sending to CGI.escape
...
fixes a problem with tags with no description, raised in issue 50
2013-03-29 16:20:52 -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
1c0a8dfd03
move after-signup invite page into signup controller
2013-02-25 11:13:44 -06:00
joshua stein
de1dc1d430
after a new user signs up, nag them to invite someone
2013-02-22 14:52:22 -06:00
joshua stein
d0459974cd
so long whitespace
2013-02-13 18:50:51 -06:00
joshua stein
d971e2072f
after sending a message, redirect_to the inbox
2013-02-11 21:58:38 -06:00
joshua stein
04363c54df
more to_s paranoia
2013-02-11 21:53:40 -06:00
joshua stein
75570194ac
sprinkle some to_s paranoia on params where it matters
2013-02-08 10:39:51 -06:00
joshua stein
5fc1827fb9
load @messages on message create screen
2013-02-07 17:38:23 -06:00
joshua stein
95cdd886a1
fix tag filtering
...
a story with tags [c, go] with a user's tag filter of [go] was just
removing the [go] tag from the story, not removing it from the list
completely
2013-02-07 17:35:20 -06:00
joshua stein
464b3c3f80
add support for viewing sent private messages
2013-01-24 14:21:22 -06:00
joshua stein
14ed917baa
show rss <link> header on /comments
2013-01-13 21:39:52 -06:00
joshua stein
f130dd7ab0
add some js to allow moderators to enter reason when deleting stories
2013-01-07 17:20:41 -06:00
joshua stein
11385d6b65
add json view of story, including comments
...
for issue #42
2012-12-30 12:17:59 -06:00
joshua stein
1031ea8cb1
require logged in user for preview_new as well
2012-12-30 11:47:43 -06:00
joshua stein
d108158d15
add json views to /newest.json and /hottest.json for issue #42
2012-12-16 20:05:27 -06:00
joshua stein
3bba719cd9
explicitly prevent caching in development mode, triggers some kind of bug
...
throws "undefined class/module Story" after changing the model in
between refreshes
2012-12-16 20:03:01 -06:00
joshua stein
a7d463999d
don't count json and rss views towards traffic counter
2012-12-16 20:01:39 -06:00
joshua stein
c6c4169ae3
don't count spider traffic towards traffic counter
2012-12-16 18:46:38 -06:00
joshua stein
a2b034ea36
fix pulling vote for current story when showing a specific comment
2012-10-24 11:53:43 -05:00
joshua stein
a05421082c
don't set @heading, there's already a navbar link for filters
2012-09-20 10:56:54 -05:00
joshua stein
058cf16863
don't allow privileged tags to be filtered
2012-09-20 10:56:31 -05:00
joshua stein
64c6949edf
paginate /comments
2012-09-19 13:40:02 -05:00
joshua stein
b2315a5728
add private rss feeds for logged-out users by passing a token
...
create a random rss_token for each user and append it to the rss
urls. when adding the user-specific feed url to a feed reader, the
user's tag filters will be applied before generating the rss view,
giving the same list of stories that the user sees while logged in.
2012-09-18 10:43:05 -05:00
joshua stein
857f2964d7
issue#18: show admin/moderator status on user tree
2012-09-16 15:14:05 -05:00
joshua stein
ad1d925c61
prevent double clicking of the post comment button from creating two comments
2012-09-14 16:17:45 -05:00
joshua stein
a51ca8c533
set editor_user_id unconditionally in delete
2012-09-10 15:46:52 -05:00
joshua stein
f0bc4e7c8d
reject email addresses with spaces, catch mailer delivery errors
2012-09-07 09:24:29 -05:00
joshua stein
1987a24a2a
properly set @title/@heading everywhere
2012-09-07 09:18:15 -05:00
joshua stein
c093431898
allow tags to be filtered by default for new and non-logged-in users
2012-09-06 13:44:42 -05:00
joshua stein
e61f8ea386
bail properly if the message isn't found
2012-09-06 12:43:51 -05:00
joshua stein
61f45092f8
cope with tag filters being on deleted tags
2012-09-06 12:07:35 -05:00
joshua stein
6ae36ea492
route /newest/:user to show all stories by that user
2012-09-03 17:29:10 -05:00
joshua stein
e9e162167d
route /threads/:user to show recent threads for that user
2012-09-03 17:11:53 -05:00
joshua stein
49feb9ba43
use the invitation's e-mail address as the default for the new user
2012-09-03 11:44:29 -05:00
joshua stein
e6c74e8251
add moderation logging
...
- add users.is_moderator and look at that for most things, not
is_admin
- make default user in readme be a moderator
- log moderator actions in story edits, comment
deletions/undeletions (and later, user disabling).
- remove ability for moderators to edit comments, there's really no
reason to.
2012-09-02 12:18:52 -05:00
joshua stein
d6255916e8
fix story hiding when downvoted; don't count comment votes
2012-08-29 08:48:57 -05:00
joshua stein
fc1f7fe5ee
move header into layout, no need for another file
2012-08-24 11:42:23 -05:00
joshua stein
3e7cdbe253
tweak traffic decay to be a little slower
2012-08-24 11:42:23 -05:00
joshua stein
43444f179b
implement traffic counter that adjusts redness of lobsters logo
2012-08-24 11:42:23 -05:00
joshua stein
342ede4d4c
reload user's tag filters after modifying, before showing again
2012-08-24 11:42:23 -05:00
joshua stein
f34ad51891
log some more things on countinual
2012-08-24 11:42:23 -05:00
joshua stein
49c6e64aac
count user creation on countinual
2012-08-24 11:42:20 -05:00
joshua stein
f541d4118c
fix
2012-08-24 11:41:37 -05:00
joshua stein
0c0aa465bb
make /comments show latest comments
2012-08-24 11:41:37 -05:00
joshua stein
3640e1e7a3
comment deleting and undeleting
2012-08-24 11:41:37 -05:00
joshua stein
fd8ec36608
story previews
2012-08-24 11:41:37 -05:00
joshua stein
abb8392c16
search engine!
2012-08-24 11:41:36 -05:00
joshua stein
b01f9e9027
fixup header current page stuff
2012-08-24 11:41:36 -05:00
joshua stein
82ae95f8ca
disable trimming threads to our own reply for now, it's busted
2012-08-24 11:41:36 -05:00
joshua stein
88f01210d3
enable activerecord attribute whitelisting just in case
2012-08-24 11:41:36 -05:00
joshua stein
75f026b182
do some short caching for guest views of story indexes
2012-08-24 11:41:36 -05:00
joshua stein
c2206f46cd
fix appearance of other tags when viewing single tag
...
don't just pull taggings where the tag id matches, pull all stories
where the id is in the list of stories tagged with that tag
2012-08-24 11:41:36 -05:00
joshua stein
543f5c12bc
user tree
2012-08-24 11:41:35 -05:00
joshua stein
e453ba8b81
add meta tag for short story url
2012-08-24 11:41:35 -05:00
joshua stein
40bc2003ab
fit more on a page
2012-08-24 11:41:35 -05:00
joshua stein
6e17272e9d
story pagination
2012-08-24 11:41:35 -05:00
joshua stein
f8dd75fde4
comment editing, looks weird for now but it works
2012-08-24 11:41:35 -05:00
joshua stein
cd568eaa38
fix deleting/undeleting stories for users and moderators
2012-08-24 11:41:35 -05:00
joshua stein
e177b769fc
a comment vote is not a vote for the story
2012-08-24 11:41:35 -05:00
joshua stein
ab6316a1cf
add link on user profile to send them a message (kind of ugly)
2012-08-24 11:41:35 -05:00
joshua stein
59bcaf9512
tweak flash messages
2012-08-24 11:41:35 -05:00
joshua stein
28cd5f8432
fix story edit bug, only check url at new time
2012-08-24 11:41:34 -05:00
joshua stein
a2705a835e
add tag filters
2012-08-24 11:41:34 -05:00
joshua stein
fc1c474fb3
implement private messages
2012-08-24 11:41:34 -05:00
joshua stein
95ef42d872
move confidence and hotness into sql tables for proper sorting
2012-08-24 11:41:34 -05:00
joshua stein
e535a1387f
make linking to specific comments work
2012-08-24 11:41:34 -05:00