<?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>maxbronsema.com</title>
	<atom:link href="http://maxbronsema.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://maxbronsema.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 07 May 2013 01:50:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>5 Drush Make tips and tricks</title>
		<link>http://maxbronsema.com/blog/2013/05/06/5-drush-make-tips-and-tricks/</link>
		<comments>http://maxbronsema.com/blog/2013/05/06/5-drush-make-tips-and-tricks/#comments</comments>
		<pubDate>Tue, 07 May 2013 01:50:55 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=414</guid>
		<description><![CDATA[Drush make is a fantastic tool that lets us basically have a build file for each site or multi-site base instance. I pair the make file with a custom installation profile and Aegir but on its own it is a powerful tool. Drush 5 supports a few upgrades for make so it is worth upgrading [...]]]></description>
				<content:encoded><![CDATA[<p>Drush make is a fantastic tool that lets us basically have a build file for each site or multi-site base instance. I pair the make file with a custom installation profile and <a href="http://www.aegirproject.org/">Aegir</a> but on its own it is a powerful tool. Drush 5 supports a few upgrades for make so it is worth upgrading if appropriate from Drush 4.</p>
<h3>5 Tips and Tricks</h3>
<h4>1. Use <a href="http://drushmake.me/">http://drushmake.me/</a> to generate a decent base make file for new projects.</h4>
<p>This is also a handy way to see popular modules and libraries that have somehow been beneath your radar.</p>
<h4>2. Patch your modules with Drush.</h4>
<p>The syntax is fairly straightforward. You can also chain patches by applying one and then applying the next.</p>
<p><code>projects[<em>project name</em>][patch][] = "url to patch"</code></p>
<p>For example, to patch the CAS module for using SSL/TLSv1 you would do the following: projects[cas][patch][] = "http://drupal.org/files/enforce_tlsv1_0.patch"</p>
<h4>3. Download your custom modules via git.</h4>
<p>To do this you need to tell Drush make to use git and then you simply provide the public repository URL.<br />
<code><br />
projects[wwuzen_gsa][download][type] = "git"<br />
projects[wwuzen_gsa][download][url] = "https://bitbucket.org/wwuweb/wwu-google-search-appliance.git"<br />
projects[wwuzen_gsa][type] = "module"</code></p>
<p>Unlike normal make projects you download you do not need to provide a version, but you do need to state that it is a git project and provide the URL. Whatever you put in the [] after the word projects is what the directory will be created as.</p>
<h4>4. Move sub-directories within libraries to their proper location.</h4>
<p>Often, external libraries do not extract from a tar or zip with the file your Drupal module is looking for. It might be buried inside of a sub-directory. With Drush 5 we can move them upon the build.This is an example from the CAS library.</p>
<p><code>libraries[CAS][download][subtree] = CAS-1.3.2/</code></p>
<p>With the subtree identified, Drush make will dowload and extract the library like normal, and then move the contents of the sub-directory CAS-1.3.2 into the main directory CAS. It might take a few attempts to figure out whether you need a / in front of the directory or not but the end result is a library extracted properly.</p>
<h4>5. Move libraries upon install anywhere you would like.</h4>
<p>The feeds module loves to have the Simple Pie XML parser library inside of it's own module directory. What a pain. However, Drush make can move it for us.<br />
<code><br />
libraries[simplepie][destination] = "sites/all/modules/feeds/libraries"</code></p>
<p>Just plop in the destination you would like to have the library moved to and the script makes it so. (<em>Pun intended</em>).</p>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2013/05/06/5-drush-make-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zurb responsive tables within Drupal</title>
		<link>http://maxbronsema.com/blog/2013/02/26/zurb-responsive-tables-within-drupal/</link>
		<comments>http://maxbronsema.com/blog/2013/02/26/zurb-responsive-tables-within-drupal/#comments</comments>
		<pubDate>Wed, 27 Feb 2013 00:34:07 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Dynamic Media]]></category>
		<category><![CDATA[RWD]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=400</guid>
		<description><![CDATA[Responsive tables are a big challenge. Tabular data is often very important and you don't want to hide the data just to keep the nice responsive design in shape. Currently within Drupal I am not aware of any defacto solutions. I experimented with jQuery Mobile's technique table reflow, the footable module, and lastly Zurb's responsive [...]]]></description>
				<content:encoded><![CDATA[<p>Responsive tables are a big challenge. Tabular data is often very important and you don't want to hide the data just to keep the nice responsive design in shape. Currently within Drupal I am not aware of any defacto solutions. I experimented with jQuery Mobile's technique <a href="http://jquerymobile.com/demos/1.3.0/docs/widgets/table-reflow/#&amp;ui-state=dialog">table reflow</a>, the <a href="http://drupal.org/project/footable">footable module</a>, and lastly Zurb's <a href="http://www.zurb.com/playground/playground/responsive-tables/index.html">responsive tables</a>.</p>
<p>I had one criteria for a successful solution; my <strong>users should not have to do anything</strong> to make their table responsive. I did not want them to right click on the table and add a class, I didn't want them to have to build all of their tables with views, just plop in a ckEditor table and hit save.</p>
<p>A secondary criteria was that the solution should be lightweight since it is primarily to be used by users on mobile devices and we don't all have 4G LTE in our offices and living rooms as of yet. All of the solutions mentioned above use some sort of CSS hook to indicate that the table needs to become responsive at certain breakpoints. The lightest weight solution for me turned out to be Zurb's approach.</p>
<p>To automate the insertion in the HTML of a CSS class I turned to the <a href="http://drupal.org/project/flexifilter">Flexifilter</a> module. Not enough people use this module but what it allows you to do is to create a Drupal input filter, so really an output filter, on anything that is formatted, like your WYSIWYG output.</p>
<p>After enabling the module you need to go to Structure -&gt; Flexifilters -&gt; Add New Flexifilter.</p>
<div id="attachment_401" class="wp-caption aligncenter" style="width: 560px"><a href="http://maxbronsema.com/blog/wp-content/uploads/2013/02/Screen-Shot-2013-02-26-at-4.13.13-PM.png"><img class="size-large wp-image-401" alt="Setting up a flexifilter in Drupal 7." src="http://maxbronsema.com/blog/wp-content/uploads/2013/02/Screen-Shot-2013-02-26-at-4.13.13-PM-1024x950.png" width="550" height="510" /></a><p class="wp-caption-text">Configuring a filter.</p></div>
<p>Inside of a filter you have several options but the Pattern Based Text Replacement widget works with regex. Once a filter is configured, you have to enable it. Once enabled, head over to your text format configuration screen and enable your new filter.</p>
<p>Configuration -&gt; Content Authoring -&gt; Text Formats -&gt; Full HTML. I put the filter as the last item to be ran so that I can ensure the class I want added is actually added.</p>
<div id="attachment_402" class="wp-caption aligncenter" style="width: 599px"><a href="http://maxbronsema.com/blog/wp-content/uploads/2013/02/Screen-Shot-2013-02-26-at-4.21.21-PM.png"><img class="size-full wp-image-402" alt="Enabling a text filter in Drupal 7. " src="http://maxbronsema.com/blog/wp-content/uploads/2013/02/Screen-Shot-2013-02-26-at-4.21.21-PM.png" width="589" height="388" /></a><p class="wp-caption-text">Enable the text filter and place it as the last filter to run.</p></div>
<p>So now we have a class called responsive being added to tables folks create. How does this help us? We need to leverage Zurb's great work to answer that. You can grab the source from their <a href="https://github.com/zurb/responsive-tables/">GitHub project page</a>. We want two of the files, responsive-tables.css and  responsive-tables.js. You can discard the rest. Place the css file in your theme/css directory and the js file in your theme/js directory.</p>
<p>Open up your theme.info file and tell Drupal about these two new files. In a Zen sub-theme it looks like this:</p>
<pre>stylesheets[all][] = css/responsive-tables.css
; Optionally add some JavaScripts to your theme.
scripts[] = js/responsive-tables.js</pre>
<p>Next, open up the responsive-tables.js file as we need to wrap it in a Drupal safe closure. At the very top of the file add</p>
<pre>(function ($, Drupal, window, document, undefined) {</pre>
<p>and at the very bottom add</p>
<pre>})(jQuery, Drupal, this, this.document);</pre>
<p>This allows the code that the Zurb folks wrote to run without conflict with the other jQuery that Drupal executes. That is pretty much it. Save those files. Go to Structure -&gt; Appearance to reload the info file and your table should now be responsive at small window sizes.</p>
<div id="attachment_403" class="wp-caption aligncenter" style="width: 524px"><a href="http://maxbronsema.com/blog/wp-content/uploads/2013/02/Screen-Shot-2013-02-26-at-4.33.17-PM.png"><img class="size-full wp-image-403" alt="Zurb style responsive table rendered in Drupal 7.20." src="http://maxbronsema.com/blog/wp-content/uploads/2013/02/Screen-Shot-2013-02-26-at-4.33.17-PM.png" width="514" height="216" /></a><p class="wp-caption-text">Zurb style responsive table in Drupal 7.20.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2013/02/26/zurb-responsive-tables-within-drupal/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to include jQuery.ui effects in Drupal 7</title>
		<link>http://maxbronsema.com/blog/2013/01/18/how-to-include-jquery-ui-effects-in-drupal-7/</link>
		<comments>http://maxbronsema.com/blog/2013/01/18/how-to-include-jquery-ui-effects-in-drupal-7/#comments</comments>
		<pubDate>Fri, 18 Jan 2013 23:46:57 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=395</guid>
		<description><![CDATA[The Task: On a recent project I had to have a div slide to the left when a link was clicked. I thought that would be easy as Drupal 7 has the jQuery UI packaged by default. So I coded up a bit of jQuery that used a .slide() function but nothing happened when clicking [...]]]></description>
				<content:encoded><![CDATA[<h3>The Task:</h3>
<p>On a recent project I had to have a div slide to the left when a link was clicked. I thought that would be easy as Drupal 7 has the jQuery UI packaged by default. So I coded up a bit of jQuery that used a .slide() function but nothing happened when clicking the link. Looking at the FireFox JavaScript console I saw an error stating that slide was not available.</p>
<h3>Why not?</h3>
<p>It turns out that even though jQuery UI is shipped with Drupal none of the UI effects are turned on by default. That is a good thing as most folks, myself included, will not use many if any of the packaged enhancements.</p>
<h3>The Solution:</h3>
<p>Using my trusty Google skills it didn't take long to find a <a href="http://redhotchilliproject.com/blog/jquery-and-jquery-ui-in-drupal-7" target="_blank">great post by Andy Carter </a>detailing how to include effects from the UI library in Drupal 7. One caveat that his post and others do not explicitly state is that the system library includes the ui and the effects array. For a short while I was trying to include the slide effect like so.</p>
<pre>  drupal_add_library('system','ui.slide');</pre>
<p>This does not work. I needed to use the effects.slide. The key is to look at what is inside of $libraries[''] and using that in your call. All of the available libraries provided by the system can be found on the <a href="http://api.drupal.org/api/drupal/modules!system!system.module/function/system_library/7" target="_blank">system_library page</a>.</p>
<p>Here is a complete example of what ended up being included in template.tpl.php.</p>
<pre>function wwuzen_preprocess_page(&amp;$variables, $hook) {
   //Add the slide effect for our search box
  drupal_add_library('system','effects.slide');
}</pre>
<p>Notice that I use effects.slide rather than ui.slide. With that change in place my expected behavior executed properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2013/01/18/how-to-include-jquery-ui-effects-in-drupal-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal Registry Rebuild</title>
		<link>http://maxbronsema.com/blog/2013/01/08/drupal-registry-rebuild/</link>
		<comments>http://maxbronsema.com/blog/2013/01/08/drupal-registry-rebuild/#comments</comments>
		<pubDate>Tue, 08 Jan 2013 18:56:30 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=391</guid>
		<description><![CDATA[Recently on a server I was on I was getting a drush error that would  not let me use drush dl, drush cc, etc... What was most frustrating is that the error was being reported about a site that doesn't even exist on the server! What to do? require_once(/home/WWU/bronsem/cmssites/test/sites/wcedev.atus.wwu.edu/modules/entity/includes/entity.inc):[warning] failed to open stream: No such [...]]]></description>
				<content:encoded><![CDATA[<p>Recently on a server I was on I was getting a drush error that would  not let me use drush dl, drush cc, etc... What was most frustrating is that the error was being reported about a site that doesn't even exist on the server! What to do?</p>
<pre>require_once(/home/WWU/bronsem/cmssites/test/sites/wcedev.atus.wwu.edu/modules/entity/includes/entity.inc):[warning]
failed to open stream: No such file or directory bootstrap.inc:3066
PHP Fatal error:  require_once(): Failed opening required '/home/WWU/bronsem/cmssites/test/sites/wcedev.atus.wwu.edu/modules/entity/includes/entity.inc' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/campusweb/cmssites/test/includes/bootstrap.inc on line 3066
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: require_once(): Failed opening required
'/home/WWU/bronsem/cmssites/test/sites/wcedev.atus.wwu.edu/modules/entity/includes/entity.inc'
(include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in
/srv/www/campusweb/cmssites/test/includes/bootstrap.inc, line 3066</pre>
<p>&nbsp;</p>
<p>That is a pretty gross error. When that error occurs it can be nigh impossible to get your site running. Awhile ago a colleague, Vid @ <a href="http://pages.uoregon.edu/vid/">Developments</a>, mentioned the drush rr command which is not built into drush. Go to http://drupal.org/project/registry_rebuild and get it. It is super simple, cleans up random cruft like above. Often those types of messages occur when you are removing a module from your sites/sitename/module folder when you want to use the version in sites/all/modules. If you run into errors, give drush rr a whirl.</p>
<h3>Steps to install</h3>
<ol>
<li>Navigate to a location where you can run drush commands. For most of us our home directory is fine.</li>
<li>Type "drush dl registry_rebuild" without the quotes and hit enter. Now it is installed. You should see something like: Project registry_rebuild (7.x-1.9) downloaded to /home/WWU/bronsem/.drush/registry_rebuild.                    [success]<br />
Project registry_rebuild contains 0 modules: .</li>
<li>Now navigate to the site that is causing you issues and run drush rr.</li>
</ol>
<p>Supposedly you can run the command from a URL as well. That might be useful if you are on a box that doesn't allow you access to the command line. For full documentation check out the <a href="http://drupal.org/project/registry_rebuild" target="_blank">project page</a>.</p>
<p>Wicked cool utility that makes drush even more awesome. Thank you <a href="http://drupal.org/user/539502">omega8cc</a>, <a href="http://drupal.org/user/30906">rfay</a>, and  <a href="http://drupal.org/user/31022">q0rban</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2013/01/08/drupal-registry-rebuild/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open iterm2 from within Finder</title>
		<link>http://maxbronsema.com/blog/2012/12/24/open-iterm2-from-within-finder/</link>
		<comments>http://maxbronsema.com/blog/2012/12/24/open-iterm2-from-within-finder/#comments</comments>
		<pubDate>Mon, 24 Dec 2012 21:11:03 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=387</guid>
		<description><![CDATA[It seems I find myself in Finder recently wanting to open the file or directory in iterm2. A quick Google search turned up a solution Peter Downs has adapted from Lance E. Sloan. It works great in OS 10.8.2. Thank you Peter and Lance! Direct Link to Peter's write-up: http://peterdowns.com/posts/open-iterm-finder-service.html]]></description>
				<content:encoded><![CDATA[<p>It seems I find myself in Finder recently wanting to open the file or directory in iterm2. A quick Google search turned up a solution <a href="http://peterdowns.com/posts/open-iterm-finder-service.html">Peter Downs</a> has adapted from <a href="https://github.com/lsloan">Lance E. Sloan</a>.</p>
<p>It works great in OS 10.8.2.</p>
<p>Thank you Peter and Lance!</p>
<p>Direct Link to Peter's write-up: <a href="http://peterdowns.com/posts/open-iterm-finder-service.html">http://peterdowns.com/posts/open-iterm-finder-service.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2012/12/24/open-iterm2-from-within-finder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Structured Content in Drupal</title>
		<link>http://maxbronsema.com/blog/2012/12/13/structured-content-in-drupal/</link>
		<comments>http://maxbronsema.com/blog/2012/12/13/structured-content-in-drupal/#comments</comments>
		<pubDate>Thu, 13 Dec 2012 16:49:49 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=382</guid>
		<description><![CDATA[A colleague sent me the link to Rachel Andrew's talk at the Smashing Conference, 2012 in Germany. The talk she gave was on the future of the CMS. I want to first say what a great talk. She hits on several key points in a style that made me think and laugh at the same [...]]]></description>
				<content:encoded><![CDATA[<p>A colleague sent me the link to <a title="Vimeo of Rachel Andrew" href="http://vimeo.com/54834476">Rachel Andrew's talk at the Smashing Conference, 2012 in Germany</a>. The talk she gave was on the future of the CMS. I want to first say what a great talk. She hits on several key points in a style that made me think and laugh at the same time. The first third of the talk discusses structured content. Structured content is the idea that each distinct concept that we want to show users is entered by a user as a separate piece of content. Rachel uses an example of a date. Dates, locations, times, headings, sub-headings, ancillary links, etc...</p>
<p>I am primarily a Drupal developer these days and during the start of the talk I kept nodding my head and telling myself, Drupal can do that. While Drupal can accomplish this it can be a fairly poor user experience. Each piece of structured content is basically a form field and for a small piece of content like a blog post, there could be 5-10 fields. To solve this we can try to help the user by pre-populating the date, time, location, etc... She goes onto present three key points of what a CMS should do in the future.</p>
<ol>
<li>The CMS should help content editors make good decisions.</li>
<li>The CMS allows the designer to make semantic decisions so the editor doesn’t have to.</li>
<li>The CMS protects the design and architecture decisions made for the site.</li>
</ol>
<p>I would like to say that a properly constructed Drupal 7 site very nearly presents the future CMS now. However, Jeff Eaton of Lullabot just published an interesting article, <a title="Lullabot article on inline editing." href="http://www.lullabot.com/articles/inline-editing-and-cost-leaky-abstractions">Inline Editing and the Cost of Leaky Abstractions</a>. How will structured content survive inline editing?</p>
<h3>"Structured content is not a silver bullet."</h3>
<address>Rachel Andrew</address>
<address> </address>
<p>Jeff's article and Rachel's talk both emphasize a careful balance. The colleague who sent me the talk and I discussed this as well and balance is the actual hard part. We can structure everything as unique fields and attach metadata behind the scenes, etc... but it then borders on insanity as you look at the form. Again we abstract some of the complexity and hide it from our user, that is part of our job but for complex data a big form is overwhelming. Big forms are nothing new and many strategies exist to solve them, and using contextual overlays we can break the forms down in Drupal into manageable chunks. This is not yet the norm.</p>
<h3>"Avoid directly inserting HTML into content."</h3>
<address>Rachel Andrew</address>
<address> </address>
<p>I applaud Rachel for discussing this topic. I do not agree that markdown is an answer, mainly because I have always had a hard time with it. I like the idea of using a WYSIWYG type entry system for users where they can highlight some text and italicize or bold a word. Not because it is familiar for users but because it is fast. However, this again comes back to a balance. If I strip all HTML or do not give a user a chance to emphasize text in anyway, I must ensure the design accounts for this. Perhaps the only bold text is the subheading for the title of the page. The only text that is italicized is the image caption. I think this is brilliant but difficult for me to achieve.</p>
<h3>Here is to the future CMS!</h3>
<p>Thank you Rachel for discussing the issues above. While it may be difficult for me to achieve the balance I have discussed, we all need to struggle to find answers to these issues. The web will be a better place for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2012/12/13/structured-content-in-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring Drupal with Icinga</title>
		<link>http://maxbronsema.com/blog/2012/11/07/monitoring-drupal-with-icinga/</link>
		<comments>http://maxbronsema.com/blog/2012/11/07/monitoring-drupal-with-icinga/#comments</comments>
		<pubDate>Wed, 07 Nov 2012 13:45:25 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=372</guid>
		<description><![CDATA[Overview: Monitoring one or two Drupal sites can be done by logging into the status report every few days and reviewing settings, looking at your watchdog log, and reading the emails the sites send you. However, as you run more and more sites that process becomes overwhelming and can take up a large amount of [...]]]></description>
				<content:encoded><![CDATA[<h3>Overview:</h3>
<p>Monitoring one or two Drupal sites can be done by logging into the status report every few days and reviewing settings, looking at your watchdog log, and reading the emails the sites send you. However, as you run more and more sites that process becomes overwhelming and can take up a large amount of time. A few services exist to help monitor all of your sites in one place, <a title="Droptor" href="http://droptor.com" target="_blank">Droptor</a>, <a title="Drupal Monitor" href="http://drupalmonitor.com" target="_blank">Drupal Monitor</a>, and <a title="Acquia Insight" href="http://www.acquia.com/tags/insight" target="_blank">Acquia</a> all provide really slick solutions. However, if you want to roll your own due to cost, corporate security, etc... the Drupal community has developed several tools leveraging Nagios.</p>
<p>I wanted to set this up to monitor the sites I manage and chose to use <a title="Icinga" href="https://www.icinga.org/" target="_blank">Icinga</a>, a fork of Nagios and <a title="Download openSUSE" href="http://software.opensuse.org/122/en" target="_blank">openSUSE 12.2</a> as that is consistent with our environment. Currently I am doing this as a proof of concept project and it is running inside of VirtualBox on an older Mac. The Drupal projects that I am using are the following:</p>
<ul>
<li><a href="http://drupal.org/project/nagios" target="_blank"> Nagios Monitoring</a></li>
<li><a href="http://drupal.org/project/prod_check" target="_blank">Production Check &amp; Production Monitor</a></li>
</ul>
<p>These two modules first let us talk with our Nagios server but also provide most of the stats you can find in the paid services. On initial install the results are not all that pretty to look at but I believe there are ways to fix that and I would rather have comprehensive than pretty any day.</p>
<p>Installation was inspired by the post at <a href="http://awebfactory.com.ar/node/421" target="_blank">awebfactory</a>. There is currently no write-ups on how to do the install if you are using Icinga but since it is a fork of Nagios all of the steps are quite similar. I still know very little about Nagios so if you see a goofy config file please improve upon it. The readme file that accompanies the Nagios Monitoring module is fairly comprehensive and if using Icinga use the Nagios 3 style configuration options. Here are four tips that I wish I had known while setting this up.</p>
<h3>4 Tips</h3>
<ol>
<li>You must define a host in your .cfg file you create for monitoring the Drupal sites. The README assumes you have done this already but if you are creating a monitoring server from scratch this is news. Add the following at the top of the hostgroups.cfg file the instructions ask you to create.
<pre>define host{
        use                     linux-server
        host_name               domainname.edu
        alias                   DevVM ; You will see what you put here in Icinga
        }</pre>
</li>
<li>The unique string you generate for use in the module and within Icinga goes where the instructions have the words <em>unique identifier. </em></li>
<li>Initially my Drupal check was not returning any results. I got an error "Service Check Timed Out." My dev server is a little pokey so I needed to edit the service_check_timeout line in icinga.cfg from 60 to 600. I chose 600 because <a href="http://www.webpaths.com/archives/software/linux/nagios/2009/02/09/nagios-service-check-timed-out.html" target="_blank">this article</a> uses it, very scientific, I know.</li>
<li>The SUSE Icinga package places Icinga in /etc/icinga, /etc/init.d/icinga check_verbose checks your settings in the .cfg files you have edited/created and /etc/init.d/icinga restart restarts the service.</li>
</ol>
<h3>Installing Icinga</h3>
<p>Thankfully there is a package for Icinga in the openSUSE repositories. I installed this using the GUI tools but if I move out of a proof of concept phase I would do this with an openSUSE box run level 3 so I will try to show the command line install options rather than how to use Yast. This generally just involves following the documentation at <a href="http://docs.icinga.org/latest/en/quickstart-icinga.html">http://docs.icinga.org/latest/en/quickstart-icinga.html</a>.</p>
<h4>Install the dependencies:</h4>
<pre>$ zypper install gd gd-devel libjpeg libjpeg-devel libpng libpng-devel
$ zypper install net-snmp net-snmp-devel perl-Net-SNMP

Create a user named icinga, please follow the instructions at the link above.

$ zypper install thttpd
$ sudo vi /etc/icinga/etc/objects/contacts.cfg

Change the email address associated with icingaadmin to one that you can receive email at. ESC : wq ENTER to exit.
Set the password for icingaadmin</pre>
<pre>$ htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
$ sudo /etc/init.d/apache2 reload</pre>
<p>Make sure Icinga starts when you boot.</p>
<pre>$ chkconfig --add icinga</pre>
<pre>$ chkconfig icinga on</pre>
<pre>Verify everything is good with your initial configuration.</pre>
<pre>$ sudo /etc/init.d/icinga check_verbose</pre>
<p>Start Icinga</p>
<p>$ sudo /etc/init.d/icinga start</p>
<p>Navigate to http://localhost/icinga/ and login with icingaadmin and the password you set earlier.</p>
<h4>Install the Nagios Drupal Check service</h4>
<p>The steps in the README file are correct for openSUSE. Just use the Nagios 3.x version of the commands and follow tip number 1 from above.</p>
<h3>Final Result</h3>
<div id="attachment_373" class="wp-caption aligncenter" style="width: 310px"><a href="http://maxbronsema.com/blog/wp-content/uploads/2012/11/Icinga-localhost-2012-11-06-15-10-02.png"><img class="size-medium wp-image-373" title="Icinga  localhost" src="http://maxbronsema.com/blog/wp-content/uploads/2012/11/Icinga-localhost-2012-11-06-15-10-02-300x198.png" alt="Drupal Nagios Alert" width="300" height="198" /></a><p class="wp-caption-text">A nagios alert showing issues with a site I have in dev.</p></div>
<p>I started monitoring a site I have on my devVM and it shows me a boatload of issues. Core is out of date, stuff is turned on that shouldn't be for a production site, modules need to be updated, etc... The beauty of this is that I simply need to turn the module on for each site I want to monitor, update my hostgroup definition in hostgroups.cfg and I have instant monitoring. I hope to provide further details such as NRPE on the remote host, selective alerts, and a prettier interface.</p>
<p>Thank you to everyone I have linked to in this article and to the developers of the fantastic Icinga, Nagios, and Drupal modules. On a happy note, Acquia itself <a href="https://docs.acquia.com/faq/how-does-acquia-monitor-websites-acquia-cloud">uses Nagios to monitor their sites in the Acquia cloud.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2012/11/07/monitoring-drupal-with-icinga/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Captions in Drupal 7 &#8211; A method</title>
		<link>http://maxbronsema.com/blog/2012/10/09/image-captions-in-drupal-7-a-method/</link>
		<comments>http://maxbronsema.com/blog/2012/10/09/image-captions-in-drupal-7-a-method/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 03:22:57 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Dynamic Media]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=355</guid>
		<description><![CDATA[Image captions are supposed are a fairly standard item in a web developer's toolkit. In a modern CMS they seem to be a given. However, Drupal leaves this to the contrib space, as it should, since each site has different needs. However, the lack of an adopted contrib method for achieving image captions was a [...]]]></description>
				<content:encoded><![CDATA[<p>Image captions are supposed are a fairly standard item in a web developer's toolkit. In a modern CMS they seem to be a given. However, Drupal leaves this to the contrib space, as it should, since each site has different needs. However, the lack of an adopted contrib method for achieving image captions was a bit surprising.</p>
<p>With Drupal 7 the media module is used to handle media. No problem, however it doesn't do anything to allow for automatic captions to appear. However, it does allow us to show users when they upload an image that an alt tag is a good idea and a title tag can be used. Most auto-caption techniques rely on that title tag to be used as the caption and you show it with a bit of javascript and CSS.</p>
<p>My goal for the end user was to have them get captions for free but have the ability to turn them off. I do not want them to assign a special class for a caption to appear because in my use case, the majority of folks want the captions. However, to disable a caption I want a fairly straight forward method that can be accomplished in the WYSIWYG editor.</p>
<p>To make this work I leveraged several contrib modules and now have it working except it still will not automatically show in the WYSIWYG editor. That last issue seems to be somewhere that improvements can still be made.</p>
<h3>Ingredients (List of Modules):</h3>
<ul>
<li><a href="http://drupal.org/project/media">Media Module</a> 7-x.1.2</li>
<li><a href="http://drupal.org/project/insert">Insert</a></li>
<li><a href="http://drupal.org/project/image_caption">Image Caption</a></li>
<li><a href="http://drupal.org/project/wysiwyg">WYSIWYG</a> with the CKeditor Library</li>
<li>HTML Purifier (Not needed if you allow full HTML)</li>
<li>Any dependencies of the above modules, i.e. ctools, views, etc...</li>
</ul>
<h3>Configuration:</h3>
<p>Go ahead and download the modules and install them on your site whatever your preferred method. You can enable them as well.</p>
<p>Now, most of these modules auto-configure themselves. For this example we will use the basic page content type but add an image field.</p>
<div id="attachment_359" class="wp-caption aligncenter" style="width: 560px"><a href="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-7.49.03-PM.png"><img class="size-large wp-image-359" title="Screen Shot 2012-10-09 at 7.49.03 PM" src="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-7.49.03-PM-1024x277.png" alt="Basic Page content type" width="550" height="148" /></a><p class="wp-caption-text">Basic page content type configuration screen.</p></div>
<p>Notice that we use the image widget which is augmented via the media module. The next screen we need to edit is the images field. Make sure to check the Enable <em>Alt</em> field and Enable <em>Title</em> field.</p>
<div id="attachment_360" class="wp-caption aligncenter" style="width: 365px"><a href="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-7.55.12-PM.png"><img class="size-full wp-image-360" title="Screen Shot 2012-10-09 at 7.55.12 PM" src="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-7.55.12-PM.png" alt="The alt and title field checkboxes are checked." width="355" height="50" /></a><p class="wp-caption-text">Don't forget to enable the alt and title fields.</p></div>
<p>Right below those check boxes, if you have the Insert module enabled you will see a collapsed field labeled insert. Expand it. Check the Enable Insert button check box. Choose the styles you want to make available to your users. Add the word "caption" without the quotes to the Additional CSS Classes text field. This will add the caption class to every image inserted into your nodes. This makes the caption magic happen automatically, as long as you fill out the title field with each image, because the image caption module looks for the class caption on all images.</p>
<div id="attachment_361" class="wp-caption aligncenter" style="width: 560px"><a href="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-7.56.54-PM.png"><img class="size-large wp-image-361" title="Screen Shot 2012-10-09 at 7.56.54 PM" src="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-7.56.54-PM-1024x419.png" alt="The insert configuration screen." width="550" height="225" /></a><p class="wp-caption-text">Enable the insert button, choose some styles, and add caption to the classes field.</p></div>
<p>Make sure you have the image caption module enabled and let's make a new test node.</p>
<p>Go to Content -&gt; Add Content -&gt; Basic Page and title your new node to test the image caption.</p>
<p>Then go down to your image field and upload a new image or graphic. Fill in the alt field and the in the title field add the text you want for your caption. Click the insert button near the style dropdown menu and the image appears in your post.</p>
<p><a href="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-8.02.10-PM.png"><img class="aligncenter size-medium wp-image-362" title="Screen Shot 2012-10-09 at 8.02.10 PM" src="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-8.02.10-PM-300x61.png" alt="An image field being configured in Drupal 7." width="300" height="61" /></a></p>
<p>Now, click the preview button and you will see the caption appear beneath your image. Styling the caption class is up to you.</p>
<p>&nbsp;</p>
<div id="attachment_364" class="wp-caption aligncenter" style="width: 310px"><a href="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-8.03.03-PM.png"><img class="size-medium wp-image-364" title="Screen Shot 2012-10-09 at 8.03.03 PM" src="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-8.03.03-PM-300x244.png" alt="A picture of the author with a caption below." width="300" height="244" /></a><p class="wp-caption-text">Look ma' a caption!</p></div>
<p>Fairly awesome.</p>
<h3>Why this approach:</h3>
<p>OK, so why did I decide to do it this way? There are a few other modules, notably <a href="http://drupal.org/project/jcaption">jCaption</a>. You could also make each image a node and then attach a caption field to the image. That approach seemed unrealistic as then I would have to easily allow authors to import nodes, into their post in an easy manner. However, the author would have to create at a minimum two nodes/entities just to create a page with one image. That doesn't entice many people.</p>
<p>jCaption looks interesting except that you cannot turn off captions. Anything with a title attribute gets a caption. Sometimes, captions are not appropriate but people still want the contents of the title attribute to appear on mouseover. With the image caption module because the caption is controlled by a class, the user can edit the image in their WYSIWYG editor and remove the class. In the next image you can see the caption class has been removed, meaning no caption will appear. This gives control to the page creators which is a fundamental goal of CMS.</p>
<div id="attachment_365" class="wp-caption aligncenter" style="width: 293px"><a href="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-8.13.23-PM.png"><img class="size-medium wp-image-365" title="Screen Shot 2012-10-09 at 8.13.23 PM" src="http://maxbronsema.com/blog/wp-content/uploads/2012/10/Screen-Shot-2012-10-09-at-8.13.23-PM-283x300.png" alt="The advanced property screen of the CKeditor image window." width="283" height="300" /></a><p class="wp-caption-text">No caption class means no caption accompanying the image.</p></div>
<h3>Improvements:</h3>
<p>I am happy with this approach except for the fact that users cannot see the captions directly in the WYSIWYG. It would be fantastic if that were possible and it will require more research. Since the caption appears because of jQuery we would have to utilize a drupal behavior to fire whenever an image is inserted and then with ajax save the state of the page and add in the caption. It sounds messy.</p>
<p>I wish there was an easier way for users to disable the caption as well. It is not hard to go into the properties of an image but it would be great if they could just click the image and remove the caption class via a dropdown menu or contextual editor.</p>
<h3>Overall:</h3>
<p>This seems to be a robust approach that helps the user by minimizing the knowledge and time needed to add captions. I need to find a good way to alert them of how to remove a caption, but I am hopeful for the use of this technique.</p>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2012/10/09/image-captions-in-drupal-7-a-method/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HTTPS sites not loading with OSX Mountain Lion &#8211; The Fix</title>
		<link>http://maxbronsema.com/blog/2012/10/09/https-sites-not-loading-with-osx-mountain-lion-the-fix/</link>
		<comments>http://maxbronsema.com/blog/2012/10/09/https-sites-not-loading-with-osx-mountain-lion-the-fix/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 02:29:15 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=352</guid>
		<description><![CDATA[My work recently provided me with OSX Mountain Lion to use while telecommuting. In the office wireless worked great but when I got home to my home office I was unable to login to any site that required SSL. These are the sites that start with https:// up in the URL bar. Digging around on [...]]]></description>
				<content:encoded><![CDATA[<p>My work recently provided me with OSX Mountain Lion to use while telecommuting. In the office wireless worked great but when I got home to my home office I was unable to login to any site that required SSL. These are the sites that start with https:// up in the URL bar. Digging around on the internet I found that this is not an uncommon problem.</p>
<p>Apparently, my little Belkin router cannot handle OS X's default 1500 Maximum Transmission Unit (MTU) setting. By altering it to 1453, a number referenced at <a title="1453 MTU for OSX" href="http://osxdaily.com/2012/08/02/fix-os-x-mountain-lion-wireless-connection-problems/" target="_blank">OSX Daily</a>, the sites once again worked.</p>
<p>The quick fix:<br />
System Preferences &gt; Network &gt; Advanced &gt; Hardware &gt;  MTU: Custom -&gt; 1453</p>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2012/10/09/https-sites-not-loading-with-osx-mountain-lion-the-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing pdftk on RHEL6</title>
		<link>http://maxbronsema.com/blog/2012/08/16/installing-pdftk-on-rhel6/</link>
		<comments>http://maxbronsema.com/blog/2012/08/16/installing-pdftk-on-rhel6/#comments</comments>
		<pubDate>Fri, 17 Aug 2012 05:36:33 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://maxbronsema.com/blog/?p=349</guid>
		<description><![CDATA[A project at work required me to use the Fill PDF module for Drupal. After installation I realized I needed the pdftk package on our VM to leverage the power of the module. Since we have the VM there is no need to use the service option. Searching for the package with yum did not [...]]]></description>
				<content:encoded><![CDATA[<p>A project at work required me to use the <a href="http://drupal.org/project/fillpdf" target="_blank">Fill PDF</a> module for Drupal. After installation I realized I needed the pdftk package on our VM to leverage the power of the module. Since we have the VM there is no need to use the service option.</p>
<p>Searching for the package with yum did not turn anything up. I did find the package at repoforge.org. We are running a 64bit install so we needed the 64bit RPM. Here are the steps to install.</p>
<p>$wget <a href="http://pkgs.repoforge.org/pdftk/pdftk-1.44-2.el6.rf.x86_64.rpm" target="_blank">http://pkgs.repoforge.org/<wbr>pdftk/pdftk-1.44-2.el6.rf.x86_<wbr>64.rpm</wbr></wbr></a><br />
rpm -K --nosignature pdftk-1.44-2.el6.rf.x86_64.rpm<br />
sudo yum install jre-gcj<br />
sudo rpm -Uvh pdftk-1.44-2.el6.rf.x86_64.rpm<br />
$PATH<br />
which pdftk</p>
<p>First we download the package and check that it a complete package with rpm -K --nosignature command. Then we install the dependency jre-gcj which is a Java Runtime Environment compiler. Next, we install the package using the update -U flag. Run $PATH to list our path and run the which command to verify it is installed in our path.</p>
<p>After that the Fill PDF module detects pdftk is installed and life is good.</p>
<p>RedHat's <a title="Red Hat RPM Documentation" href="https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sec-Installing_and_Upgrading.html" target="_blank">documentation on RPMs</a> was fantastic and a big help in making sure this went smoothly.</p>
]]></content:encoded>
			<wfw:commentRss>http://maxbronsema.com/blog/2012/08/16/installing-pdftk-on-rhel6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
