Todays Reason to Drink

From OpenSocial Directory

Jump to: navigation, search
Application Details
Description Need an excuse to celebrate with a drink? Here's today's holiday!
Publisher daysthatendiny.com
Author Michael Guo
Code http://daysthatendiny.com/googleModule.xml
Genre Fun
Screenshot
googleModule.jpg

Image:Example.jpg==Reviews== Add a Review
Template:Todays Reason to Drink Reviews

[edit] Comments

Leave a comment

Your Name:
Heading:
Comment:


[edit] Code

View Code

  <?xml version="1.0" encoding="UTF-8" ?> 
  <Module>
  <ModulePrefs title="Today's Reason to Drink" title_url="http://daysthatendiny.com" description="Need an excuse to celebrate with a drink? Here's today's holiday!" author="Michael Guo" author_email="webmaster@daysthatendiny.com" author_location="Boston, MA" screenshot="http://daysthatendiny.com/images/googleModule.jpg" height="180">
  <Require feature="analytics" /> 
  </ModulePrefs>
  <Content type="html">
  <![CDATA[ 
		<!-- load the NXSL library -->
		<script src="http://www.google.com/js/nxsl.1.js" type="text/javascript"></script>
		<style type="text/css">
		body {
			margin: 0px;
			font-size: 10pt;
		}
		
		#content___MODULE_ID__ {
			background: #FFFFFF url(http://daysthatendiny.com/images/backgroundGoogleModule.jpg) no-repeat fixed left top;
			padding-left: 51px;
			height: 180px;
		}
		
		#content___MODULE_ID__ div div {
			margin-top: 10px;
		}
		
		#content___MODULE_ID__ div#footer {
			position: absolute;
			bottom: 3px;
			font-size: x-small;
		}
		
		#content___MODULE_ID__ div#footer a {
			text-decoration: none;
		}
		</style>
		<div id="content___MODULE_ID__"></div>
		<script>
			var prefs = new _IG_Prefs(__MODULE_ID__);
			var today = new Date();
			var month = today.getMonth() + 1;
			var url = 'http://daysthatendiny.com/getReasons.php?date='
				+ today.getFullYear() + '-' + month + '-' + today.getDate();
			_IG_FetchContent(url, function (response) {
				var nxsl = '';
				nxslProcess(xmlParse(response), xmlParse(nxsl));
				var nxsl = xmlParse(''
					+ '<div select="/reasons/reason[1]">'
					+ ' <b select="date" content="."></b>'
					+ ' <div select="description" content="."></div>'
					+ '</div>');
				nxslProcess(xmlParse(response), nxsl);
				var content = xmlText(nxsl);
				content = content + '<div id="footer"><a href="http://daysthatendiny.com">Days That End in Y</a></div>';
				_gel('content___MODULE_ID__').innerHTML = content;
			});
			_IG_Analytics("UA-252998-1", "/googlemodule");
		</script>
	

  ]]> 
  </Content>
  </Module>

Page Rating

Rating: 2.5/5 (4 votes cast)

Personal tools
communication