Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
if ($config['news_msort'] == "") $config['news_msort'] = "DESC";
// ###### xShow XXX ###### //
// НАСТРОЙКИ //
$stop_xxx = "5"; // ID категорий, которые нужно скрыть (через запятую).
$xxx_default = "yes"; // Показывать по-умолчанию категории 18+ или нет. (yes или no)
// НАСТРОЙКИ //
if (isset($_COOKIE['show_xxx']) && ($_COOKIE['show_xxx'] == "yes" || $_COOKIE['show_xxx'] == "no"))
$xxx = $_COOKIE['show_xxx'];
else
$xxx = $xxx_default;
$allow_list = explode (',', $user_group[$member_id['user_group']]['allow_cats']);
if ($allow_list[0] != "all" || $xxx == "no")
{
$allow_xxx_list = '';
if ($xxx == "no")
{
$config['allow_cache'] = false;
$allow_xxx = array();
$cat_list = explode(',', $stop_xxx);
$cat_info_tmp = $cat_info;
foreach ($cat_list as $element)
{
if (!empty($element)) unset($cat_info_tmp[$element]);
}
foreach ($cat_info_tmp as $cats)
{
$allow_xxx[] = $cats['id'];
}
$allow_xxx_list = (!empty($cat_info_tmp)) ? implode ('|', $allow_xxx) : "";
}
$allow_group_list = ($allow_list[0] != "all") ? implode ('|', $allow_list) : "";
$stop_list_category = $allow_group_list.$allow_xxx_list;
$stop_list = ($stop_list_category) ? "category regexp '[[:<:]](".$stop_list_category.")[[:>:]]' AND " : "";
}
else $stop_list = "";
// ###### xShow XXX ###### //
$sql_select = "SELECT id, autor, date, short_story, full_story, xfields, title, category, alt_name, comm_num, allow_comm, allow_rate, rating, vote_num, news_read FROM " . PREFIX . "_post WHERE {$stop_list}approve = '1' AND allow_main = '1'".$where_date." ORDER BY fixed desc, ".$config['news_sort']." ".$config['news_msort']." LIMIT ".$cstart.",".$config['news_number'];
$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post WHERE {$stop_list}approve = '1' AND allow_main = '1'".$where_date;
$sql_news = "";
$url_page = $config['http_home_url'].get_url($category_id);
// ###### xShow XXX ###### //
$sql_select = "SELECT id, autor, date, short_story, full_story, xfields, title, category, alt_name, comm_num, allow_comm, allow_rate, rating, vote_num, news_read FROM " . PREFIX . "_post where category regexp '[[:<:]]($get_cats)[[:>:]]' AND approve = '1'".$where_date." ORDER BY fixed desc, ".$config['news_sort']." ".$config['news_msort']." LIMIT ".$cstart.",".$config['news_number'];
// ###### xShow XXX ###### //
$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where category regexp '[[:<:]]($get_cats)[[:>:]]' AND approve = '1'".$where_date;
$tpl->set('{allowed-ip}', stripslashes($row['allowed_ip']));
// ###### xShow XXX ###### //
if ($xxx == "yes")
{
$tpl->set('{xxx_yes}', ' checked');
$tpl->set('{xxx_no}', '');
}
else if ($xxx == "no")
{
$tpl->set('{xxx_yes}', '');
$tpl->set('{xxx_no}', ' checked');
}
// ###### xShow XXX ###### //
<!-- XXX -->
<tr valign="middle">
<td width="120" height="25">Показывать новости из категории "18+"?</td>
<td height="25"><input type="radio" name="show_xxx" value="yes"{xxx_yes}> Да <input type="radio" name="show_xxx" value="no"{xxx_no}> Нет</td>
</tr>
<tr valign="middle">
<td width="120" height="10">*</td>
<td colspan=2 height="10">*</td>
</tr>
<!-- XXX -->
Посмотри картинку, почитай описание на 4dle.А можно подробное описание данного хака и чем его едят, смысле как его использовать?