Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 77 lines (56 sloc) 4.143 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)
66e2a76 added dependency note for curl
erik authored
16 * [cURL](http://us.php.net/manual/en/ref.curl.php)
17eea86 updated documentation as per joe catera's feedback
erik authored
17 * The [short form](http://www.php.net/manual/en/ini.core.php) of PHP's open tags
18 * 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
19
17eea86 updated documentation as per joe catera's feedback
erik authored
20 ## Steps for creating an RSS-based application for YAP
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
21
17eea86 updated documentation as per joe catera's feedback
erik authored
22 1. Obtain a local copy of this project:
23 * Click the _download_ button on the [Github project page](http://github.com/ydn/rss_yap_app), pick a compression, and save the file.
24 OR
25 * Clone this repository: `git clone git://github.com/ydn/rss_yap_app.git`
26 2. Upload the project to your server
27 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
28 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
29 5. Set the _Small View Default Content_ to:
46fb8a6 added yml default small view code
erik authored
30
fd70949 added styling to default small view code
erik authored
31 <style>
9d4999a now replacing loading element so we don't double-up on padding
erik authored
32 #loading {
fd70949 added styling to default small view code
erik authored
33 font-size: 12px;
34 font-family: Verdana, Arial, Helvetica, sans-serif;
35 margin: 10px;
17eea86 updated documentation as per joe catera's feedback
erik authored
36
4887e99 now using css-style comments in small view code
erik authored
37 /* the standard yap loading animation */
babc6f6 removed excaping because markdwon isn't rendered inside code block
erik authored
38 background-image: url(http://l.yimg.com/a/i/ww/met/anim_loading_sm_082208.gif);
17eea86 updated documentation as per joe catera's feedback
erik authored
39
9dce18c added loading anim gif
erik authored
40 background-repeat: no-repeat;
41 padding-left: 30px;
42 height: 16px;
fd70949 added styling to default small view code
erik authored
43 }
44 </style>
17eea86 updated documentation as per joe catera's feedback
erik authored
45
46 <!-- replace the element 'loading' w/ the content returned from the yml:include call -->
47 <yml:include replace="loading">
9d4999a now replacing loading element so we don't double-up on padding
erik authored
48 <div id="loading">Loading ...</div>
49 </yml:include>
46fb8a6 added yml default small view code
erik authored
50
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
51 6. Click the _Preview_ button to see your app
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
52
6a91b6b edited usage instructions to match trial run
erik authored
53 ### Customization
7eea252 added base driver and documentation for simple rss2yap framework
erik authored
54
d3630a9 updated proiject urls to point back to ydn's acct
erik authored
55 #### Using a standard RSS 2.0 feed
6a91b6b edited usage instructions to match trial run
erik authored
56
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
57 1. Open _standard.php_ in a text editor
17eea86 updated documentation as per joe catera's feedback
erik authored
58 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
59 3. Save the file and reload the app
60 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
61
62 #### Defining special handling for a feed
63
d3630a9 updated proiject urls to point back to ydn's acct
erik authored
64 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
65
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
66 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
67 2. Open _special.php_ in a text editor.
7d00931 updated usage instructions and description to match new usage and struct...
erik authored
68 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.
69 4. Save the file back to your server.
70 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
71 6. Refresh your app to see the changes.
c2aacd6 added mention of license
erik authored
72
73 ## License
74
b353d68 minor text edit
erik authored
75 * Copyright: (c) 2009, Yahoo! Inc. All rights reserved.
d3630a9 updated proiject urls to point back to ydn's acct
erik authored
76 * 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
77 * Package: [http://github.com/ydn/rss\_yap_app](http://github.com/ydn/rss_yap_app)
Something went wrong with that request. Please try again.