<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://foggyperspective.com"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Foggy Perspective</title>
 <link>http://foggyperspective.com</link>
 <description></description>
 <language>en</language>
<item>
 <title>packagist.drupal-composer.org file could not be downloaded</title>
 <link>http://foggyperspective.com/article/packagistdrupal-composerorg-file-could-not-be-downloaded</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;I&#039;m excited to be starting a new Drupal 8 project. I get to try new and shiny things. Only this time I&#039;m breaking things along the way as I figure out what some of our new processes will be with Drupal 8.&lt;/p&gt;
&lt;p&gt;Part of what I&#039;ve been looking into is how to go about providing local environments to team members, building out the code-base, etc. With Drupal 7 I was pretty comfortable using .make files, install profiles and distributions.  I wanted to give Drupal Composer a try.  There are several other articles that discuss Drupal Composer and more specifically Drupal Project (Composer template for Drupal projects).  I&#039;ll leave it up to you to read through those other articles.&lt;/p&gt;
&lt;p&gt;I wanted to keep this short and sweet and point out an issue I ran into and what the work-around is in case anyone else runs into similar issues.&lt;/p&gt;
&lt;p&gt;While running &quot;&lt;strong&gt;composer install&lt;/strong&gt;&quot; I started to get the following error.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;[Composer\Downloader\TransportException]&lt;br /&gt;&lt;br /&gt;
	The &quot;&lt;a href=&quot;https://packagist.drupal-composer.org/p/provider-archived%241a0102814c28eb08a6c5ce0781872a6cf26fe1229c357943aceaedbdf0af0948.json&quot;&gt;https://packagist.drupal-composer.org/p/provider-archived%241a0102814c28...&lt;/a&gt;&quot; file could not be downloaded (HTTP/1.1 404 Not Found)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A good couple of hours was spent trying to track down what I may have done to break the process.  I went to &lt;a href=&quot;https://packagist.drupal-composer.org&quot;&gt;https://packagist.drupal-composer.org&lt;/a&gt; and at first inspection the site looked up.  Then I started browsing for packages and noticed that when trying to view a package the server was returning a 500 error.  This was the likely culprit of the 404 issue I was receiving.  &lt;/p&gt;
&lt;p&gt;Now that I know it&#039;s most likely not an issue with my composer.json file, my next task was figuring out how to work-around packagist.drupal-composer.org being essentially offline.  I needed to get some work done.&lt;/p&gt;
&lt;p&gt;On the off chance that packagist.drupal-composer.org was just another domain for packagist.org, I modified my composer.json file changing:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&quot;url&quot;: &quot;&lt;a href=&quot;https://packagist.drupal-composer.org&quot;&gt;https://packagist.drupal-composer.org&lt;/a&gt;&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;to:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&quot;url&quot;: &quot;&lt;a href=&quot;https://packagist.org&quot;&gt;https://packagist.org&lt;/a&gt;&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Bingo!!!&lt;/p&gt;
&lt;p&gt;While I can&#039;t use &quot;&lt;strong&gt;sudo composer create-project drupal-composer/drupal-project:~8.0 drupal --stability dev --no-interaction&lt;/strong&gt;&quot; mentioned in the articles linked to above, I was able to simply download the project template and then run &quot;&lt;strong&gt;composer install&lt;/strong&gt;&quot;.  All of the packages downloaded without issue and things are starting to get back on track.&lt;/p&gt;
&lt;p&gt;Hopefully this is just a random server down issue but in case anyone else runs into the same issue, maybe this will be helpful.&lt;/p&gt;
 &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupal-planet&quot;&gt;drupal-planet&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/composer&quot;&gt;composer&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/d8&quot;&gt;d8&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Fri, 22 Jan 2016 05:44:38 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">22 at http://foggyperspective.com</guid>
</item>
<item>
 <title>Email fields missing feature?  Email Confirmation!</title>
 <link>http://foggyperspective.com/article/email-fields-missing-feature-email-confirmation</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;On previous Drupal projects I&#039;ve had the requirement to provide some sort of confirmation email to email addresses entered into an &lt;a href=&quot;http://www.drupal.org/project/email&quot;&gt;Email (module) field&lt;/a&gt;.  These were typically fields like &quot;Work Email&quot; or &quot;Secondary Email&quot;.  I had written a few small custom modules to handle these cases but found myself repeating the same thing. I knew that this could be useful as a contrib but never got around to it.&lt;/p&gt;

&lt;p&gt;I recently had a requirement to confirm email changes to the user account email (e.g. $user-&amp;gt;mail). I went to my goto module for this situation, the &lt;a href=&quot;http://www.drupal.org/project/email_confirm&quot;&gt;Email Confirm module&lt;/a&gt;. But this time I decided to dive deeper into what Email Confirm was actually doing... and it looked fairly straight forward.  I was hoping that I could possibly extend this module to be used with an Email field, but that ended up not being the case.&lt;/p&gt;

&lt;p&gt;So I decided to take the plunge and create the &lt;a href=&quot;http://www.drupal.org/project/email_field_confirm&quot;&gt;Email Field Confirm module&lt;/a&gt;. Boy was I in for a ride...&lt;/p&gt;
&lt;!--break--&gt;
&lt;p&gt;The Email Confirm module only works with the User entity which happens to have the $user-&amp;gt;data property / db table. The module makes use of this to avoid any schema changes and retains the relationship of the new email address to the user account. I had started out down a similar path but came to realize this wasn&#039;t going to work for entities other than the User entity.  Node entities do not have the data property and I couldn&#039;t rely on other entity types to have it.  This is the point that I realized this was not going to be a simple module.&lt;/p&gt;

&lt;p&gt;Time to really sit down and figure out what this module needed to do.&lt;/p&gt;

&lt;p&gt;My goal was to allow for any new email address added to an Email Field to be (optionally) confirmed. A field can be reused on multiple entity types and bundles so I need to allow for configuration at the field instance along with storing any pending email address data down to the specific entity instance (e.g. entity_id). I also noticed that the Email Confirm module would stash the new email address away until it was confirmed so I added that to my list of desired features for Email Field Confirm.&lt;/p&gt;

&lt;p&gt;Just tell me what it does already!&lt;/p&gt;

&lt;h3&gt;Features&lt;/h3&gt;

&lt;p&gt;At a high level, it met the goals I was after. A confirmation email will be sent to any new email addresses that have not already been confirmed by the same user elsewhere (e.g. another Email field) on the site. A field instance can optionally be configured to save the new email address with the entity or keep the original email address until the new one is confirmed.&lt;/p&gt;

