ignore a category in plugin recent index
Contributors Thanked: 10 kez
Something like this !! I have developed it years ago.. its ez.. By the way this code also does the time exclusion bit
/* 2basix change: added exclude categories and added timefilter */
// 2basix added: page_author
$excludecats
= trim(
$cfg
[
'plugin'
][
'recentitems'
'excludecats'
]);
=
"system"
. (
empty
(
) ?
""
:
","
.
);
$timefilter
"page_begin<'"
$sys
['now_offset
']."'
AND page_expire>
'".$sys['
now_offset
";
$sql
= sed_sql_query(
"SELECT page_id, page_alias, page_cat, page_title, page_date, page_author FROM $db_pages WHERE page_state=0 AND $timefilter AND FIND_IN_SET(page_cat,'$excludecats')<=0 ORDER by page_date DESC LIMIT $l"
$newitem
= (
/* 2basix EndOfChange EOC */