Add Advanced Aquarist's Articles to Your Site
If you have a website, I am sure there have been times that you have wanted to have a couple of different widgets showing content from outside sources in the sidebar. Twitter, Facebook, etc. are examples of websites that allow you to embed outside content from their sites into yours. Thinking about this a bit, we decided to show you, our readers, how you might accomplish this with our content.
In an effort to make it as painless as possible, I have opted to show you how to implement this using Google's AJAX Search and Feed service. I chose this way as it is simple and it runs on Google's servers meaning that they will take care of serving the appropriate files as well as taking care of caching the article listing.
Before I go into the code, here is what it will look like once implemented on your website:
The widget auto-scales to your width and if you hover over an article, the display will auto-rotate to that particular article.
The code is below. Copy/paste this into your website's HTML where you want the article listing widget to show up:
<!-- ++Begin Dynamic Feed Wizard Generated Code++ --> <!-- // Created with a Google AJAX Search and Feed Wizard // http://code.google.com/apis/ajaxsearch/wizards.html // http://www.google.com/uds/solutions/wizards/dynamicfeed.html -->
<!-- // The Following div element will end up holding the actual feed control. // You can place this anywhere on your page. --> <div id="feed-control"> <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading...</span> </div>
There are some basic items that you can control with this script:
- Widget Title (title)
- Number of articles to list in the widget (numResults)
- Delay between articles (displayTime)
- How quickly the articles fade (fadeOutTime)
- If the rotation will pause if someone places their mouse over the article (pauseOnHover)
If you choose to implement it on your site, please let us know in the comments below!