<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" xml:base="http://www.midwesternmac.com/" content="http://purl.org/rss/1.0/modules/content/" dc="http://purl.org/dc/terms/" foaf="http://xmlns.com/foaf/0.1/" og="http://ogp.me/ns#" rdfs="http://www.w3.org/2000/01/rdf-schema#" sioc="http://rdfs.org/sioc/ns#" sioct="http://rdfs.org/sioc/types#" skos="http://www.w3.org/2004/02/skos/core#" xsd="http://www.w3.org/2001/XMLSchema#">
  <channel>
    <title>Midwestern Mac, LLC</title>
    <link>http://www.midwesternmac.com/</link>
    <description />
    <language>en</language>
          <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/midwesternmac" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="midwesternmac" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
    <title>Filter/Search on multiple fields with Views 3.x</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/filtersearch-multiple-fields</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;A common need I run into with a ton of Drupal sites and Views is searching/filtering content based on multiple fields. For example, a lot of people would like to search for content using either the Title or the Body for a particular content type.&lt;/p&gt;
&lt;p&gt;There are two primary solutions offered for this situation, but they both have downsides or are overly complex, in my opinion:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Use the &lt;a href="http://drupal.org/project/computed_field"&gt;Computed Field&lt;/a&gt; module to create yet another field stored in the database, combining the two (or more) fields you want to search, then expose a filter for that field instead of both of the individual fields. (I don't like this because it duplicates content/storage, and involves an extra module to do so).&lt;/li&gt;
&lt;li&gt;Use the &lt;a href="http://drupal.org/project/views_filters_populate"&gt;Views Filters Populate&lt;/a&gt; to invisibly populate a second field that you've added to a views OR group (using Views OR in Views 2.x, or the built-in AND/OR functionality in Views 3.x). (This module is slightly limited in that you can only work with strings, and again, it involves an extra module).&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Instead of using an extra module, I simply do the following to achieve a multi-field search:&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/XBhQF9Cra_bnLflF_oMrBZNsWBo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XBhQF9Cra_bnLflF_oMrBZNsWBo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/XBhQF9Cra_bnLflF_oMrBZNsWBo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/XBhQF9Cra_bnLflF_oMrBZNsWBo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/Sd7BGg--FzI" height="1" width="1"/&gt;</description>
     <pubDate>Tue, 15 May 2012 15:13:34 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">223 at http://www.midwesternmac.com</guid>
  </item>
  <item>
    <title>Finding an Image's width/height dimensions using JavaScript</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/finding-images-widthheight</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;For a complex Drupal node form I've been working on for flocknote, I have a relatively complicated image switching functionality that lets people change an imagefield on the node (either when creating a new one or editing an existing node), and once the imagefield is changed, some custom jQuery code will grab that image and display it in the form, for a very WYSWIYG-like experience (the node looks almost exactly the same when editing/adding as it does once the user saves the node).&lt;/p&gt;
&lt;p&gt;One problem is that images can be arbitrarily high (though they're resized to 600px wide), and I can't easily get the height of the image through any traditional means. If I were grabbing an already-saved imagefield image, I could throw the image height into the JS settings for the page. However, getting a dynamically-added image's height/width values is surprisingly tricky using JavaScript, at least if you take a look around the web and try using many people's suggestions (which work great if the image was already loaded with the page's content, but not if the image is dynamically added, or if the image hasn't yet loaded on the page.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/83eyWkp_PrQfGx-jr6r5QVXzwaI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/83eyWkp_PrQfGx-jr6r5QVXzwaI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/83eyWkp_PrQfGx-jr6r5QVXzwaI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/83eyWkp_PrQfGx-jr6r5QVXzwaI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/ZN9EBQ2yc6g" height="1" width="1"/&gt;</description>
     <pubDate>Wed, 18 Apr 2012 19:55:41 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">222 at http://www.midwesternmac.com</guid>
  </item>
  <item>
    <title>Getting Ping statistics with PHP</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/getting-ping-statistics-php</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;I recently needed to display some ping/server statistics on a website using PHP. The simplest way to do something like this is to use the built-in linux utility &lt;code&gt;ping&lt;/code&gt;, and then parse the results. Instead of doing complex regex with the entirety of ping's output, though, I also used a couple other built-in linux utilities to get just what I needed.&lt;/p&gt;
&lt;p&gt;Here's how I got just the response time of a given IP address:&lt;/p&gt;
&lt;p&gt;&lt;div class="codeblock"&gt;&lt;code&gt;&lt;span style="color: #000000"&gt;&lt;span style="color: #0000BB"&gt;&amp;lt;?php&lt;br /&gt;$ip_address &lt;/span&gt;&lt;span style="color: #007700"&gt;= &lt;/span&gt;&lt;span style="color: #DD0000"&gt;'123.456.789.0'&lt;/span&gt;&lt;span style="color: #007700"&gt;; &lt;/span&gt;&lt;span style="color: #FF8000"&gt;// IP address you'd like to ping.&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000BB"&gt;exec&lt;/span&gt;&lt;span style="color: #007700"&gt;(&lt;/span&gt;&lt;span style="color: #DD0000"&gt;"ping -c 1 " &lt;/span&gt;&lt;span style="color: #007700"&gt;. &lt;/span&gt;&lt;span style="color: #0000BB"&gt;$ip_address &lt;/span&gt;&lt;span style="color: #007700"&gt;. &lt;/span&gt;&lt;span style="color: #DD0000"&gt;" | head -n 2 | tail -n 1 | awk '{print $7}'"&lt;/span&gt;&lt;span style="color: #007700"&gt;, &lt;/span&gt;&lt;span style="color: #0000BB"&gt;$ping_time&lt;/span&gt;&lt;span style="color: #007700"&gt;);&lt;br /&gt;print &lt;/span&gt;&lt;span style="color: #0000BB"&gt;$ping_time&lt;/span&gt;&lt;span style="color: #007700"&gt;[&lt;/span&gt;&lt;span style="color: #0000BB"&gt;0&lt;/span&gt;&lt;span style="color: #007700"&gt;]; &lt;/span&gt;&lt;span style="color: #FF8000"&gt;// First item in array, since exec returns an array.&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #0000BB"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;The above script will ping the given IP address, and simply pull out the response time in milliseconds. You can further parse the response time to just be the numeric value by running it through &lt;code&gt;substr($ping_time[0], 5)&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Qy6O-P56sRPUfZl9-4YeZSrOVvw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Qy6O-P56sRPUfZl9-4YeZSrOVvw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Qy6O-P56sRPUfZl9-4YeZSrOVvw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Qy6O-P56sRPUfZl9-4YeZSrOVvw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/owx0eGBvMgg" height="1" width="1"/&gt;</description>
     <pubDate>Tue, 03 Apr 2012 22:23:48 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">220 at http://www.midwesternmac.com</guid>
  </item>
  <item>
    <title>Making your current Drupal theme responsive, simply</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/making-your-current-drupal</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;For a few of my smaller sites (like my portfolio website, &lt;a href="http://www.jeffgeerling.com"&gt;www.jeffgeerling.com&lt;/a&gt;), I've had a little todo item on my list for the past year or so to make the them 'more responsive'—mostly meaning "make it legible on an iPhone or comparable Android phone". Most tablets I've used render traditional 960px layouts appreciably well, including the iPad, Kindle Fire, Samsung Galaxy Tab, etc., so I want to just focus on making the websites usable on smartphones.&lt;/p&gt;
&lt;p&gt;What we had, and what we're going for (which one seems more readable and user-friendly on a small screen?):&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;img src="http://www.midwesternmac.com/sites/midwesternmac.com/files/lifeisaprayer-responsive-before.jpg" width="240" height="451" alt="Life is a Prayer.com - Responsive Design (Before)" title="" /&gt;    &lt;img src="http://www.midwesternmac.com/sites/midwesternmac.com/files/lifeisaprayer-responsive-afterwards.jpg" width="240" height="451" alt="Life is a Prayer.com - Responsive Design (After)" title="" /&gt;&lt;/p&gt;
&lt;p&gt;I'll show you how I quickly (in less than half an hour) added a &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag to the site's &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag to instruct mobile phones on the width of my site, and how I added a simple &lt;code&gt;@media&lt;/code&gt; query to my theme's stylesheet to apply a few layout rules to make the design of the site better for mobile phones.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CltPq5kWLHZr2vHPUcKVJgA6OjE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CltPq5kWLHZr2vHPUcKVJgA6OjE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CltPq5kWLHZr2vHPUcKVJgA6OjE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CltPq5kWLHZr2vHPUcKVJgA6OjE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/4zusHI5RNf0" height="1" width="1"/&gt;</description>
     <pubDate>Mon, 02 Apr 2012 03:19:23 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">219 at http://www.midwesternmac.com</guid>
  </item>
  <item>
    <title>Getting XHProf working well on Mac OS X Lion</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/getting-xhprof-working-well</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;I was inspired today to get XHProf working on my Mac, using MAMP PRO 2.0.5/PHP 5.3.6, after reading &lt;a href="https://twitter.com/#!/davereid/status/181192156227190784"&gt;@Dave Reid's tweet&lt;/a&gt;. Since I'm not leaving for DrupalCon until tomorrow, what else could I do today?&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ezUDuRJntmWP1p3oNBYyeHP6trs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ezUDuRJntmWP1p3oNBYyeHP6trs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ezUDuRJntmWP1p3oNBYyeHP6trs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ezUDuRJntmWP1p3oNBYyeHP6trs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/Qnhq-WpcEz8" height="1" width="1"/&gt;</description>
     <pubDate>Mon, 19 Mar 2012 00:51:42 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">218 at http://www.midwesternmac.com</guid>
  </item>
  <item>
    <title>Using Batch API to build huge CSV files for custom exports</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/using-batch-api-build-huge-csv</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;&lt;a href="http://www.flocknote.com/"&gt;Flocknote&lt;/a&gt; is a large web application that lets churches easily manage communications with their members via email, text message, and phone calls. Many of the core features of email marketing services like MailChimp and Constant Contact are implemented in flocknote similarly, such as list management and mass emailing (and many features like shared list/member information management, text messaging, etc. are unique to flocknote).&lt;/p&gt;
&lt;p&gt;Until recently, few groups using flocknote didn't have subscription lists that were big enough to hit our relatively high PHP max_time_limit setting when importing and exporting subscriber data. Since we're getting bigger, though, I've started implementing Batch API all over the place so user-facing bulk operations could not only complete without resulting in a half-finished operation, but could also show the end user exactly how much has been done, and how much is left:&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;img src="http://www.midwesternmac.com/sites/midwesternmac.com/files/exporting-subscribers-batch-api.png" width="500" height="165" alt="Exporting List Subscribers - Batch API CSV Export" title="" /&gt;&lt;/p&gt;
&lt;p&gt;I've seen many tutorials, blog posts, and examples for using Drupal's Batch API for &lt;em&gt;importing&lt;/em&gt; tons of data, but very few (actually, none) for &lt;em&gt;exporting&lt;/em&gt; tons of data—and specifically, in my case, building a CSV file with tons of data for download. The closest thing I've seen is a feature request in the Webform issue queue: &lt;a href="http://drupal.org/node/1327186"&gt;Use BatchAPI to Export very large data sets to CSV/Excel&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Before I get started, I want to mention that, for many people, something like &lt;a href="http://drupal.org/project/views_data_export"&gt;Views Data Export&lt;/a&gt; (for getting a ton of data out of a View) or &lt;a href="http://drupal.org/project/node_export"&gt;Node Export&lt;/a&gt; (specifically for exporting nodes) might be exactly what you need, and save you a few hours' time working with Batch API. However, since my particular circumstance ruled out Views, and since I was exporting a bit more customized data than just nodes or users, I needed to write my own batch export functionality.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bTreMqPYXs6BccehowyC7MGRzHg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bTreMqPYXs6BccehowyC7MGRzHg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bTreMqPYXs6BccehowyC7MGRzHg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bTreMqPYXs6BccehowyC7MGRzHg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/AAy_FIPo-kc" height="1" width="1"/&gt;</description>
     <pubDate>Sun, 18 Mar 2012 02:36:23 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">216 at http://www.midwesternmac.com</guid>
  </item>
  <item>
    <title>Simple iptables rules for a typical LAMP server</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/simple-iptables-rules-typical</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;I've seen a ton of iptables configurations on the Internet, and none of them really got to the heart of what I need to do for the majority of my LAMP-based web servers (hosted on Linode, HostGator, Hot Drupal, and elsewhere). For these servers, I just need a really simple set of rules that restricts all incoming traffic except for web (port 80/443 for http/https traffic), ssh (usually port 22), smtp (port 25), and icmp ping requests.&lt;/p&gt;
&lt;p&gt;The script below (save it as 'firewall.bash', &lt;code&gt;chmod u+x&lt;/code&gt; it to make it executable, and run it with &lt;code&gt;$ sudo /path/to/firewall.bash&lt;/code&gt;, then test your server (access websites, log on to it from another Terminal session, ping it, etc., and make sure that's all working)):&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0lIGsGePuatxGEKgxo-XLl7gvn0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0lIGsGePuatxGEKgxo-XLl7gvn0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0lIGsGePuatxGEKgxo-XLl7gvn0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0lIGsGePuatxGEKgxo-XLl7gvn0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/lb9NP8xLMI0" height="1" width="1"/&gt;</description>
     <pubDate>Fri, 16 Mar 2012 04:07:14 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">215 at http://www.midwesternmac.com</guid>
  </item>
  <item>
    <title>"You have inserted a Blank DVD" – Opening discs from Windows on a Mac</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/you-have-inserted-blank-dvd-%E2%80%93</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;A few times in my life, I've received DVD-Rs or CD-Rs that a Windows user burned and gave to me, and popped them in my Mac, only to receive a message, "You inserted a blank DVD [or CD]. Choose an action from the pop-up menu or click Ignore."&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;img src="http://www.midwesternmac.com/sites/midwesternmac.com/files/inserted-blank-dvd-disc.png" width="521" height="309" alt="" title="" /&gt;&lt;/p&gt;
&lt;p&gt;The problem is, there's no way to read the data from the disc on the Mac; you can try burning stuff onto it or simply ignoring it, but you can't read the pictures off the disk. I checked the data side of the disc, and, sure enough, there's a different color band where data was written. But it's a no-go on the Mac.&lt;/p&gt;
&lt;p&gt;The problem here is that Microsoft/Windows decided to implement it's 'Drag to Disc' file copying feature in a somewhat annoying way; people with Windows computers can copy individual files to a burnable disc, eject the disc, and put it back in and copy more files to it. But they can't delete files from the disc, and this kinda breaks the way write-once media is supposed to work. (To Windows users: Make sure that you finalize/burn the disc completely before you hand it off to someone. Otherwise only Windows users can read the files).&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/c4FgIo3FNJUED3iaS34V_lzluEo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c4FgIo3FNJUED3iaS34V_lzluEo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/c4FgIo3FNJUED3iaS34V_lzluEo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/c4FgIo3FNJUED3iaS34V_lzluEo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/Q-L-MScDi8E" height="1" width="1"/&gt;</description>
     <pubDate>Wed, 14 Mar 2012 17:16:00 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">214 at http://www.midwesternmac.com</guid>
  </item>
  <item>
    <title>A First Timer's Guide to DrupalCon</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/first-timers-guide-drupalcon</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;Preparing for your first &lt;a href="http://denver2012.drupal.org/"&gt;DrupalCon&lt;/a&gt;? Even if this isn't your first, here are a few tips and tidbits I've learned from my first DrupalCon &lt;em&gt;last&lt;/em&gt; year, and would like to pass on to you. (I'm posting this now so you have time to order the things you need to make your conference experience better and get it shipped!).&lt;/p&gt;
&lt;h2&gt;Keep things you need handy&lt;/h2&gt;
&lt;p&gt;I expected to have some downtime every now and then to run back to my hotel room and grab something I needed for later in the day (like a power cord), but quickly realized that I wouldn't have downtime. Instead, I ended up attending many awesomesauce presentations, BoFs (Birds of a Feather gatherings), core conversations, and informal meetings continuously, from the time I got into the convention floors until about 8 p.m. (and later!).&lt;/p&gt;
&lt;p&gt;Bring a bag large enough to hold your laptop or iPad, a charger, a few snacks (granola bars are great!), and any other little devices or chargers you'll need during the day.&lt;/p&gt;
&lt;h2&gt;Power to the People!&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.amazon.com/gp/product/B000ONZTMW/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=httpwwwmidw06-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B000ONZTMW"&gt;&lt;img src="http://www.midwesternmac.com/sites/midwesternmac.com/files/monster-outlets-to-go.jpg" alt="Monster Outlets to Go" width="200" height="136" style="float: right;" /&gt;&lt;/a&gt;Hotels and convention centers have a very low AC outlet / conference attendee ratio. Usually something like 1:100. Most laptops' batteries last 3-5 hours. You're going to have your laptop on and with you all day, and the battery &lt;em&gt;will&lt;/em&gt; die if you don't charge up every now and then.&lt;/p&gt;
&lt;p&gt;One of the best things you can do, especially if you want people to not hate you for hogging an entire outlet for one laptop charger, is buy a travel power strip, like the one I bought for this year's DrupalCon—&lt;a href="http://www.amazon.com/gp/product/B000ONZTMW/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=httpwwwmidw06-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=B000ONZTMW"&gt;Monster's Outlets to Go Powerstrip&lt;/a&gt;*. There are a few other options out there, but I like this one the most due to its compactness. Some adapters even include or two USB plugs (though not all are created equal—check to make sure the USB plugs provide enough power to charge your device!).&lt;/p&gt;
&lt;p&gt;Instead of hogging a wall jack all to yourself, you can now power one or two of your own devices, &lt;em&gt;and&lt;/em&gt; let one or two other people charge &lt;em&gt;their&lt;/em&gt; devices.&lt;/p&gt;
&lt;p&gt;For non-US residents, be sure you have the proper power adapters for your devices!&lt;/p&gt;
&lt;h2&gt;Don't only go to sessions&lt;/h2&gt;
&lt;p&gt;I made the mistake of trying to attend every session that piqued my interest last year. It wasn't until the last day of the conference that I hopped out of a session that had lost my interest and found that I was missing some of the best parts of DrupalCon:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://denver2012.drupal.org/bofs"&gt;Birds of a Feather gatherings&lt;/a&gt; (people basically come together and talk about/work through things things they have in common, like newspaper websites, Church sites, or a passion for DevOps!).&lt;/li&gt;
&lt;li&gt;&lt;a href="http://denver2012.drupal.org/core-conversations"&gt;Core Conversations&lt;/a&gt; (people who want to make Drupal and Drupal.org better come together and, well, make Drupal and Drupal.org better).&lt;/li&gt;
&lt;li&gt;The Expo area (talking to some of the people in Drupal consultancies, or people from hosting providers, or anyone else on the expo floor, is pretty enriching).&lt;/li&gt;
&lt;li&gt;The community (getting to meet people I converse with every week on drupal.org, in IRC, etc. is awesome).&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ylw20XnQLi9yS2MO_fkHsG42wK4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ylw20XnQLi9yS2MO_fkHsG42wK4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ylw20XnQLi9yS2MO_fkHsG42wK4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ylw20XnQLi9yS2MO_fkHsG42wK4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/wWViV2Gqj5Q" height="1" width="1"/&gt;</description>
     <pubDate>Sun, 11 Mar 2012 03:31:17 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">213 at http://www.midwesternmac.com</guid>
  </item>
  <item>
    <title>Creating an Image Effect to put a play button on Video thumbnails</title>
    <link>http://www.midwesternmac.com/blogs/jeff-geerling/creating-image-effect-place</link>
    <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;I had a rather interesting feature to implement on &lt;a href="http://www.flocknote.com/"&gt;flocknote&lt;/a&gt; lately (after doing a pretty vast redesign of the UX/UI on the site over the past month... it was refreshing to dig into PHP again!):&lt;/p&gt;
&lt;p&gt;We want to allow insertion of YouTube and Vimeo (and potentially other) videos into 'Notes' on the site, and there are a few moving parts in this equation:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;I had to create a text format filter similar to the 'Embedded media inline' module in Drupal 6 so people could simply put a 'merge tag' in their Note (like &lt;code&gt;[video=URL]&lt;/code&gt;) where they want the video to appear.&lt;/li&gt;
&lt;li&gt;When a user views the embedded video on the site, the video should show at a uniform width/height, and be able to play the video (basically, a merge tag the user enters should be converted to the proper embed code for the provider (in this case, an &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; with the proper formatting).&lt;/li&gt;
&lt;li&gt;When a user sees the video in the note email, the video can't actually play since very few email clients support any kind of video embedded in an email. So, instead, the video shows as a frame with a play button on top (this is the trickiest part), and links to the video on YouTube, Vimeo, etc.&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Creating my own Image Effect for a Video Play Button&lt;/h3&gt;
&lt;p&gt;What I wanted to end up with was an image that had a custom-made iOS-style play button (play icon in a circle with a translucent grey background) right in the middle (I like the simple look of videos on my iPad...):&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;img src="http://www.midwesternmac.com/sites/midwesternmac.com/files/video-play-button-example-resized.png" width="300" height="225" alt="Video Play Button Example" title="" /&gt;&lt;/p&gt;
&lt;p&gt;So, I decided to work with Drupal's Image Effect API and expose a new image effect, aptly named 'Video Play Button', to Drupal's simple set of 'Resize, Scale, etc.' image effects. This is a pretty simple process:&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Sj4rq_WK20rd4LJLVVr6WhgHO1w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Sj4rq_WK20rd4LJLVVr6WhgHO1w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Sj4rq_WK20rd4LJLVVr6WhgHO1w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Sj4rq_WK20rd4LJLVVr6WhgHO1w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/midwesternmac/~4/f4soeBvNW2w" height="1" width="1"/&gt;</description>
     <pubDate>Fri, 09 Mar 2012 05:03:20 +0000</pubDate>
 <dc:creator>Jeff Geerling</dc:creator>
 <guid isPermaLink="false">212 at http://www.midwesternmac.com</guid>
  </item>
  </channel>
</rss>

