Esempio n. 1
0
						</div>
						<?php 
$even = false;
$max = 6;
?>
						<div class="box-content">
							<div id="grid" class="noticias-box row" data-columns>
							<?php 
$query = "\tSELECT id,title,alias,publish_up,introtext,`fulltext` FROM jos_content\n\t\t\t\t\t\t\t\t\t\tWHERE state = 1\n\t\t\t\t\t\t\t\t\t\tAND sectionid = 9\n\t\t\t\t\t\t\t\t\t\tAND catid IN (51,52,53,54,55,56,57,90)\n\t\t\t\t\t\t\t\t\t\tORDER BY publish_up DESC\n\t\t\t\t\t\t\t\t\t\tLIMIT 0,10";
$noticias = $db->query($query);
while ($noticia = $noticias->fetch_object()) {
    ?>
								<div class="nota">
									<?php 
    if (linkExtractor($noticia->fulltext)) {
        echo "<img src='http://www.reportenlinea.com/" . linkExtractor($noticia->fulltext) . "'/>";
    }
    ?>

									<h3>
										<a href="">
										<?php 
    @(list($titulo, $sub1, $sub2) = explode("|", $noticia->title));
    echo $titulo;
    ?>
										</a>
									</h3>
									<span>
										<span class="noticia_fecha">
											<i class="fa fa-calendar"></i> <?php 
    echo date("d/m/Y", strtotime($noticia->publish_up));
Esempio n. 2
0
function fn_list_news_feed_older(&$parent)
{
    //sort by pubDate
    usort($parent->news_feed, "cmpDates");
    $buf = VOID;
    if (isset($parent->news_feed)) {
        $o = new stdClass();
        $count = count($parent->news_feed);
        for ($i = 2; $i < $count; $i++) {
            $news = $parent->news_feed[$i];
            $news->descr = str_replace(' class=mediaright"', '', $news->descr);
            $news->descr = str_replace(' class=media"', '', $news->descr);
            $news->descr = str_replace('img src=', 'img class="img img-responsive" src=', $news->descr);
            // pilt, mida näidatakse uudisest vasakul
            $images = linkExtractor($news->descr);
            if (empty($images)) {
                $news->image = DEFAULT_NEWS_IMAGE;
            } else {
                $news->image = $images[0][0];
            }
            $buf .= $parent->loop($news);
        }
    }
    return $buf;
}