<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>techno.blog(&#34;Dion&#34;) &#187; googleajaxapis</title>
	<atom:link href="http://almaer.com/blog/tag/googleajaxapis/feed" rel="self" type="application/rss+xml" />
	<link>http://almaer.com/blog</link>
	<description>blogging about life, the universe, and everything tech</description>
	<lastBuildDate>Tue, 28 Aug 2012 14:41:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ajax Feed Partner Bar</title>
		<link>http://almaer.com/blog/ajax-feed-partner-bar</link>
		<comments>http://almaer.com/blog/ajax-feed-partner-bar#comments</comments>
		<pubDate>Tue, 18 Dec 2007 19:54:28 +0000</pubDate>
		<dc:creator>dion</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[googleajaxapis]]></category>
		<category><![CDATA[partnerbar]]></category>

		<guid isPermaLink="false">http://almaer.com/blog/ajax-feed-partner-bar</guid>
		<description><![CDATA[The Google Ajax API team has given us some new magic to sprinkle on our sites. This time we have a PartnerBar, which is &#8220;a control designed to enable contextual cross linking and promotion of sites within or across network. You configure the control with an array of Partner objects which include a feed url, [...]]]></description>
			<content:encoded><![CDATA[<p>The Google Ajax API team has <a href="http://googleajaxsearchapi.blogspot.com/2007/12/partnerbar-contextual-cross-linking.html">given us some new magic to sprinkle on our sites</a>. This time we have a <a href="http://www.google.com/uds/solutions/partnerbar/index.html">PartnerBar</a>, which is &#8220;a control designed to enable contextual cross linking and promotion of sites within or across network. You configure the control with an array of Partner objects which include a feed url, partner name, etc. and the PartnerBar takes care of the rest.&#8221;</p>
<p>Here is an example:</p>
<p><iframe src="http://almaer.com/partnerbar/" frameborder="0" width="100%"></iframe></p>
<p>It is very simple indeed to setup. The bulk of my bar is in the JavaScript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">google.<span style="color: #660066;">setOnLoadCallback</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> partners <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>
        <span style="color: #009900;">&#123;</span>
          feed<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://ajaxian.com/index.xml&quot;</span><span style="color: #339933;">,</span>
          moreTitle<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;More Ajaxian news&quot;</span><span style="color: #339933;">,</span>
          link<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://ajaxian.com/&quot;</span><span style="color: #339933;">,</span>
          logo<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;logo-aj.png&quot;</span><span style="color: #339933;">,</span>
          classSuffix<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;extra&quot;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#123;</span>
          feed<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://devphone.com/index.xml&quot;</span><span style="color: #339933;">,</span>
          moreTitle<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;More devphone news&quot;</span><span style="color: #339933;">,</span>
          link<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://devphone.com/&quot;</span><span style="color: #339933;">,</span>
          logo<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;logo-dp.png&quot;</span><span style="color: #339933;">,</span>
          classSuffix<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;extra&quot;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
        <span style="color: #009900;">&#123;</span>
          feed<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://google-code-updates.blogspot.com/atom.xml&quot;</span><span style="color: #339933;">,</span>
          moreTitle<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;More Google Code&quot;</span><span style="color: #339933;">,</span>
          link<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://code.google.com/&quot;</span><span style="color: #339933;">,</span>
          logo<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;logo-gc.png&quot;</span><span style="color: #339933;">,</span>
          classSuffix<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;extra&quot;</span>
        <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #003366; font-weight: bold;">var</span> options <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
        linkTarget<span style="color: #339933;">:</span> google.<span style="color: #660066;">feeds</span>.<span style="color: #660066;">LINK_TARGET_BLANK</span><span style="color: #339933;">,</span>
        numEntries<span style="color: #339933;">:</span> <span style="color: #CC0000;">3</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      <span style="color: #003366; font-weight: bold;">new</span> PartnerBar<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;partnerbar&quot;</span><span style="color: #339933;">,</span> partners<span style="color: #339933;">,</span> options<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>There are many options for you to tweak your bar. You can use CSS to entirely change the look, and you can even do really smart things, such as grab the image for the particular section dynamically. You do this by configuring a resolver callback, such as this one that grabs the image from the RSS feed itself:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// tie the option to the resolver: { logoResolver : logoResolverCallback, ... }</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> logoResolverCallback<span style="color: #009900;">&#40;</span>partner<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> n <span style="color: #339933;">=</span> partner.<span style="color: #660066;">result</span>.<span style="color: #660066;">xmlDocument</span>.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;rss&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    n <span style="color: #339933;">=</span> n.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;channel&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>n<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      n <span style="color: #339933;">=</span> n.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;image&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
      url <span style="color: #339933;">=</span> n.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">firstChild</span>.<span style="color: #660066;">nodeValue</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">return</span> url<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>You can also see this running on <a href="http://www.ew.com/ew">Entertainment Weekly</a>&#8217;s online presence. It is nice to see that this came out of Mark and his team working with EW.</p>
]]></content:encoded>
			<wfw:commentRss>http://almaer.com/blog/ajax-feed-partner-bar/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
