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.
я думаю нет. он хочет автоматически выводить список категорий и подкатегорий + количество новостей в них.
тебе подойдёт category block
*** скрытое содержание ***
<?php
if (!defined('DATALIFEENGINE'))
{
die ("Hacking attempt!");
}
$tpl->load_template('num_cat.tpl');
$map1 = dle_cache ("sitemap", $config['skin']);
if(!$map) {
$map1 = "";
foreach($cat_info as $val)
{
$map1 .= "<a href='".$config['http_home_url']."category/".$val['alt_name']."/' class='link'; align='left'; '>$val[name]</a>\n";
$cat = intval($val[id]);
$result = $db->query("SELECT COUNT(*) as count FROM ". PREFIX ."_post WHERE category = '$cat' ORDER BY title ASC");
while ($row = $db->get_row($result))
$map1 .= '('.$row['count'].')<br />';
}
}
$tpl->result['num_cat'] = $map1;
$tpl->clear();
?>
$tpl->set('{speedbar}', $tpl->result['speedbar']);
$tpl->set('{num_cat}', $tpl->result['num_cat']);
include_once ENGINE_DIR.'/modules/num_cat.php';
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left">
<span class="category"><strong>{num_cat}</strong></span>
</td>
</tr>
</table>
foreach($cat_info as $val)
{
$map1 .= "<a href='".$config['http_home_url']."category/".$val['alt_name']."/' class='link'; align='left'; '>$val[name]</a>\n";
$cat = intval($val[id]);
$result = $db->query("SELECT COUNT(*) as count FROM ". PREFIX ."_post WHERE category = '$cat' ORDER BY title ASC");
while ($row = $db->get_row($result))
$map1 .= '('.$row['count'].')<br />';
}
foreach($cat_info as $val)
{
if ($val==1) OR ($val==1) {
$map1 .= "<a href='".$config['http_home_url']."category/".$val['alt_name']."/' class='link'; align='left'; '>$val[name]</a>\n";
$cat = intval($val[id]);
$result = $db->query("SELECT COUNT(*) as count FROM ". PREFIX ."_post WHERE category = '$cat' ORDER BY title ASC");
while ($row = $db->get_row($result))
$map1 .= '('.$row['count'].')<br />';
}
}