Jump to content
View in the app

A better way to browse. Learn more.

Дизайн и модификация Invision Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Запрет на копирование (мобильная версия)

Доброго. Кто подскажет, что нужно добавить, что бы запретить копирование в мобильной версии сайта конкретным группам?

body { 
        -ms-user-select: none; 
        -moz-user-select: none; 
        -webkit-user-select: none; 
        user-select: none; 
    }

Featured Replies

  • Author

Заранее спасибо 🙂

Edited by aLEX49566

Приветствую

{{if (\IPS\Member::loggedIn()->inGroup( [1, 2, 3, 4] ) )}}
    <style type='text/css'>
      @media (max-width: 979px) {
          body {
              -ms-user-select: none;
              -moz-user-select: none;
              -khtml-user-select: none;
              -webkit-user-select: none;
              user-select: none
          }
      }
    </style>
{{endif}}

Где 1, 2, 3, 4 - id конкректных групп,

979px - максимальное разрешение экрана.

  • Author
2 часа назад, Lesovsky сказал:

Приветствую


{{if (\IPS\Member::loggedIn()->inGroup( [1, 2, 3, 4] ) )}}
    <style type='text/css'>
      @media (max-width: 979px) {
          body {
              -ms-user-select: none;
              -moz-user-select: none;
              -khtml-user-select: none;
              -webkit-user-select: none;
              user-select: none
          }
      }
    </style>
{{endif}}

Где 1, 2, 3, 4 - id конкректных групп,

979px - максимальное разрешение экрана.

Это для Custom?

29 минут назад, aLEX49566 сказал:

Это для Custom?

В смысле?

  • Author
3 часа назад, Lesovsky сказал:

В смысле?

Через custom получается никак не решить этот вопрос? Нужно только в глобал?!

43 минуты назад, aLEX49566 сказал:

Через custom получается никак не решить этот вопрос? Нужно только в глобал?!

Да можете в любой шаблон страницы вставить, если нужно точечно, либо в глобальный, но тогда нужно указывать класс контейнера для запрета на копирования, например контейнер поста .ipsComment_content

  • 2 weeks later...
  • Author

По итогу сделал так:

 

{{if (\IPS\Member::loggedIn()->inGroup( [2] ) )}}
      <style type='text/css'>
	  @media (max-width: 979px) {
.noselect_mobile {
              -ms-user-select: none;
              -moz-user-select: none;
              -khtml-user-select: none;
              -webkit-user-select: none;
              user-select: none
}
 }
        </style>
{{endif}}

noselect_mobile ставим в класс, контент которого нужно скрыть, в моем случае это body

Edited by aLEX49566

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.