Меню сайта
Последние комментарии
Users Hide (v2) - для DLE 10.4 - 14.0 и выше
Users Hide - небольшой хак который показывает содержимое, для определенных пользователей!
Ручная установка
1. Открыть: /engine/modules/functions.php найти
function dle_session( $sid = false ) {
Выше вставить
function users_hide($go, $stop){
global $member_id;
$go = explode(",", strtolower($go));
if ($member_id['user_id'] == 1 or in_array(strtolower($member_id['name']), $go))
return $stop;
else {
$user_ok = array();
foreach ($go as $users) {
$user_ok[] = "<b>" . $users . "</b>";
}
return "<div class=\"quote\">Ссылка доступна только для пользователей: " . implode(', ', $user_ok) . "</div>";
}
}
2. Открыть: /engine/modules/show.short.php найти
if( isset($view_template) AND $view_template == "rss" ) {
Выше вставить
$row['short_story'] = preg_replace("#\[users_hide=(.*?)\](.*?)\[/users_hide\]#ies", "users_hide('$1', '$2')", $row['short_story']);
3. Открыть: /engine/modules/show.full.php найти
$tpl->set( '{short-story}', $row['short_story'] );
Выше вставить
$row['short_story'] = preg_replace("#\[users_hide=(.*?)\](.*?)\[/users_hide\]#ies", "users_hide('$1', '$2')", $row['short_story']);
$row['full_story'] = preg_replace("#\[users_hide=(.*?)\](.*?)\[/users_hide\]#ies", "users_hide('$1', '$2')", $row['full_story']);
4. Открыть: /engine/modules/show.custom.php найти
$tpl->set( '{short-story}', $row['short_story'] );
Выше вставить
$row['short_story'] = preg_replace("#\[users_hide=(.*?)\](.*?)\[/users_hide\]#ies", "users_hide('$1', '$2')", $row['short_story']);
5. Открыть: /engine/classes/comments.class.php найти
$tpl->set( '{comment}', "<div id="'comm-id- . $row['id'] . ">" . stripslashes( $row['text'] ) . "</div>" );
Выше вставить
$row['text'] = preg_replace("#\[users_hide=(.*?)\](.*?)\[/users_hide\]#ies", "users_hide('$1', '$2')", $row['text']);
Готово!
Как все это использовать?
[users_hide=X,X,X] ссылка [/users_hide]
Данный хайд вы можете использовать в новостях и комментариях!
P.S На пользователя с ID==1 данный хайд не распространяется!
Автор: SX2
Проверенно на: DLE 10.4 - 14.0 и выше
Скачать Users Hide (v2)
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.
Популярное за день
Elementor PRO (4.3.3 + 4.4.0 Beta 3 + RUS) [Nulled]
Просмотров: (29 537 + 19)
Elementra (2.0.2) [Nulled]
Просмотров: (385 + 16)
Vehica (1.0.110) [Nulled]
Просмотров: (966 + 14)
WoodMart (8.6.6) [Nulled]
Просмотров: (13 307 + 9)
Listeo (2.3.0) [Nulled]
Просмотров: (2 110 + 7)
Divi (5.19.0) [Nulled]
Просмотров: (262 + 7)
Mango (1.6.3)
Просмотров: (136 + 7)
SP Page Builder Pro (6.10.0 + Templates + RUS)
Просмотров: (13 969 + 6)
JCE Pro Content Editor Pro (3.0.4 & 2.9.99.13)
Просмотров: (5 298 + 6)
Chat - Support Board (3.8.4) [Nulled]
Просмотров: (3 355 + 5)
Bookly PRO (10.7) [Nulled]
Просмотров: (3 027 + 5)
WordPress Real Media Library (4.23.7) [Nulled]
Просмотров: (2 765 + 5)
RS Firewall (3.3.19)
Просмотров: (2 136 + 5)
EvnTalk (1.7.8) [Nulled]
Просмотров: (1 905 + 5)
Hreflang Manager (1.32) [Nulled]
Просмотров: (858 + 5)
Image Swap for WooCommerce (2.13.0) [Nulled]
Просмотров: (257 + 5)
Andera
Просмотров: (207 + 5)
Journal (3.2.10.0) [Nulled]
Просмотров: (10 258 + 4)
Advanced Custom Fields Pro (6.8.11.0 + Addons) [Nulled]
Просмотров: (5 863 + 4)
Vue File Manager Pro (2.2.7 Extended) [Nulled]
Просмотров: (976 + 4)
SP Page Builder Pro