<?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>Wayne State Web Communications Blog &#187; code</title>
	<atom:link href="http://wcs.wayne.edu/blog/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://wcs.wayne.edu/blog</link>
	<description>We build user centered Web sites from the ground up.</description>
	<lastBuildDate>Fri, 20 Nov 2009 17:08:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WCAG 2.0 is official, now what?</title>
		<link>http://wcs.wayne.edu/blog/2008/12/16/wcag-20-is-official-now-what/</link>
		<comments>http://wcs.wayne.edu/blog/2008/12/16/wcag-20-is-official-now-what/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 21:00:08 +0000</pubDate>
		<dc:creator>Nick DeNardis</dc:creator>
				<category><![CDATA[accessibility]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[initiatives]]></category>
		<category><![CDATA[official]]></category>
		<category><![CDATA[standards.]]></category>
		<category><![CDATA[wcag]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/?p=631</guid>
		<description><![CDATA[Ten years after WCAG 1.0 was published WCAG 2.0 is official, so what do we do now? Its time to look inside and start updating.
WCAG 2.0 applies broadly to more advanced technologies; is easier to use and understand; and is more precisely testable with automated testing and human evaluation.
W3C WAI recommends using WCAG 2.0, instead [...]]]></description>
			<content:encoded><![CDATA[<p>Ten years after WCAG 1.0 was published <a href="http://my.opera.com/ODIN/blog/2008/12/11/wcag-2-0-is-now-official-2">WCAG 2.0 is official</a>, so what do we do now? Its time to look inside and start updating.</p>
<p>WCAG 2.0 applies broadly to more advanced technologies; is easier to use and understand; and is more precisely testable with automated testing and human evaluation.</p>
<p><strong>W3C WAI recommends using WCAG 2.0</strong>, instead of WCAG 1.0.</p>
<p class="listafter">Most Web sites that conform to WCAG 1.0 will not require significant   changes in order to conform to WCAG 2.0, and some may not need any changes. To help you move to WCAG 2.0, WAI is developing:</p>
<ul class="listwithp">
<li><a href="http://www.w3.org/WAI/WCAG20/from10/diff.php">How WCAG 2.0 Differs from WCAG 1.0</a></li>
<li> <a href="http://www.w3.org/WAI/WCAG20/from10/comparison/">Comparison of WCAG 1.0 Checkpoints to WCAG 2.0</a></li>
<li><a href="http://www.w3.org/WAI/WCAG20/from10/websites.html">How to Update Your Web Site from WCAG 1.0 to WCAG 2.0</a></li>
</ul>
<p><a href="http://www.w3.org/TR/WCAG20">WCAG 2.0</a><strong> </strong>has 12 guidelines that are organized under <a href="http://www.w3.org/TR/UNDERSTANDING-WCAG20/intro.html#introduction-fourprincs-head">4 principles: perceivable, operable, understandable, and robust</a>. For each guideline, there are testable <em>success criteria</em>, which are at <a href="http://www.w3.org/TR/UNDERSTANDING-WCAG20/conformance.html#uc-levels-head">three levels: A, AA, and AAA</a>.</p>
<p>For a short summary of the WCAG 2.0 guidelines, see <a href="http://www.w3.org/WAI/WCAG20/glance/">WCAG 2.0 at a Glance</a>.</p>
<p>The best place to start working with WCAG 2.0 is the <a href="http://www.w3.org/WAI/WCAG20/quickref/">How to Meet WCAG 2.0 (Quick Reference)</a>.</p>
<p>Remember we are here to help so any questions about your site being accessible let us know and we can give you a complete evaluation.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F12%2F16%2Fwcag-20-is-official-now-what%2F';
  addthis_title  = 'WCAG+2.0+is+official%2C+now+what%3F';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/12/16/wcag-20-is-official-now-what/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Guest Post] Tracking Flash Interaction with Google Analytics</title>
		<link>http://wcs.wayne.edu/blog/2008/11/24/guest-post-tracking-flash-interaction-with-google-analytics/</link>
		<comments>http://wcs.wayne.edu/blog/2008/11/24/guest-post-tracking-flash-interaction-with-google-analytics/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 16:28:12 +0000</pubDate>
		<dc:creator>Nick DeNardis</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/?p=605</guid>
		<description><![CDATA[Over at .eduGuru they are searching for a new blogger. They took applications and had everyone write a guest post, they then let the community decide who the next blogger should be.
I was one of the applicants and wrote my post on Tracking Flash Interaction with Google Analytics. The goal was to not only give [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://doteduguru.com/"><img class="alignright size-full wp-image-609" title="doteduguru-logo" src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/11/doteduguru-logo.png" alt="" width="163" height="78" /></a>Over at <a href="http://doteduguru.com/">.eduGuru</a> they are searching for a new blogger. They took applications and had everyone write a guest post, they then let the community decide who the next blogger should be.</p>
<p>I was one of the applicants and wrote my post on <a href="http://doteduguru.com/id1313-google-analytics-tracking-flash.html">Tracking Flash Interaction with Google Analytics</a>. The goal was to not only give the readers an enjoyable article but also real tools that can be used on their site for free and back that up with an actual example.</p>
<p>So we only have one week to vote, below I have the link to all the guest posts and the link to vote. All the applicants did a great job! I encourage everyone to read all the articles and vote for who you think should be the next .eduGuru blogger.</p>
<p><strong><a href="http://doteduguru.com/idcategory/guest-post">Read All Guest Posts</a></strong></p>
<p><strong><a href="http://doteduguru.com/id1326-blogger-search-vote.html">Vote For Your Favorite</a></strong></p>
<p><strong>Voting closes Midnight Saturday November 29th.</strong></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F11%2F24%2Fguest-post-tracking-flash-interaction-with-google-analytics%2F';
  addthis_title  = '%5BGuest+Post%5D+Tracking+Flash+Interaction+with+Google+Analytics';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/11/24/guest-post-tracking-flash-interaction-with-google-analytics/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>hCalendar microformat support in the events calendar</title>
		<link>http://wcs.wayne.edu/blog/2008/11/10/hcalendar-microformat-support-in-the-events-calendar/</link>
		<comments>http://wcs.wayne.edu/blog/2008/11/10/hcalendar-microformat-support-in-the-events-calendar/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 15:20:39 +0000</pubDate>
		<dc:creator>Nick DeNardis</dc:creator>
				<category><![CDATA[announcement]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[microformats]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/?p=365</guid>
		<description><![CDATA[In our continuous effort to support microformats, we are proud to announce expanded hCalendar support on the Wayne State University Events Calendar.
If you are not familiar with microformats the goal is to use plain HTML and embed through classes and Semantic HTML information about the content. Similar to XML to describe content but in plain [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://microformats.org/"><img class="alignright size-full wp-image-27" title="Microformats" src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/01/microformats.gif" alt="" width="120" height="127" /></a>In our <a href="http://wcs.wayne.edu/blog/2008/01/17/microformats-now-on-all-web-page-footers/">continuous effort to support microformats</a>, we are proud to announce expanded <a href="http://microformats.org/wiki/hcalendar">hCalendar</a> support on the <a href="http://events.wayne.edu">Wayne State University Events Calendar</a>.</p>
<p>If you are not familiar with <a href="http://microformats.org/">microformats</a> the goal is to use plain HTML and embed through classes and Semantic HTML information about the content. Similar to XML to describe content but in plain of HTML so an additional document is not necessary. Recently Yahoo released <a href="http://developer.yahoo.com/searchmonkey/">Search Monkey</a> which takes advantage of microformats to mesh search results with the information on the result pages.</p>
<p>Support for hCalendar is on both the event listing page and the individual event pages. Below are some screen shots of the pages and what can be pulled from them.</p>
<p style="text-align:center"><a href="http://wcs.wayne.edu/blog/wp-content/uploads/2008/10/event-list.jpg"><img class="aligncenter size-medium wp-image-419" title="event-list" src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/10/event-list-300x199.jpg" alt="" width="300" height="199" /></a><a href="http://wcs.wayne.edu/blog/wp-content/uploads/2008/10/event-view.jpg"><img class="aligncenter size-medium wp-image-420" title="event-view" src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/10/event-view-300x199.jpg" alt="" width="300" height="199" /></a></p>
<p>As of right now we don&#8217;t have any plans to implement a Search Monkey app just yet but this is the first step for us or the community to pull from these events. Especially since the <a href="http://events.wayne.edu/registrar/index.php?dv=&amp;wv=&amp;mv=1">Academic Calendar</a> is now in the events calendar.</p>
<p>This is just a small change to the calendar but it shows our contuned support and drive to support web standards and initiatives.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F11%2F10%2Fhcalendar-microformat-support-in-the-events-calendar%2F';
  addthis_title  = 'hCalendar+microformat+support+in+the+events+calendar';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/11/10/hcalendar-microformat-support-in-the-events-calendar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a quick html form connected to a database</title>
		<link>http://wcs.wayne.edu/blog/2008/10/10/create-a-quick-html-form-connected-to-a-database/</link>
		<comments>http://wcs.wayne.edu/blog/2008/10/10/create-a-quick-html-form-connected-to-a-database/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 16:28:09 +0000</pubDate>
		<dc:creator>Nick DeNardis</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpsimpl]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/?p=338</guid>
		<description><![CDATA[Having a small staff and enormous amounts of work everything we can do to speed up tasks we take advantage of. We are asked all the time to create html forms for sites, its the only way to get users information, from RSVP&#8217;s to request information. Recreating forms is time consuming especially since most feed [...]]]></description>
			<content:encoded><![CDATA[<p>Having a small staff and enormous amounts of work everything we can do to speed up tasks we take advantage of. We are asked all the time to create html forms for sites, its the only way to get users information, from RSVP&#8217;s to request information. Recreating forms is time consuming especially since most feed into a database plus usually email someone also.</p>
<p>I created a screencast to show how we in the <a href="http://wcs.wayne.edu/">Web Communications</a> department of <a href="http://wayne.edu/">Wayne State University</a> create forms quickly, consistently and accessible using an open source framework I created and that we maintain. The framework is <a href="http://code.google.com/p/phpsimpl/">PHPSimpl</a> and is hosted on <a href="http://code.google.com/">Google Code</a>, it is not meant to be a full blown MVC framework but more or less a helper for common tasks.</p>
<p style="text-align: center;"><img src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/10/screencast-form.jpg" /></p>
<p>This is the first screencast I have ever created so bear with me as I adjust to talking to a computer instead of a room full of people. Also ignore any technical issues which I am still trying to work through. I created it with just a Mac Book Pro, <a href="http://www.ambrosiasw.com/utilities/snapzprox/">Snapz Pro</a> and the internal mic, so the sound might not be the best.</p>
<p>The video is best viewed at full screen to see the detail in the text. I am playing with the flash video encoder options to find the optimal compression for quality and size. If anyone has any suggestions on the settings or screencast recorder feel free to comment.</p>
<p>In case you are wondering the form is being created on an Apache server running PHP5 and MySQL.</p>
<p>Hope you enjoy it and it helps you out.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F10%2F10%2Fcreate-a-quick-html-form-connected-to-a-database%2F';
  addthis_title  = 'Create+a+quick+html+form+connected+to+a+database';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/10/10/create-a-quick-html-form-connected-to-a-database/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using JavaScript to find links within plain text</title>
		<link>http://wcs.wayne.edu/blog/2008/09/09/using-javascript-to-find-links-within-plain-text/</link>
		<comments>http://wcs.wayne.edu/blog/2008/09/09/using-javascript-to-find-links-within-plain-text/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 17:16:54 +0000</pubDate>
		<dc:creator>Nick West</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[Regex]]></category>
		<category><![CDATA[Regular Expression]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/?p=255</guid>
		<description><![CDATA[Today I was working on adding the Wayne State University Twitter feed to our website. It&#8217;s not a terribly difficult task since Twitter has some auto-generated code (javascript and HTML) for adding your public time line to a website. We, however, wanted more. Twitter&#8217;s auto-generated code offers a pretty basic setup, no frills at all. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was working on adding the Wayne State University <a href="http://twitter.com/waynestate">Twitter feed</a> to our website. It&#8217;s not a terribly difficult task since Twitter has some <a href="http://twitter.com/badges/html">auto-generated code</a> (javascript and HTML) for adding your public time line to a website. We, however, wanted more. Twitter&#8217;s auto-generated code offers a pretty basic setup, no frills at all. Our issue with the Twitter code is that the links within tweets lack markup and are non-functioning within a web browser.</p>
<h2>The Solution</h2>
<p>The solution is pretty simple, but not easily found online so I wrote my own. Twitter provides you with links to two JavaScript files within their auto-generated code. The <a href="http://twitter.com/javascripts/blogger.js">first included javascript file</a> provides you with two functions. One is the callback function that is used to display the <a href="http://www.json.org/">json</a> feed using HTML. The second function is used to convert the time stamp to relative time to keep with Twitter look. Rather than continuing to use the include from twitter.com I localized the two functions so I could edit the callback function and get some markup around those links.</p>
<p>My changes are fairly simplistic and make use of regular expressions to replace obvious plain text links with a marked up version of the links so the end users will be able to click the links.</p>
<p>The code to replace plain text URLs with their marked up version:</p>
<blockquote>
<pre>var tweet = "Some tweek with a link to a site: http://wcs.wayne.edu/";
var pattern = /(HTTP:\/\/|HTTPS:\/\/)([a-zA-Z0-9.\/&amp;?_=!*,\(\)+-]+)/i;
var replace = "&lt;a href=\"$1$2\"&gt;$1$2&lt;/a&gt;";
tweet = tweet.replace(pattern , replace);</pre>
</blockquote>
<p>Now my regular expression skills are far from great, so it&#8217;s likely this can be optimized. It&#8217;s also possible I forgot some URL safe characters within the pattern. This code basically searches the tweet for anything that looks like http://i-am-a.link/cool/link.ext?okay=yes&amp;fine or whatever the link might look like. I think it could be expanded to search for links that do not include the http:// as well, but I didn&#8217;t have a need to do that at this time. <a href="http://wcs.wayne.edu/tools/twitter_code.txt">Here</a> is the full modified twitter JavaScript code incase you want it.</p>
<p>The result is tweets with working links on <a href="http://wayne.edu/current/">http://wayne.edu/current/</a>.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F09%2F09%2Fusing-javascript-to-find-links-within-plain-text%2F';
  addthis_title  = 'Using+JavaScript+to+find+links+within+plain+text';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/09/09/using-javascript-to-find-links-within-plain-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript on window close event</title>
		<link>http://wcs.wayne.edu/blog/2008/05/28/javascript-on-window-close-event/</link>
		<comments>http://wcs.wayne.edu/blog/2008/05/28/javascript-on-window-close-event/#comments</comments>
		<pubDate>Wed, 28 May 2008 21:22:17 +0000</pubDate>
		<dc:creator>Nick West</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[beforeunload]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[onbeforeunload]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/?p=103</guid>
		<description><![CDATA[It&#8217;s been pretty busy around here lately so I haven&#8217;t had much of a chance to write a blog post. Among other things, I&#8217;ve been working with Help Center Live, a  live chat web application. The live chat application will hopefully find its way onto the Registrar&#8217;s site which is getting a new look [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been pretty busy around here lately so I haven&#8217;t had much of a chance to write a blog post. Among other things, I&#8217;ve been working with <a href="http://helpcenterlive.com" target="_blank">Help Center Live</a>, a  live chat web application. The live chat application will hopefully find its way onto the <a href="http://reg.wayne.edu/" target="_blank">Registrar&#8217;s</a> site which is getting a new look and a better feel in the coming months. We needed to modify the application so it would work with our University login both on the user end and the management end. The code was fairly easy to work with and adding the code for the University&#8217;s system to authenticate users was a relatively straightforward change.</p>
<h2>The problem was in the logout</h2>
<p>When logged in we wanted to be sure that the user was actually the same person who originally logged in. This level of authentication guarantees the user already has access to the account with the given accessid. However, since we can&#8217;t guarantee that a user will properly log out and we can&#8217;t make sessions expire too quickly, we had to figure out a way to log the user out even if they just closed the window.</p>
<h2>And so I found the DOM event &#8220;beforeunload&#8221;</h2>
<p>Also known as <a href="http://msdn.microsoft.com/en-us/library/ms536907(VS.85).aspx" target="_blank">onbeforeunload</a> and mistakenly thought to be <a href="http://pro-thoughts.blogspot.com/2006/03/onbeforeunload-event.html" target="_blank">IE only</a>; when attached to the window, the beforeunload event is triggered when the page is unloaded. This, however, includes a link being clicked, a form being submitted, and any other event that will cause the page to go away, including closing the browser window. Without further ado, here&#8217;s some code (using some <a href="http://jquery.com/" target="_blank">jQuery</a> to make things simple):</p>
<p>First, we bind the startup routine to the load event on window:</p>
<blockquote>
<pre>$(window).bind('load', function(e){
  close_window = true;
  logged_out = false;
  $("a").bind('click', function(e){
    if(!$(this).hasClass('clickable'))
      close_window = false;
    });
  $("form").bind('submit', function(e){
    close_window = false;
  });
  if (window.addEventListener) {
    window.addEventListener('beforeunload', message, false);
  } else {
    window.attachEvent('onbeforeunload', message);
  }
});</pre>
</blockquote>
<p>The load routine binds submit and click events to anchor tags and forms so we can ignore those exit cases. Then the beforeunload event is attached to the window in 2 different ways to account for the differences in the big 3 browsers.</p>
<p>Here is the message function triggered by the beforeunload event:</p>
<blockquote>
<pre>function message(ev) {
  if(close_window){
    if (ev.stopPropagation) {
      ev.stopPropagation();
    } else {
      ev.cancelBubble = true;
    }
    if (ev.preventDefault) {
      logout();
    } else {
      logout();
      ev.returnValue = "Leaving?";
    }
  }
}</pre>
</blockquote>
<p>And finally the logout function which makes an ajax call to a php script that cleans up any sessions, database info, and cookies:</p>
<blockquote>
<pre>function logout(){
  if(!logged_out){
    $.ajax({
      type: "GET",
      url: '/chat/inc/logout_connector.php',
      data: "logout=true",
      async: false,
      cache: false,
      success: function(msg){
        console.log("Ajax Repsonse: "+msg);
        logged_out = true;
      }
    });
  }
}</pre>
</blockquote>
<h2>Here&#8217;s a quick summary of what is going on, if you need it</h2>
<p>When the page is loaded, the close_window variable is set to true. The message method requires the close_window flag to be true, otherwise its routine isn&#8217;t run. We&#8217;re binding the submit event and click events to forms and anchors respectively then setting close_window to false when those events are triggered. This way the beforeunload event&#8217;s code will be skipped when the user leaves the page with those events. When the window is closed, the beforeunload code is run and makes an ajax call to a php script that will clean up the session, cookies, database, etc to assure a clean logout.</p>
<p>This code is currently supported by Firefox 2, IE 6, IE 7, and Safari 3. Opera is the only browser I tested that doesn&#8217;t support it.</p>
<p>It&#8217;s possible that a jQuery plugin is in the works to do this more easily in the future. If I get the chance to write it, and get it done and working, I&#8217;ll make another post about it then.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F05%2F28%2Fjavascript-on-window-close-event%2F';
  addthis_title  = 'Javascript+on+window+close+event';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/05/28/javascript-on-window-close-event/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Bulk HTML emails and their impact</title>
		<link>http://wcs.wayne.edu/blog/2008/01/24/bulk-html-emails-and-their-impact/</link>
		<comments>http://wcs.wayne.edu/blog/2008/01/24/bulk-html-emails-and-their-impact/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 21:28:42 +0000</pubDate>
		<dc:creator>Nick DeNardis</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/2008/01/24/bulk-html-emails-and-their-impact/</guid>
		<description><![CDATA[We have been asked more and more to create HTML emails, they look attractive and do allow for more visual exposure for the sender. The problem is security, email clients (most) by default do not display images unless they are attached to the email. This becomes a problem when sending out ~40,000 emails and its [...]]]></description>
			<content:encoded><![CDATA[<p>We have been asked more and more to create HTML emails, they look attractive and do allow for more visual exposure for the sender. The problem is security, email clients (most) by default do not display images unless they are attached to the email. This becomes a problem when sending out ~40,000 emails and its not viable to attach all the images.</p>
<p>Last week we sent out one of these emails, it was purely information regarding litter and cigarette butts on campus. Since there was no immediate action from the user it was difficult for us to track how effective the email was. So instead we measured how many users actually opened the email and viewed the images.</p>
<p>The reason for gathering these stats was mainly to advocate or deter from using HTML emails in the future. Most students on campus read their campus mail using the online interface which has a scary warning about viewing HTML images and we wanted to know how many students would get past the warning. Students also have the option to forward their email to another address, we were also interested to see where most students were forwarding their mail for better HTML email support.</p>
<p>What we did was setup mod_rewrite and a PHP script to upon loading a URL record the filename, timestamp, referrer and user agent. Then return back the image requested.</p>
<p><strong>.htaccess</strong></p>
<blockquote>
<pre>RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+).gif$ /email/index.php?image=$1.gif [L]</pre>
</blockquote>
<p><strong>Example URL of image:</strong></p>
<blockquote>
<pre>http://wayne.edu/email/header.gif</pre>
</blockquote>
<p>We then would pull out the records from the database and created the same log format as a web server, run it through a web log statistics program to get the results. This is what we came up with.</p>
<p><strong>Total Sent:</strong> ~45,000 users<br />
<strong>Total Viewed Images:</strong> ~8,300</p>
<p align="center"><strong>Visitors by Day:</strong><br />
<img src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/01/daily_visitors.png" alt="daily_visitors.png" /></p>
<p align="center"><strong> Hours of the Day:</strong><br />
<img src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/01/activity_by_hour_of_day.png" alt="activity_by_hour_of_day.png" /></p>
<p align="center"><strong>Referring Sites:</strong><br />
<img src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/01/top_referring_sites.png" alt="top_referring_sites.png" /></p>
<p align="left"><strong>Conclusion:</strong><br />
Most people who received the email did not open the image, only 18% viewed the images. Of those 18% only 45% opened the email in the webmail interface or in a desktop email client. The top three most popular forwarding addresses are Gmail, AOL and Comcast. And the most popular reading time is between 9-11 am and 9-10 pm. Although these statistics are only from 18% of the emails recipients, it goes to show nothing beats plain old text when you need to get important information across via email. Images should only be used for fluff and should not contain any necessary information.
</p>
<p style="text-align: center">&nbsp;</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F01%2F24%2Fbulk-html-emails-and-their-impact%2F';
  addthis_title  = 'Bulk+HTML+emails+and+their+impact';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/01/24/bulk-html-emails-and-their-impact/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t fork the web, IE8 meta switch may get ugly</title>
		<link>http://wcs.wayne.edu/blog/2008/01/23/dont-fork-the-web-ie8-meta-switch-may-get-ugly/</link>
		<comments>http://wcs.wayne.edu/blog/2008/01/23/dont-fork-the-web-ie8-meta-switch-may-get-ugly/#comments</comments>
		<pubDate>Wed, 23 Jan 2008 11:49:17 +0000</pubDate>
		<dc:creator>Nick DeNardis</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[thoughts]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[meta]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[standards.]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/2008/01/23/dont-fork-the-web-ie8-meta-switch-may-get-ugly/</guid>
		<description><![CDATA[If you don&#8217;t already have your head around the recent articles regarding IE8 and its three rendering modes you should, it is going to be a fact of life soon.
Basically it comes down to IE rendering pages in three modes, the &#8220;old mode&#8221;, the IE7 half standards mode and IE8 full standards mode. It makes [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/01/ie6vie7.gif" alt="IE6 v IE7" align="right" />If you don&#8217;t already have your head around the <a href="http://alistapart.com/articles/beyonddoctype" target="_blank">recent</a> <a href="http://alistapart.com/articles/fromswitchestotargets" target="_blank">articles</a> regarding IE8 and its three rendering modes you should, it is going to be a fact of life soon.</p>
<p>Basically it comes down to IE rendering pages in three modes, the &#8220;old mode&#8221;, the IE7 half standards mode and IE8 full standards mode. It makes sense to be nice to the web developers who refuse to keep up with their profession, their pages will work forever in future version&#8217;s of IE, and be nice to the leading edge developers who painfully hack their way into IE.</p>
<p>As a web developer myself at first I did not have an opinion on the topic but the more I read the more scared I get. This is going to introduce yet ANOTHER variable into the development world. Making developers working on new projects forced to keep up with these three modes and possibly in three years still be working in the &#8220;old mode&#8221; when they could have been in full standards mode two years ago and help out the end user. Instead it is advocating laziness (ignorance) and old code on the web.</p>
<p>The web is an always transforming place, the landscape has changed from a page-to-page static world to a fully asynchronized ajax environment. These three modes will just slow down the advancements on the web and ultimately make the end user suffer. The graph included is wayne.edu&#8217;s IE usage IE7 has taken over IE6&#8217;s lead and 7&#8217;s growth continues to climb, browsers come and go and developers know this. Soon IE7 will be gone and IE8 will have the largest percent of Microsofts browser share.</p>
<p>Not to mention if no other browsers pick up the idea (I really hope they don&#8217;t), IE will yet again become the corporate browser of its predecessors and the &#8220;lock in&#8221; continues. IE&#8217;s goal should be to unify the web and if some sites get broken in the mean time so be it, if enough people like the features (forced update via windows update) and end up using IE8 the non-compliant companies will get on board the standards wagon and won&#8217;t look back, their business will depend on it.</p>
<p>My stance is firm, the meta rendering mode is a negative not only for the web development community but the web users as a whole. Breaking the already broken end of the web may not be a bad thing in the overall scheme, just imagine in two years or so when they eventually deprecate the &#8220;old mode&#8221; rendering engine, it&#8217;ll be a much tougher fight than if they never implemented it in the first place.</p>
<p><strong>Update: 01/24/2008 6:30 am EST:</strong></p>
<p>After reading an article by John Resig and the <a href="http://ejohn.org/blog/html5-doctype/" target="_blank">HTML 5 DOCTYPE</a> my fears of this meta switch have eased.  It turns out IE will only use the meta tag for doctypes which are already established and widely used. HTML5 and beyond will not need the switch to render in fully standard mode.  And IE8 will support DOCTYPE switching for all new DOCTYPES.</p>
<p>This changes the whole situation, it awards the developers who code to standards with  an actual useful browser and lets the lazy developers keep their routine.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F01%2F23%2Fdont-fork-the-web-ie8-meta-switch-may-get-ugly%2F';
  addthis_title  = 'Don%26%238217%3Bt+fork+the+web%2C+IE8+meta+switch+may+get+ugly';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/01/23/dont-fork-the-web-ie8-meta-switch-may-get-ugly/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Microformats now on all web page footers</title>
		<link>http://wcs.wayne.edu/blog/2008/01/17/microformats-now-on-all-web-page-footers/</link>
		<comments>http://wcs.wayne.edu/blog/2008/01/17/microformats-now-on-all-web-page-footers/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 18:34:41 +0000</pubDate>
		<dc:creator>Nick DeNardis</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[initiatives]]></category>
		<category><![CDATA[footer]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[vcard]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/2008/01/17/microformats-now-on-all-web-page-footers/</guid>
		<description><![CDATA[We have just expanded our vcard microformated university address from the university homepage to all pages in the universities Content Management System. The list can be found here, it doesn&#8217;t include all the pages by far but it is a crucial step to integrate microformats into all pages at the university. Not only the vcard [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/01/microformats.gif" alt="microformats.gif" align="right" />We have just expanded our vcard <a href="http://microformats.org/" target="_blank">microformated</a> university address from the <a href="http://wayne.edu" target="_blank">university homepage</a> to all pages in the universities <a href="http://cms.wayne.edu/" target="_blank">Content Management System</a>. The list can be found <a href="http://wcs.wayne.edu/portfolio/" target="_blank">here</a>, it doesn&#8217;t include all the pages by far but it is a crucial step to integrate microformats into all pages at the university. Not only the vcard for the university address but eventually all events, profiles and news items.</p>
<p>Current code in footers:</p>
<blockquote>
<pre>&lt;address class="vcard" id="wsu_copyright"&gt;
  &lt;a href="http://wayne.edu/" class="url fn org"&gt;Wayne State University&lt;/a&gt;
  &lt;span class="adr"&gt;
    &lt;span class="locality"&gt;Detroit&lt;/span&gt;,
    &lt;span class="region"&gt;MI&lt;/span&gt;
    &lt;span class="postal-code"&gt;48202&lt;/span&gt;
    &lt;span class="country-name"&gt;United States&lt;/span&gt;
  &lt;/span&gt;
  © 2007
&lt;/address&gt;</pre>
</blockquote>
<p>Microformats are important to us as a university for a few reasons. First they are the right thing to do, since IE hates XML its difficult to describe the content on web pages. <a href="http://microformats.org/wiki/posh" target="_blank">POSH</a> helps but it only goes so far, the relationships and descriptions of the items being represented are missing. Microformats jump right in, they offer a way to describe content on a page while still being standard compliant.</p>
<p>Secondly as a higher ed institution we are here to bring knowledge to everyone and publish our research. Microformats help with people and services discovering and sifting through all the information we provide.</p>
<p>Our microformat initiative starts with these vcard footers, the events calendar is next and then profiles. Eventually we hope to use all microformats where necessary.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F01%2F17%2Fmicroformats-now-on-all-web-page-footers%2F';
  addthis_title  = 'Microformats+now+on+all+web+page+footers';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/01/17/microformats-now-on-all-web-page-footers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wayne State goes Twittering</title>
		<link>http://wcs.wayne.edu/blog/2008/01/10/wayne-state-goes-twittering/</link>
		<comments>http://wcs.wayne.edu/blog/2008/01/10/wayne-state-goes-twittering/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 01:09:08 +0000</pubDate>
		<dc:creator>Nick DeNardis</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[initiatives]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[helpful]]></category>
		<category><![CDATA[marketing]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://wcs.wayne.edu/blog/2008/01/10/wayne-state-goes-twittering/</guid>
		<description><![CDATA[Branching out past the confines of our university homepage means working with public API&#8217;s and services. We started yesterday with Twitter, the first of many social and external sites we will be pushing information.
We choose twitter mainly because of its simplicity. The idea of having a full blown facebook application with no street credit seemed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wcs.wayne.edu/blog/2008/01/10/wayne-state-goes-twittering/twitter-logo-2/" rel="attachment wp-att-16" title="Twitter Logo"><img src="http://wcs.wayne.edu/blog/wp-content/uploads/2008/01/twitter.gif" alt="Twitter Logo" align="right" /></a>Branching out past the confines of our university homepage means working with public API&#8217;s and services. We started yesterday with <a href="http://twitter.com/" target="_blank">Twitter</a>, the first of many social and external sites we will be pushing information.</p>
<p>We choose twitter mainly because of its simplicity. The idea of having a full blown facebook application with no street credit seemed unnerving to us. Sticking to short titles and links gives us the ability to talk about anything Wayne State and not be locked into a certain user action or have to maintain a code base that maybe 10 people interact with.</p>
<p>Items will be posting as they come up, we are not setting a schedule or pattern. We don&#8217;t have any followers at the moment but we have not posted its existence other than here. We hope it will become a tool for people interested in the university can use to keep up with while keeping up with their friends. We will also be posting deadlines and important date as they approach and occur.</p>
<p>Follow Us<br />
<a href="http://twitter.com/waynestate" target="_blank">http://twitter.com/waynestate</a></p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwcs.wayne.edu%2Fblog%2F2008%2F01%2F10%2Fwayne-state-goes-twittering%2F';
  addthis_title  = 'Wayne+State+goes+Twittering';
  addthis_pub    = 'nickdenardis';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://wcs.wayne.edu/blog/2008/01/10/wayne-state-goes-twittering/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
