[TYPO3-ttnews] Problem with mode -2: do NOT show items with selected categories OR

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Tue Dec 19 12:22:20 CET 2006


Hi!

Besides that it perhaps should be named "do NOT show items with any of the 
selected categories" (as opposed to "do NOT show items with all of the 
selected categories") it does not select any items that have no selection 
at all.

Too me that does not make sense. I only want to ommit some categories, but 
that doesn't mean I want to hide uncategorized items.

Therefore I changed the selection in function getSelectConf():

// de-select newsitems by their categories
if (($this->config['categoryMode'] == -1 ||
   $this->config['categoryMode'] == -2)) {
  // do not show items with selected categories
  $selectConf['leftjoin'] =
   'tt_news_cat_mm ON tt_news.uid = tt_news_cat_mm.uid_local';
  $selectConf['where'] .=
   ' AND (IFNULL(tt_news_cat_mm.uid_foreign,0) NOT IN (' .
   ($this->catExclusive?$this->catExclusive:0) . '))';
  // MY CHANGE!!!
  if ($this->config['categoryMode'] == -1)	{
   $selectConf['where'] .=
   ' AND (tt_news_cat_mm.uid_foreign)'; // filter out not categoized records
  }
}

What do you think? Shall this be changed in tt_news? Or may it go in with 
yet another config var (config.doNotHideUncategorisedItems)?

Masi


More information about the TYPO3-project-tt-news mailing list