Skip to content
Browse files

updated readme to reflect new template structure

  • Loading branch information...
1 parent 07780bd commit 6d673a0d85d812c0f2a5101e1c23213649adaa2b erik committed
Showing with 41 additions and 17 deletions.
  1. +41 −17 readme.markdown
  2. BIN readme.pdf
View
58 readme.markdown
@@ -1,24 +1,35 @@
-# RSS YAP app
+# Yahoo! Application Platform (YAP) RSS application generator
A simple framework for generating a Yahoo! Application Platform application from an RSS feed
+## Preamble
+
+This document is intended to address two typical use cases:
+
+1. "Porting" an app based on a Yahoo! Front Door XSL-based template
+2. Creating a new YAP app based on a standard RSS feed
+
+Installation and usage instructions follow, but in brief, this framework operates by consuming a given feed, parsing the feed data using PHP's SimpleXML library, and passing the parsed data to a PHP/HTML/CSS template for rendering. In an app's description, the location of the framework is given as the base URL for the app, and the output from the template is returned back to YAP for display.
+
## Installation
-* Click the `download` button above - OR -
-* Clone this repository: `git clone git://github.com/ydn/rss_yap_app.git`
+1. Obtain the source code:
+ * Click the _download_ button on the Github project page (github.com/erikeldridge/rssyapgen), pick a compression, and save the file.
+ OR
+ * Clone this repository: `git clone git://github.com/erikeldridge/rssyapgen.git`
+2. Upload the project to a server accessible by YAP
## Usage
### Requirements
-* PHP 5.2
+* PHP 5.2 with SimpleXML
### Initialization
-* Upload this directory to your server
-* Create a new YAP application
-* Set the "Application URL" of the app to point to the location of this directory on your server
-* Set the "Small View Default Content" to:
+1. Create a new YAP application
+2. Set the _Application URL_ of the app to point to the location of this directory on your server
+3. Set the _Small View Default Content_ to:
<style>
#loading {
@@ -31,24 +42,37 @@ A simple framework for generating a Yahoo! Application Platform application from
height: 16px;
}
</style>
- <yml:include replace="loading">
+ <yml:include replace="loading" params="index.php">
<div id="loading">Loading ...</div>
</yml:include>
-* Click the "Save" button
-* Click the "Preview" button to see your app
+4. Click the "Save" button
+5. Click the "Preview" button to see your app
### Customization
#### Setting the feed url
-* Open index.php in a text editor
-* Set the "$feedUrl" variable at the top of the file to point to the RSS feed of your choice, e.g. "http://sports.yahoo.com/sow/rss.xml"
-* Save the file and reload the app
-* Note: by default, yapgen only handles RSS syntax. Also, some feeds may require special handling.
+1. Open index.php in a text editor
+2. Set the `$feedUrl` variable at the top of the file to point to the RSS 2.0 feed of your choice, e.g. _http://sports.yahoo.com/sow/rss.xml_
+3. Save the file and reload the app
+4. Note: by default, rssyapgen only handles RSS 2.0 syntax. Some feeds may require special handling.
+
+#### Defining special handling for a feed
+
+If you feed uses custom xml namespaces, such as "y:navigation", "y:search", etc., you'll need to create a custom template to render the feed as follows:
+
+1. Copy _templates/basic.php_ as another file. For this example we'll call the file _special.php_ and save it in the _templates_ directory.
+2. Open _special.php_ in a text editor.
+3. Templates use standard PHP [_alternate syntax_](http://us2.php.net/manual/en/control-structures.alternative-syntax.php) and short tags. Edit the styling, markup, and templating to match the structure of your feed.
+4. Edit _index.php_:
+ * Set the _feedUrl_ variable to point to the new feed.
+ * Set the _templatePath_ variable to point to _templates/special.php_.
+5. Save the file back to your server.
+6. Refresh your app to see the changes.
## License
* Copyright: (c) 2009, Yahoo! Inc. All rights reserved.
-* License: code licensed under the BSD License:
-* Package: http://github.com/ydn/rss_yap_app
+* License: code licensed under the BSD License. See [license.markdown](http://github.com/erikeldridge/rssyapgen/blob/master/license.markdown)
+* Package: http://github.com/erikeldridge/rssyapgen
View
BIN readme.pdf
Binary file not shown.

0 comments on commit 6d673a0

Please sign in to comment.
Something went wrong with that request. Please try again.