Permalink
Browse files

moved simplexml call into template files for consistency

  • Loading branch information...
erik
erik committed Nov 11, 2009
1 parent 4c93ca6 commit e2ca446aa863753c090741f783cd2c8f287fb0f9
Showing with 40 additions and 15 deletions.
  1. +0 −3 index.php
  2. +11 −7 templates/basic.php
  3. +20 −1 templates/entertainment.php
  4. +9 −4 templates/standard.php
View
@@ -10,9 +10,6 @@
//END: config
-//fetch data for template. Note: template depends on this var
-$feed = simplexml_load_file($feedUrl);
-
//render template
require $templatePath;
View
@@ -1,10 +1,14 @@
-<!--
-@This is a template for rendering a feed described as "basic" in the
-"Yahoo! Developer's Guide for Feed Templates":
-http://public.yahoo.com/~jchu/StdFeedTemplate_TechnicalandDesignGuidance.doc
-Requires: This file assumes a variable named $feed has been defined and
-contains "basic" data described in the doc referred to above.
- -->
+<?php
+
+/**
+ * This is a template for rendering a feed described as "basic" in the
+ * "Yahoo! Developer's Guide for Feed Templates":
+ * http://public.yahoo.com/~jchu/StdFeedTemplate_TechnicalandDesignGuidance.doc
+ * This file assumes a variable named $feedUrl has been defined.
+ */
+
+$feed = simplexml_load_file($feedUrl);
+?>
<style>
/* wrap app to limit style bleeding from parent */
@@ -1,4 +1,12 @@
<?php
+
+/**
+ * This is a template for rendering a feed described as "entertainment" in the
+ * "Yahoo! Developer's Guide for Feed Templates":
+ * http://public.yahoo.com/~jchu/StdFeedTemplate_TechnicalandDesignGuidance.doc
+ * This file assumes a variable named $feedUrl has been defined.
+ */
+
$feed = simplexml_load_file($feedUrl);
//BEGIN: preprocess feed data so template isn't too complicated to read
@@ -134,6 +142,7 @@
}
.wrapper .header .navigation .label {
margin-right: 10px;
+ color: #ccc;
/* align label next to ul (see below) */
float: left;
@@ -160,7 +169,7 @@
margin-bottom: 10px;
text-transform: uppercase;
}
-.wrapper .body li .title {
+.wrapper .body .title {
font-weight: bold;
}
.wrapper .body .left {
@@ -170,6 +179,16 @@
.wrapper .body .left li {
margin-bottom: 10px;
}
+.wrapper .body .left .description {
+ color: #ccc;
+ margin-bottom: 10px;
+}
+.wrapper .body .left .pubDate {
+ color: #ccc;
+}
+.wrapper .body .left .top {
+ margin-bottom: 10px;
+}
.wrapper .body .right {
float: right;
}
View
@@ -1,7 +1,12 @@
-<!--
-- This is a template for rendering a standard RSS 2.0 feed.
-- This file assumes a variable named $feed has been defined.
--->
+<?php
+
+/**
+ * This is a template for rendering a standard RSS 2.0 feed.
+ * This file assumes a variable named $feedUrl has been defined.
+ */
+
+$feed = simplexml_load_file($feedUrl);
+?>
<style>
/* wrap app to limit style bleeding from parent */

0 comments on commit e2ca446

Please sign in to comment.