<?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>{5} Setfive - Talking to the World</title>
	<atom:link href="http://shout.setfive.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://shout.setfive.com</link>
	<description></description>
	<lastBuildDate>Wed, 02 May 2012 14:52:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Internet Explorer Extension Quickstart and Skeleton</title>
		<link>http://shout.setfive.com/2012/05/01/internet-explorer-extension-quick-start-and-skeleton/</link>
		<comments>http://shout.setfive.com/2012/05/01/internet-explorer-extension-quick-start-and-skeleton/#comments</comments>
		<pubDate>Wed, 02 May 2012 04:27:48 +0000</pubDate>
		<dc:creator>Ashish Datta</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[BHO]]></category>
		<category><![CDATA[Browser Help Object]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Internet Explorer Extension]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1487</guid>
		<description><![CDATA[Recently, one of our clients was looking to build a prototype/proof of concept browser extension for Firefox, Chrome, and Internet Explorer. We were basically looking to inject a script, run it in user space, and modify some of the page&#8217;s DOM &#8211; like a trimmed down Greasemonkey script. Doing this in Chrome and Firefox is [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, one of our clients was looking to build a prototype/proof of concept browser extension for Firefox, Chrome, and Internet Explorer. We were basically looking to inject a script, run it in user space, and modify some of the page&#8217;s DOM &#8211; like a trimmed down <a href="http://www.greasespot.net/" target="_blank">Greasemonkey</a> script. </p>
<p>Doing this in Chrome and Firefox is pretty straightforward since the extensions are built Javascript, this is actually how I built the prototype <a href="https://tru.ly" target="_blank">tru.ly</a> extensions. Unsurprisingly, the &#8220;odd man out&#8221; is Internet Explorer, this is my first time looking into writing an IE extension and the experience was pretty jarring so hopefully this synopsis can save you some time and frustration.</p>
<p>The first sign of trouble was that there doesn&#8217;t seem to be an official Microsoft guide on writing IE extensions. There&#8217;s just a bunch of ad-hoc tutorials, some MSDN articles, and then code samples built against every possible combination of language and library.</p>
<p>As it turns out, Internet Explorer has actually supported extensions since IE5 using a technology called <a href="http://en.wikipedia.org/wiki/Browser_Helper_Object" target="_blank">Browser Help Objects</a> and continues to support them via BHOs through IE9. In contrast to Chrome and Firefox&#8217;s Javascript based extensions, a BHO is a Windows DLL and consequently must be written and compiled using your choice of a Win32 compatible programming language. Given this and from the discussions I saw, the most popular choice seems to be to use C++/ATL to create a COM DLL. Being that I&#8217;m deathly afraid of C++ and that this approach was described as &#8220;COM DLL hell&#8221; I decided to see what else was possible.</p>
<p>After a bit more poking around I found out that it&#8217;s possible to use C# and .NET&#8217;s Interop libraries to scaffold enough to get the DLL loading into IE. <a href="http://www.codeproject.com/Articles/19971/How-to-attach-to-Browser-Helper-Object-BHO-with-C" target="_blank">This Code Project</a> article walks through the process but it has several typos and the download containing the files seems to have gone missing. I fixed the typos and built it successfully &#8211; you can grab the files from <a href="https://github.com/adatta02/ie-extension-skeleten" target="_blank">GitHub here</a>.</p>
<p>From my extremely rough understanding of C#, what the code does is create an interface from C# managed code to the unmanaged COM code that IE uses to communicate with extensions. Then, the code registers an event handler to be called once the DOM has finished rendering.</p>
<p>In order to actually build the project, you&#8217;ll need to do the following:</p>
<ul>
<li>Install a copy of Visual Studio &#8211; I used <a target="_blank" href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express">VS Express 2010</a> which is free.</li>
<li>You&#8217;ll then need to import my VS project and build your DLL. If it complains about references to SHDocVw or IHTMLDocument2 you&#8217;ll just need to make sure that references to the two DLLs in Greyhound/ exist in your VS project.</li>
<li>Once the DLL is built, you&#8217;ll need to register it with RegAsm &#8211; this is a bit tricky since you need to use the correct version of RegAsm available on your system. <a href="http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.setup/2008-04/msg00002.html" target="_blank">This article</a> explains where it should be located. Once you locate it, run the following: </li>
</ul>
<pre name="code" class="php">
C:\[path to your .NET library]\RegAsm.exe /codebase bin\Release\Greyhound.dll
</pre>
<p>Thats it. Now start Internet Explorer and once the DOM on a page finishes loading you should see an alert box being generated via Javascript that your DLL is injecting.</p>
<p>The magic is all happening in the following function:</p>
<pre name="code" class="php">
public void OnDocumentComplete(object pDisp, ref object URL)
{
   IHTMLDocument2 doc = (IHTMLDocument2)webBrowser.Document;
   doc.parentWindow.execScript("var d=window.document,s=d.createElement('script'),h=d.getElementsByTagName('body')[0];s.src='http://twitlabs.net/sayhello.js.php';h.appendChild(s);");
}
</pre>
<p>You&#8217;ll just need to edit that script tag to load your own Javascript. </p>
<p>Anyway, pretty gnarly stuff. It&#8217;s also extremely frightening that IE extensions are basically full fledged programs that have full reign over your entire system. No sandboxed, no permission limitations, just a fully integrated program that people &#8220;casually&#8221; download off the Internet. </p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2012/05/01/internet-explorer-extension-quick-start-and-skeleton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MetaForce: A MetaTrader4 Integration, Opening MT4 to the Web</title>
		<link>http://shout.setfive.com/2012/04/11/metaforce-a-metatrader4-integration-opening-mt4-to-the-web/</link>
		<comments>http://shout.setfive.com/2012/04/11/metaforce-a-metatrader4-integration-opening-mt4-to-the-web/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 14:51:00 +0000</pubDate>
		<dc:creator>Matt Daum</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Launch]]></category>
		<category><![CDATA[integrations]]></category>
		<category><![CDATA[metatrader4]]></category>
		<category><![CDATA[mt4]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1462</guid>
		<description><![CDATA[We know we&#8217;ve been silent here lately, however we are happy to announce our full revamp of one of our products: MetaForce. MetaForce is a product we&#8217;ve had around for a while and have several clients using. What is MetaForce? MetaForce allows MetaTrader4 data to be extracted to numerous CRMs, support systems, and custom client [...]]]></description>
			<content:encoded><![CDATA[<p>We know we&#8217;ve been silent here lately, however we are happy to announce our full revamp of one of our products: <a href="http://getmetaforce.com" target="_blank">MetaForce</a>.  MetaForce is a product we&#8217;ve had around for a while and have several clients using.  </p>
<p>What is MetaForce?  MetaForce allows MetaTrader4 data to be extracted to numerous CRMs, support systems, and custom client areas.  With MetaForce brokers can do things they never have been able, a few highlights are:</p>
<ul>
<li>Process deposits automatically to MT4 via their payment processors</li>
<li>Manage MT4 accounts from their CRM, support system, or client area</li>
<li>Allow clients to reset their MT4 passwords from the web</li>
</ul>
<p>There are two levels of MetaForce.  One which syncs data from the MT4 platform into a CRM, support system, or client area.  The second which does the data sync, but also allows interactions back from the CRM, support system, or client area into the MT4, such as creating accounts, deposits, etc.  </p>
<p>MetaForce is the first product of its kind.  No longer are brokers required to use the MT4 programs to manually process account applications, deposits, and other business processes; brokers can now use their own platforms to do these actions.  With MetaForce brokers can streamline their processes and cut down on training time.</p>
<p>For more information on solutions please visit the <a href="http://getmetaforce.com">product&#8217;s site</a>.  </p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2012/04/11/metaforce-a-metatrader4-integration-opening-mt4-to-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Be Responsive: A History of Responsive Design</title>
		<link>http://shout.setfive.com/2012/03/12/be-responsive-a-history-of-responsive-design/</link>
		<comments>http://shout.setfive.com/2012/03/12/be-responsive-a-history-of-responsive-design/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 22:04:05 +0000</pubDate>
		<dc:creator>Ashish Datta</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[fun stuff]]></category>
		<category><![CDATA[responsive design]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1427</guid>
		<description><![CDATA[During the last two years the number of mobile devices has grown at an exponential pace, with one Cisco estimate (http://bit.ly/zVdFJD) predicting more mobile connected devices than people by the end of 2012. Due to this growth, providing a first class mobile web experience has become increasingly important and is now a paramount concern for [...]]]></description>
			<content:encoded><![CDATA[<p>During the last two years the number of mobile devices has grown at an exponential pace, with one Cisco estimate (<a href="http://bit.ly/zVdFJD" target="_blank">http://bit.ly/zVdFJD</a>) predicting more mobile connected devices than people by the end of 2012. Due to this growth, providing a first class mobile web experience has become increasingly important and is now a paramount concern for websites. Union Square Ventures’ Fred Wilson went as far as to point out that new web apps are commonly designed “mobile first web second” (<a href="http://bit.ly/gQTtBp" target="_blank">http://bit.ly/gQTtBp</a>)</p>
<p>Within the last year a technique known as “responsive design” has become an increasingly popular way to tackle “mobile vs. desktop” web design issues. There have been several reasons for this rise in popularity which we’ll talk about after an abridged history of the mobile web.</p>
<p>How did we get here? Well it all started with WAP&#8230; Back in the dark days of the mobile web, well before the average consumer was accessing the Internet from a cellphone the majority of web content was served via a technology called the Wireless Application Protocol. Even I am to young to really have experienced it in all of its glory but the “Criticisms” page on Wikpedia should convey just how awful it was &#8211; <a href="http://bit.ly/wWxY2c" target="_blank">http://bit.ly/wWxY2c</a> Big takeaways? Imagine writing websites in XML, oh and it has to validate.</p>
<p>Anyway, fast forward a couple of years and vaguely recognizable devices are slowly starting to come online. From the Nokia Symbians, to Palm, and of course the venerable Blackberry mobile devices are beginning to access the nascent mobile web (yay!). The problem? The browsers on these devices were severely limited in terms of CSS and Javascript support, standards compatibility, and available bandwidth. As a result of these limitations, developers chose to basically develop “stripped down” basic HTML versions of sites to present on mobile devices.</p>
<p>One last trip in the DeLorean and we’re zooming from the initial release of the iPhone during the summer of 2007 to today with thousands of smart phone and tablet models and billions of connected devices. During this period, developers tended to build specific “mobile” sites which were usually an entirely separate HTML/CSS/JS(kinda?) code base from their desktop sites. Understandably, this situation was less than ideal since at the minimum it meant maintaining two code bases and the mobile site often lacked the full functionality of the desktop site. Additionally, as both desktop and mobile browser development rapidly progressed consumers began to expect a consistent experience across their devices.</p>
<p>So how do we address these issues and improve mobile user experience? Enter, “responsive design”. The central tenant of responsive design is that you (the designer/developer) should be able to use the same HTML, CSS, and Javascript to serve devices with different screen sizes and resolutions. The idea is that your layout should be able to respond by adapting the it’s presentation layer depending on any number of factors.</p>
<p>The key technology this process relies upon are Media Queries. Fully adopted by CSS3, media queries allow CSS directives to be conditionally applied depending on the result of a boolean query. In practice, this means a single CSS stylesheet can contain one set of directives for a 480px screen as well as different directives for a 1200px screen. Lets look at an example. If you open <a href="http://www.agentvita.com/" target="_blank">http://www.agentvita.com/</a> and then progressively shrink your browser window you’ll see that the elements dynamically adjust depending on the size of the screen.</p>
<p>Well that’s some history and a quick demonstration, now for some nitty implementation gritty details. Unfortunately, there’s no “magic bullet” to automatically take a standard desktop layout and responsively adapt it for different screen sizes. In my opinion the best approach is to start with a solid framework, keep your markup clean, and of course be cognizant that you’re planning to adapt the layout for different screen sizes. Or if you’re feeling brave, start with the mobile layout first and then progressively enhance the layout as your screen size increases.</p>
<p>Here are some specific resources to get started:</p>
<ul>
<li><a href="http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/" target="_blank">http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/</a></li>
<li><a href="http://twitter.github.com/bootstrap/" target="_blank">http://twitter.github.com/bootstrap/</a> &#8211; Bootstrap 2.0 ships with some responsive defaults</li>
<li><a href="http://drupal.org/project/omega" target="_blank">http://drupal.org/project/omega</a> &#8211; THE responsive Drupal theme, makes a great base theme for any project</li>
<li><a href="http://www.quora.com/Responsive-Design" target="_blank">http://www.quora.com/Responsive-Design</a> &#8211; Ask and you shall receive</li>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2012/03/12/be-responsive-a-history-of-responsive-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony2 &#8211; Getting All Errors From a Form in a Controller</title>
		<link>http://shout.setfive.com/2012/02/09/symfony2-getting-all-errors-from-a-form-in-a-controller/</link>
		<comments>http://shout.setfive.com/2012/02/09/symfony2-getting-all-errors-from-a-form-in-a-controller/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 22:09:25 +0000</pubDate>
		<dc:creator>Matt Daum</dc:creator>
				<category><![CDATA[Free Advice]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[symfony2]]></category>
		<category><![CDATA[translators]]></category>
		<category><![CDATA[validators]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1387</guid>
		<description><![CDATA[Recently I was working on an API call which uses a form to validate the data you are passing in. I ran into the issue of getting all the errors for a form in Symfony2 is not as straight forward as you would think. At first I tried `$form->getErrors()` and then looped through the errors. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on an API call which uses a form to validate the data you are passing in.  I ran into the issue of getting all the errors for a form in Symfony2 is not as straight forward as you would think.  At first I tried `$form->getErrors()` and then looped through the errors. That didn&#8217;t get all of them.  After looking around I found:</p>
<pre name="code" class="php">
    public function getAllErrors($children, $template = true) {
    	$this->getAllFormErrors($children);
    	return $this->allErrors;
    }

    private function getAllFormErrors($children, $template = true) {
    	foreach ($children as $child) {
    		if ($child->hasErrors()) {
    			$vars = $child->createView()->getVars();
    			$errors = $child->getErrors();
    			foreach ($errors as $error) {
    				$this->allErrors[$vars["name"]][] = $this->convertFormErrorObjToString($error);
    			}
    		}

    		if ($child->hasChildren()) {
    			$this->getAllErrors($child);
    		}
    	}
    }

    private function convertFormErrorObjToString($error) {
    	$errorMessageTemplate = $error->getMessageTemplate();
    	foreach ($error->getMessageParameters() as $key => $value) {
    		$errorMessageTemplate = str_replace($key, $value, $errorMessageTemplate);
    	}
    	return $errorMessageTemplate;
    }
</pre>
<p>This works really well for any errors which are bound to a field.  However it will not catch global errors such as a unique validator.  It should probably be renamed from getAllErrors(). In order to get those you need to also loop through $form->getErrors().  This was returning the global errors only for me.  Here is my code in the end:</p>
<pre name="code" class="php">
        foreach($form->getErrors() as $e)
            $errors[]=$translator->trans($this->convertFormErrorObjToString($e), array(), 'validators');

        foreach($this->getAllErrors($children) as $key=>$error)
            $errors[]=$key.': '.$translator->trans($error[0], array(), 'validators');
</pre>
<p>There may be a better way, just wanted to shoot this out as not many people had good solutions on it.</p>
<p>Bonus: If you are using the translator service on validators and you get an error which is the &#8216;validators&#8217; translation files, make sure you use the proper domain, ie: $translator->trans(&#8216;key&#8217;,array(),&#8217;validators&#8217;).</p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2012/02/09/symfony2-getting-all-errors-from-a-form-in-a-controller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AJAX Request Slow With PHP?  Here&#8217;s Why</title>
		<link>http://shout.setfive.com/2012/01/18/ajax-request-slow-with-php-heres-why/</link>
		<comments>http://shout.setfive.com/2012/01/18/ajax-request-slow-with-php-heres-why/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 21:09:19 +0000</pubDate>
		<dc:creator>Matt Daum</dc:creator>
				<category><![CDATA[Free Advice]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1372</guid>
		<description><![CDATA[Recently I was working on a project where we had a page which loads tons of data from numerous sources. I decided after a while that we wanted to AJAX each section of data so that the page would load a bit quicker. After splitting up the requests and sending them asyncronously, there was little [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was working on a project where we had a page which loads tons of data from numerous sources.  I decided after a while that we wanted to AJAX each section of data so that the page would load a bit quicker.  After splitting up the requests and sending them asyncronously, there was little improvement.  I thought at first it may be due to the fact we were pinging a single API for most of the data multiple times, that wasn&#8217;t it.  Maybe it was a browser limit? Nope was still far below the 6 requests most allow.  I setup xdebug and kcachegrind and to my surprise it was the session_start() that was taking the most time on the requests.  </p>
<p>I looked around the web for a while trying to figure out what in the world was going on.  It turns out that PHP&#8217;s default session_start will block future session_starts for the same session until the session is closed.  This is because the default method uses a file on the filesystem which it locks until you close it.  If you want more information on this and how to close it you can read a bit more <a href="http://konrness.com/php5/how-to-prevent-blocking-php-requests" target="_blank">here</a>.</p>
<p>We switched over to database based sessions and it fixed it.  In symfony 1.4 the default session storage uses the file system, however switching over to <a href="http://trac.symfony-project.org/browser/branches/1.4/lib/storage/sfPDOSessionStorage.class.php">sfPDOSessionStorage</a> is very easy and quick.  </p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2012/01/18/ajax-request-slow-with-php-heres-why/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Red Wings &amp; Michigan Lottery cross promo launched!</title>
		<link>http://shout.setfive.com/2012/01/06/red-wings-promo-launche/</link>
		<comments>http://shout.setfive.com/2012/01/06/red-wings-promo-launche/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 22:29:13 +0000</pubDate>
		<dc:creator>Ashish Datta</dc:creator>
				<category><![CDATA[Launch]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fun stuff]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1342</guid>
		<description><![CDATA[Hope everyone survived the first week of 2012 unscathed. Just wanted to announce that we helped the Detroit Red Wings and the Michigan State Lottery launch a Facebook promotion. It&#8217;s a pretty neat deal, all you have to do is LIKE the MI Lottery page and submit your information to be entered to win a [...]]]></description>
			<content:encoded><![CDATA[<p>Hope everyone survived the first week of 2012 unscathed. Just wanted to announce that we helped the Detroit Red Wings and the Michigan State Lottery launch a Facebook promotion. It&#8217;s a pretty neat deal, all you have to do is LIKE the MI Lottery page and submit your information to be entered to win a Zamboni ride. And honestly, who doesn&#8217;t love a Zamboni ride.</p>
<p>The promo is live here <a href="https://www.facebook.com/MichiganLottery" target="_blank">https://www.facebook.com/MichiganLottery</a></p>
<p>Unfortunately, its only open to Michigan residents.</p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2012/01/06/red-wings-promo-launche/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boomerang via @fredwilson and @cdixon</title>
		<link>http://shout.setfive.com/2011/12/30/boomerang-via-fredwilson-and-cdixon/</link>
		<comments>http://shout.setfive.com/2011/12/30/boomerang-via-fredwilson-and-cdixon/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 19:16:21 +0000</pubDate>
		<dc:creator>Ashish Datta</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[fun stuff]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1302</guid>
		<description><![CDATA[Hope everyone had a great Christmas and that you&#8217;re gearing up for a great New Years! Anyway, I picked up a Kindle Fire for Christmas and decided to use it as an eReader at least once in its life. I had remembered seeing Boomerang by Michael Lewis recommended by both Fred Wilson and Chris Dixon [...]]]></description>
			<content:encoded><![CDATA[<p>Hope everyone had a great Christmas and that you&#8217;re gearing up for a great New Years! </p>
<p>Anyway, I picked up a Kindle Fire for Christmas and decided to use it as an eReader at least once in its life. I had remembered seeing <a href="www.amazon.com/Boomerang-Travels-New-Third-World/dp/0393081818/" target="_blank">Boomerang by Michael Lewis</a> recommended by both <a href="http://www.avc.com/a_vc/2011/12/fun-friday-what-im-reading-now.html" target="_blank">Fred Wilson</a> and <a href="http://cdixon.org/2011/12/22/michael-lewis-boomerang/" target="_blank">Chris Dixon</a> so I figured it must be worth checking out.</p>
<p>The book is a short, easy read but it offers a fascinating perspective on the global financial crisis through several different viewpoints. As Chris pointed out, theres also a couple of funny anecdotes and bizarre cultural highlights. If you have some time to kill, I&#8217;d definitely recommend picking up Boomerang and giving it a once over.</p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2011/12/30/boomerang-via-fredwilson-and-cdixon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Toggle non-consecutive checkboxes with jQuery UI</title>
		<link>http://shout.setfive.com/2011/12/27/toggle-non-consecutive-checkboxes-with-jquery-ui/</link>
		<comments>http://shout.setfive.com/2011/12/27/toggle-non-consecutive-checkboxes-with-jquery-ui/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 16:19:38 +0000</pubDate>
		<dc:creator>Ashish Datta</dc:creator>
				<category><![CDATA[open source]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1272</guid>
		<description><![CDATA[You&#8217;re all probably familiar with the UI convention of allowing users to select ALL or NONE for a list of checkboxes (like in Gmail). Recently I was working on a project that had a large table full of checkboxes (imagine a 10&#215;10 grid) where the user would need to toggle some but not all of [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re all probably familiar with the UI convention of allowing users to select ALL or NONE for a list of checkboxes (like in Gmail). Recently I was working on a project that had a large table full of checkboxes (imagine a 10&#215;10 grid) where the user would need to toggle some but not all of the checkboxes in a given row. And to make matters more complex, they would need to toggle groups of non-consecutive checkboxes (say 15, skip 10, 5, etc.). I threw on the thinking cap but couldn&#8217;t think of any similar interactions I&#8217;d seen and couldn&#8217;t think of a particularly good way to achieve this.</p>
<p><strong>Enter jQuery UI</strong>. I happened to stumble across the jQuery UI Selectable documentation and realized it would provide a good UI experience to toggle some but not all of the checkboxes. The code to implement this is surprisingly simple:</p>
<p><strong>Note: You don&#8217;t actually need the div container &#8211; that was just for JSFiddle.</strong></p>
<pre name="code" class="php">
&lt;div id=&quot;checkboxes&quot;&gt;

&lt;table id=&quot;checkboxTable&quot;&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
          &lt;td&gt;&lt;input type=&quot;checkbox&quot; /&gt;&lt;/td&gt;
     &lt;/tr&gt;
&lt;/table&gt;
&lt;/div&gt;
</pre>
<p>And then the Javascript (jQuery + jQuery UI):</p>
<pre name="code" class="php">
$("#checkboxes").selectable( {filter: "input:checkbox",
            stop: function(event, ui) {

                $(".ui-selected").each( function(){

                    $(this).each( function(){
                        var val = $(this).attr("checked") ? null : "checked";
                        $(this).attr("checked", val);
                    });

                });
}});
</pre>
<p>You can check out a live demo at <a href="http://jsfiddle.net/whMyQ/3/" target="_blank">http://jsfiddle.net/whMyQ/3/</a></p>
<p>As always, questions and comments are welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2011/12/27/toggle-non-consecutive-checkboxes-with-jquery-ui/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy Holidays!</title>
		<link>http://shout.setfive.com/2011/12/23/happy-holidays-2/</link>
		<comments>http://shout.setfive.com/2011/12/23/happy-holidays-2/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 22:25:24 +0000</pubDate>
		<dc:creator>Matt Daum</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1282</guid>
		<description><![CDATA[We just wanted to wish everyone a great holiday season. We hope everyone brings in the new year with a bang! See you next year, Setfive]]></description>
			<content:encoded><![CDATA[<p>We just wanted to wish everyone a great holiday season.  We hope everyone brings in the new year with a bang!</p>
<p>See you next year,<br />
Setfive</p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2011/12/23/happy-holidays-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook: How-to force users to LIKE page</title>
		<link>http://shout.setfive.com/2011/12/16/facebook-how-to-force-users-to-like-page-to-access-content/</link>
		<comments>http://shout.setfive.com/2011/12/16/facebook-how-to-force-users-to-like-page-to-access-content/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 20:39:41 +0000</pubDate>
		<dc:creator>Ashish Datta</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://shout.setfive.com/?p=1122</guid>
		<description><![CDATA[With Facebook&#8217;s move to deprecate FBML for tabs the documentation around how to make a &#8220;please Like! before&#8230;&#8221; has become much more choppy and inconsistent. Anyway, I recently found myself in a position where I needed to make this happen so here goes. With in-line FBML deprecated, the only way to accomplish this without using [...]]]></description>
			<content:encoded><![CDATA[<p>With Facebook&#8217;s move to deprecate <a href="https://developers.facebook.com/docs/reference/fbml/" target="_blank">FBML</a> for tabs the documentation around how to make a &#8220;please Like! before&#8230;&#8221; has become much more choppy and inconsistent. Anyway, I recently found myself in a position where I needed to make this happen so here goes. </p>
<p>With in-line FBML deprecated, the only way to accomplish this without using a third party branded solution is to create a Facebook iframe app. Here are the steps you need to take to get something up using PHP and the Facebook PHP SDK.</p>
<p><strong>1.</strong> Create a new Facebook Application at https://developers.facebook.com/apps</p>
<p><strong>2.</strong> Configure your new Facebook App the enable &#8220;Website&#8221; and &#8220;Page Tab&#8221;. You&#8217;ll need to enter a valid URL for the following fields:</p>
<ul>
<li>Site URL</li>
<li>Page Tab URL</li>
<li>Secure Page Tab URL</li>
</ul>
<p>You&#8217;ll also want to use a HTTPs URL since Facebook sessions default to HTTPs by default and your iframe will be marked insecure if its over vanilla HTTP. For this walk through, lets assume were using https://www.setfive.com/fb/index.php? as the URL.</p>
<p><strong>3.</strong> Now, you&#8217;ll want to add your new App to a Facebook Page. The easiest way to do this is to use this URL https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&#038;next=YOUR_URL replacing YOUR_APP_ID and YOUR_URL with your App ID and then a URL that is derived from your endpoint (or even just your endpoint). When you load that URL, you&#8217;ll be prompted to add your app to a page &#8211; select the page you want and submit the form.</p>
<p><strong>4.</strong> The final piece is throwing together the actual PHP script. You&#8217;ll need the Facebook PHP SDK available on GitHub &#8211; https://github.com/facebook/php-sdk. Clone that and then this is the PHP script you&#8217;ll need:</p>
<pre name="code" class="php">

&lt;?php
require 'php-sdk/src/facebook.php';

$facebook = new Facebook(array(
  'appId'  =&gt; 'YOUR_APP_ID',
  'secret' =&gt; 'YOUR_APP_SECRET',
));

$req = $facebook-&gt;getSignedRequest();
?&gt;

&lt;!DOCTYPE html&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;xmlns:fb=&quot;http://ogp.me/ns/fb#&quot;&gt;

&lt;head&gt;
    &lt;meta charset=&quot;utf-8&quot; /&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;?php if( $req[&quot;page&quot;][&quot;liked&quot;] ): ?&gt;

	Content for users that have LIKED the page.

&lt;?php else: ?&gt;

	Content for users that HAVE NOT LIKED the page.

&lt;?php endif; ?&gt;

&lt;/body&gt;

&lt;/html&gt;
</pre>
<p>And thats it! Now you&#8217;ll be able to gate content from non-fans while growing the fanbase of your Facebook Page.</p>
<p>Drop any questions in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://shout.setfive.com/2011/12/16/facebook-how-to-force-users-to-like-page-to-access-content/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

