태그된 주제에 저작권 보호 추가

안녕하세요,

회원 중 많은 분들이 고품질의 주제, 블로그 글 등을 작성하고 있습니다. 안타깝게도 다른 사이트에서 출처를 명시하지 않고 이를 자신의 것으로 둔갑시켜 공개하는 경우가 있습니다. 심지어 작성자가 명확히 "이 글은 이 사이트에만 게시하오니 도용하지 마세요. 이 콘텐츠를 사용하시려면 먼저 저에게 연락해 주세요."라고 명시해도 마찬가지입니다. 작성자들이 새로운 고품질 콘텐츠 생성에 대한 의욕을 잃어가고 있어 조치가 필요했습니다. 많은 방문자가 포럼 외부에서 이러한 콘텐츠를 읽기 때문에 포럼을 비공개(프라이빗)로 전환하는 것은 원하지 않습니다.

이것이 인터넷이라는 것을 잘 알고 있으며 저작권 콘텐츠에 대한 100% 완벽한 해결책은 없음을 인지하고 있습니다. 하지만 이러한 콘텐츠의 도용을 더 어렵게 만들거나, 쉽게 도용되지 않도록 만드는 것은 가능합니다. 이는 시간 낭비처럼 보일 수 있지만, 간단한 텍스트 선택 및 복사가 작동하지 않으면 많은 도용자들이 포기합니다.

우리는 copy-protected 태그를 사용하고 있으며, 이를 재사용하고 있습니다: Disable right click on image lightbox - #7 by awesomerobot

모든 회원이 주제에 #copy-protected 태그를 추가할 수 있는 옵션을 추가했습니다.
이 태그에는 다음과 같은 기능이 있습니다:

  • 우클릭 비활성화 (첫 번째 게시물의 OP 콘텐츠 .cooked 클래스 전체에 적용)
  • 복사 및 잘라내기 비활성화 (첫 번째 게시물의 OP 콘텐츠 .cooked 클래스 전체에 적용)
  • 비회원(비등록 방문자)의 경우 텍스트 선택 비활성화 (첫 번째 게시물의 OP 콘텐츠 .cooked 클래스 전체에 적용)
  • 주제 제목 섹션 위에 저작권 보호 안내 문구 추가

1. 여기 헤더에서 이 기능을 위해 사용하는 코드가 있습니다. 작성자가 주제에 저작권 태그를 추가하면 활성화됩니다.

<script type="text/discourse-plugin" version="0.8">
const TopicRoute = require("discourse/routes/topic").default;

TopicRoute.reopen({
  activate: function() {
    this._super();
    Em.run.next(function() {
      // Disable right click
      $('.tag-copy-protected #post_1 .cooked').on('contextmenu', function(e) { return false; });
      // Disable copy and cut
      $('.tag-copy-protected #post_1 .cooked').bind('cut copy', function (e) { e.preventDefault(); });
    });
  }
});
</script>

2. 비회원(비등록 방문자)의 경우 텍스트 선택을 비활성화하는 추가 계층을 사용합니다. 이를 위해 common에서 CSS를 사용합니다.

.anon {
  .tag-copy-protected {
    #post_1 .cooked {
      -webkit-user-select: none;
      -khtml-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      -o-user-select: none;
      user-select: none;
    }
  }
}

3. 주제 제목 섹션 위에 작은 빨간색 안내 문구도 추가합니다. 문구 내용은 This content has been copyright-protected by the author!입니다.

.tag-copy-protected #topic-title .title-wrapper {
  &:before {
    content: 'This content has been copyright-protected by the author!';
    color: #e40202;
  }
}

4. prevent anons from downloading files 사이트 설정을 사용하여 회원만 파일을 다운로드할 수 있도록 합니다.


이것이 우리가 이 문제를 처리하기 위해 취한 조치입니다. 이 솔루션에 대해 우리의 작성자들은 만족하며, 우리가 그들을关心和하고 존중해 준다는 점을 고맙게 생각합니다. :slightly_smiling_face: :heart: 이 정보가 조금이나마 도움이 되고 기대한 결과를 가져오기를 바랍니다. :crossed_fingers:

18개의 좋아요

Nice work!

Sounds like a great opportunity to package this up in a Theme Component?

4개의 좋아요

Thanks Robert! :slightly_smiling_face:

Sure, a Theme Component is a great idea! I would be grateful if you could do it, of course if you want to and have some time for it :slightly_smiling_face:

3개의 좋아요

I’d be delighted to help you. We can host and support it on Pavilion and I’ll give you and Awesomerobot credit as authors.

My current focus is on getting my plugins and TC’s Ember-CLI compability and a couple of bugs, but I can get to this next.

I’ll PM you for testing.

Perhaps we can add some settings at some point if switching things on and off is useful? Perhaps we can add a setting to select the specific tag etc.

There may be others who find this useful as a TC (@davidkingham ?)

6개의 좋아요

It’s a great idea to have this as a TC for others to use, I really don’t need the extra features beyond the right click protection that I already have though.

2개의 좋아요

It’s not working with me..

Can you clarify a little bit? I double checked this and works as expected. I will try to make a Theme Component from this so that will make it easier to use. :slightly_smiling_face:

1개의 좋아요

That would be greate; since im not using the default discourse theme; but it’s doesn’t work with me for both themes… component will be good idea.. thanks!

1개의 좋아요

I changed the code and made a component from this. It was not so compatible with loading spinner hopefully it fix the issue. I think it broke when the body class list refresh.

I’ve added some settings.


Here you can find this.
https://github.com/VaperinaDEV/copyrighted-topic

4개의 좋아요

Works perfect, just the visitor can open the pictures/save it.. but the rest working fine.

1개의 좋아요

There is a 3 dots on the video that users can download. I want to disable download - so view only… https://discourse.fotografos.online/t/fotografia-como-aumentar-a-percepcao-de-valor/223449 I have check the “prevent anons from downloading files” but this did not work… any ideas? @jaymf or others in the support channel? thank you much!

Hello,

Here is a quick and hacky solution to disable download on videos.

Paste this to Common / Header

Use this, if you want to disable only the download button from video controls.

<script type="text/discourse-plugin" version="0.8">
  api.decorateCooked(
    $elem => $elem.find('video').attr('controlsList', 'nodownload'),
    { id: 'disable-video-download-button' }
  );
</script>

Use this, if you want to disable download button from video controls and disable right click (context menu) on video. So it prevents the video download with right click or long tap (mobile) from context menu.

<script type="text/discourse-plugin" version="0.8">
  api.decorateCooked(
    $elem => $elem.find('video')
    // disable download button from controls
    .attr('controlsList', 'nodownload')
    // disable right click context menu
    .on('contextmenu', function(e) {
      e.preventDefault()
    }),
    { id: 'disable-video-download' }
  );
</script>
1개의 좋아요

How would that ever work? Technically videos must be downloaded before those can be shown, but even if the meaning is take away download button my iPhone and iPad will ask what I want to do when clicked a video: download (save as) or view.

You can also just grab the url from the network tab and throw it at wget.

This worked like a charm! Thank you very much! We’ll be locking premium content and this would work perfectly!

2개의 좋아요