Меню сайта
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)
Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.
Популярное за день
TikTok Video Downloader Kit (1.0.0)
Просмотров: (35 + 4)
Litho (3.6) [Nulled]
Просмотров: (1 404 + 2)
AdForest Theme (6.0.11) [Nulled]
Просмотров: (1 345 + 2)
MinervaKB (2.0.9)
Просмотров: (1 190 + 2)
Cooked Pro (1.4.2)
Просмотров: (926 + 2)
FoodTiger (2.4.3) [Nulled]
Просмотров: (630 + 2)
Neurozen (1.0.0) [Nulled]
Просмотров: (33 + 2)
Twoet
Просмотров: (23 + 2)
WPBakery Page Builder for WordPress (8.7.2) [Nulled]
Просмотров: (3 729 + 1)
WP All Export Pro (1.9.15) [Nulled]
Просмотров: (2 134 + 1)
Hostel (1.0)
Просмотров: (1 922 + 1)
Mailster (4.1.16 + Templates) [Nulled]
Просмотров: (1 854 + 1)
Merchandiser (5.7.4) [Nulled]
Просмотров: (1 431 + 1)
WPMU Defender Pro (5.8.0) [Nulled]
Просмотров: (1 379 + 1)
Iniya (3.4 + Premium Plugins) [Nulled]
Просмотров: (1 055 + 1)
Clearfy Cache Pro (3.6.4) [Nulled]
Просмотров: (951 + 1)
Quick Featured Images Pro (8.5.0)
Просмотров: (755 + 1)
WhatsBox (5.0.0) [Nulled]
Просмотров: (533 + 1)
New99 (2.1.1) [Nulled]
Просмотров: (308 + 1)
Stability (2.2)
Просмотров: (308 + 1)

Vristo