joshua stein
e9f005d83b
User: a few more reserved usernames
2015-04-01 01:02:01 -05:00
joshua stein
e974083413
Story: inactive tags that are marked for destruction are ok
2015-03-19 12:10:52 -05:00
joshua stein
26f17ae928
User: add some banned usernames from a long-ago comment by @kevinburke
2015-03-19 12:10:18 -05:00
joshua stein
d286eab325
add option to show user avatars on stories and comments
...
just because
2015-03-12 23:23:15 -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
966579e596
Search: more sphinx chars to escape
2015-03-10 17:07:15 -05:00
joshua stein
fd00205625
for admins, show some private info about users in user profiles
2015-02-17 11:47:27 -06:00
joshua stein
976eb522e8
Hat: provide a destroy method that can log a moderation
2015-02-17 11:47:26 -06: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
7d15b5db6d
tldr, didn't comment
2015-02-09 23:11:25 -06:00
joshua stein
975e35d006
Search: escape @, it has special meaning to sphinx
2015-02-05 09:55:41 -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
a16150d8a5
allow searching stories by domain, link domain in story list to such a query
2015-01-29 10:16:46 -06:00
joshua stein
00d347c4f4
consolidate sql fragment to cast story/comment score
2015-01-28 15:02:40 -06:00
joshua stein
bf928cf62b
Story: take hotness window back down to 36, 48 is a bit stale
2015-01-27 12:14:26 -06:00
joshua stein
31df8973a8
Pushover: switch to subscriptions
...
users.pushover_device and users.pushover_sound columns can be
dropped once migrated
2015-01-15 13:23:31 -06:00
joshua stein
f1cfe29b1f
fix initial story hotness
...
Initial story hotness was zero, which excluded stories with no other
upvotes from the homepage. Before creating, define initial hotness
to something.
Since this now makes very new stories show up on the homepage right
away, expand the window back to 48 hours.
This requires a Story.recalculate_all_hotnesses! to properly sort
things.
2015-01-13 13:00:55 -06:00
joshua stein
4b768e2f42
Search: clamp results to Sphinx's max_matches
...
Otherwise this will annoyingly raise an exception when fetching
results if offset exceeds max_matches
2015-01-11 12:59:41 -06:00
joshua stein
88709b5d04
move story tagging sorting into a function
2015-01-06 17:31:44 -06:00
joshua stein
9c73c87d28
add story cache showing for manually-specified unavailable stories
2015-01-06 17:31:09 -06:00
joshua stein
9f5e04bbba
use _path for most things instead of _url
...
Instead of hard-coding the scheme and host everywhere, use _path
methods to show relative URLs.
Except that our previous setting of
Rails.application.routes.default_url_options in
config.after_initialize made this moot because Rails inserts that
host into all _path helpers for some reason. So revert that
setting.
But then anything that wants an absolute URL doesn't know the
hostname and the root_url helper throws an exception. So make a
Rails.application.root_url shortcut to pass the per-app settings in
Rails.application to root_url.
Now we can just use _path helpers most places but still use _url
ones where we need them, such as in RSS views and e-mail templates.
2015-01-02 17:02:55 -06:00
joshua stein
c151fbeeb8
better tag hotness mod calculation
2015-01-01 10:25:14 -06:00
joshua stein
1cc16ecfbf
tweak code formatting
2014-12-15 15:06:53 -06:00
joshua stein
606f5c9849
experiment with factoring comment scores into story hotness
...
might keep an active story alive on the front page and bury a story
with a "comment graveyard"
2014-12-15 15:06:53 -06:00
joshua stein
5c1cc0ae38
Hat: if link isn't a url, don't href to it (probably shouldn't call it link then)
2014-12-15 15:06:53 -06:00
joshua stein
ddb9215aa0
log a moderation when hats are granted, since we're open and all that
2014-11-15 09:52:29 -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
5b94406640
Comment: include page anchor in urls
2014-11-14 12:46:09 -06:00
joshua stein
9e8b89be1c
cast story.{upvotes,downvotes} to signed on mysql, integer on postgres
...
old mysql doesn't support 'cast(1 as integer)', but new/mariadb does
postgres doesn't support 'cast(1 as signed)'
should fix #145
2014-10-06 14:07:53 -05:00
joshua stein
09bd0026d3
ignore a story's submitter's comments when calculating hotness
2014-09-16 10:53:25 -05:00
joshua stein
dfe6db4849
revert 85cb7c20
, give up on planet rss aggregation
2014-08-31 20:35:41 -05:00
joshua stein
962b7e8d59
add per-tag story hotness modifiers
2014-08-31 20:27:54 -05:00
joshua stein
e252d2d66e
StoryRepository: positive_ranked should end at -1
2014-08-25 17:57:26 -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
13de40df34
order newest stories by id, not created_at
...
same order (most likely) but id has an index on it and created_at
will need a full table scan
2014-08-17 18:58:45 -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
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
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
270939b5a4
Story: return true from recalculate_all_hotnesses!
...
this is usually called from the console, and true is better than a
giant array of every Story object
2014-07-02 10:09:03 -05:00
joshua stein
78f4da6699
Search: escape " when sending to sphinx
2014-06-24 20:08:15 -05:00
joshua stein
023f8282ea
as noted earlier, URI.parse is not very lenient
...
trying to use it in Story#domain but not in validate can ruin things
2014-06-05 07:54:48 -05:00
joshua stein
56774913c0
Story: experiment with making comment counts affect hotness
2014-05-06 21:32:17 -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
73b8df5eb7
implement story merging
...
closes #137
2014-04-08 17:51:12 -05:00
joshua stein
9848cf5e47
Story: export tags in json view
...
closes #143
2014-04-03 10:23:37 -05:00
joshua stein
eec85db1f8
bump up max edit times for stories and comments
...
not really any harm in letting people correct mistakes
2014-04-02 13:14:08 -05:00
joshua stein
7fb75af7fe
simplify Story.find_similar_by_url arel, only pull undeleted stories
2014-03-28 10:45:01 -05:00