Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 76 lines (55 sloc) 4.094 kb
17eea86 updated documentation as per joe catera's feedback
erik authored
1 # RSS-based applications for the Yahoo! Application Platform (YAP)
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
2
6d673a0 updated readme to reflect new template structure
erik authored
3 ## Preamble
4
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
5 _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:
6d673a0 updated readme to reflect new template structure
erik authored
6
17eea86 updated documentation as per joe catera's feedback
erik authored
7 1. "Porting" an app based on a [Yahoo! Front Door XSL-based template](http://public.yahoo.com/~jchu/) to YAP
6d673a0 updated readme to reflect new template structure
erik authored
8 2. Creating a new YAP app based on a standard RSS feed
9
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
10 _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.
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
11
17eea86 updated documentation as per joe catera's feedback
erik authored
12 ## Prerequisites
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
13
17eea86 updated documentation as per joe catera's feedback
erik authored
14 * PHP 5.2 with the following enabled:
15 * [SimpleXML](http://us2.php.net/simplexml)
16 * The [short form](http://www.php.net/manual/en/ini.core.php) of PHP's open tags
17 * A server that can serve content to YAP, i.e., a server accessible via a valid url and capable of receiving POST requests.
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
18
17eea86 updated documentation as per joe catera's feedback
erik authored
19 ## Steps for creating an RSS-based application for YAP
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
20
17eea86 updated documentation as per joe catera's feedback
erik authored
21 1. Obtain a local copy of this project:
22 * Click the _download_ button on the [Github project page](http://github.com/ydn/rss_yap_app), pick a compression, and save the file.
23 OR
24 * Clone this repository: `git clone git://github.com/ydn/rss_yap_app.git`
25 2. Upload the project to your server
26 3. Create a new YAP application using the [YDN dashboard](http://developer.yahoo.com/dashboard)
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
27 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_
17eea86 updated documentation as per joe catera's feedback
erik authored
28 5. Set the _Small View Default Content_ to:
46fb8a6 added yml default small view code
erik authored
29
fd70949 added styling to default small view code
erik authored
30 <style>
9d4999a now replacing loading element so we don't double-up on padding
erik authored
31 #loading {
fd70949 added styling to default small view code
erik authored
32 font-size: 12px;
33 font-family: Verdana, Arial, Helvetica, sans-serif;
34 margin: 10px;
17eea86 updated documentation as per joe catera's feedback
erik authored
35
36 <!-- the standard yap loading animation -->
37 background-image: url(http://l.yimg.com/a/i/ww/met/anim\_loading\_sm_082208.gif);
38
9dce18c added loading anim gif
erik authored
39 background-repeat: no-repeat;
40 padding-left: 30px;
41 height: 16px;
fd70949 added styling to default small view code
erik authored
42 }
43 </style>
17eea86 updated documentation as per joe catera's feedback
erik authored
44
45 <!-- replace the element 'loading' w/ the content returned from the yml:include call -->
46 <yml:include replace="loading">
9d4999a now replacing loading element so we don't double-up on padding
erik authored
47 <div id="loading">Loading ...</div>
48 </yml:include>
46fb8a6 added yml default small view code
erik authored
49
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
50 6. Click the _Preview_ button to see your app
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
51
6a91b6b edited usage instructions to match trial run
erik authored
52 ### Customization
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
53
d3630a9 updated proiject urls to point back to ydn's acct
erik authored
54 #### Using a standard RSS 2.0 feed
6a91b6b edited usage instructions to match trial run
erik authored
55
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
56 1. Open _standard.php_ in a text editor
17eea86 updated documentation as per joe catera's feedback
erik authored
57 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_.
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
58 3. Save the file and reload the app
59 4. Note: As is, _standard.php_ only handles RSS 2.0 syntax. Some feeds may require special handling.
6d673a0 updated readme to reflect new template structure
erik authored
60
61 #### Defining special handling for a feed
62
d3630a9 updated proiject urls to point back to ydn's acct
erik authored
63 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:
6d673a0 updated readme to reflect new template structure
erik authored
64
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
65 1. Copy _templates/basic.php_ as another file. For this example we'll call the file _special.php_.
6d673a0 updated readme to reflect new template structure
erik authored
66 2. Open _special.php_ in a text editor.
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
67 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.
68 4. Save the file back to your server.
69 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_
6d673a0 updated readme to reflect new template structure
erik authored
70 6. Refresh your app to see the changes.
c2aacd6 added mention of license
erik authored
71
72 ## License
73
b353d68 minor text edit
erik authored
74 * Copyright: (c) 2009, Yahoo! Inc. All rights reserved.
d3630a9 updated proiject urls to point back to ydn's acct
erik authored
75 * License: code licensed under the BSD License. See [license.markdown](http://github.com/ydn/rss_yap_app/blob/master/license.markdown)
17eea86 updated documentation as per joe catera's feedback
erik authored
76 * Package: [http://github.com/ydn/rss\_yap_app](http://github.com/ydn/rss_yap_app)
Something went wrong with that request. Please try again.