public function buildLinksNs()
 {
     $oUser = $this->getUser();
     $set = new ViewFormElementFieldset();
     $set->setLabel(wfMessage('bs-blog-blog')->plain());
     $select = new ViewFormElementSelectbox();
     $select->setId('selFeedNsBlog');
     $select->setName('selFeedNsBlog');
     $select->setLabel(wfMessage('bs-ns')->plain());
     $aNamespacesTemp = BsNamespaceHelper::getNamespacesForSelectOptions(array(NS_SPECIAL, NS_MEDIA, NS_BLOG, NS_BLOG_TALK, NS_FILE));
     $aNamespaces = array();
     foreach ($aNamespacesTemp as $index => $name) {
         if ($index % 2 == 0) {
             $aNamespaces[$index] = $name;
         }
     }
     $oSpecialRSS = SpecialPage::getTitleFor('RSSFeeder');
     $sUserName = $oUser->getName();
     $sUserToken = $oUser->getToken();
     foreach ($aNamespaces as $key => $name) {
         $select->addData(array('value' => $oSpecialRSS->getLinkUrl(array('Page' => 'blog', 'ns' => $key, 'u' => $sUserName, 'h' => $sUserToken)), 'label' => $name));
     }
     $btn = new ViewFormElementButton();
     $btn->setId('btnFeedNsBlog');
     $btn->setName('btnFeedNsBlog');
     $btn->setType('button');
     $btn->setLabel(wfMessage('bs-rssfeeder-submit')->plain());
     $set->addItem($select);
     $set->addItem($btn);
     return $set;
 }
 public function buildLinksWatch()
 {
     global $wgUser;
     $aRssWatchlistDays = array(1, 3, 5, 7, 14, 30, 60, 90, 180, 365);
     $set = new ViewFormElementFieldset();
     $set->setLabel(wfMessage('bs-rssstandards-title-watch')->plain());
     $select = new ViewFormElementSelectbox();
     $select->setId('selFeedWatch');
     $select->setName('selFeedWatch');
     $select->setLabel(wfMessage('bs-rssstandards-title-watch')->plain());
     $oSpecialRSS = SpecialPage::getTitleFor('RSSFeeder');
     $sUserName = $wgUser->getName();
     $sUserToken = $wgUser->getToken();
     foreach ($aRssWatchlistDays as $day) {
         $select->addData(array('value' => $oSpecialRSS->getLinkUrl(array('Page' => 'watchlist', 'days' => $day, 'u' => $sUserName, 'h' => $sUserToken)), 'label' => wfMessage('bs-rssstandards-link-text-watch', $day)->text()));
     }
     $btn = new ViewFormElementButton();
     $btn->setId('btnFeedWatch');
     $btn->setName('btnFeedWatch');
     $btn->setType('button');
     $btn->setLabel(wfMessage('bs-rssfeeder-submit')->plain());
     $set->addItem($select);
     $set->addItem($btn);
     return $set;
 }