Меню сайта
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.1.0 Pro + RUS) [Nulled]
Просмотров: (24 557 + 14)
RSForm! PRO (3.4.5 Package + Addons)
Просмотров: (4 079 + 9)
SP Page Builder Pro (6.6.0 FIX + Templates)
Просмотров: (11 246 + 6)
JCE Pro Content Editor (2.9.99.4 Pro)
Просмотров: (3 729 + 6)
Content Views PRO (7.4.0) [Nulled]
Просмотров: (1 875 + 5)
YOOtheme Pro for WordPress (5.0.34 + WidgetKit 3.1.37) [Nulled]
Просмотров: (822 + 5)
Project (1.0.0)
Просмотров: (142 + 5)
Rocket LMS (2.2.0) [Nulled]
Просмотров: (1 316 + 4)
WP Cerber Security Pro (9.7.4.0) [Nulled]
Просмотров: (1 155 + 4)
Akeeba Backup Pro (10.3.1)
Просмотров: (743 + 4)
HomeID (1.9.1) [Nulled]
Просмотров: (378 + 4)
SureForms Pro (2.10.0) [Nulled]
Просмотров: (111 + 4)
Dynamic Shortcodes (1.8.3) [Nulled]
Просмотров: (89 + 4)
JLex Review (6.4.7 + Addons)
Просмотров: (4 + 4)
Elements Kit (4.4.5) [Nulled]
Просмотров: (3 796 + 3)
The Plus Addons for Elementor (6.4.13) [Nulled]
Просмотров: (3 547 + 3)
Tutor LMS Pro (3.9.11 + Addon) [Nulled]
Просмотров: (3 353 + 3)
Astra Pro Addon (4.13.4) [Nulled]
Просмотров: (3 233 + 3)
UpdraftPlus Pro (2.26.4.26) [Nulled]
Просмотров: (2 382 + 3)
AcyMailing Enterprise (10.7.1) [Nulled]
Просмотров: (1 828 + 3)
Elementor PRO