blob: cad2a6f7fd741de8e9635f044bb26b295a30a60e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<?php
$pageTitle = $PlanetConfig->getName();
$limit = $PlanetConfig->getMaxDisplay();
$count = 0;
header('Content-type: text/html; charset=UTF-8');
?><!DOCTYPE html>
<html lang="<?=$PlanetConfig->getLocale()?>" class="no-js">
<head>
<?php include(__DIR__.'/head.tpl.php'); ?>
</head>
<body>
<div id="page">
<?php include(__DIR__.'/top.tpl.php'); ?>
<div id="content">
<?php if (0 == count($items)) : ?>
<div class="article">
<h2 class="article-title">
<?=_g('No article', 'note de trad')?>
</h2>
<p class="article-content"><?=_g('No news, good news.')?></p>
</div>
<?php else : ?>
<?php foreach ($items as $item) : ?>
<?php
$arParsedUrl = parse_url($item->get_feed()->getWebsite());
$host = 'from-' . preg_replace('/[^a-zA-Z0-9]/i', '-', $arParsedUrl['host']);
?>
<div class="article <?php echo $host; ?>">
<h2 class="article-title">
<a href="<?php echo $item->get_permalink(); ?>" title="Go to original place"><?php echo $item->get_title(); ?></a>
</h2>
<p class="article-info">
<?php echo strip_tags(($item->get_author()? $item->get_author()->get_name() : 'Anonymous')); ?>,
<?php
$ago = time() - $item->get_date('U');
//echo '<span title="'.Duration::toString($ago).' ago" class="date">'.date('d/m/Y', $item->get_date('U')).'</span>';
echo '<span id="post'.$item->get_date('U').'" class="date">'.$item->get_date('d/m/Y').'</span>';
?>
|
<?=_g('Source:')?> <?php
$feed = $item->get_feed();
echo '<a href="'.$feed->getWebsite().'" class="source">'.$feed->getName().'</a>';
?>
</p>
<div class="article-content">
<?php echo $item->get_content(); ?>
</div>
</div>
<?php if (++$count == $limit) {
break;
} ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
<?php include_once(__DIR__.'/sidebar.tpl.php'); ?>
<?php include(__DIR__.'/footer.tpl.php'); ?>
</div>
</body>
</html>
|