示例#1
0
function afficher_feed($url, $picto, $nb = 3)
{
    $items = lire_feed($url, $nb);
    if ($items !== false) {
        foreach ($items as $item) {
            $link = $item->get_permalink();
            $title = strip_tags($item->get_title());
            $author = strip_tags($item->get_author());
            $description = $item->get_description();
            $date = $item->get_date('d/m/Y');
            ?>
                        <div class="span4">
                            <h2><?php 
            echo $date;
            ?>
 - <?php 
            echo $title;
            ?>
</h2>
                            <p><?php 
            echo couperTexte($description, 250);
            ?>
</p>
                            <p><a class="btn" href="<?php 
            echo $link;
            ?>
" target="_blank">Lire la suite &raquo;</a></p>
                        </div>
			<?php 
        }
    }
}
示例#2
0
function afficher_feed($url, $picto, $nb = 3)
{
    $items = lire_feed($url, $nb);
    if ($items !== false) {
        foreach ($items as $item) {
            $link = $item->get_permalink();
            $title = strip_tags($item->get_title());
            $author = strip_tags($item->get_author());
            $description = $item->get_description();
            $date = $item->get_date('d/m/Y');
            ?>
			<div class="Bloc_news_index">

				<div class="picto"><img src="gfx/<?php 
            echo $picto;
            ?>
" /></div>

				<ul class="texte">
					<li class="date"><?php 
            echo $date;
            ?>
</li>
					<li class="titre"><a href="<?php 
            echo $link;
            ?>
" target="_blank"><?php 
            echo $title;
            ?>
</a></li>
					<li><?php 
            echo couperTexte($description, 150);
            ?>
</li>
				</ul>
			</div>
			<?php 
        }
    }
}