JavaScript RSS Translator
Modified to be Inserted Embedded Into a Site:
Portability/Customization Features Added:
By Danny Garfield

Core Code Written On: 07/06/03 (dd/mm/yy)
(c) 2003 Premshree Pillai


Download The Script Here

     This page is the main page for Danny Garfield's modification of Premshree Pillai's Javascript RSS Reader.

     Most blogger users, it seems, don't really know how to UTILIZE the RSS feeds Blogger gives them. Blogger, being the incredible user-friendly system it is, doesn't really require any coding knowledge.
     And this is great! Why should it? Blogger is the program that does everything for you.
     In the same spirit, this code simplifies that "RSS Feed thing" so many people don't quite know how to use.

     This script allows any user to harvest the info from their RSS feed. It takes their feed, converts it to HTML (using javascript), and puts it into the user's page wherever they want.
     Using this script, you can have your blog appear, in addition to on the blog itself, ANYWHERE you want, on ANY other page, anywhere.
     Combine your webpages; show other friends' blogs all on the same page; put your blog onto someone else's page, or onto your Diaryland, Livejournal, or home page.
     This is the type of effect news sites use to integrate headlines!

     Best yet, this script is totally customizable. In look and fonts. It both requires no coding knowledge, but allows an expert to customize as much as they want. It fits anywhere.
     Just one javascript include, in the head, and one function call in the body, where you want it to appear. That's it.
And your latest blog posts can appear absolutely anywhere.


Examples Of The Script:
The Blog || The Embedded Version (it's in the right column - real example)
The Blog || The Embedded Version (the left side, under the profile window)

Download The Script Here
Please, respect my bandwidth, if possible. Please upload it to your own server.





Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.
Feel free to share and remix, for noncommercial use, but please keep credits intact.
Script Now Supports:
-Embedding in an HTML File
-Variable Number Of Entries Outputted
-Outputting And Formatting Options
-Externally Customizable Font/Look


To Use This Script:
  • Paste into the <head></head> section of the HTML page:
              <script src="translator.js"></script>
    Change the address of the include to wherever you store it on YOUR server, of course. :)

  • Then, wherever you want the translated RSS feed to appear, paste:
              <script>
              try {readRSS(unescape("blog.rss"),5);}
              catch(e) {}
              </script>


  • Replace the red URL with that of the RSS feed you want.
    Replace the red number with the max number of entries you want displayed. (Posts, on a blog).
    If the number is zero, it means to display ALL availble posts.
    If the number is more than the available posts, all available posts will show.

  • Optional Features:
    By sending a couple extra arguments to the function, you can change the output.
         "NOHR" - Makes the output print without the horizontal rules
         "NODOUBLESPACE" - Takes out one hard return between entries.
         "NOAUTHOR" - Makes the output print without the "by: Name" field.
              Good for blogs with only one author.

         "DATEFIRST" - Makes the date print before the post, as opposed to after.
         "NODATE" - Makes the output print without the Date field.
         "SHOWTIME12" - Shows the time of the post after the date, in 12Hour.
              The date must not be turned off.

         "SHOWTIME24" - Shows the time of the post after the date, in 24Hour.
              The date must not be turned off.
              Only one time format can be used.

         "SHOWBODY" - Shows the full body of the post, above the author.
              Or the short description, if that's the option chosen in Blogger.

         "ALTDATEAUTH" - An alternate style of author and date output, supercedes DATEFIRST and other date options. Date and author on the same line, after the post.
         "NOTITLE" - Does not show the title.

    The order of the options does not matter. Examples of how to use these options are at the bottom of the page.

  • Slightly More Advanced (Optional)
    You can customize the colors/styles of the text outputted by this using a standard style sheet from the outside.
    The classes of the words are:
         .rsslink - the links printed (the titles)
         .rssdate - the date/time printed
         .rssauthor - the name of the poster.

    Normal style declarations (color, size, text decoration, italics, bold, etc) can be declared in the style sheet as usual.

Examples Of The Code In use:
These snippets of code would be placed wherever you want the actual feed to appear. The include in the hed must already be there.
Also, I am only showing the one relevant line, here. It must be surrounded by the other lines, shown above, in the "How To Use" section.

try {readRSS(unescape("blog.rss"),0);} - Would display all feeds available from the given blog.
try {readRSS(unescape("blog.rss"),5);} - Would display just the most recent 5 posts from the given blog.
try {readRSS(unescape("blog.rss"),5, "NOHR");} - Displays the five most recent posts, without the horizontal rules.
try {readRSS(unescape("blog.rss"),0, "NOAUTHOR", "NOHR");} - Displays all available posts, without displaying the authors or horizontal rules.

Last Altered/Upgraded: 4/10/04 --- Upgrade/Version History
Revised For This Purpose By: Danny Garfield 2004
   

Original Code Core Written By: Premshree Pillai 2003
http://www.qiksearch.com ||| http://premshree.resource-locator.com