&lt;p&gt;This works on both single-value and multi-value Email fields, however there are some limitations with the multi-value field.&lt;/p&gt;

&lt;p&gt;With multi-value fields it has proven more difficult to accurately identify what the original email value may be have been. I wasn&#039;t able to easily identify if the end user was changing an email address vs. just removing and adding another. It is also easy to re-order the values of a multi-value field so relying on the $delta wasn&#039;t helpful.&lt;/p&gt;

&lt;p&gt;So with single-value fields we have the capability to retain the original email address until the new email address is confirmed. We also have the option to notify the original email address that a change has been made.&lt;/p&gt;

&lt;p&gt;&lt;img alt=&quot;&quot; height=&quot;207&quot; src=&quot;http://foggyperspective.com/sites/foggyperspective.com/files/styles/medium/public/email_field_confirm.png?itok=GVoawIhg&quot; title=&quot;&quot; width=&quot;220&quot; /&gt;​&lt;/p&gt;

&lt;p&gt;Some other notable features include:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Ability to resend a pending non-expired confirmation email.&lt;/li&gt;
	&lt;li&gt;Configure if the acting user (e.g. the user adding the email address) or the entity author/owner is responsible for confirming the email address.&lt;/li&gt;
	&lt;li&gt;Hooks for email confirmation and expiration. This module actually makes use of these to handle updating / revering single value email fields to the new or original value.&lt;/li&gt;
	&lt;li&gt;Rules integration -- with events similar to the aforementioned hooks.&lt;/li&gt;
	&lt;li&gt;Permission to bypass email confirmation. (typically for trusted roles.)&lt;/li&gt;
	&lt;li&gt;Permission to manually confirm any email address. (typically for administrative roles.)&lt;/li&gt;
	&lt;li&gt;Configurable confirmation and notification emails with token replacement.&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Beta Release&lt;/h3&gt;

&lt;p&gt;There is currently a beta release available for download on the &lt;a href=&quot;http://www.drupal.org/project/email_field_confirm&quot;&gt;Email Field Confirm project page&lt;/a&gt;. It has been pretty stable so far. Besides having more sites use the module and report back and defects or feature requests, I hope to get some automated testing (most likely Behat) in place.&lt;/p&gt;
 &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupal-planet&quot;&gt;drupal-planet&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/email-field&quot;&gt;email field&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Thu, 14 Aug 2014 03:50:00 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">21 at http://foggyperspective.com</guid>
</item>
<item>
 <title>Automatically Change Database Based on the Git Branch</title>
 <link>http://foggyperspective.com/article/automatically-change-database-based-git-branch</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;While working on some larger enterprise Drupal projects we make extensive use of feature branches. &lt;em&gt;Note: See &lt;a href=&quot;http://nvie.com/posts/a-successful-git-branching-model/&quot;&gt;A Successful Git branching model&lt;/a&gt;&lt;/em&gt;. When changing branches (e.g. git checkout) we&#039;ve often run into issues where the code in that branch does not match up well with the database. This often happens if a branch includes a database update, new module, etc. and we aren&#039;t ready to merge that into the other feature branches.&lt;/p&gt;
&lt;p&gt;We had several workarounds that weren&#039;t very efficient.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Manually create a new database per branch and update the settings file every time.&lt;/li&gt;
&lt;li&gt;Create database dumps prior to switching branches and import a dump after switching.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Neither option was enjoyable and often led to mistakes so we came up with small solution inside the settings file.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: Recommendation is to first create &lt;a href=&quot;http://foggyperspective.com/article/environment-specific-settingsphp-overrides&quot;&gt;environment specific settings files&lt;/a&gt; given that git may not be installed on every environment or we don&#039;t want to run the following bit of code.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;At the bottom of our settings.[environment].php file we added the following code.&lt;/p&gt;
&lt;div class=&quot;geshifilter&quot;&gt;
&lt;div class=&quot;php geshifilter-php&quot;&gt;
&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co4&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co4&quot;&gt; * Acquire the current git branch and populate a variable to render on the&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co4&quot;&gt; * site.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co4&quot;&gt; */&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_git_head&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;/path/to/.git/HEAD&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$git_head&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/file&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;file&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$path_to_git_head&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; FILE_USE_INCLUDE_PATH&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  &lt;span class=&quot;re0&quot;&gt;$git_head&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$git_head&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  &lt;span class=&quot;re0&quot;&gt;$git_head_exploded&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/explode&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;explode&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$git_head&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  &lt;span class=&quot;re0&quot;&gt;$git_branch&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$git_head_exploded&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nu0&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  &lt;span class=&quot;re0&quot;&gt;$conf&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;current_git_branch&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$git_branch&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co4&quot;&gt;/**&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co4&quot;&gt; * If we were able to determine the git branch, try to connect to a&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co4&quot;&gt; * branch-specific database if possible.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co4&quot;&gt; */&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;!&lt;/span&gt;&lt;a href=&quot;http://www.php.net/empty&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;empty&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$git_branch&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  &lt;span class=&quot;re0&quot;&gt;$git_branch_db&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;a href=&quot;http://www.php.net/preg_replace&quot;&gt;&lt;span class=&quot;kw3&quot;&gt;preg_replace&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;/[^a-zA-Z0-9_]/&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st_h&quot;&gt;&#039;&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$git_branch&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  try &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;    &lt;span class=&quot;re0&quot;&gt;$dbh_test&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;new&lt;/span&gt; PDO&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;mysql:host=localhost;dbname=&#039;&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$databases&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;database&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;_&lt;span class=&quot;es4&quot;&gt;$git_branch_db&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$databases&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;username&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$databases&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;password&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;    &lt;span class=&quot;re0&quot;&gt;$databases&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;database&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;sy0&quot;&gt;.=&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&quot;_&lt;span class=&quot;es4&quot;&gt;$git_branch_db&lt;/span&gt;&quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  &lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt; catch &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;PDOException &lt;span class=&quot;re0&quot;&gt;$ex&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;br0&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;What the above code does is attempt to acquire the current branch, and if so, then modify the default database settings established in the settings.[environment].php file.&lt;/p&gt;
&lt;p&gt;To help make things more noticeable for the developer, we do render a few variables in our page.tpl.php file.&lt;/p&gt;
&lt;div class=&quot;geshifilter&quot;&gt;
&lt;div class=&quot;php geshifilter-php&quot;&gt;
&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;re0&quot;&gt;$is_admin&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  &amp;lt;!-- Admin environment notification --&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  &amp;lt;div id=&quot;environment&quot; class=&quot;messages warning&quot;&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;    &amp;lt;strong&amp;gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; variable_get&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;environment&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Undefined&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/strong&amp;gt; Environment; &amp;lt;strong&amp;gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; variable_get&lt;span class=&quot;br0&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;current_git_branch&#039;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;Undefined&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/strong&amp;gt; git branch; &amp;lt;strong&amp;gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;global&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$databases&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;re0&quot;&gt;$databases&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;default&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;st_h&quot;&gt;&#039;database&#039;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&amp;lt;/strong&amp;gt; database.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;  &amp;lt;/div&amp;gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;&amp;lt;?php&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;endif&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;sy1&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The above code lists the current environment, git branch, and database which are all set in our settings files.&lt;/p&gt;
 &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupal-planet&quot;&gt;drupal-planet&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/git&quot;&gt;git&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tutorials&quot;&gt;tutorials&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Wed, 03 Jul 2013 21:04:48 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">20 at http://foggyperspective.com</guid>
