Commit graph

293 commits

Author SHA1 Message Date
joshua stein 907a18267b update to rails 3.2.10 to fix CVE-2012-5664 2013-01-02 17:18:57 -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 048c614590 Story: make update_comment_count factor in deleted comments/threads 2012-12-30 12:12:24 -06:00
joshua stein 19ba94fd31 don't collapse moderated threads, remove them entirely 2012-12-30 12:11:47 -06:00
joshua stein 1031ea8cb1 require logged in user for preview_new as well 2012-12-30 11:47:43 -06:00
joshua stein 8848ea8a17 Merge pull request #44 from rpwll/css-img-fix
limit width of images in story descriptions to that of the story container
2012-12-20 11:31:33 -08:00
Rhys Powell 10ad698616 Fixed an issue where images would exceed their container 2012-12-19 21:09:57 +11:00
joshua stein f7cac129b4 when comments are moderated, collapse their replies
also try to show which moderator deleted the comment and the reason
2012-12-18 21:36:32 -06:00
joshua stein d64f713054 User: don't export id to json; consumers should use username as pk 2012-12-18 17:26:29 -06:00
joshua stein 109718ba90 expose User and Story created_at to json 2012-12-18 17:16:02 -06:00
joshua stein cb5e1592b0 Story: export comment_count and score to json 2012-12-17 18:19:19 -06:00
joshua stein a4e5684994 moderation log: fix tag change summary; fixes issue #43 2012-12-16 20:27:54 -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 9cc54edb5b move avatar url generation into User model 2012-12-16 20:02:02 -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 175ff9d2b1 add some custom as_json output to Story and User 2012-12-16 20:00:41 -06:00
joshua stein 6b0a965c66 test that a story with one real tag doesn't error out 2012-12-16 19:59:41 -06:00
joshua stein fecc2ef5bb add test for bad email address 2012-12-16 19:59:34 -06:00
joshua stein c6c4169ae3 don't count spider traffic towards traffic counter 2012-12-16 18:46:38 -06:00
joshua stein a9e169175b show story vote summaries to submitters and mods if it has any downvotes 2012-12-08 22:39:06 -06:00
joshua stein 90a57ef8c9 whitespace 2012-12-08 22:39:05 -06:00
joshua stein ef1b2e9dda on login and signup page, mention open signup isn't available and link to user tree 2012-12-08 13:14:43 -06:00
joshua stein ffa9d35477 whitespace 2012-12-08 13:14:33 -06:00
joshua stein f34607f17f set meta referrer tag to "always"
http://wiki.whatwg.org/wiki/Meta_referrer

lobsters isn't secret, but because it's all behind https, browsers
don't send a referrer header when visiting linked stories that
aren't behind ssl.  for site owners, it can be useful to see where a
sudden burst of traffic is coming from and view comments, so force
supporting browsers (currently only chrome) to send the lobsters
referral url.
2012-12-08 13:08:27 -06:00
joshua stein ad762d233a rss: comments link must be encoded as well 2012-11-28 15:18:41 -06:00
joshua stein 91b1255d96 story form: auto-apply video tag to vimeo links, too 2012-11-27 11:47:44 -06:00
joshua stein e5a0b671b8 story: simplify tags malarky and just use mark_for_destruction on associated objects 2012-11-26 13:39:16 -06:00
joshua stein 6600d36c3b fix tests by creating tag1 and tag2 tags so story blueprint can use them 2012-11-23 13:50:09 -06:00
joshua stein b8f3ffa30b Merge pull request #38 from krainboltgreene/using-the-new-patchset
bump rbenv version to 1.9.3-p327
2012-11-23 09:34:46 -08:00
Kurtis Rainbolt-Greene e0fc89f1fa Adding an rvmrc for rvm users 2012-11-22 19:53:28 -08:00
Kurtis Rainbolt-Greene d2929c55a9 Updating the patchset to the latest secure version 2012-11-22 19:53:19 -08:00
joshua stein 088084965c rss: only hide comments link when no url
stories with a url but also a description were previously not
getting comments link shown
2012-11-21 22:15:00 -06:00
joshua stein 3e689b1c35 check for show_story first 2012-11-21 22:13:50 -06:00
joshua stein cb8901473c add an #invite anchor to the settings url 2012-11-21 22:04:29 -06:00
joshua stein 70f9208a7b shorten top links to avoid running into each other on small screens 2012-11-21 22:04:29 -06:00
joshua stein 69facd5408 pushover: send a default message if none supplied 2012-11-21 22:04:29 -06:00
joshua stein 367982adef whitespace cleanup 2012-11-21 22:04:29 -06:00
joshua stein ae66c583b6 Merge pull request #37 from wilkie/bugfix/reply_link_on_comments_index
Remove reply link on comment when not on a story page.
2012-11-21 20:01:59 -08:00
wilkie e37053cea4 Removes link to reply on comment when not on a story page.
The reply link does not work on any page that isn't a story page because
it replies on the fact that a comment_form div exists on a page. That
form is the base comment field present on a story page. Therefore,
removing the link when the story is displayed next to the comment
selects for that case easily.

Closes #36 by virtue of removing the link.
2012-11-15 21:25:34 -05:00
joshua stein fd4a278d3b fix duplicate description= definition 2012-11-13 11:39:50 -06:00
joshua stein 6deadc731a designate certain tags as media types, require a tag other than those
just tagging something "video" doesn't make it appropriate for
submission, it still requires a categorization tag
2012-11-12 11:02:18 -06:00
joshua stein 9ece6666bf add stupid temporary hack to strip out utf8mb4 chars that are screwing up mysql
4-byte utf8 chars like emoji are passed around in ruby fine, but
when they are put into mysql queries, strings get truncated at the
first mb4 character.  to prevent truncation, strip out mb4
characters in most user-controlled fields like comments, story
descriptions and titles, and messages.

to properly support utf8mb4, mysql server 5.5 is needed, the table
encodings need to be changed to utf8mb4, and the mysql2 gem needs to
be upgraded once it supports utf8mb4:

https://github.com/brianmario/mysql2/issues/249
2012-11-07 21:58:10 -06:00
joshua stein 0eac1c375a show user count on user tree page 2012-10-26 17:08:19 -05:00
joshua stein 47f1c44fc9 do incremented_value_for in a transaction to make sure we get the right key back
do sqlite checks based on Keystore.connection.adapter_name rather
than assuming one environment uses sqlite and the others don't
2012-10-24 14:55:14 -05:00
joshua stein 72b67b0103 move monkey patches to a separate file 2012-10-24 14:55:14 -05:00
joshua stein dc71bbbd98 block archivers 2012-10-24 11:53:43 -05:00
joshua stein 5ee6c227a3 <> -> < />, add noarchive robots header 2012-10-24 11:53:43 -05:00
joshua stein d07c555595 comments can be deleted or moderated to be considered gone 2012-10-24 11:53:43 -05:00
joshua stein a2b034ea36 fix pulling vote for current story when showing a specific comment 2012-10-24 11:53:43 -05:00