Gameer
Постоялец
- Регистрация
- 25 Апр 2014
- Сообщения
- 187
- Реакции
- 118
- Автор темы
- #1
![1438474646_hidebyday[1].png 1438474646_hidebyday[1].png](https://nulled.cc/data/attachments/58/58265-215347d15d3a43675e5198cd9bb1c66b.jpg)
С помощью этого хака вы сможете скрывать текст внутри тегов если пользователь зарегистрирован меньше указанного времени.
Открыть /engine/classes/templates.class.php найти :
Выше вставить:
Далее найти :
Выше вставить :
Далее найти :
Выше вставить :
PHP:
if (strpos ( $this->template, "[aviable=" ) !== false) {
PHP:
if (strpos ( $this->template, "[show_user=" ) !== false) {
$this->template = preg_replace_callback ( "#\\[(show_user)=(.+?)\\](.*?)\\[/show_user\\]#is", array( &$this, 'show_user'), $this->template );
}
PHP:
if (strpos ( $template, "[aviable=" ) !== false) {
PHP:
if (strpos ( $template, "[show_user=" ) !== false) {
$template = preg_replace_callback ( "#\\[(show_user)=(.+?)\\](.*?)\\[/show_user\\]#is", array( &$this, 'show_user'), $template );
}
PHP:
function check_module( $matches=array() ) {
PHP:
function show_user( $matches=array() ) {
global $member_id;
$show_user = $matches[2]; $block = $matches[3];
if(count(explode('|', $show_user)) > 1)
{
$show_user = explode('|', $show_user);
$show_user[0] = (int)$show_user[0];
$show_user[1] = trim(strip_tags(stripslashes($show_user[1])));
}
else
$show_user = (int)$show_user;
if ($matches[1] == "show_user") $action = true; else $action = false;
$date = langdate("Y-m-d", $member_id['reg_date']);
if( $action AND (int)$member_id['user_group'] != 5) {
if((floor((strtotime(date('Y-m-d'))-strtotime($date))/(3600*24))) <= (!empty($show_user[0]) ? $show_user[0] : $show_user)) return !empty($show_user[1]) ? $show_user[1] : '';
else return $block;
}
else
return !empty($show_user[1]) ? $show_user[1] : '';
}
Открыть /engine/classes/templates.class.php найти :
Выше вставить:
Далее найти :
Выше вставить :
Далее найти :
Выше вставить :
PHP:
if (strpos ( $this->template, "[aviable=" ) !== false) {
PHP:
if (strpos ( $this->template, "[show_user=" ) !== false) {
$this->template = preg_replace ( "#\\[show_user=(.+?)\\](.*?)\\[/show_user\\]#ies", "\$this->show_user('\\1', '\\2')", $this->template );
}
PHP:
if (strpos ( $template, "[aviable=" ) !== false) {
PHP:
if (strpos ( $template, "[show_user=" ) !== false) {
$template = preg_replace ( "#\\[show_user=(.+?)\\](.*?)\\[/show_user\\]#ies", "\$this->show_user('\\1', '\\2')", $template );
}
PHP:
function check_module($aviable, $block, $action = true) {
PHP:
function show_user( $show_user, $block, $action = true ) {
global $member_id;
if(count(explode('|', $show_user)) > 1)
{
$show_user = explode('|', $show_user);
$show_user[0] = (int)$show_user[0];
$show_user[1] = trim(strip_tags(stripslashes($show_user[1])));
}
else
$show_user = (int)$show_user;
$date = langdate("Y-m-d", $member_id['reg_date']);
if( $action AND (int)$member_id['user_group'] != 5) {
if((floor((strtotime(date('Y-m-d'))-strtotime($date))/(3600*24))) <= (!empty($show_user[0]) ? $show_user[0] : $show_user)) return !empty($show_user[1]) ? $show_user[1] : '';
else return $block;
}
else
return !empty($show_user[1]) ? $show_user[1] : '';
}
Автор : Для просмотра ссылки Войди
Последнее редактирование: