Меню сайта
Последние комментарии
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.0 Beta 3 + 4.2.3 Pro + RUS) [Nulled]
Просмотров: (28 037 + 48)
SP Page Builder Pro (6.9.1 + Templates)
Просмотров: (13 275 + 32)
WP Rocket (3.23.3.3 [Бесконечная лицензия]) [Nulled]
Просмотров: (5 688 + 15)
WoodMart (8.6.1) [Nulled]
Просмотров: (12 871 + 13)
WPBakery Page Builder for WordPress (9.0.1) [Nulled]
Просмотров: (4 551 + 10)
Akeeba Admin Tools Pro (7.8.9 + RUS)
Просмотров: (1 899 + 9)
JCE Pro Content Editor (2.9.99.11 Pro)
Просмотров: (5 060 + 8)
RS Firewall (3.3.18)
Просмотров: (2 043 + 8)
MeetsPro (3.6) [Nulled]
Просмотров: (236 + 8)
All in One SEO Pack Pro (5.0.1.1 [FIX] + Addons) [Nulled]
Просмотров: (5 407 + 6)
Attex (1.0.0)
Просмотров: (15 + 6)
RSForm! PRO (3.4.9 Package + Addons)
Просмотров: (4 451 + 5)
Astra Pro Addon (4.13.9) [Nulled]
Просмотров: (3 500 + 5)
GeneratePress Premium (2.5.6) [Nulled]
Просмотров: (2 964 + 5)
Oxygen Builder (6.2.0 Beta 3 + Addons) [Nulled]
Просмотров: (2 347 + 5)
Engage Box (7.1.1 Pro + Template)
Просмотров: (1 766 + 5)
Coin Market Cap & Prices (5.8.3) [Nulled]
Просмотров: (1 093 + 5)
Hoverex (1.5.12) [Nulled]
Просмотров: (456 + 5)
DiviFlash (1.4.6) [Nulled]
Просмотров: (95 + 5)
Journal (3.2.10.0) [Nulled]
Просмотров: (10 136 + 4)
4SEO PRO