</item>
<item>
 <title>Foggy Perspective Redesigned</title>
 <link>http://foggyperspective.com/article/foggy-perspective-redesigned</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;This website has finally received some much needed love. It&#039;s been over 2 1/2 years since this website was &lt;a href=&quot;http://foggyperspective.com/article/foggy-perspective-now-drupal-7&quot;&gt;upgraded to Drupal 7&lt;/a&gt;. Other Drupal projects have kept me busy and I haven&#039;t time until recently to make some changes. I wanted to continue using Drupal as my blogging platform but needed to make it more maintainable. I still wanted to have fun trying out different modules / theming options but I&#039;ll try to keep those to a minimum so I don&#039;t find myself stuck in the same situation.&lt;/p&gt;
&lt;h3&gt;Omega8.cc Hosting&lt;/h3&gt;
&lt;p&gt;In preparation for some larger projects I wanted to give a different development process a run. So as part of the redesign I&#039;ve moved this blog to &lt;a href=&quot;http://omega8.cc&quot;&gt;Omega8.cc&lt;/a&gt; and try out the Aegir platform. It&#039;s definitely been a change and I&#039;m still working out the kinks in my process. I&#039;m learning quite a bit along the way. Omega8.cc is a great way to try out Aegir without having to manage the Aegir platform itself. The documentation is a bit scattered throughout various blog posts / articles on the Omega8.cc website but the staff has been pretty responsive to support requests.&lt;/p&gt;
&lt;h3&gt;Zen Theme&lt;/h3&gt;
&lt;p&gt;I had previously used the 7.x-2.2 version of the &lt;a href=&quot;https://drupal.org/project/corolla&quot;&gt;Corolla theme&lt;/a&gt; before it became an &lt;a href=&quot;https://drupal.org/project/adaptivetheme&quot;&gt;AdaptiveTheme&lt;/a&gt; sub-theme. I wanted to create my own simplified theme that had some responsive capabilities so I chose the widely used &lt;a href=&quot;https://drupal.org/project/zen&quot;&gt;Zen theme&lt;/a&gt;. Other than learning how &lt;a href=&quot;http://zengrids.com&quot;&gt;Zen Grids&lt;/a&gt; does its responsive magic, it&#039;s been a pretty easy change. Zen Grids really makes it easy to read / understand how the site will respond and it&#039;s constantly improving. Zen itself comes already setup to make the include regions responsive and I only made some very minor changes.&lt;/p&gt;
&lt;p&gt;I love the minimalist approach (doesn&#039;t assume any design) that Zen takes and I&#039;ve already started using it as a base theme for some enterprise Drupal projects.&lt;/p&gt;
&lt;h3&gt;Syntax Highlighting&lt;/h3&gt;
&lt;p&gt;I post sample code quite a bit and previously would just format it using the Courier New font. I hated that and finally installed the &lt;a href=&quot;https://drupal.org/project/geshifilter&quot;&gt;GeSHi Filter module&lt;/a&gt;. Hopefully that will make reading code quite a bit easier.  I&#039;m also planning to utilize the &lt;a href=&quot;https://drupal.org/project/gist_filter&quot;&gt;Gist Input Filter&lt;/a&gt; with code snippets I have on Gist. Now all I&#039;m waiting for is &lt;a href=&quot;http://dropbucket.org/&quot;&gt;Dropbucket&lt;/a&gt; to provide a way to embed snippets.&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;&lt;div class=&quot;geshifilter&quot;&gt;
&lt;div class=&quot;php geshifilter-php&quot;&gt;
&lt;ol&gt;&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// If you haven&#039;t visited Dropbucket yet&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;li1&quot;&gt;
&lt;div class=&quot;de1&quot;&gt;&lt;span class=&quot;co1&quot;&gt;// I would definitely check it out.&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;h3&gt;Disqus Comments&lt;/h3&gt;
&lt;p&gt;The previous site was using Drupal core comments. Spam was a plague that I got tired of managing and I didn&#039;t want to require folks to create their own account simply to comment. So all of the previous comments have been removed and the &lt;a href=&quot;https://drupal.org/project/disqus&quot;&gt;Disqus module&lt;/a&gt; enabled. Hopefully more folks will be inclined to comment given the widespread use of Disqus on other sites and the included ability to login to Disqus using a variety of social sites.&lt;/p&gt;
&lt;h2&gt;What&#039;s Left?&lt;/h2&gt;
&lt;p&gt;There&#039;s still quite a bit I&#039;d like to get to on this site. How the site responds definitely needs some work based on the content / widgets that are used. I need to dive into the &lt;a href=&quot;https://drupal.org/project/picture&quot;&gt;Picture&lt;/a&gt; + &lt;a href=&quot;https://drupal.org/project/breakpoints&quot;&gt;Breakpoints&lt;/a&gt; modules a bit more.&lt;/p&gt;
&lt;p&gt;I&#039;m also using the core homepage (/node) and Recent Posts block which I&#039;d like to change out. I&#039;m sure there are some theming tweaks I&#039;ll be making along the way as well.&lt;/p&gt;
 &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/about&quot;&gt;about&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupal-planet&quot;&gt;drupal-planet&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Wed, 03 Jul 2013 20:14:27 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">19 at http://foggyperspective.com</guid>
</item>
<item>
 <title>Environment Specific settings.php Overrides</title>
 <link>http://foggyperspective.com/article/environment-specific-settingsphp-overrides</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;Throughout a development life-cycle code may move between various environments (e.g. Development -&amp;gt; Integration -&amp;gt; Staging -&amp;gt; Production), however we may not want every environment to have the exact same setup. An example of this might be that on Staging and Production we have CSS / JS aggregation enabled along with caching. On a Development environment we may want both of those disabled. The database connection is also going to be different on each environment.&lt;/p&gt;
&lt;p&gt;Some of these configuration settings like the database connection are stored in the &lt;span style=&quot;background-color:#ffff00;&quot;&gt;sites / default / settings.php&lt;/span&gt; file. Aggregation and caching can be configured through the admin UI but they can also be setup in the settings.php file with the $conf variable.  The following is a snippet from the settings.php file.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;/**&lt;br /&gt;
	 * Database settings:&lt;br /&gt;
	 */&lt;br /&gt;
	$databases = array (&lt;br /&gt;
	  &#039;default&#039; =&amp;gt;&lt;br /&gt;
	  array (&lt;br /&gt;
	    &#039;default&#039; =&amp;gt;&lt;br /&gt;
	    array (&lt;br /&gt;
	      &#039;database&#039; =&amp;gt; &#039;local_drupal&#039;,&lt;br /&gt;
	      &#039;username&#039; =&amp;gt; &#039;local_drupal&#039;,&lt;br /&gt;
	      &#039;password&#039; =&amp;gt; &#039;local_drupal&#039;,&lt;br /&gt;
	      &#039;host&#039; =&amp;gt; &#039;localhost&#039;,&lt;br /&gt;
	      &#039;port&#039; =&amp;gt; &#039;&#039;,&lt;br /&gt;
	      &#039;driver&#039; =&amp;gt; &#039;mysql&#039;,&lt;br /&gt;
	      &#039;prefix&#039; =&amp;gt; false,&lt;br /&gt;
	    ),&lt;br /&gt;
	  ),&lt;br /&gt;
	);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt; * CSS/&lt;/span&gt;JS&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt; aggregated file &lt;/span&gt;gzip&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt; compression:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt; */&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt;$&lt;/span&gt;conf&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt;[&#039;&lt;/span&gt;css_gzip_compression&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt;&#039;] = FALSE;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt;$&lt;/span&gt;conf&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt;[&#039;&lt;/span&gt;js_gzip_compression&lt;span style=&quot;font-family: &#039;courier new&#039;, courier, monospace;&quot;&gt;&#039;] = FALSE;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;
	gitignore&lt;/h3&gt;
&lt;p&gt;Each environment has a unique settings.php file to accommodate the different settings.  If you use a version control system like &lt;a href=&quot;http://git-scm.com/&quot;&gt;git&lt;/a&gt;, the settings.php file is typically added to the &lt;a href=&quot;http://drupalcode.org/project/drupal.git/blob/refs/heads/7.x:/.gitignore&quot;&gt;.gitignore&lt;/a&gt; file. This works however you now lose any version control over your settings.php file(s).  While not catastrophic, it can be painful if you&#039;ve heavily modified the settings.php file.&lt;/p&gt;
&lt;h3&gt;
	settings.[environment].php&lt;/h3&gt;
&lt;p&gt;If you want to move your settings.php file(s) into version control we can create a standard settings.php file used across all environments and have that file conditionally include a uniquely named settings.[environment].php file.  The trick is how you identify what environment code is being executed on.&lt;/p&gt;
&lt;p&gt;We typically have subdomains setup for each environment. For production the URL would be mysite.com and staging it would be staging.mysite.com.  We can add a small piece of code to the end of the settings.php file to make this check and then look for a correlating settings.[environment].php file.&lt;/p&gt;
&lt;p&gt;Here&#039;s the snippet of code that we added to the end of settings.php.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;/**&lt;br /&gt;
	* Override default settings.php with settings.[environment].php.&lt;br /&gt;
	*&lt;br /&gt;
	* Get the http host and then start removing pieces to eventually end up with&lt;br /&gt;
	* an environment identifier. The default environment is &#039;production&#039;.&lt;br /&gt;
	*&lt;br /&gt;
	* Examples:&lt;br /&gt;
	*   mysite.com = production&lt;br /&gt;
	*   &lt;a href=&quot;http://www.mysite.com&quot;&gt;www.mysite.com&lt;/a&gt; = production&lt;br /&gt;
	*   stage.mysite.com = stage&lt;br /&gt;
	*   local.mysite.com = local&lt;br /&gt;
	*   local.mysite = local&lt;br /&gt;
	*/&lt;br /&gt;
	$host = $_SERVER[&#039;HTTP_HOST&#039;];&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;$subdomain = str_replace(&#039;mysite.com&#039;, &#039;&#039;, $host);&lt;br /&gt;
	$subdomain = str_replace(&#039;mysite&#039;, &#039;&#039;, $subdomain);&lt;br /&gt;
	$subdomain = str_replace(&#039;www.&#039;, &#039;&#039;, $subdomain);&lt;/p&gt;
&lt;p&gt;$subfile = (strlen($subdomain) &amp;gt;= 1) ? $subdomain : &#039;production&#039;;&lt;br /&gt;
	$subfile = trim($subfile, &#039;.&#039;);&lt;/p&gt;
&lt;p&gt;// Prefix configuration variables with &#039;pre_&#039; to avoid any clashes.&lt;br /&gt;
	$conf[&#039;pre_environment&#039;] = ucfirst($subfile);&lt;br /&gt;
	$conf[&#039;pre_settings_file&#039;] = &#039;/settings.&#039; . $subfile . &#039;.php&#039;;&lt;/p&gt;
&lt;p&gt;// Check if the file exists prior to including it.&lt;br /&gt;
	if (file_exists(dirname(__FILE__) . $conf[&#039;pre_settings_file&#039;])) {&lt;br /&gt;
	  include dirname(__FILE__) . $conf[&#039;pre_settings_file&#039;];&lt;br /&gt;
	}&lt;/p&gt;
&lt;p&gt;What we&#039;re doing here is grabbing the HTTP_HOST and selectively removing parts of it. The remaining piece is then used as the [environment] component of the settings.[enviromment].php file. For example, staging.mysite.com would check to see if settings.staging.php exists, and if so, include it. &lt;/p&gt;
&lt;p&gt;We can now include the various settings file(s) in our git repository.  One caveat is that each developer would have their own unique settings.local.php file and we don&#039;t want those to overwrite each other.  So we did add settings.local.php to the &lt;a href=&quot;https://gist.github.com/caschbre/4750738&quot;&gt;.gitignore&lt;/a&gt; file and created a sample.settings.local.php file that we add to the repository.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://gist.github.com/caschbre/f75dd8b78cbf1e38ef7d&quot;&gt;Here&#039;s a sample&lt;/a&gt; of settings.local.php.&lt;/p&gt;
&lt;p&gt;There are definitely other ways to tackle this and hopefully the code samples give you ideas on making your setup more efficient.  Good luck!&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
 &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupal-planet&quot;&gt;drupal-planet&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tutorials&quot;&gt;tutorials&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Thu, 07 Feb 2013 17:04:18 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">18 at http://foggyperspective.com</guid>
</item>
<item>
 <title>Positioning the User&#039;s Profile Picture on the Manage Display Screen</title>
 <link>http://foggyperspective.com/article/positioning-users-profile-picture-manage-display-screen</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;&lt;em&gt;It&#039;s been a while since I&#039;ve had time to share my Drupal experiences with the community. New additions to the family, moving, and a large / length Drupal project have taken up my time. Hopefully things are easing up a bit and I&#039;ll be back to sharing.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Have you ever noticed that not all elements rendered on the user account page are visible on the user account -&amp;gt; manage display configuration page?&lt;/p&gt;
&lt;p&gt;The project I&#039;m currently working on utilizes &lt;a href=&quot;http://drupal.org/project/panels&quot;&gt;panels&lt;/a&gt; and in more than one situation we want the ability to insert the user entity as a pane. When we insert the user entity we want to be able to choose a specific view mode that&#039;s configured with the fields we want displayed.  Let me walk through this in more detail.&lt;/p&gt;
&lt;p&gt;Our user account contains the following fields:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
		First Name&lt;/li&gt;
&lt;li&gt;
		Last Name&lt;/li&gt;
&lt;li&gt;
		Address&lt;/li&gt;
&lt;li&gt;
		Telephone&lt;/li&gt;
&lt;li&gt;
		etc...&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;When viewing a user&#039;s account page, if / how the fields are displayed are controlled through the &lt;span style=&quot;background-color:#ffff00;&quot;&gt;Administration » Configuration » People » Account settings » Manage Display&lt;/span&gt; tab. We can re-order the fields, hide the fields, etc. One user account element that is missing is the User&#039;s profile picture.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://foggyperspective.com/sites/foggyperspective.com/files/field/image/user-manage-display.png#overlay-context=article/positioning-users-profile-picture-manage-display-screen&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;http://foggyperspective.com/sites/foggyperspective.com/files/field/image/user-manage-display.png&quot; style=&quot;width: 490px; height: 162px;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: the screenshot was taken before the additional user account fields were added.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Let&#039;s say that you want to hide the profile picture on the user account page or provide new view modes that display / hide the profile picture.  Here&#039;s how we can easily go about doing that.&lt;/p&gt;
&lt;h3&gt;
	Extra Fields: User Picture&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;I&#039;m assuming that you&#039;re familiar with &lt;a href=&quot;http://drupal.org/node/361112&quot;&gt;creating a custom module&lt;/a&gt;. &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In our EXAMPLE.module file we&#039;re going to add a single call to &lt;a href=&quot;http://api.drupal.org/api/drupal/modules%21field%21field.api.php/function/hook_field_extra_fields/7&quot;&gt;hook_field_extra_fields()&lt;/a&gt; as follows.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;/**&lt;br /&gt;
	 * Implements hook_field_extra_fields()&lt;br /&gt;
	 */&lt;br /&gt;
	function EXAMPLE_field_extra_fields() {&lt;br /&gt;
	  $extra = array();&lt;br /&gt;
	  $extra[&#039;user&#039;][&#039;user&#039;] = array(&lt;br /&gt;
	    &#039;display&#039; =&amp;gt; array(&lt;br /&gt;
	      &#039;user_picture&#039; =&amp;gt; array(&lt;br /&gt;
	        &#039;label&#039; =&amp;gt; t(&#039;User Picture from Core&#039;),&lt;br /&gt;
	        &#039;weight&#039; =&amp;gt; -5,&lt;br /&gt;
	        &#039;description&#039; =&amp;gt; t(&#039;This can be anything. I have not seen where this is rendered.&#039;),&lt;br /&gt;
	      ),&lt;br /&gt;
	    ),&lt;br /&gt;
	  );&lt;br /&gt;
	  return $extra;&lt;br /&gt;
	}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;Ok, so what did we do there?&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
		&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;&lt;strong&gt;hook_field_extra_fields()&lt;/strong&gt; let&#039;s us add pseudo-fields to the entity. We could have provided a form option as well, but in this situation we&#039;re only concerned with the display of an existing element.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
		&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;&lt;strong&gt;$extra[&#039;user&#039;][&#039;user&#039;]&lt;/strong&gt; is the User bundle of the User entity, both provided by Drupal core.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
		&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;&lt;strong&gt;&#039;display&#039;&lt;/strong&gt; says that we&#039;re dealing with the display (manage display).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
		&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;&lt;strong&gt;&#039;user_picture&#039;&lt;/strong&gt; is the identifier for the actual User Picture uploaded on the user account page&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
		&lt;font face=&quot;arial, helvetica, sans-serif&quot;&gt;&lt;strong&gt;&#039;label&#039;&lt;/strong&gt; is the text that is shown on the Manage Display tab.  Depending on how the element is themed, it&#039;s possible this would show up on the rendered user account page&lt;/font&gt;&lt;/li&gt;
&lt;li&gt;
		&lt;font face=&quot;arial, helvetica, sans-serif&quot;&gt;&lt;strong&gt;&#039;weight&#039;&lt;/strong&gt; is the default / initial weight of the element compared to the other elements.  This value will change as you re-order elements on the manage display screen.&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Save the module, clear your caches, and refresh your manage display configuration screen and you should see &quot;User Picture from Core&quot; as an element you can re-order.  &lt;/p&gt;
&lt;p&gt;You can also hide the picture from rendering on the user account page. While that&#039;s probably not something most will do, let&#039;s see how this might be useful with other view modes.&lt;/p&gt;
&lt;h3&gt;
	View Mode: Author Bio&lt;/h3&gt;
&lt;p&gt;If you&#039;re not familiar with view modes, you probably just aren&#039;t recognizing the term.  If you look at a node&#039;s manage display screen you&#039;ll notice &#039;Default&#039; and &#039;Teaser&#039;.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;&quot; src=&quot;http://foggyperspective.com/sites/foggyperspective.com/files/field/image/node-view-nodes.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Here are some other blog posts that describe view modes.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
		&lt;a href=&quot;http://pingv.com/blog/custom-drupal-7-view-modes-different-ways-see-your-content&quot;&gt;Custom Drupal 7 view modes: Different ways to see your content&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
		&lt;a href=&quot;http://www.wunderkraut.com/blog/drupal-7-custom-node-view-modes/2010-12-20&quot;&gt;Drupal 7 custom node view modes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;The user account only comes with one view mode by default.  Back to my original situation, I will be inserting the user entity as a pane in a panel but I don&#039;t want to display all of the fields that typically render on the user account page. So what we&#039;re going to do is create a new view mode for the user entity.&lt;/p&gt;
&lt;p&gt;Back to our EXAMPLE.module we&#039;re going to add a single function &lt;a href=&quot;http://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_entity_info_alter/7&quot;&gt;hook_entity_info_alter()&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family:courier new,courier,monospace;&quot;&gt;/**&lt;br /&gt;
	* Implements hook_entity_info_alter()&lt;br /&gt;
	*/&lt;br /&gt;
	function EXAMPLE_entity_info_alter(&amp;amp;$entity_info) {&lt;br /&gt;
	  $entity_info[&#039;user&#039;][&#039;view_modes&#039;] += array(&lt;br /&gt;
	    &#039;author_bio&#039; =&amp;gt; array(&lt;br /&gt;
	      &#039;label&#039; =&amp;gt; t(&#039;Author Bio&#039;),&lt;br /&gt;
	      &#039;custom settings&#039; =&amp;gt; TRUE,&lt;br /&gt;
	    ),&lt;br /&gt;
	  );&lt;br /&gt;
	}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Ok, let&#039;s look at what&#039;s going on.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
		&lt;strong&gt;$entity_info&lt;/strong&gt; is passed in by reference so we&#039;re directly altering this variable.&lt;/li&gt;
&lt;li&gt;
		&lt;strong&gt;$entity_info[&#039;user&#039;][&#039;view_modes&#039;] +=&lt;/strong&gt; is adding to the existing view modes for the user entity.&lt;/li&gt;
&lt;li&gt;
		&lt;strong&gt;&#039;author_bio&#039;&lt;/strong&gt; is the machine name for the new view mode.&lt;/li&gt;
&lt;li&gt;
		&lt;strong&gt;&#039;label&#039;&lt;/strong&gt; is the text displayed on the Manage Display screen for the new view mode.&lt;/li&gt;
&lt;li&gt;
		&lt;strong&gt;&#039;custom settings&#039;&lt;/strong&gt; is the default setting to say whether we want to configure the fields differently from the default view mode.  This value can be changed on a per-bundle bases.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Save the module, clear your caches, and refresh the manage display page and you should see a new View Mode.  It will most likely have all of the fields setup the same as the default view mode. &lt;/p&gt;
&lt;p&gt;I&#039;m now able to display the user profile picture and first / last name fields.  When I insert the user entity as a pane and choose the &#039;Author Bio&#039; view mode, it will render only those fields in the order I&#039;ve set them.  I can now use CSS to position them accordingly.&lt;/p&gt;
 &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupal-planet&quot;&gt;drupal-planet&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tutorials&quot;&gt;tutorials&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Wed, 21 Nov 2012 18:43:58 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">17 at http://foggyperspective.com</guid>
</item>
<item>
 <title>Fun at DrupalCamp Asheville</title>
 <link>http://foggyperspective.com/article/fun-drupalcamp-asheville</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;This past weekend I had the pleasure of attending &lt;a href=&quot;http://www.drupalcampasheville.com/&quot; target=&quot;_blank&quot;&gt;DrupalCamp Asheville&lt;/a&gt;.  It was a great time to see some old faces and meet some new ones.  For me these events are less about the sessions and more about the other Drupaleers I get to meet in person.  &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://drupal.org/user/65088&quot; target=&quot;_blank&quot;&gt;Addison Berry&lt;/a&gt; opened up the day as the keynote speaker.  She touched on some of the very reasons why I use Drupal and attend these events... the Community.  With the number of folks new to Drupal that attended this camp, her message was right on point.  I hope it rung a tone with them.&lt;/p&gt;
&lt;p&gt;My favorite session of the day was &lt;a href=&quot;http://www.drupalcampasheville.com/sessions/building-a-responsive-theme-in-drupal-with-omega-and-drush&quot; target=&quot;_blank&quot;&gt;Building a responsive theme in Drupal with Omega and Drush&lt;/a&gt; presented by JP of &lt;a href=&quot;http://redfinsolutions.com&quot; target=&quot;_blank&quot;&gt;Redfin Solutions&lt;/a&gt;.  Not only was the topic of interest, but JP has a great presentation style.  I&#039;d highly recommend attending any session he&#039;s putting on.  After attending this session and watching the &lt;a href=&quot;http://drupal.org/project/omega&quot; target=&quot;_blank&quot;&gt;Omega theme&lt;/a&gt; progress, I&#039;m going to have to switch this blog over to that theme.  I figure I gotta provide my ten viewers the ability to view my blog on their mobile device.  :-)&lt;/p&gt;
&lt;p&gt;During each session there were free books to be handed out.  There weren&#039;t enough for every attendee so JP had a little humming contest.  One participant had to hum the tune of a song while the other participant had to guess the title of the song.  I wasn&#039;t quick enough to catch the whole contest, but I was able to capture part of it on my phone.  Unfortunately the microphone on the phone couldn&#039;t pick up the humming loud enough over the laughter of the group.  Below is a minute long video of the contest on youtube.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;300&quot; src=&quot;http://www.youtube.com/embed/pT91tgz_js4?rel=0&amp;amp;hd=1&quot; width=&quot;480&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Overall the event was great, especially given it was only the second year for Asheville.  I think there is / was a survey coming out I need to complete.  But for those putting together other events, here is one comment that hopefully will be useful.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;
		Explain what a BoF is.  I remember my first camp and I had no clue.  Use the opening session to let folks know what they are and where the sign-up sheets are.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Can&#039;t wait until DrupalCamp Atlanta!!!&lt;/p&gt;
 &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupal-planet&quot;&gt;drupal-planet&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupalcamp&quot;&gt;drupalcamp&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Thu, 18 Aug 2011 21:42:28 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">16 at http://foggyperspective.com</guid>
</item>
<item>
 <title>Theming Custom Entities</title>
 <link>http://foggyperspective.com/article/theming-custom-entities</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;Entities are a new and exciting concept in Drupal 7 and a few modules are starting to make use of them. A &lt;a href=&quot;http://drupal.org/user/1449894&quot;&gt;co-worker (Scott)&lt;/a&gt; of mine has recently jumped on the Drupal bandwagon. He&#039;s been reading up on the Drupal development books and creating custom modules. A new module that he was working on created a new entity type. Great! Not a problem, the Drupal books and online docs provided pretty detailed steps. We ran into a wall however when we attempted to theme it. The documentation was lacking at this point and looking over contrib modules that created entities didn&#039;t provide any entity theming examples.&lt;/p&gt;
&lt;p&gt;Scott started digging through the code and eventually figured out how to accomplish custom entity theming.  Even better, he &lt;a href=&quot;http://drupal.org/node/1238606&quot;&gt;contributed his findings&lt;/a&gt; to the Drupal online documentation.  Win Win!&lt;/p&gt;
&lt;p&gt;You can learn more about the solution he found on his &lt;a href=&quot;http://technify.me/cms/drupal/theming-custom-entities-in-drupal-7/&quot;&gt;blog post&lt;/a&gt;.  Just don&#039;t give him too hard of a time about his blog running on Wordpress.  :-)&lt;/p&gt;
&lt;!--break--&gt;&lt;p&gt;&lt;em&gt;Note: I closed comments on my blog post here... head on over to Scott&#039;s to leave any feedback.&lt;/em&gt;&lt;/p&gt;
 &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/theming&quot;&gt;theming&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/entities&quot;&gt;entities&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupal-planet&quot;&gt;drupal-planet&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Thu, 04 Aug 2011 16:59:10 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">15 at http://foggyperspective.com</guid>
</item>
<item>
 <title>Get a jumpstart on #drupal development with #quickstart</title>
 <link>http://foggyperspective.com/article/get-jumpstart-drupal-development-quickstart-0</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;I work quite often with Drupal doing various tasks like setting up temporary sites to test out new modules, develop custom modules, and demo Drupal&#039;s capabilities to clients and co-workers.  For years I&#039;ve done this on Windows-based machines.  I&#039;ve found over time that I spend quite a bit of time doing tasks that I have very little interest in, just to get to a point where I can enjoy working with Drupal.  Some of these tasks include:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Creating databases&lt;/li&gt;
&lt;li&gt;Setting up database users&lt;/li&gt;
&lt;li&gt;Configuring DNS / host files&lt;/li&gt;
&lt;li&gt;Configuring virtual hosts&lt;/li&gt;
&lt;li&gt;Manually downloading drupal core, modules, themes&lt;/li&gt;
&lt;li&gt;Running the drupal install (yes I like to start with fresh installs for some things)&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Windows isn&#039;t the easiest to develop on when working with Drupal.  I want to mimic the *AMP stack as close as possible and stay clear of IIS.  I tried several options to reduce those tasks.&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-size: 16px; font-weight: bold;&quot;&gt;&lt;span style=&quot;font-size: 13px; font-weight: normal;&quot;&gt;I&#039;ve tried both &lt;a href=&quot;http://www.wampserver.com/en/&quot; target=&quot;_blank&quot;&gt;WampServer (WAMP)&lt;/a&gt; and &lt;a href=&quot;http://www.apachefriends.org/en/xampp.html&quot; target=&quot;_blank&quot;&gt;XAMPP&lt;/a&gt;.  While both allow me to use apache, mysql, and php, they still leave &lt;a href=&quot;http://drupal.org/node/547860&quot; target=&quot;_blank&quot;&gt;most of the minutiae&lt;/a&gt; (I always wanted to use that word) left up to me to deal with. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-size: 16px; font-weight: bold;&quot;&gt;&lt;span style=&quot;font-size: 13px; font-weight: normal;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size: 13px; font-weight: normal;&quot;&gt;I also gave the &lt;a href=&quot;http://network.acquia.com/downloads&quot; target=&quot;_blank&quot;&gt;Acquia stack (Dev Desktop)&lt;/a&gt; a run for a short while.  Dev Desktop handled most of the apache / mysql setup and actually did a great job of importing existing sites to test upgrades, patches, new modules, etc.  I was still left manually handling dealing with modules and themes, but I could live with this.  It got me closer to getting into the weeds of what I enjoyed.  Where the Dev Desktop eventually failed me however was during development.  I use &lt;a href=&quot;http://www.activestate.com/komodo-ide&quot; target=&quot;_blank&quot;&gt;Komodo IDE 6&lt;/a&gt; for development and debugging and I prefer to have code intelligence (i.e. autocomplete) for PHP and Drupal functions.  I&#039;ve been unable to get Komodo (or Eclipse) to recognize the existence of PHP from the Acquia Stack.  &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-size: 16px; font-weight: bold;&quot;&gt;&lt;span style=&quot;font-size: 13px; font-weight: normal;&quot;&gt;So I made the trip back to WAMP / XAMPP and figured I would see if I can add &lt;a href=&quot;http://drupal.org/project/drush&quot; target=&quot;_blank&quot;&gt;Drush&lt;/a&gt; into the mix to try and alleviate some of the mundane tasks.  Unfortunately Drush on Windows still has &lt;a href=&quot;http://drupal.org/project/issues/search/drush?text=&amp;amp;assigned=&amp;amp;submitted=&amp;amp;participant=&amp;amp;status[]=1&amp;amp;status[]=13&amp;amp;status[]=8&amp;amp;status[]=14&amp;amp;status[]=15&amp;amp;status[]=2&amp;amp;issue_tags_op=or&amp;amp;issue_tags=windows&quot; target=&quot;_blank&quot;&gt;quite a few issues&lt;/a&gt; and isn&#039;t the most reliable.  At times it ended up causing more issues and I had to spend time correcting them or starting over.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I was contemplating dual booting Ubuntu but quickly turned that idea out. I didn&#039;t want to deal with rebooting each time to switch environments and didn&#039;t need to put my wife through figuring out what to do if I left Ubuntu left open.&lt;/p&gt;
&lt;p&gt;Luckily I came across a recent project a few months ago that changed everything.&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;http://drupal.org/project/quickstart&quot; target=&quot;_blank&quot;&gt;Quickstart&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;From the project page: &lt;em&gt;&quot;A pre-packaged downloadable PHP Development Environment for Drupal&quot;&lt;br /&gt;&lt;/em&gt;The &lt;a href=&quot;http://www.youtube.com/user/drupalquickstart&quot; target=&quot;_blank&quot;&gt;Youtube Channel&lt;/a&gt; provides a video demo of Quickstart&#039;s capabilities.&lt;br /&gt;Author: &lt;a href=&quot;http://drupal.org/user/8121&quot; target=&quot;_blank&quot;&gt;Michael Cole &lt;/a&gt;&lt;br /&gt;Drupal Group: &lt;a href=&quot;http://groups.drupal.org/quickstart-drupal-development-environment&quot; target=&quot;_blank&quot;&gt;Quickstart Drupal Development Environment&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What&#039;s included:&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0.692em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 2em; vertical-align: baseline; list-style-type: disc; list-style-position: initial; list-style-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 13px; border: 0px initial initial;&quot;&gt;&lt;li style=&quot;vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 13px; padding: 0px; margin: 0px; border: 0px initial initial;&quot;&gt;Support for Drupal 7 and Drupal 6&lt;/li&gt;
&lt;li style=&quot;vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 13px; padding: 0px; margin: 0px; border: 0px initial initial;&quot;&gt;Ubuntu Linux, Apache, MySQL, APC, XDebug, IMAP, UploadProgress&lt;/li&gt;
&lt;li style=&quot;vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 13px; padding: 0px; margin: 0px; border: 0px initial initial;&quot;&gt;Firefox (with developer plugins) and Chrome&lt;/li&gt;
&lt;li style=&quot;vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 13px; padding: 0px; margin: 0px; border: 0px initial initial;&quot;&gt;Drush, drush make, and custom drush commands&lt;/li&gt;
&lt;li style=&quot;vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 13px; padding: 0px; margin: 0px; border: 0px initial initial;&quot;&gt;Install scripts for: Apache Solr, Aegir, Hudson, and Oracle&lt;/li&gt;
&lt;li style=&quot;vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 13px; padding: 0px; margin: 0px; border: 0px initial initial;&quot;&gt;Netbeans and Eclipse, configured with XDebug&lt;/li&gt;
&lt;li style=&quot;vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 13px; padding: 0px; margin: 0px; border: 0px initial initial;&quot;&gt;XHProf and Webgrind profilers. Emails logged as files&lt;/li&gt;
&lt;li style=&quot;vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-size: 13px; padding: 0px; margin: 0px; border: 0px initial initial;&quot;&gt;cvs, subversion, git, bazaar&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;At a high level, Quickstart provides a Virtualbox (Ubuntu 10.04 guest) appliance of a Drupal development machine with some additional Drush scripts.  This has drastically decreased my setup / configuration time spent with Drupal.  The Virtualbox installation was a breeze.  There were a few steps to make sure Ubuntu and Drush were the latest but then I was quickly on to Drupal fun time!&lt;/p&gt;
&lt;h3&gt;Quickstart Drush Scripts&lt;/h3&gt;
&lt;p&gt;Where I think Quickstart excels is with the additional Drush scripts it provides.  Taking a look at one of the &lt;a href=&quot;http://drupal.org/node/819398&quot; target=&quot;_blank&quot;&gt;Quickstart documentation pages&lt;/a&gt; we can see an example of one of these scripts.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;span style=&quot;background-color: #ffff99;&quot;&gt;$ drush quickstart-create all --domain=example1.dev&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This command will download the latest core, create the database and db user, configure apache / virtual hosts, DNS, and run the Drupal install with the default profile.  Boom!  I can now open up my browser to example1.dev and start working with Drupal.  When I&#039;m done with this particular temporary solution, we simply use the &lt;span style=&quot;background-color: #ffff99;&quot;&gt;quickstart-delete&lt;/span&gt; Drush command to remove all traces.&lt;/p&gt;
&lt;p&gt;We can also create different make files and utilize those with the quickstart-create command.  Simply add the &lt;span style=&quot;background-color: #ffff99;&quot;&gt;--makefile=mymakefile.make&lt;/span&gt; parameter.&lt;/p&gt;
&lt;p&gt;One thing to note is that the quickstart-create will create a new instance of Drupal in it&#039;s own folder, database, etc.  Where Quickstart isn&#039;t quite up to speed yet is handling multi-site &quot;quick&quot; installs.  From the&lt;a href=&quot;http://drupal.org/node/1105284&quot; target=&quot;_blank&quot;&gt; looks of it&lt;/a&gt; however, it appears that this is an upcoming feature.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Similar Projects&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://drupal.org/project/drubuntu&quot; target=&quot;_blank&quot;&gt;Drubuntu&lt;/a&gt; (see partial &lt;a href=&quot;http://drupal.org/node/796432&quot; target=&quot;_blank&quot;&gt;feature comparison&lt;/a&gt;)&lt;br /&gt;&lt;em&gt;Note: I have not used Drubuntu yet.  Quickstart has met my needs and I haven&#039;t had the time yet to give Drubuntu a shot.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/drupal-planet&quot;&gt;drupal-planet&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/quickstart&quot;&gt;quickstart&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/virtualbox&quot;&gt;virtualbox&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Fri, 20 May 2011 14:25:03 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">14 at http://foggyperspective.com</guid>
</item>
<item>
 <title>Comment notification enabled</title>
 <link>http://foggyperspective.com/article/comment-notification-enabled</link>
 <description>&lt;div class=&quot;field field-name-body field-type-text-with-summary field-label-hidden&quot;&gt;&lt;div class=&quot;field-items&quot;&gt;&lt;div class=&quot;field-item even&quot;&gt; &lt;p&gt;With the &lt;a href=&quot;http://foggyperspective.com/article/foggy-perspective-now-drupal-7&quot;&gt;recent transition&lt;/a&gt; for foggy perspective from &lt;a href=&quot;http://foggyperspective.posterous.com&quot; target=&quot;_blank&quot;&gt;posterous&lt;/a&gt; to drupal 7 one of the features I lost was the ability for readers to subscribe to comments.  The &lt;a href=&quot;http://drupal.org/project/comment_notify&quot; target=&quot;_blank&quot;&gt;comment notify&lt;/a&gt; module has recently released a D7 version so I&#039;ve installed and enabled that.&lt;/p&gt;
&lt;p&gt;Now all I need are readers and commenters.  :-)&lt;/p&gt;
 &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;ul class=&quot;field field-name-field-tags field-type-taxonomy-term-reference field-label-hidden&quot;&gt;
  &lt;i class=&quot;icon icon-tags&quot;&gt;&lt;/i&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/comment-notify&quot;&gt;comment notify&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tags/subscriptions&quot;&gt;subscriptions&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/about&quot;&gt;about&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Tue, 11 Jan 2011 17:13:33 +0000</pubDate>
 <dc:creator>caschbre</dc:creator>
 <guid isPermaLink="false">13 at http://foggyperspective.com</guid>
</item>
</channel>
</rss>
