Forumlar / Unrelated / Offtopic / ignore a category in plugin recent index

ignore a category in plugin recent index

ez
#32839 2012-01-20 20:08

Something like this !!
I have developed it years ago.. its ez..
By the way this code also does the time exclusion bit

PHP
1
2
3
4
5
6
7
8
9
10
/* 2basix change: added exclude categories and added timefilter */
// 2basix added: page_author
$excludecats = trim($cfg['plugin']['recentitems']['excludecats']);
$excludecats = "system". (empty($excludecats) ? "":",".$excludecats );
$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 = (empty($excludecats) ? "":",".$excludecats );
/* 2basix EndOfChange EOC */
Like you see i made a new item in setup called excludecats:
something like this

excludecats=02:string:::Exclude PageCats (comma separated)
==- I say: Keep it EZ -==