Ticket #302: minimalchannellist.patch

File minimalchannellist.patch, 2.5 kB (added by jtokash, 3 years ago)

proposed changes to implement 'minimalchannellist' option

  • cls/channels.php

     
    138138        } 
    139139         
    140140        function render() {              
    141                 $GLOBALS['rss']->currentFeedsFolder = $this; 
    142                 require($GLOBALS['rss'] ->getTemplateFile("feedsfolder.php")); 
     141                if ((!getConfig('rss.output.mimimalchannellist')) || ($this->feeds)) { 
     142                        $GLOBALS['rss']->currentFeedsFolder = $this; 
     143                        require($GLOBALS['rss'] ->getTemplateFile("feedsfolder.php")); 
     144                } 
    143145        } 
    144146} 
    145147 
     
    276278                        if (!array_key_exists($cparent, $this->folders)) { 
    277279                                $this->folders[$cparent] = new FeedFolder($fname, $cparent,$this); 
    278280                        } 
    279                         $this->folders[$cparent]->feeds[] = $f; 
     281                        if(($ucc != 0) || (!getConfig('rss.output.mimimalchannellist'))) 
     282                        { 
     283                                $this->folders[$cparent]->feeds[] = $f; 
     284                        } 
    280285                        $this->folders[$cparent]->isCollapsed = in_array($cparent, $this->collapsed_ids) && ($cparent > 0); 
    281286 
    282287                } 
  • schema.php

     
    285285                "rss.output.frontpage.numitems" =>              array("100","100","num","Maximum number of items displayed on the main page. Set this variable to 0 to show no items on the main page.",NULL), 
    286286                "rss.output.frontpage.mixeditems"       => array('true','true','boolean','Show read items along with unread items on the front page?',NULL), 
    287287                "rss.output.frontpage.numreaditems"     => array(-1,-1,'num','If there are no unread items then how many items to show on the frontpage. Set this to -1 if you want it to be the same as rss.output.numitemsonmainpage',NULL), 
     288                "rss.output.mimimalchannellist" => array('false','false','boolean','Exclude folders and channels without unread items in channel list?',NULL), 
    288289                "rss.output.theme"                      =>              array('default','default','string','The theme to use. Download more themes from the <a href="http://themes.gregarius.net/">Gregarius Themes Repository</a>.',NULL), 
    289290                "rss.output.cachecontrol"       =>              array('false','false','boolean','If true, Gregarius will negotiate with the browser and check whether it should get a fresh document or not.',NULL), 
    290291                "rss.config.plugins"            =>              array('a:2:{i:0;s:13:"urlfilter.php";i:1;s:18:"roundedcorners.php";}','a:2:{i:0;s:13:"urlfilter.php";i:1;s:18:"roundedcorners.php";}','array','Plugins are third-party scripts that offer extended functionalities. More plugins can be found at the <a href="http://plugins.gregarius.net/">Plugin Repository</a>.' , NULL),