Меню сайта
Последние комментарии
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)
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.
Популярное за день
The7 (14.4.6.0) [Nulled]
Просмотров: (4 519 + 5)
Acorn (2.0.0)
Просмотров: (223 + 4)
JCE Pro Content Editor (2.9.99.9 Pro)
Просмотров: (4 705 + 3)
Fluxstore WooCommerce (6.3.0)
Просмотров: (141 + 3)
Swift Box (2.13.0) [Nulled]
Просмотров: (20 + 3)
Elementor PRO (4.2.1 Pro + RUS) [Nulled]
Просмотров: (26 600 + 2)
Yoast SEO Premium (28.2.0 + Premium Extensions) [Nulled]
Просмотров: (9 045 + 2)
Advanced Custom Fields Pro (6.8.7.0 + Addons) [Nulled]
Просмотров: (5 478 + 2)
RSForm! PRO (3.4.9 Package + Addons)
Просмотров: (4 272 + 2)
RS Firewall (3.3.15)
Просмотров: (1 794 + 2)
Litho (3.7) [Nulled]
Просмотров: (1 596 + 2)
Quiz And Survey Master (8.1.16 + Addons) [Nulled]
Просмотров: (1 057 + 2)
Advanced Custom Fields for WooCommerce (5.0.0)
Просмотров: (1 036 + 2)
Brisk (6.4.1) [Nulled]
Просмотров: (631 + 2)
SmartCrawl Pro (3.16.3) [Nulled]
Просмотров: (414 + 2)
JSpeed (3.2.5)
Просмотров: (399 + 2)
Noew (2.1.0)
Просмотров: (62 + 2)
Luminor
Просмотров: (41 + 2)
SP Page Builder Pro (6.7.1 FIX + Templates)
Просмотров: (12 643 + 1)
Savoy (3.1.9) [Nulled]
Просмотров: (3 384 + 1)
SP Page Builder Pro