Template:Surf the web with Ning users Code

From OpenSocial Directory

Jump to: navigation, search
  <?xml version="1.0" encoding="UTF-8" ?> 
  <Module>
  <ModulePrefs title="Surf the web with Ning users" title_url="http://me.dium.com/" author="Me.dium" author_email="support@me.dium.com" author_affiliation="Me.dium, Inc." author_location="Boulder, CO" category="communication" category2="tools" description="See where other Ning users are online, with this kick-ass gadget from Me.dium." screenshot="http://me.dium.com/images/widget/screenshots/ning.png" thumbnail="http://me.dium.com/images/widget/thumbnails/ning.png" height="300" width="400" scaling="false" scrolling="false">
  <Require feature="opensocial-0.5" /> 
  </ModulePrefs>
  <Content type="html">
  <![CDATA[ 
			<script type="text/javascript">
			    _IG_RegisterOnloadHandler(request);

			    function request() {
			      var req = opensocial.newDataRequest();
			      req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
			      req.add(req.newFetchPersonRequest("OWNER"), "owner");
			      req.send(response);
			    }

			    function response(data) {
			      var owner = data.get("owner").getData().getDisplayName();
			      var viewer = data.get("viewer").getData().getDisplayName();
			      if (viewer == "Anonymous") viewer = "you";
			      document.getElementById('ownerName').innerHTML = owner;
			      document.getElementById('viewerName').innerHTML = viewer;
			    }
			</script>
		
			<div style="height: 200px; width: 440px; overflow:hidden;background: url(http://me.dium.com/images/widget/background/ning.png) no-repeat;">
				<table style="color: #fff; font-size: 12px; font-weight: bold; font-family: arial; width:185px; height: 130px; position:absolute; top: 28px; left:227px;"><tr><td valign="middle">
					Hey <span id="viewerName">you</span>,
					appear on this gadget with <span id="ownerName">this user</span> and other Ning users.
					<a style="color:#FF6804; margin-top:10px; display:block;" href="http://me.dium.com/" target="_blank">Join Me.<span style="color:#fff">dium</span></a>
				</td></tr></table>
				<iframe frameborder="0" style="border:none; width=200px; height:200px;" scrolling="no" ALLOWTRANSPARENCY="true"    
				 src="http://widget.getmedium.com/widget/map.html?update=http://widget.getmedium.com/updates/paulg_2881.xml&h=200&w=200&co_brand_height=0&theme=myworld&skin=http://me.dium.com/images/widget/background/transparent.png&proxy=http://me.dium.com/proxy?url="></iframe>
			</div>
		

  ]]> 
  </Content>
  </Module>
Personal tools
communication