Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disabling-doubleposts feature #424

Merged
merged 24 commits into from
Jun 21, 2016
Merged

disabling-doubleposts feature #424

merged 24 commits into from
Jun 21, 2016

Conversation

Risers
Copy link
Contributor

@Risers Risers commented Mar 12, 2016

Doubleposting is disabled server-side and user-side. Users can doublepost 3 days after last post.
User that created topic can doublepost every 24h.

return false;
}
if ($user->user_id === $this->topic_poster) {
if (Carbon::now()->subdays(1) > $this->topic_last_post_time) {

This comment was marked as off-topic.

@peppy
Copy link
Member

peppy commented Mar 14, 2016

what's with all the file permission changes? might want to check your git setup.

@LiquidPL
Copy link
Contributor

This gets created on a clean vagrant provision iirc

@Sakisan
Copy link
Contributor

Sakisan commented Mar 14, 2016

I also get these modifications automatically right after the installation by vagrant.

~/projects/osu-web/code on master !
➜ gss
 M bootstrap/cache/.keep
 M storage/.gitignore
 M storage/app/.gitignore
 M storage/clockwork/.gitignore
 M storage/framework/.gitignore
 M storage/framework/cache/.gitignore
 M storage/framework/sessions/.gitignore
 M storage/framework/views/.gitignore
 M storage/htmlpurifier/.keep
 M storage/logs/.gitignore

No one noticed this before?

@LiquidPL
Copy link
Contributor

I did, but I didn't really care to bring that up

@Sakisan
Copy link
Contributor

Sakisan commented Mar 15, 2016

I guess the quick fix is to just let these files be merged. I don't think that would be a problem.

@Risers
Copy link
Contributor Author

Risers commented Mar 21, 2016

Kinda up?

@@ -425,4 +426,30 @@ public function deleteWithCover()

$this->delete();
}

public function isADoublePost(User $user)

This comment was marked as off-topic.

@nanaya
Copy link
Collaborator

nanaya commented Apr 11, 2016

  • what's with so many "style fixes" commit?
  • don't change permission of unrelated files. And, no, those files should not be executable.
  • once activated (and is double post) the box can't be hidden since close button is obstructed by the overlay
  • if the user has slow connection, he will be able to write something and then later the overlay appears
  • every reply box activation triggers network round trip. Especially noticeable when scrolling back and forth from the bottom of the page while writing a reply

@Risers
Copy link
Contributor Author

Risers commented Apr 11, 2016

Thanks

Update post-box.coffee

Update forum-post.less

Update forum-post.less

Update Authorize.php

Update TopicsController.php

Update forum-topic-reply.coffee

Update Topic.php

Update osu.php

Update forum-topic-reply.coffee

file modes changed
cleaning styleCl

Update forum-post.less

adding deleted empty lines
postbox opverlay is now displayed afer post
@Risers
Copy link
Contributor Author

Risers commented Jun 1, 2016

Done

return false;
}
if ($user->user_id === $this->topic_poster) {
if (Carbon::now()->subhours(config('osu.forum.authorDoublePostTime')) > $this->topic_last_post_time) {

This comment was marked as off-topic.

@nanaya
Copy link
Collaborator

nanaya commented Jun 7, 2016

Just make it like this

In resources/views/forum/topics/show.blade.php around line 137:

<div class="forum-post__content forum-post__content forum-post__content--edit-bar">
    @if (priv_check('ForumTopicReply', $topic)->can())
        @include("forum.topics._post_box_footer", ["submitText" => trans("forum.topic.post_reply")])
    @else
        <span>
            <i class="fa fa-warning"></i>
            {{ priv_check('ForumTopicReply', $topic)->message() }}
        </span>
    @endif
</div>

And add relevant check in app/Libraries/OsuAuthorize.php, function checkForumTopicReply. Also move the error message translation to authorization.php file.

cleaning code

cleaning code
@Risers
Copy link
Contributor Author

Risers commented Jun 20, 2016

Done

@@ -29,6 +29,10 @@
'forum' => [
'admin_forum_id' => intval(env('ADMIN_FORUM_ID', 28)),
'help_forum_ids' => array_map('intval', explode(' ', env('HELP_FORUM_IDS', '4 5 29 30 101'))),
'doublePostTime' => [

This comment was marked as off-topic.

@Risers
Copy link
Contributor Author

Risers commented Jun 21, 2016

Done

@nanaya nanaya merged commit 2efe77c into ppy:master Jun 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants