ORDER BY `news`.`date_created` DESC LIMIT 0, 6'); $tpl->assign_rs('news', $rs); sql_free_result($rs); $tpl->assign('extern_news', false); } else { /* * changed by bohrsty to fix error in displaying news from blog * requires $opt['news']['count'] in settings for number of blog-items * $opt['news']['include'] needs to be the RSS-URL of the blog * $url = $opt['news']['include']; $url = str_replace('{style}', $opt['template']['style'], $url); $newscontent = read_file($url, $opt['news']['maxsize']); */ // get newest blog entries $tpl->assign('news', $getNew->feedForSmarty('blog')); $tpl->assign('newsfeed', $opt['news']['include']); $tpl->assign('extern_news', true); } /* // forum entries if (file_exists($opt['rootpath'] . 'cache2/phpbb.inc.php')) require_once $opt['rootpath'] . 'cache2/phpbb.inc.php'; else */ if ($opt['forum']['url'] != '') { /* * changed by bohrsty to add lastest forum-entries using RSS-feed * requires $opt['forum']['count'] in settings for number of lastest forum-posts * requires $opt['forum']['url'] in settings: RSS-feed-URL of the forum */
// simplify $opt foreach ($options as $option) { if (isset($opt['page']['404'][$_SERVER['SERVER_NAME']][$option])) { $opt404[$option] = $opt['page']['404'][$_SERVER['SERVER_NAME']][$option]; } else { $opt404[$option] = $opt['page']['404']['www.opencaching.de'][$option]; } if ($opt404[$option]['urlname'] == '') { $opt404[$option]['urlname'] = parse_url($opt404[$option]['url'], PHP_URL_HOST); } } // get feeds from $feeds array foreach ($feeds as $feed) { if ($isRedirect404) { if ($opt404[$feed]['show']) { $tpl->assign($feed, $getNew->feedForSmarty($feed, 3, $opt404[$feed]['feedurl'], $opt404[$feed]['timeout'])); } } else { $tpl->assign($feed, $getNew->feedForSmarty($feed, 3)); } } // get newest caches if ($isRedirect404) { if ($opt404['newcaches']['show']) { $tpl->assign_rs('newcaches', $getNew->rsForSmarty('cache', [$sUserCountry, $opt['template']['locale'], 3])); } } else { $tpl->assign_rs('newcaches', $getNew->rsForSmarty('cache', [$sUserCountry, $opt['template']['locale'], 3])); } // assign $opt404 $tpl->assign('opt404', $opt404);