Jump to content

Запрет на копирование

Featured Replies

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

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

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/
Share on other sites

Попробуйте с помощью условия if. Не уверен,конечно,что в css это сработает.

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211368
Share on other sites
2 часа назад, aLEX49566 сказал:

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

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

Попробуйте так

{{if member.inGroup(array("здесь id группы"))}}
здесь ваш код
{{endif}}

Ещё как вариант.

Добавьте доп.класс к body,например, .no_copy

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

А в globalTemlate в теге <body> добавьте

{{if member.inGroup(array("здесь id группы"))}}
no_copy
{{endif}}

Надеюсь смысл поняли.

 

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211369
Share on other sites

AHristich ни один из способов не сработал

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211380
Share on other sites
41 минуту назад, aLEX49566 сказал:

AHristich ни один из способов не сработал

Покажите как делали.

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211381
Share on other sites
Только что, AHristich сказал:

Покажите как делали.

Все как тут описано) уже бэкапнул обратно

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211382
Share on other sites

Ну бэкапнул так бэкапнул...

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211384
Share on other sites
41 минуту назад, AHristich сказал:

Ну бэкапнул так бэкапнул...

В custom.css

{{if member.inGroup(array("ID group - кому запрещено выделять текст на форуме"))}}
.noselect {
	color: #555;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
{{endif}}

 

И в GlobalTemplate

Добавить noselect в <body>

пример вот:

<body class='noselect'

 

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211385
Share on other sites

Если не сработает, попробуй вот так

в GlobalTemplate

Добавить noselect в <body>

Далее, после body

{{if member.inGroup(array("ID group - кому запрещено выделять текст на форуме"))}}
      <style>
.noselect {
	color: #555;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
        </style>
{{endif}}

 

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211386
Share on other sites
39 минут назад, murovets сказал:

В custom.css

{{if member.inGroup(array("ID group - кому запрещено выделять текст на форуме"))}}
.noselect {
	color: #555;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
{{endif}}

 

И в GlobalTemplate

Добавить noselect в <body>

пример вот:

<body class='noselect'

 

В custom.css добавь только

.noselect { color: #555; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

В globalTemlate

<body {{if member.inGroup(array("ID group - кому запрещено выделять текст на форуме"))}}class='noselect'{{endif}}>

Edited by AHristich

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211387
Share on other sites
14 минут назад, AHristich сказал:

В custom.css добавь только

.noselect { color: #555; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

В globalTemlate

<body {{if member.inGroup(array("ID group - кому запрещено выделять текст на форуме"))}}class='noselect'{{endif}}>

Согласен, так даже по лучше будет)

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211388
Share on other sites
2 часа назад, murovets сказал:

Если не сработает, попробуй вот так

в GlobalTemplate

Добавить noselect в <body>

Далее, после body

{{if member.inGroup(array("ID group - кому запрещено выделять текст на форуме"))}}
      <style>
.noselect {
	color: #555;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}
        </style>
{{endif}}

 

Сработал только этот скрипт)

Всем спасибо за помощь! :ab:

      {{if member.inGroup(array("2"))}}<style>.noselect {-webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;}</style>{{endif}}

 

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211391
Share on other sites
  • 2 недели спустя...
{{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}}

 

Спасибо за корректировки  Lesovsky

Link to comment
https://ipbmafia.ru/topic/28009-zapret-na-kopirovanie/?&do=findComment&comment=211749
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.


Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.