$GLOBALS['loricaColumnWide'] = intval($GLOBALS['loricaColumnWide']); $GLOBALS['loricaOptions'] = intval($GLOBALS['loricaOptions']); if (empty($GLOBALS['loricaOptions'])) { $GLOBALS['loricaOptions'] = kGetVar('news', 1); } if (empty($GLOBALS['loricaOptions'])) { $GLOBALS['loricaOptions'] = 5; } if (!isset($_GET['p'])) { $_GET['p'] = 1; } foreach (kGetNewsList(array("page" => $_GET['p'], "limit" => $GLOBALS['loricaOptions'])) as $i => $news) { kSetNewsByDir($news['dir']); ?> <a href="<?php echo kGetNewsPermalink(); ?> "> <div class="secondaryNews <?php echo $i % 2 == 0 ? 'even' : 'odd'; ?> "> <?php if (!empty($news['featuredimage'])) { kSetImage(kGetNewsFeaturedImage()); ?> <div class="featuredImage"> <img src="<?php echo kGetImageUrl(); ?> ">
<?php $GLOBALS['loricaColumnWide'] = intval($GLOBALS['loricaColumnWide']); ?> <div class="grid w<?php echo $GLOBALS['loricaColumnWide']; ?> "> <div class="fb-comments" data-href="<?php echo kGetSiteUrl() . kGetNewsPermalink(); ?> " data-width="100%" data-numposts="5" data-colorscheme="light"></div> </div>
<?php foreach (kGetNewsQuickList(false, false, false, false) as $n) { kSetNewsByDir($n['dir']); ?> <item> <title><![CDATA[<?php echo kGetNewsTitle(); ?> ]]></title> <link><?php echo kGetSiteURL() . kGetNewsPermalink(); ?> </link> <guid><?php echo kGetSiteURL() . kGetNewsPermalink(); ?> </guid> <pubDate><?php echo kGetNewsDate("%a, %d %b %Y %H:%M:%S %z"); ?> </pubDate> <?php foreach (kGetNewsCategories() as $cat) { ?> <category><![CDATA[<?php echo $cat['categoria']; ?> ]]></category> <?php }
?> </urlset><?php /* NEWS */ } elseif ($_GET['type'] == "news") { ?> <urlset xmlns:news="http://www.google.com/schemas/sitemap-news/0.9"> <?php foreach (kGetLanguages() as $l) { foreach (kGetNewsList("*", false, 9999, 0, "", "", "", $l['ll']) as $p) { kSetNewsByDir($p['dir']); $md = kGetSeoMetadata(kGetNewsDir($l['ll']) . '/' . $p['categorie'][0]['dir'] . '/' . $p['dir']); if (strpos($md['robots'], "noindex") === false) { ?> <url> <loc><?php echo b3_unhtmlize(kGetSiteURL() . kGetNewsPermalink()); ?> </loc> <lastmod><?php echo kGetNewsDateModified() != "" ? date("c", mktime(substr(kGetNewsDateModified(), 11, 2), substr(kGetNewsDateModified(), 14, 2), substr(kGetNewsDateModified(), 17, 2), substr(kGetNewsDateModified(), 5, 2), substr(kGetNewsDateModified(), 8, 2), substr(kGetNewsDateModified(), 0, 4))) : date("c"); ?> </lastmod> <changefreq><?php echo $md['changefreq']; ?> </changefreq> <priority><?php echo $md['priority']; ?> </priority> </url>