<?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>WizOne Solutions &#187; Tips</title>
	<atom:link href="http://www.wizonesolutions.com/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wizonesolutions.com</link>
	<description>Put some magic into your Web site.</description>
	<lastBuildDate>Fri, 20 Jan 2012 22:14:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>UPDATED: Weird fix for CCK fields not appearing with Display Suite (Drupal 6)</title>
		<link>http://www.wizonesolutions.com/2011/11/11/weird-fix-for-cck-fields-not-appearing-with-display-suite-drupal-6/</link>
		<comments>http://www.wizonesolutions.com/2011/11/11/weird-fix-for-cck-fields-not-appearing-with-display-suite-drupal-6/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 20:24:10 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[appearing]]></category>
		<category><![CDATA[cck]]></category>
		<category><![CDATA[contributions]]></category>
		<category><![CDATA[disable]]></category>
		<category><![CDATA[display suite]]></category>
		<category><![CDATA[enable]]></category>
		<category><![CDATA[fields]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[nd]]></category>
		<category><![CDATA[nd_cck]]></category>
		<category><![CDATA[node displays]]></category>
		<category><![CDATA[not]]></category>
		<category><![CDATA[toggle]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=482</guid>
		<description><![CDATA[Update: Oops, this wasn&#8217;t the problem at all. It was actually with the Content Permissions module. Forgot the site was using it! Pretty embarrassing I just went through quite a struggle getting my CCK fields to appear on my Display Suite-managed node. I finally succeeded, though, in the end, and thought I would share the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: Oops, this wasn&#8217;t the problem at all. It was actually with the Content Permissions module. Forgot the site was using it! Pretty embarrassing <img src='http://www.wizonesolutions.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<p>I just went through quite a struggle getting my CCK fields to appear on my Display Suite-managed node. I finally succeeded, though, in the end, and thought I would share the solution.</p>
<p>Don&#8217;t worry, there isn&#8217;t much to read: <strong>just disable and re-enable the Node Displays CCK (nd_cck) module</strong> found within in the <a href="http://drupal.org/project/nd_contrib" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/nd_contrib?referer=');">Node Displays Contributions</a> module.</p>
<p>I initially tried disabling and re-enabling all Display Suite-related modules, but that didn&#8217;t work. For some reason, however, disabling and re-enabling that specific one <em>did</em>.</p>
<p>Hope this solves someone&#8217;s problem!</p>
<p>(To read my full rant, check out <a href="http://drupal.org/node/1325706#comment-5230228" onclick="pageTracker._trackPageview('/outgoing/drupal.org/node/1325706_comment-5230228?referer=');">this issue comment and the ones below</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/11/11/weird-fix-for-cck-fields-not-appearing-with-display-suite-drupal-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Last-ditch Solution to Non-Working PHP-FPM + Apache Configuration</title>
		<link>http://www.wizonesolutions.com/2011/11/03/last-ditch-solution-to-non-working-php-fpm-apache-configuration/</link>
		<comments>http://www.wizonesolutions.com/2011/11/03/last-ditch-solution-to-non-working-php-fpm-apache-configuration/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 21:28:25 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Life of a Web Developer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[2]]></category>
		<category><![CDATA[action]]></category>
		<category><![CDATA[addtype]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[fpm]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-fpm]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=473</guid>
		<description><![CDATA[I had a surreal experience yesterday. I was following online tutorials about setting up Apache + PHP-FPM (for example, this ServerFault question: http://serverfault.com/questions/326919/how-to-set-the-httpd-conf-when-using-php-fpm-with-php5-3-8-and-apache2). I&#8217;ll let you read that rather than re-hash it. My goal here is only to share quickly how I actually got this working. Alright, so you know the part where it says [...]]]></description>
			<content:encoded><![CDATA[<p>I had a surreal experience yesterday. I was following online tutorials about setting up Apache + PHP-FPM (for example, this ServerFault question: <a href="http://serverfault.com/questions/326919/how-to-set-the-httpd-conf-when-using-php-fpm-with-php5-3-8-and-apache2" onclick="pageTracker._trackPageview('/outgoing/serverfault.com/questions/326919/how-to-set-the-httpd-conf-when-using-php-fpm-with-php5-3-8-and-apache2?referer=');">http://serverfault.com/questions/326919/how-to-set-the-httpd-conf-when-using-php-fpm-with-php5-3-8-and-apache2</a>). I&#8217;ll let you read that rather than re-hash it.</p>
<p>My goal here is only to share quickly how I <em>actually</em> got this working.</p>
<p>Alright, so you know the part where it says to add the directives:</p>
<p><code>AddHandler php5-fcgi .php<br />
Action php5-fcgi /fcgi-bin/php5.external</code></p>
<p>This didn&#8217;t work for me no matter what I did. No errors were produced, so I knew that it simply wasn&#8217;t executing the Action directive for whatever reason. In checking the Apache 2.2 documentation for Action, I noticed that a MIME type could be given in lieu of an <em>action-type</em> (the php5-fcgi thing). Having exhausted all other options, and knowing that the PHP file was being sent to the browser unprocessed with the MIME type <code>application/x-httpd-php</code>, I decided to <strong>add</strong>:</p>
<p><code>Action application/x-httpd-php /fcgi-bin/php5.external</code></p>
<p>to my configuration. And, much to my shock, <em>it actually worked</em>!</p>
<p>So, if you find yourself as frustrated with setting up Apache + PHP-FPM as I was, I hope this tip may ease your suffering.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/11/03/last-ditch-solution-to-non-working-php-fpm-apache-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux tip &#8211; regular expression find and replace in all files in a directory</title>
		<link>http://www.wizonesolutions.com/2011/10/07/linux-tip-regular-expression-find-and-replace-in-all-files-in-a-directory/</link>
		<comments>http://www.wizonesolutions.com/2011/10/07/linux-tip-regular-expression-find-and-replace-in-all-files-in-a-directory/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 04:43:26 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[Life of a Web Developer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[expression]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[preg]]></category>
		<category><![CDATA[regular]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=456</guid>
		<description><![CDATA[As you may have seen me tweet, I&#8217;ve been looking for a way to do this. I didn&#8217;t want to manually change my Apache configuration to reflect my new internal IP address. After some Internet searching, I stumbled across this gem: http://www.linuxquestions.org/questions/linux-software-2/find-and-replace-text-in-multiple-file-203801/#post1742045 find . -name '[^.]*' &#124; xargs perl -pi -e 's/192\.168\.1\.3/192\.168\.0\.3/g' I adapted it [...]]]></description>
			<content:encoded><![CDATA[<p>As you may have seen me tweet, I&#8217;ve been looking for a way to do this. I didn&#8217;t want to manually change my Apache configuration to reflect my new internal IP address. After some Internet searching, I stumbled across this gem: http://www.linuxquestions.org/questions/linux-software-2/find-and-replace-text-in-multiple-file-203801/#post1742045</p>
<p><code>find . -name '[^.]*' | xargs perl -pi -e 's/192\.168\.1\.3/192\.168\.0\.3/g'</code></p>
<p>I adapted it to this for my task of replacing IP addresses. The first set of numbers is the old one (don&#8217;t delete the backslashes) and the second set is the new one.</p>
<p>This command assumes all files in the directory are configuration files and do not start with a dot.</p>
<p>Enjoy!</p>
<p><strong>Update: </strong>According to a commenter, <code>sed -i 's/thisip/thatip/g' *</code> should also work. I didn&#8217;t try that since I thought it wouldn&#8217;t work with multiple input files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/10/07/linux-tip-regular-expression-find-and-replace-in-all-files-in-a-directory/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cloning Content Types in D7 &#8211; Errata</title>
		<link>http://www.wizonesolutions.com/2011/10/04/cloning-content-types-in-drupal-7-errata/</link>
		<comments>http://www.wizonesolutions.com/2011/10/04/cloning-content-types-in-drupal-7-errata/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 08:01:34 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[clone]]></category>
		<category><![CDATA[cloning]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[type]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=454</guid>
		<description><![CDATA[Update: You may also want to check out the Bundle Copy module. I haven&#8217;t tried it yet, so let me know in the comments if it works! Recently, I read the Stanford Tech Commons article on Cloning a Content Type in D7 at https://techcommons.stanford.edu/topics/drupal-7x/cloning-content-type-d7. It proposes a simple but (mostly) effective way  to wind up [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update: You may also want to check out the <a href="http://drupal.org/project/bundle_copy" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/bundle_copy?referer=');">Bundle Copy</a> module. I haven&#8217;t tried it yet, so let me know in the comments if it works!</strong></p>
<p>Recently, I read the Stanford Tech Commons article on Cloning a Content Type in D7 at<a href="https://techcommons.stanford.edu/topics/drupal-7x/cloning-content-type-d7" onclick="pageTracker._trackPageview('/outgoing/techcommons.stanford.edu/topics/drupal-7x/cloning-content-type-d7?referer=');"> https://techcommons.stanford.edu/topics/drupal-7x/cloning-content-type-d7</a>. It proposes a simple but (mostly) effective way  to wind up with cloned content types in Drupal 7. Summarized:<span id="more-454"></span></p>
<ol>
<li>Create a content type and set it up as desired.</li>
<li>Export the content type and its field to a feature module with the <a href="http://drupal.org/project/features" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/features?referer=');">Features</a> module. <span style="color: #ff0000;"><strong>*** WARNING: DO NOT ENABLE THE FEATURE MODULE YET</strong></span><strong>.</strong> ***</li>
<li>The existing content type will be the clone, so edit it and change the machine name; this renames it and changes the type of all existing content to the new name.</li>
<li>Enable the feature module. Your previous content type is restored (potentially after reverting).</li>
</ol>
<h2>My Experience</h2>
<p>I found that things didn&#8217;t quite go as advertised with this approach. I couldn&#8217;t get the existing content type to be recreated when reverting the feature. I found a workaround; it entailed editing database tables in phpMyAdmin, so it&#8217;s not ideal;  however, it does appear to be safe as it is only old data that is deleted. <strong>This should be done only if you have enabled the feature module and you cannot revert it, meaning that shows <em>Overridden</em> despite your best efforts.</strong></p>
<ol>
<li>Open phpMyAdmin or your database tool.</li>
<li>Browse to the <strong>field_config_instance</strong> table.</li>
<li>Sort by the <strong>bundle</strong> column and delete all rows corresponding to the content type encapsulated in your feature (<strong>not</strong> the already-renamed one).</li>
<li>Now browse to the <strong>node_type</strong> table.</li>
<li>Edit the row corresponding to the <strong>renamed</strong> content type, and you should see that its <strong>orig_type</strong> column still contains, predictably, the original name. Unless you&#8217;re sure you need this information, in which case you probably won&#8217;t be able to revert the feature module, edit this row and change the value of this column to the same as the <strong>type</strong> column. In other words, if the new machine-readable name for your content type is <strong>income</strong>, as it was mine, change the value of this column to <strong>income</strong> as well.</li>
</ol>
<p>Try reverting your feature again. The content type will revert successfully, and the fields will remain <em>Overridden</em>. But don&#8217;t despair! They will be properly configured when you go and have a look. It&#8217;s just that Drupal adds some additional information that for one reason or another will not have been exported to the original feature, or wasn&#8217;t in my case. Recreate the feature module and re-export it to make it show <em>Default</em> again.</p>
<p>I hope these third-party errata help someone out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/10/04/cloning-content-types-in-drupal-7-errata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-to: Create Drupal development sites in Quickstart</title>
		<link>http://www.wizonesolutions.com/2011/09/05/how-to-create-drupal-development-sites-in-quickstart/</link>
		<comments>http://www.wizonesolutions.com/2011/09/05/how-to-create-drupal-development-sites-in-quickstart/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 00:19:05 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Drush]]></category>
		<category><![CDATA[Life of a Web Developer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[6]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[8]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[drush]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[quickstart]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[workaround]]></category>
		<category><![CDATA[working copy]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=435</guid>
		<description><![CDATA[Yesterday, I felt like reviewing some patches, so I fired up my Quickstart-based virtual machine and set about creating some Drupal development sites. I realized I first had to create Drush Make files to get the proper development versions installed. So I did that. However, I also realized that, despite cloning the code via Git [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I felt like reviewing some patches, so I fired up my <a href="http://drupal.org/project/quickstart" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/quickstart?referer=');">Quickstart</a>-based virtual machine and set about creating some Drupal development sites. I realized I first had to create Drush Make files to get the proper development versions installed. So I did that. However, I also realized that, despite cloning the code via Git and checking out a particular branch, the Git clone was not actually a Git repository. This is because Drush Make requires the &#8211;working-copy switch in order to do this. I&#8217;ve posted a workaround on the Quickstart issue queues. This post mostly serves as pointers to a couple things:</p>
<ul>
<li><a href="https://drupal.org/node/1269394" onclick="pageTracker._trackPageview('/outgoing/drupal.org/node/1269394?referer=');">Drush Make makefiles for Drupal development versions</a></li>
<li><a href="http://drupal.org/node/1269406#comment-4950294" onclick="pageTracker._trackPageview('/outgoing/drupal.org/node/1269406_comment-4950294?referer=');">Workaround for inability of Quickstart&#8217;s quickstart-create Drush command to create Git-enabled sites</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/09/05/how-to-create-drupal-development-sites-in-quickstart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Feeds CSV Importer Sources: Caveat Amplificator</title>
		<link>http://www.wizonesolutions.com/2011/07/29/feeds-csv-importer-sources-caveat-amplificator/</link>
		<comments>http://www.wizonesolutions.com/2011/07/29/feeds-csv-importer-sources-caveat-amplificator/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 01:32:24 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[6]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[latin]]></category>
		<category><![CDATA[lowercase]]></category>
		<category><![CDATA[not]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[spaces]]></category>
		<category><![CDATA[tags]]></category>
		<category><![CDATA[tamper]]></category>
		<category><![CDATA[taxonomy]]></category>
		<category><![CDATA[underscore]]></category>
		<category><![CDATA[working]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=431</guid>
		<description><![CDATA[I had an interesting experience with Feeds and Feeds Tamper today. I wasn&#8217;t able to get a comma-separated set of words to turn into multiple tags no matter what I tried. I was using the Explode plugin that comes with Feeds Tamper and set the delimiter as a comma and the limit to 1. My [...]]]></description>
			<content:encoded><![CDATA[<p>I had an interesting experience with <a href="http://drupal.org/project/feeds" target="_blank" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/feeds?referer=');">Feeds</a> and <a href="http://drupal.org/project/feeds_tamper" target="_blank" onclick="pageTracker._trackPageview('/outgoing/drupal.org/project/feeds_tamper?referer=');">Feeds Tamper</a> today. I wasn&#8217;t able to get a comma-separated set of words to turn into multiple tags no matter what I tried. I was using the Explode plugin that comes with Feeds Tamper and set the delimiter as a comma and the limit to 1. My research indicated this should work, but it didn&#8217;t.</p>
<p>There were two problems that were so counterintuitive, the urge to blog about them came over me. Disclaimer: I admit I&#8217;ve never properly read the Feeds documentation; I figured setting up a node importer based off a CSV parser would be pretty easy.</p>
<p>The solution is extremely simple:<strong></strong></p>
<p><strong>When setting up your CSV importer and specifying Source column names, do not use spaces or uppercase letters. This means you need to avoid it in your CSV file as well.</strong></p>
<p>That&#8217;s all! Instead of <em>Body Text</em>, call it <em>body_text</em>. What happens is that by the time Feeds Tamper receives your Feeds field, the data structure it uses to store them contains lowercase (and probably space-free) versions of whatever you had as the Source column names back in your updater. Using my tip ensures that these will be the same, and Feeds Tamper will be happy.</p>
<p>Have fun tampering.</p>
<p>P.S. The Latin in the title hopefully means, &#8220;Developer beware.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/07/29/feeds-csv-importer-sources-caveat-amplificator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Snippet &#8211; Open Link in New Window in Drupal 7</title>
		<link>http://www.wizonesolutions.com/2011/06/02/code-snippet-open-link-in-new-window-in-drupal-7/</link>
		<comments>http://www.wizonesolutions.com/2011/06/02/code-snippet-open-link-in-new-window-in-drupal-7/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 20:07:18 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[7]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=367</guid>
		<description><![CDATA[Although this is not recommended, I&#8217;ve seen the question mentioned in the topic come up a couple times over the last few weeks: How do I get my links to open in a new window or tab in the user&#8217;s browser in Drupal 7? I&#8217;ve heard that the target=&#8221;_blank&#8221; method is once again valid in [...]]]></description>
			<content:encoded><![CDATA[<p>Although this is <a href="http://ux.stackexchange.com/questions/5397/whats-your-take-on-target-blank" target="_blank" onclick="pageTracker._trackPageview('/outgoing/ux.stackexchange.com/questions/5397/whats-your-take-on-target-blank?referer=');">not recommended</a>, I&#8217;ve seen the question mentioned in the topic come up a couple times over the last few weeks:</p>
<blockquote><p>How do I get my links to open in a new window or tab in the user&#8217;s browser in Drupal 7?</p></blockquote>
<p>I&#8217;ve heard that the <strong>target=&#8221;_blank&#8221;</strong> method is once again valid in HTML 5&#8230;however, it will still make your HTML fail validation under other specifications. The way around this is to use JavaScript.</p>
<p>Copy and paste this snippet into the appropriate area of your site &#8211; usually a JavaScript file in your theme. When you want to make a link open in a new window or tab, instead of <strong>target=_blank</strong>, add <strong>rel=&#8221;external&#8221;</strong>.</p>
<p><code>(function ($) {<br />
<span style="padding-left: 17px;">Drupal.behaviors.externalLink = {</span><br />
<span style="padding-left: 34px;">attach: function (context, settings) {</span><br />
<span style="padding-left: 51px;">$('a[rel="external"]', context).attr("target", "_blank");</span><br />
<span style="padding-left: 34px;">}</span><br />
<span style="padding-left: 17px;">}</span><br />
}(jQuery));</code></p>
<p>The reason this workaround is OK to use is that it does a little something called separating presentation from behavior. In other words, you aren&#8217;t relying on the browser to take a particular action because of the HTML itself; you&#8217;re telling it what action to take in the JavaScript.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/06/02/code-snippet-open-link-in-new-window-in-drupal-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux sed trick &#8211; Remove line from file by number</title>
		<link>http://www.wizonesolutions.com/2011/05/21/linux-sed-trick-remove-line-from-file-by-number/</link>
		<comments>http://www.wizonesolutions.com/2011/05/21/linux-sed-trick-remove-line-from-file-by-number/#comments</comments>
		<pubDate>Sun, 22 May 2011 04:25:56 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[Life of a Web Developer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[sed]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[trick]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=350</guid>
		<description><![CDATA[I wanted to document this before I forgot it. To remove a single line from an existing file with sed, use: sed -i '[num]d' [filename] For example, to remove line 1 from ~/.ssh/known_hosts (my exact use case right now), type: sed -i '1d' ~/.ssh/known_hosts sed is a neat little tool. I use it to quickly [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to document this before I forgot it. To remove a single line from an existing file with sed, use:</p>
<p><code>sed -i '[num]d' [filename]</code></p>
<p>For example, to remove line 1 from ~/.ssh/known_hosts (my exact use case right now), type:</p>
<p><code>sed -i '1d' ~/.ssh/known_hosts</code></p>
<p>sed is a neat little tool. I use it to quickly copy and change Apache virtual hosts sometimes as well. I recommend learning a bit about it and its &#8216;s&#8217; command as well.</p>
<p>P.S. If you don&#8217;t use the <code>-i</code> switch, sed will output the result after replacements instead of changing the file. You can pipe (|) this output to other programs or redirect (&gt; or &gt;&gt;) it to a file.</p>
<p>Happy sed&#8230;ing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/05/21/linux-sed-trick-remove-line-from-file-by-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Drush Tip &#8211; Import database SQL with drush sql-cli (sqlc)</title>
		<link>http://www.wizonesolutions.com/2011/03/28/quick-drush-tip-import-database-sql-with-drush-sql-cli-sqlc/</link>
		<comments>http://www.wizonesolutions.com/2011/03/28/quick-drush-tip-import-database-sql-with-drush-sql-cli-sqlc/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 03:48:04 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Drush]]></category>
		<category><![CDATA[Life of a Web Developer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[drush]]></category>
		<category><![CDATA[drush sql-cli]]></category>
		<category><![CDATA[drush sqlc]]></category>
		<category><![CDATA[import database to drupal]]></category>
		<category><![CDATA[import sql to drupal]]></category>
		<category><![CDATA[import sql with drush]]></category>
		<category><![CDATA[magic]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[postgresql]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=296</guid>
		<description><![CDATA[I discovered something awesome today just on a hunch and wanted to share. I&#8217;m not the first one to blog about this, but it isn&#8217;t widely mentioned on the &#8216;net, at least not as far as I can see. Basically, it&#8217;s the drush sql-cli command, or drush sqlc for short. If you type just that, [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered something awesome today just on a hunch and wanted to share. I&#8217;m not the first one to <a href="http://www.bronius.com/features-git-drush-drupal-development-workflow-example" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.bronius.com/features-git-drush-drupal-development-workflow-example?referer=');">blog about this</a>, but it isn&#8217;t widely mentioned on the &#8216;net, at least not as far as I can see.</p>
<p>Basically, it&#8217;s the <strong>drush sql-cli</strong> command, or <strong>drush sqlc</strong> for short. If you type just that, you will be logged into a database shell. Did you know, however, that you can actually import a database this way, much in the way you would with <strong>mysql database &lt; database_file.sql</strong>? Swap out the mysql stuff and drop in <strong>drush sqlc &lt; database_file.sql</strong> &#8211; and it works! It grabs the DB information from your settings.php file, and magic happens! This was an awesome find for me, and it&#8217;s going to save me a decent amount of time in the future.</p>
<p><strong>NOTE: This might be MySQL-only. If a PostgreSQL user could chime in and let me know if it works for that or any other DBMSes, I&#8217;d appreciate it!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/03/28/quick-drush-tip-import-database-sql-with-drush-sql-cli-sqlc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal 7 Tips: Fixing &#8220;$ is not an object&#8221; in JavaScript code</title>
		<link>http://www.wizonesolutions.com/2011/02/11/drupal-7-tips-fixing-not-an-object-in-javascript-code/</link>
		<comments>http://www.wizonesolutions.com/2011/02/11/drupal-7-tips-fixing-not-an-object-in-javascript-code/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 08:18:16 +0000</pubDate>
		<dc:creator>WizOne Solutions</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[$ is not an object]]></category>
		<category><![CDATA[drupal 7]]></category>
		<category><![CDATA[drupal 7 Drupal.behaviors]]></category>
		<category><![CDATA[drupal 7 jquery]]></category>
		<category><![CDATA[drupal 7 jquery not an object error]]></category>
		<category><![CDATA[drupal 7 jquery workaround]]></category>
		<category><![CDATA[fix drupal 7 jquery]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jQuery.noConflict]]></category>

		<guid isPermaLink="false">http://www.wizonesolutions.com/?p=215</guid>
		<description><![CDATA[(I almost named this, &#8220;Drupal 7 wants you to use $ for money, not your jQuery.) I ran into an API change issue yesterday when working on upgrading Fill PDF to be fully Drupal 7-compatible, and just today, someone on IRC ran into the same issue. She suggested that &#8220;somebody&#8221; write a blog post about [...]]]></description>
			<content:encoded><![CDATA[<p>(I almost named this, &#8220;Drupal 7 wants you to use $ for money, not your jQuery.)</p>
<p>I ran into an API change issue yesterday when working on upgrading Fill PDF to be fully Drupal 7-compatible, and just today, someone on IRC ran into the same issue. She suggested that &#8220;somebody&#8221; write a blog post about it, so I thought I would. I hope it saves some random Internet searcher a few hairs.</p>
<p>Basically, <strong>you can no longer use jQuery&#8217;s shortcut variable $ in Drupal 7 instead of the full jQuery variable</strong>.<span id="more-215"></span></p>
<p>What does this mean? In short, code that you used to write like this:</p>
<p style="padding-left: 30px;"><code><strong>$('#my-awesome-id').attr('title', 'My Awesome Title');</strong></code></p>
<p>will net you a Javascript error in Drupal 7. There are not one, but <strong>two ways</strong> around this.</p>
<p><strong>The Ugly Way</strong></p>
<p>Replace $ with jQuery wherever $ is used. For example:</p>
<p style="padding-left: 30px;"><code><strong>jQuery('#my-awesome-id').attr('title', 'My Awesome Title');</strong></code></p>
<p>Yuck. Despite that actually being the slightly simpler way&#8230;I don&#8217;t like it.</p>
<p><strong>The Money Way</strong></p>
<p>This is the money way because it brings back the $. This way is slightly more complex because you have to wrap your JavaScript code inside of a parenthetical inline function. Let&#8217;s have a look:</p>
<p style="padding-left: 30px;"><code><strong>(function($) {<br />
$('#my-awesome-id').attr('title', 'My Awesome Title');<br />
})(jQuery);</strong></code></p>
<p>This basically makes $ work <em>inside of that wrapper code</em> (between the <code>(function($) {</code> and the <code>})(jQuery)</code>. I haven&#8217;t yet tried putting it around entire JS files &#8211; if you have, let us know in the comments. Does Drupal.behaviors work inside of this wrapper? <strong>Update: According to Lê Thanh in the comments, Drupal.behaviors functions properly within the (function($) { &#8230; })(jQuery); wrapper. Next question &#8211; anyone know if this wrapper has a name? I&#8217;m going to call it the jQuery Sandwich &#8482; until corrected.</strong></p>
<p>For the full story, see: http://drupal.org/node/224333#javascript_compatibility</p>
<p>And speaking of Drupal.behaviors, that has also changed a little bit (and perhaps more if you are doing AHAH/AJAX): http://drupal.org/node/224333#drupal_behaviors</p>
<p>Whether you write jQuery in Drupal 7 the subjectively ugly way or the subjectively money way, you will now at least be able to produce working jQuery code in Drupal 7. Happy coding!</p>
<p>P.S.: For further hair preservation, it is recommended not to look at the size of your browser scrollbar when browsing the &#8220;Converting 6.x modules to 7.x&#8221; page referenced above.</p>
<p><strong>Update: P.P.S: The jQuery Sandwich is not actually a trademark, or if it is, it&#8217;s not mine.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wizonesolutions.com/2011/02/11/drupal-7-tips-fixing-not-an-object-in-javascript-code/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

