error:function(xhr,status,index,anchor) { $(anchor.hash).html("Could not load page. Please check your internet connection."); } } }); }); '; $Template->loadJavascript('FURASTA_ADMIN_SETTINGS_UPDATE', $javascript); /** * check for updates */ $cache_file = 'FURASTA_ADMIN_RSS_UPDATE'; /** * fetch update feed */ $rss = rss_fetch('http://furasta.org/update.xml', 'item'); foreach ($rss as $feed) { if (VERSION < $feed['version']) { $status = '<p>An update to the CMS is available. Press update below to automatically upgrade to <a href="' . $feed['link'] . '">' . $feed['title'] . '</a></p> <h3>New Features</h3> ' . $feed['description'] . ' <p><a href="settings.php?page=update&action=verify-auto&file=' . $feed['download'] . '" class="grey-submit right">Auto Update</a></p> <br style="clear:both" /> '; } } if ($rss == false) { $status = '<p>Could not make a connection. Please use the manual updater.</p>'; } if (!isset($status)) {
/** * Dev Blog, Furasta.Org * * This page manages the retrieval of articals from the Furasta.Org * dev blog. In order to prevent a long wait while the RSS is fetched, * this page is only executed procedurally once, then it is accessed * via AJAX. * * @author Conor Mac Aoidh <*****@*****.**> * @license http://furasta.org/licence.txt The BSD License * @version 1.0 * @package admin_overview */ require '_inc/define.php'; $elements = rss_fetch('http://blog.macaoidh.name/tag/furasta-org/feed/'); $items = array(); for ($i = 0; $i <= 2; $i++) { foreach ($elements[$i] as $element => $value) { switch ($element) { case 'pubDate': $items[$i]['pubDate'] = date("F j, Y", strtotime($value)); break; case 'title': $items[$i]['title'] = iconv("UTF-8", "UTF-8//IGNORE", $value); break; case 'link': $items[$i]['link'] = $value; break; case 'description': $items[$i]['description'] = substr($value, 0, 125) . ' [...]';