ignore a category in plugin recent index
elfrenazo |
|
---|---|
you can ignore a category in plugin recent index ? |
GHengeveld |
|
---|---|
With recentitems its not possible. It should be relatively simple to modify it to ignore specific categories though. Maybe you can try that and release it so we can use it in the Cotonti package? |
elfrenazo |
|
---|---|
ok thanks for your answer |
ez |
|
---|---|
Something like this !! /* 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 -==
|
GHengeveld |
|
---|---|
$sys['now_offset'] is replaced with $sys['now'] in recent versions of Cotonti. The one with _offset was used to work with user's timezone setting, but this has been replaced with a more global approach which doesn't need it anymore, so $sys['now_offset'] and $sys['now'] are identical. @ez: If you fork Cotonti on Github, then make this change to the recentitems plugin and send a pull request, I can include this feature in the core package. |
elfrenazo |
|
---|---|
#32839 ez:
where I have to put that code? |
ez |
|
---|---|
@Gert:
@Elfrenazo: ==- I say: Keep it EZ -==
|
elfrenazo |
|
---|---|
without problems, it is not essential, thanks for your time |