Ejemplo n.º 1
0
 /**
  * wikiFeed executes the RSSParser for type "wiki"
  *
  * @param int $items number of feeditems to parse from feed (RSSParser)
  * @param string $url url of the feed to parse (RSSParser)
  * @param boolean $includetext ???following??? add table-tag?
  * @return string HTML string used for smarty assign method
  */
 private function wikiFeed($items = null, $url = null, $includetext = null)
 {
     // global
     global $opt;
     // check $items and set defaults
     if (is_null($items) || !is_numeric($items)) {
         $items = 10;
     }
     // check $url and set defaults
     if (is_null($url) || !is_string($url)) {
         $url = 'http://wiki.opencaching.de/index.php/Spezial:Neue_Seiten?feed=rss';
     }
     // check $includetext and set defaults
     if (is_null($includetext) || !is_bool($includetext)) {
         $includetext = false;
     }
     // execute RSSParser
     return RSSParser::parse($items, $url, $includetext);
 }
Ejemplo n.º 2
0
 /**
  * wikiFeed executes the RSSParser for type "wiki"
  *
  * @param int $items number of feeditems to parse from feed (RSSParser)
  * @param string $url url of the feed to parse (RSSParser)
  * @param boolean $includetext ???following??? add table-tag?
  * @param int $timeout maximum seconds to wait for the requested page
  * @return string HTML string used for smarty assign method
  */
 private function wikiFeed($items = null, $url = null, $timeout = null, $includetext = null)
 {
     // global
     global $opt;
     // check $items and set defaults
     if (is_null($items) || !is_numeric($items)) {
         $items = $opt['wikinews']['count'];
     }
     // check $url and set defaults
     if (is_null($url) || !is_string($url)) {
         $url = $opt['wikinews']['url'];
     }
     if (is_null($timeout) || !is_numeric($timeout)) {
         $timeout = $opt['wikinews']['timeout'];
     }
     // check $includetext and set defaults
     if (is_null($includetext) || !is_bool($includetext)) {
         $includetext = false;
     }
     // execute RSSParser
     return RSSParser::parse($items, $url, $timeout, $includetext);
 }