Commit graph

818 commits

Author SHA1 Message Date
joshua stein 3bebdb80a7 User: clear deleted_at when unbanning, since we probably set it 2016-06-10 16:31:13 -05:00
joshua stein 71fb5bdaf3 t(), remove bbs link 2016-06-10 16:28:00 -05:00
chaica c962520680 I18n support for layout/application.html view (#294)
* i18n support for layout/application.html view

* i18n english strings for layout/application.html

* i18n french strings for layout/application.html
2016-06-10 17:24:02 -04:00
joshua stein 30166dd120 Merge pull request #293 from nyanpasu/master
Allow admin/moderator to disable user from inviting
2016-06-10 17:20:48 -04:00
joshua stein d3a826d80e Story: fix saving old stories with inactive tags 2016-06-01 14:36:09 -05:00
joshua stein ba8a39ee93 new story: re-order guidelines in order that i have to deal with them 2016-06-01 14:36:09 -05:00
joshua stein 647d7d5da8 new story: make bookmarklet look less like a button
closes #276
2016-06-01 14:36:09 -05:00
nyanpasu 99f78ad10c Send pm instead of email on invite disable 2016-05-19 09:01:27 +08:00
nyanpasu 19526c2d3f Don't delete user after disabling invites 2016-05-19 09:01:27 +08:00
nyanpasu 39b911963e Remove redundant return 2016-05-16 11:55:16 +08:00
nyanpasu aa0ffeb37b Allow admin/moderator to disable user from inviting 2016-05-16 02:40:46 +08:00
joshua stein d1c9aeaaa3 Story: make title_as_url output shorter urls 2016-05-04 14:40:06 -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 98ab3796b3 add simple @titles for about, chat, privacy 2016-05-02 17:56:16 -05:00
David R. MacIver 0f38779d7a Add RSS and JSON feeds for newest by user 2016-04-29 17:41:14 +01:00
joshua stein d8c240dc46 switch to an image-less user tree, properly hide lines on last branch 2016-04-27 16:26:18 -05:00
joshua stein db3c62597c strikethrough in markdown does not work, so don't advertise it
but it's just temporary, so comment it out until issue #288 is
resolved
2016-04-27 12:50:31 -05:00
joshua stein b204775e8f Story: don't allow a story to be merged into itself 2016-04-25 13:24:50 -05:00
Peter Bhat Harkins b886ea1413 Clean up mysqlism (booleans are also usable as int(1)) (#285)
Clean up mysqlism (booleans are also usable as int(1))
2016-04-23 21:20:10 -04:00
Peter Bhat Harkins 540095667b Use asset_path in select2 image URLs 2016-04-15 21:34:14 -05:00
joshua stein 0e90347956 stories: include url to big icon in twitter card 2016-04-14 11:18:44 -05:00
joshua stein f05cb03b0c Merge pull request #283 from pushcx/chat-default
Don't 500 if someone hasn't added a chat template
2016-04-13 10:00:30 -05:00
Peter Bhat Harkins 01f1a71a18 Remove unused assets 2016-04-13 09:10:06 -05:00
Peter Bhat Harkins bfe7a67156 Don't 500 if someone hasn't added a chat template 2016-04-12 21:34:04 -05:00
joshua stein 239379ea51 shrink TRAFFIC_DECREMENTER 2016-04-12 11:49:36 -05:00
joshua stein 94ce8cbcc0 clarify hat rules 2016-04-12 11:49:10 -05:00
joshua stein a7d426581d Story: shrink hotness window to 22 hours 2016-04-12 11:48:47 -05:00
joshua stein 3b14a9ba54 hats: sort hat groups without case sensitivity 2016-04-06 19:20:25 -05:00
joshua stein a694b2a499 css: nowrap on hats, splitting/wrapping them looks very weird 2016-04-06 19:15:45 -05:00
joshua stein 92117e9947 hats: clear button 2016-04-06 19:15:31 -05:00
joshua stein 2e1f8d9f33 hats: don't require a logged-in user to browse hats
closes #282
2016-04-06 15:23:22 -05:00
joshua stein 1fb6eb6eb2 drop SUGGESTION_QUORUM to 2 2016-04-06 13:22:46 -05:00
joshua stein d88b03b4b3 add some more bot UAs 2016-04-06 13:22:37 -05:00
joshua stein a5928b675d implement hats list and request/approval system
closes #281
2016-04-06 13:19:46 -05:00
joshua stein e3750172c6 Revert "Prettier messaging"
This reverts commit c6d6413ff7.

I don't really like this.
2016-04-05 19:31:13 -05:00
wally fa39374d30 Fixes #272. Add runSelect2 method to call after previewStory.
The select2 code failed to run after previewing a story
submission. This fix creates a new method that can be called upon
completion of the previewStory load() call.
2016-04-05 16:10:31 -04:00
crertel c6d6413ff7 Prettier messaging
Put compose message at the top
2016-04-01 21:20:21 -05:00
joshua stein 8a62b530aa apply a basic style to #l_holder
lobste.rs is overriding this in local.css but at least other sites
can get a basic thing there.

mention in README that local css should go into a directory.
2016-03-31 14:24:57 -05:00
joshua stein c77f1d7269 rm a css file that was only for the fake hn interface years ago 2016-03-29 09:44:15 -05:00
joshua stein e85afa2425 StoryRepository: simplify 2016-03-28 17:14:55 -05:00
joshua stein 437124da4e StoryRepository: make positive_ranked honest 2016-03-28 17:14:43 -05:00
joshua stein 7b5aad85d6 css: move some lobsters-specific things to local 2016-03-24 15:13:50 -05:00
joshua stein d9ff6eb188 bring in stylesheets/local/* which are ignored in git 2016-03-24 15:08:10 -05:00
joshua stein 41ba0b20dd Hat: add css class of hat_(actual_hat_name) 2016-03-24 14:58:06 -05:00
joshua stein 84394c5de6 when comments are -1, just collapse them
avoids piling on and engaging with trolls
2016-03-24 13:55:25 -05:00
joshua stein d54427df21 make 'link' on comments use very short url 2016-03-24 13:19:26 -05:00
joshua stein e515caaea1 don't increase traffic for tor users 2016-03-22 14:07:39 -05:00
joshua stein bd1ffe171b settings: link to /threads, put delete at bottom, fix typo 2016-03-09 10:00:14 -06:00
joshua stein 2e1cf36ee0 css: apparently safari still doesn't support min-resolution
add webkit-specific thing to show high-res L logo

closes #267
2016-03-02 09:41:52 -06:00
joshua stein 192a6c8a02 give up on "discuss"
closes issue #265
2016-02-21 09:43:17 -06:00
joshua stein 869f83e285 fix @user vs @showing_user in unban section 2016-02-11 09:59:05 -06:00
joshua stein 2b5ba63087 Comment: if user is banned, make gone text reflect that 2016-02-10 16:12:11 -06:00
joshua stein d66648ff68 moderations: show comment username to avoid a click through 2016-02-10 16:11:34 -06:00
joshua stein 28bbc9c8f7 moderators have to provide a reason for deleting others' comments 2016-02-10 08:57:38 -06:00
joshua stein 3afe1538f8 stories: show archive link to archive.is 2016-02-10 08:39:42 -06:00
joshua stein c3b62cc166 User#grant_moderatorship_by_user! 2016-02-10 08:39:10 -06:00
joshua stein e0b7c25758 comments: show usernames in vote summaries to moderators 2016-02-10 08:38:28 -06:00
joshua stein 61b08c7dee story list detail: flip flop again, show 'no comments' for non-users
I've changed this a few times because I didn't want to show
"discuss" to non-users, but they at least need a link to the story
to copy, so show a link with "no comments" to them.
2016-02-02 11:56:10 -06:00
joshua stein 0ec9c3a2ac turn on avatars by default 2016-01-21 11:59:06 -06:00
joshua stein f53aced518 add a comment explaining why this code is so verbose 2016-01-21 11:58:54 -06:00
joshua stein d10f567a26 Search: just use Riddle.escape, sorry boolean 2016-01-21 11:58:54 -06:00
joshua stein 200e4f7dd2 css: remove white background colors that were driving me nuts 2016-01-12 16:39:23 -06:00
joshua stein ffa1b879da use span tag for time_ago_in_words_label 2015-12-31 09:15:02 -06:00
joshua stein 13df4537f3 make merged story points count towards the winning story
but not take them into its score, just its hotness value.  this way
when a new winning story takes over an upvoted story, the hotness
value will be near the losing one.
2015-12-31 09:14:09 -06: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 5129733b04 when showing another user's threads, don't include story threads 2015-12-18 10:51:01 -06:00
J. Ryan Stinnett 4c3c6094d0 Remove white background from .legend 2015-12-18 09:33:48 -06:00
joshua stein ec92478bc9 use time_ago_in_words_label to show missing 'ago' part
pr #252
2015-12-16 12:36:23 -06:00
joshua stein ce8a148cbe Story: don't count comments towards hotness when tag hotness mods < 0 2015-12-15 12:35:18 -06:00
joshua stein de176d80dd story tags: sort by exact tag matches first, then description matches
select2 has sortResults in newer versions but so much crap changed
there that it's easier to just hack in support for this here

fixes #251
2015-12-14 10:44:28 -06:00
joshua stein 46ebed367d Comment, Story: crank MAX_EDIT_MINS to 6 hours 2015-12-09 11:52:48 -06:00
joshua stein b21f96cb1a story submission: make tag select box match tag description too
fixes #247
2015-12-09 11:51:15 -06:00
joshua stein 850131873b link to /chat when talking about requesting invites
issue #244
2015-12-07 13:17:11 -06:00
joshua stein 6b636ac8c5 add setting to show threads on a user's submitted stories in 'Your Threads'
closes #231
2015-12-07 12:27:09 -06:00
joshua stein 3850fa7d54 Story: reduce suggestion quorum to 3 2015-12-07 12:27:09 -06:00
joshua stein 9f9e608fc8 fix fetched_attributes fallout 2015-12-03 14:57:33 -06:00
joshua stein 4e94bc9e29 Comment: for emailed comments, show that in the message id used for mailing list 2015-12-02 13:46:19 -06:00
joshua stein 5d8c7f7167 make time_ago_in_words_label use a custom time_ago_in_words
"36 hours ago" is more useful than "1 day ago", so tweak the times
used to jump to the next divisor
2015-12-02 13:46:19 -06:00
joshua stein c05f526a57 make story description icon a link to the story page, revert c1d1a44472
i don't like showing "discuss" to logged out users, and now that we
have a story description icon that can link to the story text, back
out the change that made logged out users see discuss when they
can't discuss it.
2015-12-02 13:46:19 -06:00
joshua stein 45b63935af Story: move fetched_* stuff into a single fetched_attributes 2015-12-02 13:46:19 -06:00
joshua stein c354485916 when a non-banned, deleted user logs in, reactivate their account 2015-11-18 12:08:45 -06:00
joshua stein 77e2000cb3 comment: put merge icon before avatar 2015-11-18 11:35:34 -06:00
joshua stein ee363e3635 filters: link to /tags 2015-11-13 15:53:38 -06:00
joshua stein 80311fa978 message view: fix double 'ago' 2015-11-13 15:53:22 -06:00
joshua stein 8edc8b926f css: all this time i had no idea we didn't have a white background 2015-11-13 15:53:06 -06:00
Andrew Gwozdziewycz 760e2a3f36 Update by line for non-authored submissions.
- Use 'via' for credit instead of 'by', which implies creation.
2015-11-13 01:28:32 -08:00
joshua stein 97dac71389 tags: set @title
tweak @title of filters controller
2015-11-09 10:01:43 -06:00
joshua stein 09fd14dd93 add a tag cloud thingy
closes #236
2015-11-09 09:52:32 -06:00
David Stygstra c1d1a44472 Show comments link even if there are no comments
For stories with both text and a link that have no comments, the only
way to view the text is to either log in (no account :( ) or view the
page source and find the story ID. This commit fixes that by always
showing the comments link.
2015-11-08 12:23:52 -05:00
joshua stein e4a23f74ca change character for additional story text, add tip text 2015-11-06 08:56:28 -06:00
joshua stein 70a3b60f04 embolden story description character 2015-11-05 11:58:34 -06:00
joshua stein 6bebed996e make description present character an actual html entity
issue #227
2015-11-05 11:58:34 -06:00
joshua stein 9d79f2c76b include both urls in srcset, use 1x/2x instead of image width
seems to work better in firefox
2015-11-05 11:58:34 -06:00
joshua stein 72fc702abe Merge pull request #227 from pushcx/patch-1
Indicate if a story has a description
2015-11-05 11:50:15 -06:00
Peter Harkins f1f09face1 move before tags, use different symbol
Pilcrow is ugly. Alternates: *, †, ‡, §
2015-11-04 10:52:27 -06:00
joshua stein 1e6b892005 show hidpi images for avatars, site load icon, and favicon 2015-11-01 19:56:30 -06:00
joshua stein 37994c0306 story editing: consolidate auto tag application, add audio for soundcloud 2015-10-26 10:39:40 -05:00
joshua stein d4f375ce11 story submission bookmarklet: open to lobste.rs in a new tab 2015-10-24 18:25:07 -05:00
Peter Harkins d95619ce69 I meant markeddown_description 2015-10-20 07:57:50 -05:00
joshua stein 73342e7d45 settings: pushover has used subscriptions for a while, not a manual key 2015-10-19 19:13:34 -05: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 a337ee850e take suggestions on moderator stories, just not those with privileged tags
also allow moderators to make tag suggestions, we're people too
2015-10-17 10:38:48 -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 800aea1ca9 always show downvote summary if score is <= 0, else it's confusing
improves on 9c40023
2015-10-16 17:03:54 -05:00
joshua stein 14bf26f339 for story comments by author of story, color blue as well 2015-10-16 13:08:05 -05:00
joshua stein 3439b93b12 when editing a story, show suggested titles and tags 2015-10-15 10:23:25 -05:00
joshua stein e3c881b81a implement automatic tag changing in response to user suggestions
Right now it's just a simple check for SUGGESTION_QUORUM (currently
4) number of users agreeing on a set of new tags.

Log a moderation to the story submitter when this happens, and allow
moderations to be done by a non-specific user.

Issue #207
2015-10-15 10:04:23 -05:00
joshua stein 2ca2c94ef6 allow messages to come from system instead of a user 2015-10-15 10:01:42 -05:00
joshua stein 7974ab4090 don't take suggestions on moderator stories
This should probably only apply to stories with restricted tags,
though.
2015-10-15 09:38:26 -05:00
joshua stein 21927eccbe Story: always recalculate hotness after saving changes 2015-10-14 21:17:54 -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 700c63b936 Story: extend MAX_EDIT_MINS to 3 hours 2015-10-14 18:23:06 -05:00
joshua stein 1c789fbae0 add /chat page 2015-10-11 13:04:16 -05:00
joshua stein 677da599f2 login: if user password hash is not at current rounds, re-encrypt it 2015-10-11 13:04:16 -05:00
joshua stein 80f7d5b095 remove or fix failing tests
Many of these fail because they were written with fancy rspec
features that don't work properly anymore and I don't care enough
about testing everything to update them.

See issue #228
2015-10-11 13:00:34 -05:00
joshua stein 696e669f60 mobile css: fix upvote/unvote/upvote still showing red arrow
closes #230
2015-10-10 20:36:48 -05:00
Peter Harkins df96fd8a0f Indicate if a story has a description
To encourage folks to write story descriptions on links, let's mark stories with descriptions so that folks know to click through.

The pilcrow is a little visually heavy, but it seemed better than an arbitrary symbol.
2015-10-03 08:41:25 -05:00
joshua stein 2a30511117 time_ago_in_words_label: put "ago" in the text since it's used everywhere
closes #222
2015-09-23 13:24:47 -05:00
Agustin Borgna 803a036a26 Implement comment folding in pure css 2015-09-23 00:44:46 -03:00
joshua stein 5567bb0b7e when resetting a password, if user is deleted but not banned, undelete
Also mention on the login screen that a deleted account can be
recovered this way.

Closes #221
2015-09-06 15:00:20 -05:00
joshua stein 5a86c0a506 rename comments/index.rss to reflect that it's an erb template 2015-09-06 15:00:20 -05:00
joshua stein a73d19d667 always show vote summary for mods 2015-09-06 15:00:20 -05:00
joshua stein 9c4002323d don't show story downvotes unless there are at least 3
people seem to freak out over one or two users being stupid, so make
them not stand out
2015-08-12 09:25:51 -05:00
joshua stein 5ce8976ba3 make 'authored by' link color to less bright blue 2015-08-12 09:25:51 -05:00
joshua stein 7d1231cec3 remove css hack 2015-08-12 09:25:51 -05:00
Basilio the cat 3743a41868 Keep the www\d* domain for some stories
When extracting story domain, keep the facing `www\d*` domain in cases
where it's the only non top level domain (e.g. www31337.tld).
2015-08-09 22:21:22 +02:00
joshua stein ed021d4975 add conditional link to /bbs 2015-08-04 09:59:21 -05:00
joshua stein 0c4a88e284 export some more things through json 2015-08-04 09:58:47 -05:00
joshua stein 4c8335d32f shrink story summary to 2 lines 2015-07-31 22:43:16 -05:00
joshua stein 6dcf35dc25 my karma means nothing 2015-07-31 22:43:16 -05:00
joshua stein 3f425a7abc make story/comment avatars link to user profile 2015-07-31 13:10:44 -05:00
joshua stein 229b2da008 settings: sort 2015-07-31 13:06:42 -05:00
joshua stein 0799fe33d7 specify a width for folder/unfolder to avoid shifting 2015-07-31 13:05:33 -05:00
joshua stein 27e2f0e5e5 fix magical path to sprockets manifest for our stupid hack 2015-07-31 12:53:28 -05:00
joshua stein 3ceb309577 when collapsing comment trees, collapse the comment itself 2015-07-31 12:52:52 -05:00
joshua stein 117aaaf3db move avatars to the far left 2015-07-31 10:51:33 -05:00
Owen Marshall 8fae63929d Truncate at end-of-string, not at every EOL 2015-07-31 09:03:10 -04:00
joshua stein 09f65774c2 Story#description_or_story_cache: handle truncation properly 2015-07-30 18:12:57 -05:00
joshua stein 81b3be6165 add setting to show inline story previews in story list
Closes #148
2015-07-30 17:56:09 -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 ff097813ad autosize comment textareas
closes #194
2015-07-24 01:26:58 -05:00
joshua stein 6ac294470d when replying to a comment, if text is selected, quote it
Because the browser unselects text when you click on something, make
the reply link "unselectable" with CSS and an HTML attribute for
various browsers.

Implements #206
2015-07-24 00:51:46 -05:00
joshua stein 8282181e49 Story: shrink hotness window to 24 hours 2015-07-24 00:51:11 -05:00
joshua stein 5bef185dda story list: use negative_* classes for flagged stories 2015-07-24 00:51:11 -05:00
joshua stein ecb20668ce SignupController: add an explicit action for invite 2015-07-24 00:51:11 -05:00
joshua stein 55bab8003d Story: validate url length according to db field length 2015-07-24 00:51:11 -05:00
joshua stein cbc1c50cd2 add user banning/unbanning from user view page 2015-07-24 00:51:11 -05:00
joshua stein 38ac6a4c3f Story: halve comment score weights in hotness 2015-07-24 00:51:11 -05:00