Skip to content
This repository has been archived by the owner on Apr 18, 2019. It is now read-only.

Commit

Permalink
updated usage instructions and description to match new usage and str…
Browse files Browse the repository at this point in the history
…ucture, removal of index.php and templates/
  • Loading branch information
erik committed Nov 14, 2009
1 parent 8eb332a commit 7d00931
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions readme.markdown
Expand Up @@ -2,12 +2,12 @@


## Preamble ## Preamble


_rss\_yap\_app_ is a simple framework for generating a [Yahoo! Application Platform](http://developer.yahoo.com/yap) application from an RSS feed. This document is intended to describe usage of this project for two common scenarios: _rss\_yap\_app_ is a collection of examples for generating a [Yahoo! Application Platform](http://developer.yahoo.com/yap) application from an RSS feed. This document is intended to describe usage of this project for two common scenarios:


1. "Porting" an app based on a [Yahoo! Front Door XSL-based template](http://public.yahoo.com/~jchu/) to YAP 1. "Porting" an app based on a [Yahoo! Front Door XSL-based template](http://public.yahoo.com/~jchu/) to YAP
2. Creating a new YAP app based on a standard RSS feed 2. Creating a new YAP app based on a standard RSS feed


_rss\_yap\_app_ 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. Detailed installation and usage instructions are given below. _rss\_yap\_app_ 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 template to use is given as the base URL for the app, and the output from the template is returned back to YAP for display. Detailed installation and usage instructions are given below.


## Prerequisites ## Prerequisites


Expand All @@ -24,7 +24,7 @@ _rss\_yap\_app_ operates by consuming a given feed, parsing the feed data using
* Clone this repository: `git clone git://github.com/ydn/rss_yap_app.git` * Clone this repository: `git clone git://github.com/ydn/rss_yap_app.git`
2. Upload the project to your server 2. Upload the project to your server
3. Create a new YAP application using the [YDN dashboard](http://developer.yahoo.com/dashboard) 3. Create a new YAP application using the [YDN dashboard](http://developer.yahoo.com/dashboard)
4. Set the _Application URL_ of the app to point to the location of the _index.php_ file in the project directory on your server, e.g. http://example.com/rss\_yap_app/index.php 4. Set the _Application URL_ of the app to point to the location of the _{template}.php_ file in the project directory on your server, e.g. _http://example.com/rss\_yap\_app/standard.php_
5. Set the _Small View Default Content_ to: 5. Set the _Small View Default Content_ to:


<style> <style>
Expand All @@ -47,29 +47,26 @@ _rss\_yap\_app_ operates by consuming a given feed, parsing the feed data using
<div id="loading">Loading ...</div> <div id="loading">Loading ...</div>
</yml:include> </yml:include>
6. Click the "Preview" button to see your app 6. Click the _Preview_ button to see your app


### Customization ### Customization


#### Using a standard RSS 2.0 feed #### Using a standard RSS 2.0 feed


1. Open _index.php_ in a text editor 1. Open _standard.php_ in a text editor
2. Set the `$feedUrl` variable at the top of the file to point to the feed of your choice, e.g. _http://sports.yahoo.com/sow/rss.xml_. 2. Set the `$feedUrl` variable at the top of the file to point to the feed of your choice, e.g. _http://sports.yahoo.com/sow/rss.xml_.
3. Set the `$templatePath` variable to "templates/standard.php" 3. Save the file and reload the app
4. Save the file and reload the app 4. Note: As is, _standard.php_ only handles RSS 2.0 syntax. Some feeds may require special handling.
5. Note: As is, _standard.php_ only handles RSS 2.0 syntax. Some feeds may require special handling.


#### Defining special handling for a feed #### Defining special handling for a feed


If you are "porting" an existing Yahoo! Front Doors template app, or if your feed uses custom xml namespaces, you may need to create a custom template to render the feed. Here are instructions for doing so: If you are "porting" an existing Yahoo! Front Doors template app, or if your feed uses custom xml namespaces, you may need to create a custom template to render the feed. Here are instructions for doing so:


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. 1. Copy _templates/basic.php_ as another file. For this example we'll call the file _special.php_.
2. Open _special.php_ in a text editor. 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). Edit the preprocessing, styling, and markup to match the structure of your feed. 3. Note: templates use PHP's [_alternate syntax_](http://us2.php.net/manual/en/control-structures.alternative-syntax.php). Edit the preprocessing, styling, and markup to match the structure of your feed.
4. Edit _index.php_: 4. Save the file back to your server.
* Set the _feedUrl_ variable to point to the new feed. 5. Edit your app in the [YDN dashboard](http://developer.yahoo.com/dashboard) and set the base to _{your domain}/{path to rss\_yap\_app}/special.php_
* 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. 6. Refresh your app to see the changes.


## License ## License
Expand Down
Binary file modified readme.pdf
Binary file not shown.

0 comments on commit 7d00931

Please sign in to comment.