Posted 24 сентября, 2024Sep 24 Доброго. Кто подскажет, что нужно добавить, что бы запретить копирование в мобильной версии сайта конкретным группам? body { -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; }
24 сентября, 2024Sep 24 On 24.09.2024 at 08:12, aLEX49566 said: Доброго. Кто подскажет, что нужно добавить, что бы запретить копирование в мобильной версии сайта конкретным группам? 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}} Надеюсь смысл поняли.
24 сентября, 2024Sep 24 On 24.09.2024 at 13:15, aLEX49566 said: AHristich ни один из способов не сработал Покажите как делали.
24 сентября, 2024Sep 24 Author On 24.09.2024 at 13:57, AHristich said: Покажите как делали. Все как тут описано) уже бэкапнул обратно
24 сентября, 2024Sep 24 On 24.09.2024 at 14:12, AHristich said: Ну бэкапнул так бэкапнул... В 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'
24 сентября, 2024Sep 24 Если не сработает, попробуй вот так в 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}}
24 сентября, 2024Sep 24 On 24.09.2024 at 14:55, murovets said: В 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 24 сентября, 2024Sep 24 by AHristich
24 сентября, 2024Sep 24 On 24.09.2024 at 15:33, AHristich said: В 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}}> Согласен, так даже по лучше будет)
24 сентября, 2024Sep 24 Author On 24.09.2024 at 15:11, murovets said: Если не сработает, попробуй вот так в 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}} Сработал только этот скрипт) Всем спасибо за помощь! {{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}}
3 октября, 2024Oct 3 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}} Спасибо за корректировки Lesovsky
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.