diff options
author | Pascal Chevrel <pascal@chevrel.org> | 2012-03-09 09:02:34 +0100 |
---|---|---|
committer | Pascal Chevrel <pascal@chevrel.org> | 2012-03-09 09:02:34 +0100 |
commit | 926e36b8fdf8ceaf59ac72e1b28b862f42978b84 (patch) | |
tree | 302f7892e24e5a6a0b3582b7b137328824116058 /custom/views | |
parent | 66c2ad84d4d493865fbc5a5fbfbbc61ff0bb3edf (diff) | |
download | planet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.tar planet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.tar.gz planet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.tar.bz2 planet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.tar.xz planet-926e36b8fdf8ceaf59ac72e1b28b862f42978b84.zip |
convert all files saved in Windows(CRLF) to Unix (LF)
Diffstat (limited to 'custom/views')
-rw-r--r-- | custom/views/archive/index.tpl.php | 68 | ||||
-rw-r--r-- | custom/views/atom10/index.tpl.php | 58 | ||||
-rw-r--r-- | custom/views/default/index.tpl.php | 102 | ||||
-rw-r--r-- | custom/views/rss10/index.tpl.php | 90 |
4 files changed, 159 insertions, 159 deletions
diff --git a/custom/views/archive/index.tpl.php b/custom/views/archive/index.tpl.php index 8f45fa0..c09e266 100644 --- a/custom/views/archive/index.tpl.php +++ b/custom/views/archive/index.tpl.php @@ -1,4 +1,4 @@ -<?php
+<?php $count = 0; $today = Array(); $week = Array(); @@ -19,23 +19,23 @@ foreach ($items as $item) { } } -header('Content-type: text/html; charset=UTF-8');
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
-
- <title><?php echo $PlanetConfig->getName(); ?></title>
- <?php include(dirname(__FILE__).'/head.tpl.php'); ?>
-</head>
-
-<body>
- <div id="page">
- <?php include(dirname(__FILE__).'/top.tpl.php'); ?>
-
+header('Content-type: text/html; charset=UTF-8'); +?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Script-Type" content="text/javascript" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + + <title><?php echo $PlanetConfig->getName(); ?></title> + <?php include(dirname(__FILE__).'/head.tpl.php'); ?> +</head> + +<body> + <div id="page"> + <?php include(dirname(__FILE__).'/top.tpl.php'); ?> + <div id="content"> <?php if (0 == count($items)) :?> <div class="article"> @@ -47,15 +47,15 @@ header('Content-type: text/html; charset=UTF-8'); <?php endif; ?> <?php if (count($today)): ?> <div class="article"> - <h2>Today</h2>
- <ul>
+ <h2>Today</h2> + <ul> <?php foreach ($today as $item): ?> - <?php $feed = $item->get_feed(); ?>
+ <?php $feed = $item->get_feed(); ?> <li> - <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> :
- <a href="<?php echo $item->get_permalink(); ?>" title="Go to original place"><?php echo $item->get_title(); ?></a>
- </li>
- <?php endforeach; ?>
+ <a href="<?php echo $feed->getWebsite() ?>" class="source"><?php echo $feed->getName() ?></a> : + <a href="<?php echo $item->get_permalink(); ?>" title="Go to original place"><?php echo $item->get_title(); ?></a> + </li> + <?php endforeach; ?> </ul> </div> <?php endif; ?> @@ -103,12 +103,12 @@ header('Content-type: text/html; charset=UTF-8'); <?php endforeach; ?> </ul> </div> - <?php endif; ?>
- </div>
-
- <?php include_once(dirname(__FILE__).'/sidebar.tpl.php'); ?>
-
- <?php include(dirname(__FILE__).'/footer.tpl.php'); ?>
- </div>
-</body>
-</html>
+ <?php endif; ?> + </div> + + <?php include_once(dirname(__FILE__).'/sidebar.tpl.php'); ?> + + <?php include(dirname(__FILE__).'/footer.tpl.php'); ?> + </div> +</body> +</html> diff --git a/custom/views/atom10/index.tpl.php b/custom/views/atom10/index.tpl.php index d515961..6e03980 100644 --- a/custom/views/atom10/index.tpl.php +++ b/custom/views/atom10/index.tpl.php @@ -1,29 +1,29 @@ -<?php
-$limit = $PlanetConfig->getMaxDisplay();
-$count = 0;
-
-header('Content-Type: application/atom+xml; charset=UTF-8');
-echo '<?xml version="1.0" encoding="UTF-8" ?>';
-?><feed xmlns="http://www.w3.org/2005/Atom">
- <title><?php echo $PlanetConfig->getName(); ?></title>
- <subtitle></subtitle>
- <id><?php echo $PlanetConfig->getUrl(); ?></id>
- <link rel="self" type="text/html" href="<?php echo $PlanetConfig->getUrl(); ?>?type=atom10" />
- <link rel="alternate" type="text/html" href="<?php echo $PlanetConfig->getUrl(); ?>" />
- <updated><?php echo date("Y-m-d\TH:i:s\Z") ?></updated>
- <author><name>Author</name></author>
-
- <?php $count = 0; ?>
- <?php foreach ($items as $item): ?>
- <entry xmlns="http://www.w3.org/2005/Atom">
- <title type="html"><?php echo htmlspecialchars($item->get_feed()->getName()); ?> : <?php echo htmlspecialchars($item->get_title());?></title>
- <id><?php echo htmlspecialchars($item->get_permalink());?></id>
- <link rel="alternate" href="<?php echo htmlspecialchars($item->get_permalink());?>"/>
- <published><?php echo $item->get_date('Y-m-d\\TH:i:s+00:00'); ?></published>
- <author><name><?php echo ($item->get_author()? $item->get_author()->get_name() : 'anonymous'); ?></name></author>
-
- <content type="html"><![CDATA[<?php echo $item->get_content();?>]]></content>
- </entry>
- <?php if (++$count == $limit) { break; } ?>
- <?php endforeach; ?>
-</feed>
+<?php +$limit = $PlanetConfig->getMaxDisplay(); +$count = 0; + +header('Content-Type: application/atom+xml; charset=UTF-8'); +echo '<?xml version="1.0" encoding="UTF-8" ?>'; +?><feed xmlns="http://www.w3.org/2005/Atom"> + <title><?php echo $PlanetConfig->getName(); ?></title> + <subtitle></subtitle> + <id><?php echo $PlanetConfig->getUrl(); ?></id> + <link rel="self" type="text/html" href="<?php echo $PlanetConfig->getUrl(); ?>?type=atom10" /> + <link rel="alternate" type="text/html" href="<?php echo $PlanetConfig->getUrl(); ?>" /> + <updated><?php echo date("Y-m-d\TH:i:s\Z") ?></updated> + <author><name>Author</name></author> + + <?php $count = 0; ?> + <?php foreach ($items as $item): ?> + <entry xmlns="http://www.w3.org/2005/Atom"> + <title type="html"><?php echo htmlspecialchars($item->get_feed()->getName()); ?> : <?php echo htmlspecialchars($item->get_title());?></title> + <id><?php echo htmlspecialchars($item->get_permalink());?></id> + <link rel="alternate" href="<?php echo htmlspecialchars($item->get_permalink());?>"/> + <published><?php echo $item->get_date('Y-m-d\\TH:i:s+00:00'); ?></published> + <author><name><?php echo ($item->get_author()? $item->get_author()->get_name() : 'anonymous'); ?></name></author> + + <content type="html"><![CDATA[<?php echo $item->get_content();?>]]></content> + </entry> + <?php if (++$count == $limit) { break; } ?> + <?php endforeach; ?> +</feed> diff --git a/custom/views/default/index.tpl.php b/custom/views/default/index.tpl.php index 4f82e46..9efc5f7 100644 --- a/custom/views/default/index.tpl.php +++ b/custom/views/default/index.tpl.php @@ -1,27 +1,27 @@ -<?php
-$limit = $PlanetConfig->getMaxDisplay();
+<?php +$limit = $PlanetConfig->getMaxDisplay(); $count = 0; -header('Content-type: text/html; charset=UTF-8');
-?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
-
- <title><?php echo $PlanetConfig->getName(); ?></title>
- <?php include(dirname(__FILE__).'/head.tpl.php'); ?>
-</head>
-
-<body>
- <script type="text/javascript">
- document.body.className += 'js';
- </script>
- <div id="page">
- <?php include(dirname(__FILE__).'/top.tpl.php'); ?>
-
+header('Content-type: text/html; charset=UTF-8'); +?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Script-Type" content="text/javascript" /> + <meta http-equiv="Content-Style-Type" content="text/css" /> + + <title><?php echo $PlanetConfig->getName(); ?></title> + <?php include(dirname(__FILE__).'/head.tpl.php'); ?> +</head> + +<body> + <script type="text/javascript"> + document.body.className += 'js'; + </script> + <div id="page"> + <?php include(dirname(__FILE__).'/top.tpl.php'); ?> + <div id="content"> <?php if (0 == count($items)) : ?> <div class="article"> @@ -30,23 +30,23 @@ header('Content-type: text/html; charset=UTF-8'); </h2> <p class="article-content">No news, good news.</p> </div> - <?php else : ?>
+ <?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 ($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>';
+ ?> + <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 ($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>'; ?> | @@ -54,20 +54,20 @@ header('Content-type: text/html; charset=UTF-8'); 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; } ?>
+ ?> + </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(dirname(__FILE__).'/sidebar.tpl.php'); ?>
-
- <?php include(dirname(__FILE__).'/footer.tpl.php'); ?>
- </div>
-</body>
-</html>
+ <?php endif; ?> + </div> + + <?php include_once(dirname(__FILE__).'/sidebar.tpl.php'); ?> + + <?php include(dirname(__FILE__).'/footer.tpl.php'); ?> + </div> +</body> +</html> diff --git a/custom/views/rss10/index.tpl.php b/custom/views/rss10/index.tpl.php index 7d07196..0141327 100644 --- a/custom/views/rss10/index.tpl.php +++ b/custom/views/rss10/index.tpl.php @@ -1,49 +1,49 @@ -<?php
-$limit = $PlanetConfig->getMaxDisplay();
+<?php +$limit = $PlanetConfig->getMaxDisplay(); $count = 0; header('Content-Type: text/xml; charset=UTF-8'); -echo '<?xml version="1.0" encoding="UTF-8" ?>';
-?><rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
- xmlns:admin="http://webns.net/mvcb/"
- xmlns:cc="http://web.resource.org/cc/"
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
- xmlns="http://purl.org/rss/1.0/">
-
- <channel rdf:about="<?php echo $PlanetConfig->getUrl(); ?>">
- <title><?php echo $PlanetConfig->getName(); ?></title>
- <description></description>
- <link><?php echo $PlanetConfig->getUrl(); ?></link>
- <dc:language></dc:language>
- <dc:creator></dc:creator>
- <dc:rights></dc:rights>
- <dc:date><?php echo date('Y-m-d\\TH:i:s+00:00'); ?></dc:date>
- <admin:generatorAgent rdf:resource="http://moonmoon.inertie.org/" />
-
- <items>
- <rdf:Seq>
- <?php foreach ($items as $item): ?>
- <rdf:li rdf:resource="<?php echo $item->get_permalink(); ?>"/>
- <?php if (++$count == $limit) { break; } ?>
- <?php endforeach; ?>
- </rdf:Seq>
- </items>
- </channel>
-
- <?php $count = 0; ?>
- <?php foreach ($items as $item): ?>
- <item rdf:about="<?php echo $item->get_permalink();?>">
- <title><?php echo htmlspecialchars($item->get_feed()->getName()) ?> : <?php echo htmlspecialchars($item->get_title());?></title>
- <link><?php echo htmlspecialchars($item->get_permalink());?></link>
- <dc:date><?php echo date('Y-m-d\\TH:i:s+00:00',$item->get_date('U')); ?></dc:date>
- <dc:creator><?php echo htmlspecialchars($item->get_author()? $item->get_author()->get_name() : 'anonymous') ?></dc:creator>
- <description><?php echo htmlspecialchars($item->get_content()); ?></description>
- <content:encoded><![CDATA[<?php echo $item->get_content();?>]]></content:encoded>
- </item>
- <?php if (++$count == $limit) { break; } ?>
- <?php endforeach; ?>
-
+echo '<?xml version="1.0" encoding="UTF-8" ?>'; +?><rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" + xmlns:admin="http://webns.net/mvcb/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:content="http://purl.org/rss/1.0/modules/content/" + xmlns="http://purl.org/rss/1.0/"> + + <channel rdf:about="<?php echo $PlanetConfig->getUrl(); ?>"> + <title><?php echo $PlanetConfig->getName(); ?></title> + <description></description> + <link><?php echo $PlanetConfig->getUrl(); ?></link> + <dc:language></dc:language> + <dc:creator></dc:creator> + <dc:rights></dc:rights> + <dc:date><?php echo date('Y-m-d\\TH:i:s+00:00'); ?></dc:date> + <admin:generatorAgent rdf:resource="http://moonmoon.inertie.org/" /> + + <items> + <rdf:Seq> + <?php foreach ($items as $item): ?> + <rdf:li rdf:resource="<?php echo $item->get_permalink(); ?>"/> + <?php if (++$count == $limit) { break; } ?> + <?php endforeach; ?> + </rdf:Seq> + </items> + </channel> + + <?php $count = 0; ?> + <?php foreach ($items as $item): ?> + <item rdf:about="<?php echo $item->get_permalink();?>"> + <title><?php echo htmlspecialchars($item->get_feed()->getName()) ?> : <?php echo htmlspecialchars($item->get_title());?></title> + <link><?php echo htmlspecialchars($item->get_permalink());?></link> + <dc:date><?php echo date('Y-m-d\\TH:i:s+00:00',$item->get_date('U')); ?></dc:date> + <dc:creator><?php echo htmlspecialchars($item->get_author()? $item->get_author()->get_name() : 'anonymous') ?></dc:creator> + <description><?php echo htmlspecialchars($item->get_content()); ?></description> + <content:encoded><![CDATA[<?php echo $item->get_content();?>]]></content:encoded> + </item> + <?php if (++$count == $limit) { break; } ?> + <?php endforeach; ?> + </rdf:RDF>
\ No newline at end of file |