gruppastimul
Ваш
- Регистрация
- 22 Окт 2006
- Сообщения
- 800
- Реакции
- 149
- Автор темы
- #11
нашел бы отписал бы ) пока нет. странно, что никто еще до этого не додумался..
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.
Никто больше способов кроме этого не нашёл? Нужно чтоб именно налочка снималась на категории (нужно, как многие догадались , для категории "Эротика").{info}
[not-aviable=main] {content}[/aviable]
[aviable=main] {custom category="2,7,и тд все нужные кроме ненужной" template="custom" aviable="global" from="0" limit="10" cache="yes"}[/aviable]
Когда я делаю такое, то правлю в
engine.php
там где вывод новостей на главке. можно править запрос.
$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, flag, editdate, editor, reason, view_edit, tags FROM " . PREFIX . "_post WHERE {$stop_list}approve";
$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, flag, editdate, editor, reason, view_edit, tags FROM " . PREFIX . "_post WHERE category=1 AND ({$stop_list}approve)";
$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, flag, editdate, editor, reason, view_edit, tags FROM " . PREFIX . "_post WHERE category IN (1, 2, 3) AND ({$stop_list}approve)";
$sql_select = "SELECT SQL_CALC_FOUND_ROWS id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, xfields, title, category, alt_name, comm_num, allow_comm, allow_rate, rating, vote_num, news_read, flag, editdate, editor, reason, view_edit, tags FROM " . PREFIX . "_post WHERE {$stop_list}approve AND allow_main".$where_date." ORDER BY ".$fixed.$news_sort_by." ".$news_direction_by." LIMIT ".$cstart.",".$config['news_number'];
$sql_select = "SELECT SQL_CALC_FOUND_ROWS id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, xfields, title, category, alt_name, comm_num, allow_comm, allow_rate, rating, vote_num, news_read, flag, editdate, editor, reason, view_edit, tags FROM " . PREFIX . "_post WHERE category=1 AND {$stop_list}approve AND allow_main".$where_date." ORDER BY ".$fixed.$news_sort_by." ".$news_direction_by." LIMIT ".$cstart.",".$config['news_number'];
$sql_select = "SELECT SQL_CALC_FOUND_ROWS id, autor, date, short_story, SUBSTRING(full_story, 1, 15) as full_story, xfields, title, category, alt_name, comm_num, allow_comm, allow_rate, rating, vote_num, news_read, flag, editdate, editor, reason, view_edit, tags FROM " . PREFIX . "_post WHERE category IN (1, 2, 3) AND {$stop_list}approve AND allow_main".$where_date." ORDER BY ".$fixed.$news_sort_by." ".$news_direction_by." LIMIT ".$cstart.",".$config['news_number'];
Что-то я толком не понял... А как сделать чтоб просто, только одна каттегория не выводилась?
$cat_not_in_main = "1"; // если нужно 2 категории = "1,4";
$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, flag, editdate, editor, reason, view_edit, tags FROM " . PREFIX . "_post WHERE category not in ($cat_not_in_main) AND ({$stop_list}approve)";
$cat_not_in_main = "1"; // если нужно 2 категории = "1,4";
$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, flag, editdate, editor, reason, view_edit, tags FROM " . PREFIX . "_post WHERE category not in ($cat_not_in_main) AND ({$stop_list}approve)";