I am releasing a plugin (Download here) that displays YouTube videos, Google maps, Flickr pictures and Amazon.Com books.
Here’s how the output looks: http://pipes.1913intel.com/2009/12/02/my-playlist/
In order to use the plugin please do the following:
1. Edit s-xml-media.php. In the input area there is the option to set Google and Yahoo! keys in order for the Google Maps feature to work.
The default setting will ignore Google Maps until you set the keys. Keys are needed for the Amazon.com output too.
2. Get the Google Maps key here: http://code.google.com/apis/maps/signup.html
3. Get the Yahoo! key here: https://developer.apps.yahoo.com/wsregapp/
4. Get the Amazon.Com keys here: http://aws.amazon.com/
You will need an access key and secret key. You will also need your associate ID.
4. Usage: <!–playlist_key:PlaylistID–>
<!–main_key:keyword1,keyword2,keyword3–>
<!–map_key:city,state–>
<!–map_key:city,country–>
<!–flickr_key:keyword1,keyword2–>
<!–amazon_key:ASIN1,ASIN2–>
<!–playlist_key:427AF2E57F512594–> (YouTube Videos – One playlist)
<!–main_key:Russia,Military–> (YouTube Videos – Unlimited keywords)
<!–map_key:Moscow,Russia–> (Google Map – City, Country)
<!–map_key:Seattle,Washington–> (Google Map – City, State)
<!–flickr_key:Asian,Girl–> (Flickr Pictures – Unlimited keywords)
<!–amazon_key:1594032017,1441199683–> (Amazon Books – Up to two ASINs may be used)
Please note that there are two “-” before and two “-” after <! – - – ->. You must use two “-” because my program is looking for two “-”.
Just enter any of the above key settings in any post. The output is appended to the end of the post. Multiple keys are allowed. For example, you could
enter all of the above settings in one post.
Notice that a key setting is just an HTML comment.
5. Upload s-xml-media.php to the plugin area of your website. A subfolder is not needed. Activate normally.
6. What is a playlist?
YouTube allows you to group videos into playlists. For example, I have playlists on the Middle East, China, Russia, Iran and other areas.
7. How do you create a playlist?
Go to a video that you would like to add to a playlist. Select +Playlist. Then select Add to Playlist. Select the dropdown arrow.
The last option on the list is [New Playlist]. Select the [New Playlist] option. Now create your new playlist. You can add more
videos to this playlist.
8. How do you find the playlist code for use with this plugin?
Go to your account. In the upper right hand corner of the screen is your account name followed by a dropdown arrow. Select the dropdown arrow, then
select playlists. Next select the playlist that you want. Look at the link at the top of the screen. Here is my link for my Middle East playlist:
http://www.youtube.com/my_playlists?pi=0&ps=20&sa=0&dm=0&p=061E3F343885AAF9
This is the playlist code for my Middle East playlist: 061E3F343885AAF9
Enter this code: <!–playlist_key:061E3F343885AAF9–>
9. Here is an overview of how things work:
a. s_xml_main => The main function that runs everything. s_xml_main loops through all of the keys.
b. s_xml_playlist => Handles the playlist output. Returns all output. You must echo output before it shows up on the screen.
c. s_xml => Handles the YouTube keyword output. Returns all output. You must echo output before it shows up on the screen.
d. g_xml => Handles the Google Maps output. Returns all output. You must echo output before it shows up on the screen.
e. f_xml => Handles the Flickr output. Returns all output. You must echo output before it shows up on the screen.
f. a_xml => Handles the Amazon.Com output. Returns all output. You must echo output before it shows up on the screen.
I have tested this on WordPress 2.7.1. It’s pretty simple, so I don’t expect any problems with other versions.