Drupal https://mikekeran.com/category/webdev/programming/drupal en I voted! https://mikekeran.com/node/165 <span class="field field--name-title field--type-string field--label-hidden">I voted!</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sun, 03/13/2016 - 8:20pm</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><img alt="Image saying &quot;I voted.&quot;" data-entity-type="file" data-entity-uuid="815e100e-c594-466c-a637-55905b6ec2f1" src="/sites/default/files/inline-images/DAElection-IVoted%5B1%5D.png" class="align-right" />You can't complain if you don't vote. Drupal Association members are <a href="https://association.drupal.org/boardelection">currently voting</a> for the at-large board member position. If you want a say in the future direction of the DA, you'd better cast your vote now -- voting closes on 18 March.</p> <p>If you work with Drupal, and make money using Drupal, you should join the Drupal Association. You won't be able to vote in this round of elections, but you will be supporting all that the DA does -- running drupal.org (including all the sub-domains and testbots!), DrupalCons, financing Drupal Camps, Community Cultivation grants, global training days, and generally minding the health and well-being of the Drupal community in general.</p></div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> </div> <div class="field field--name-other field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/articles/copyright" hreflang="en">Copyright</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <a id="comment-538"></a> <article data-comment-user-id="0" about="/comment/538" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1484826108"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="" content="Reviews of essay writing service">Reviews of ess… (not verified)</span> on Thu, 01/19/2017 - 3:41am</span> <span property="schema:dateCreated" content="2017-01-19T11:41:48+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/538#comment-538" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/538" class="permalink" rel="bookmark" hreflang="en">Well that is a exceptional…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>Well that is a exceptional dialogue you might have made here. I particularly respect all above recounted statements a couple of specific and a brand new development subject. I believe this is one of the predominant discipline the readers must make a exceptional understandings about it.</p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=538&amp;1=full&amp;2=en&amp;3=" token="20beb7fe"></drupal-render-placeholder> </div> </article> <a id="comment-542"></a> <article data-comment-user-id="0" about="/comment/542" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1488291610"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Tue, 02/28/2017 - 6:20am</span> <span property="schema:dateCreated" content="2017-02-28T14:20:10+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/542#comment-542" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/542" class="permalink" rel="bookmark" hreflang="en">If you work with Drupal, and…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>If you work with Drupal, and make money using Drupal, you should join the Drupal Association. You won't be able to vote in this round of elections, but you will be supporting all that the DA does -- running drupal.org (including all the sub-domains and testbots!), DrupalCons, financing Drupal Camps, Community Cultivation grants, global training days, and generally minding the health and well-being of the Drupal community in general.</p> <p>http://clip-converters.com/<br />  </p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=542&amp;1=full&amp;2=en&amp;3=" token="be2d4a74"></drupal-render-placeholder> </div> </article> <a id="comment-543"></a> <article data-comment-user-id="0" about="/comment/543" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1488291665"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Tue, 02/28/2017 - 6:21am</span> <span property="schema:dateCreated" content="2017-02-28T14:21:05+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/543#comment-543" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/543" class="permalink" rel="bookmark" hreflang="en">You can&#039;t complain if you…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>You can't complain if you don't vote. Drupal Association members are currently voting for the at-large board member position. If you want a say in the future direction of the DA, you'd better cast your vote now -- voting closes on 18 March.</p> <p><a href="http://clip-converters.com/">clip converter</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=543&amp;1=full&amp;2=en&amp;3=" token="1f14ce9a"></drupal-render-placeholder> </div> </article> <a id="comment-552"></a> <article data-comment-user-id="0" about="/comment/552" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1489154994"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Fri, 03/10/2017 - 6:09am</span> <span property="schema:dateCreated" content="2017-03-10T14:09:54+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/552#comment-552" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/552" class="permalink" rel="bookmark" hreflang="en">If you work with Drupal, and…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>If you work with Drupal, and make money using Drupal, you should join the Drupal Association. You won't be able to vote in this round of elections, but you will be supporting all that the DA does -- running drupal.org (including all the sub-domains and testbots!), DrupalCons, financing Drupal Camps, Community Cultivation grants, global training days, and generally minding the health and well-being of the Drupal community in general.</p> <p><a href="http://uspstrackingz.com/">usps</a><a href="http://uspstrackingz.com/"> tracking</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=552&amp;1=full&amp;2=en&amp;3=" token="f93ebc8f"></drupal-render-placeholder> </div> </article> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=165&amp;2=comment&amp;3=comment" token="f1c86eeb"></drupal-render-placeholder> </section> Mon, 14 Mar 2016 03:20:30 +0000 MikeKeran 165 at https://mikekeran.com Making sql-sync Safer https://mikekeran.com/other/making-sql-sync-safer <span class="field field--name-title field--type-string field--label-hidden">Making sql-sync Safer</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Wed, 12/04/2013 - 8:17pm</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Drush aliases can be a huge timesaver when you’re working back-and-forth between your local dev environment and a remote server. You can clear caches remotely as easily as adding <code>@remote</code> to your usual <code>drush cc all</code> command. Or use the sql-cli command to log into the remote server’s MySQL instance without leaving the comfort of your local command prompt. My favorite is updating my local database to what’s on the remote server: <code>drush sql-sync @remote @local</code> (followed by a coffee break).</p> <p>We've all accidentally swapped parameters on the command line, usually after too much work and too little sleep. Not a big deal when you swap source and destination for <code>ln –s</code>, it politely warns you that it can’t overwrite an existing file. But do that with <code>sql-sync</code> and you’ve just replaced your live server’s database with whatever test content you’ve been tooling around with! It’s good practice to test your daily backups from time to time, but not while your live server is showing nothing but <a href="http://baconipsum.com/">Bacon Ipsum</a>. Let’s save us the heart attack and data loss by preventing this situation in the first place.</p> <p>One option is to never specify the destination using a site alias: use <code>drush sql-sync @remote example.com</code> to replace the database pointed to by <em>sites/example.com/settings.php</em>. Removing the <code>@</code> in the destination prevents you from ever blowing away any database other than your local one. You’ll need to run this from within the Drupal install of the site you’re updating and you’ll need to get everyone working on the project to do it. But it’s a good habit to get into.</p> <p>Option two solves the problem is a more systemic way. By implementing <code>drush_hook_COMMAND_validate</code>, we can add extra validation code to any Drush command. Open <em>~/.drush/policy.drush.inc</em> and add the following code:</p> <pre class="code-sample"> &lt;?php /** * Implements drush_hook_COMMAND_validate. * * Prevent a catastrophic brain-fart -- only allow users to overwrite their * local database. */ function drush_policy_sql_sync_validate($source = NULL, $dest = NULL) { if ($dest == '@local' || FALSE === strpos($dest, '@')) { return TRUE; } else { return drush_set_error(dt('You may only overwrite your local database -- check your source/destination order. It should be similar to "drush sql-sync @remote @local".')); } }</pre> <p>This is a slightly more restrictive version of what ships in the <a href="http://api.drush.ws/api/drush/examples%21policy.drush.inc/function/drush_policy_sql_sync_validate/master">Drush example policy file</a>. This one disallows any site alias in the destination parameter except <code>@local</code> under the assumption that any you would never want to overwrite a remote database. If you use sql-sync to move databases from staging to production, you may need to add an override that will allow this.</p> <p>Safe now, we can happily sql-sync databases late into the night.</p> </div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> </div> <div class="field field--name-other field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/articles/drupal-planet" hreflang="en">Drupal Planet</a></div> <div class="field__item"><a href="/articles/drush" hreflang="en">Drush</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <a id="comment-440"></a> <article data-comment-user-id="0" about="/comment/440" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1387445212"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <a rel="nofollow" href="http://www.bariswanschers.com" lang="" typeof="schema:Person" property="schema:name" datatype="" class="username">BarisW (not verified)</a> on Thu, 12/19/2013 - 1:26am</span> <span property="schema:dateCreated" content="2013-12-19T09:26:52+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/440#comment-440" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/440" class="permalink" rel="bookmark" hreflang="en">Thanks for sharing</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=440&amp;1=full&amp;2=en&amp;3=" token="0d077d8b"></drupal-render-placeholder> </div> </article> <a id="comment-553"></a> <article data-comment-user-id="0" about="/comment/553" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1489155020"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Fri, 03/10/2017 - 6:10am</span> <span property="schema:dateCreated" content="2017-03-10T14:10:20+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/553#comment-553" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/553" class="permalink" rel="bookmark" hreflang="en">We&#039;ve all accidentally…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>We've all accidentally swapped parameters on the command line, usually after too much work and too little sleep. Not a big deal when you swap source and destination for <code>ln –s</code>, it politely warns you that it can’t overwrite an existing file. But do that with <code>sql-sync</code> and you’ve just replaced your live server’s database with whatever test content you’ve been tooling around with! It’s good practice to test your daily backups from time to time, but not while your live server is showing nothing but <a href="http://baconipsum.com/">Bacon Ipsum</a>. Let’s save us the heart attack and data loss by preventing this situation in the first place.</p> <p><a href="http://texaslotterytx.com/">texas lottery</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=553&amp;1=full&amp;2=en&amp;3=" token="58073861"></drupal-render-placeholder> </div> </article> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=163&amp;2=comment&amp;3=comment" token="81bf780d"></drupal-render-placeholder> </section> Thu, 05 Dec 2013 04:17:52 +0000 MikeKeran 163 at https://mikekeran.com Adding Custom Mobile Protocols to Drupal https://mikekeran.com/other/adding-custom-mobile-protocols-to-drupal <span class="field field--name-title field--type-string field--label-hidden">Adding Custom Mobile Protocols to Drupal</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Mon, 11/25/2013 - 8:34pm</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>With the proliferation of mobile apps and Web sites on mobile devices, developers are often asked to integrate the two. Mobile apps can register a custom protocol with the mobile OS so that a link on a Web page such as <code>&lt;a href=”myapp://openapp”&gt;Open in MyApp&lt;/a&gt;</code> will open MyApp on the user’s phone. An early example of this was to have links on phone numbers actually call the number on mobile phones.</p> <p>On a recent project, I was asked to include a “Back to App” link on the site’s menu. “No problem,” I thought, “I’ll just set that as the destination of that menu item.” However trying to add <code>myapp://openapp</code> as a menu item destination lead to a</p> <blockquote> <p><em>Notice</em>: Undefined index: path in <em>menu_edit_item_validate()</em> (line <em>399</em> of <em>//modules/menu/menu.admin.inc</em>).</p> <p>The path '' is either invalid or you do not have access to it.</p> </blockquote> <p>A little digging lead me to the problem: Drupal has a limited list of protocols it considers 'valid'. Fortunately, those are accessed via <code>variable_get</code>. Unfortunately, there is no admin page where you can edit that list. And, more confusingly, Drupal uses two different default values for the list of protocols (includes/common.inc@1336 includes the <code>tel</code> protocol but modules/filter/filter.module@1398 does not). Finally, by default, Drupal doesn't set this variable in the database so the default value passed to <code>variable_get</code> is what gets used.</p> <p>My solution was to add a <code>hook_update_N</code> to an existing (custom) module to add the protocol I needed.</p> <pre class="code-sample">/** * Adds myapp:// protocol to the list of allowed protocols. */ function example_update_7001(&amp;$sandbox) { // From include/common.inc @ 1336 $protocols = variable_get('filter_allowed_protocols', array('ftp', 'http', 'https', 'irc', 'mailto', 'news', 'nntp', 'rtsp', 'sftp', 'ssh', 'tel', 'telnet', 'webcal')); $protocols[] = 'myapp'; variable_set('filter_allowed_protocols', $protocols); }</pre> <p>Not interested in writing an update hook? You can also set this directly in your <code>settings.php</code> file:</p> <pre class="code-sample">$conf['filter_allowed_protocols'] = array('ftp', 'http', ...);</pre> <p>I prefer the first option. If there is another module trying to add a protocol to the list, the second option would negate that. But you can't beat editing your settings.php for a quick-fix that avoids the need for a custom module.</p> </div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> </div> <div class="field field--name-other field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/articles/drupal-planet" hreflang="en">Drupal Planet</a></div> <div class="field__item"><a href="/articles/mobile-phones" hreflang="en">Mobile Phones</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <a id="comment-441"></a> <article data-comment-user-id="0" about="/comment/441" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1387464347"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">gmclelland (not verified)</span> on Thu, 12/19/2013 - 6:45am</span> <span property="schema:dateCreated" content="2013-12-19T14:45:47+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/441#comment-441" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/441" class="permalink" rel="bookmark" hreflang="en">As an alternative see</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=441&amp;1=full&amp;2=en&amp;3=" token="ac3ef965"></drupal-render-placeholder> </div> </article> <a id="comment-536"></a> <article data-comment-user-id="0" about="/comment/536" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1479356691"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Sarah (not verified)</span> on Wed, 11/16/2016 - 8:24pm</span> <span property="schema:dateCreated" content="2016-11-17T04:24:51+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/536#comment-536" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/536" class="permalink" rel="bookmark" hreflang="en">Make it easy</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>http://forum.viva.co.id/indeks/threads/madu-dapat-menyembuhkan-mata-minus-benarkah.2273827/<br /> http://forum.idws.id/threads/6-cara-menjaga-agar-mata-tetap-sehat.585071/<br /> https://www.bersosial.com/threads/benarkah-vitamin-c-baik-untuk-kesehatan-mata.40258/<br /> http://warungkopi.okezone.com/thread/581128/mata-minus-dapat-diobati-dengan-wortel-mitos-atau-faktah<br /> http://forum.liputan6.com/t/konsumsi-makanan-ini-mata-minus-bisa-sembuh/71814</p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=536&amp;1=full&amp;2=en&amp;3=" token="595295af"></drupal-render-placeholder> </div> </article> <a id="comment-537"></a> <article data-comment-user-id="0" about="/comment/537" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1481071035"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Toni (not verified)</span> on Tue, 12/06/2016 - 4:37pm</span> <span property="schema:dateCreated" content="2016-12-07T00:37:15+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/537#comment-537" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/537" class="permalink" rel="bookmark" hreflang="en">Fight !</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p><a href="https://www.dpreview.com/members/4318677761/overview">lecithinsoftgel</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=537&amp;1=full&amp;2=en&amp;3=" token="f86b1141"></drupal-render-placeholder> </div> </article> <a id="comment-546"></a> <article data-comment-user-id="0" about="/comment/546" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1488291890"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Tue, 02/28/2017 - 6:24am</span> <span property="schema:dateCreated" content="2017-02-28T14:24:50+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/546#comment-546" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/546" class="permalink" rel="bookmark" hreflang="en">I prefer the first option…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item">I prefer the first option. If there is another module trying to add a protocol to the list, the second option would negate that. But you can't beat editing your settings.php for a quick-fix that avoids the need for a custom module. <a href="http://gofundmereview.com/">gofundme</a></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=546&amp;1=full&amp;2=en&amp;3=" token="5758530f"></drupal-render-placeholder> </div> </article> <a id="comment-554"></a> <article data-comment-user-id="0" about="/comment/554" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1489155046"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Fri, 03/10/2017 - 6:10am</span> <span property="schema:dateCreated" content="2017-03-10T14:10:46+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/554#comment-554" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/554" class="permalink" rel="bookmark" hreflang="en">A little digging lead me to…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>A little digging lead me to the problem: Drupal has a limited list of protocols it considers 'valid'. Fortunately, those are accessed via <code>variable_get</code>. Unfortunately, there is no admin page where you can edit that list. And, more confusingly, Drupal uses two different default values for the list of protocols (includes/common.inc@1336 includes the <code>tel</code> protocol but modules/filter/filter.module@1398 does not). Finally, by default, Drupal doesn't set this variable in the database so the default value passed to <code>variable_get</code> is what gets used.</p> <p><a href="http://simplemp3-downloader.com/">simple mp3 downloader</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=554&amp;1=full&amp;2=en&amp;3=" token="8949aa69"></drupal-render-placeholder> </div> </article> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=162&amp;2=comment&amp;3=comment" token="2086fce3"></drupal-render-placeholder> </section> Tue, 26 Nov 2013 04:34:34 +0000 MikeKeran 162 at https://mikekeran.com Migrating a CCK Field into the Node Title Field https://mikekeran.com/other/migrating-a-cck-field-into-the-node-title-field <span class="field field--name-title field--type-string field--label-hidden">Migrating a CCK Field into the Node Title Field</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Mon, 10/28/2013 - 10:26am</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>On a recent migration project I came across an odd error:</p> <blockquote><code>Illegal offset type in isset or empty File ...snip...\sites\all\modules\pathauto\pathauto.inc, line 182</code></blockquote> <p>I was using Migrate 2.5 to move date from a Drupal 6 project into Drupal 7 and had already migrated several content types without having problems with my pathauto settings.</p> <p>After digging for a bit, I realized that pathauto was being passed an array for the node title causing problems with checking the cache for a previous calculated pathauto URL. Odd, node titles are always strings. Then I realized that this is the first content type that I was pulling the node title from a CCK text field and Migrate will pass that along as an array (just like all other CCK fields).</p> <p>The fix is easy enough, add a <code>prepare</code> routine to your migration object such as this:</p> <pre class="code-sample">public function prepare($entity, stdClass $row) { // Because the title field is imported from a CCK field, it shows up as an // array. Node titles have to be strings. if (is_array($entity-&gt;title)) { $entity-&gt;title = $entity-&gt;title[0]; } }</pre> <p>And pathauto is happy again!</p> </div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> </div> <div class="field field--name-other field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/articles/migration" hreflang="en">Migration</a></div> <div class="field__item"><a href="/articles/drupal-planet" hreflang="en">Drupal Planet</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <a id="comment-458"></a> <article data-comment-user-id="0" about="/comment/458" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1394933165"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Tanout (not verified)</span> on Sat, 03/15/2014 - 6:26pm</span> <span property="schema:dateCreated" content="2014-03-16T01:26:05+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/458#comment-458" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/458" class="permalink" rel="bookmark" hreflang="en">Thanks for sharing</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=458&amp;1=full&amp;2=en&amp;3=" token="438fbfc7"></drupal-render-placeholder> </div> </article> <a id="comment-555"></a> <article data-comment-user-id="0" about="/comment/555" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1489155072"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Fri, 03/10/2017 - 6:11am</span> <span property="schema:dateCreated" content="2017-03-10T14:11:12+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/555#comment-555" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/555" class="permalink" rel="bookmark" hreflang="en">After digging for a bit, I…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>After digging for a bit, I realized that pathauto was being passed an array for the node title causing problems with checking the cache for a previous calculated pathauto URL. Odd, node titles are always strings. Then I realized that this is the first content type that I was pulling the node title from a CCK text field and Migrate will pass that along as an array (just like all other CCK fields).</p> <p><a href="http://mangastreamreviews.com/">mangastream</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=555&amp;1=full&amp;2=en&amp;3=" token="28702e87"></drupal-render-placeholder> </div> </article> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=161&amp;2=comment&amp;3=comment" token="18bd7790"></drupal-render-placeholder> </section> Mon, 28 Oct 2013 17:26:34 +0000 MikeKeran 161 at https://mikekeran.com Eclipse Configuration for Drupal Development https://mikekeran.com/webdev/eclipse-configuration-for-drupal-development <span class="field field--name-title field--type-string field--label-hidden">Eclipse Configuration for Drupal Development</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Tue, 01/08/2013 - 1:27pm</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>These configuration steps used to reside in my <a href="http://mikekeran.com/drupal-developer-setup-windows">Drupal Developer's Setup for Windows</a> post. But I've since switched to Sublime Text 2 so the steps in that post changed drastically. I've archived the Eclipse/Aptana settings here, just in case they are still of use to anyone.</p><ol><li>Set <em>Window –&gt; Preferences –&gt; General –&gt; Editors –&gt; Text Editor –&gt; Displayed tab width</em> to 2 and check the <em>Insert spaces for tabs</em> option</li><li>Navigate to <em>General –&gt; Editors –&gt; File Associations</em> in the left-hand pane<ol><li>Click the <em>Add…</em> button next to the <em>File types</em> list (the top Add button) type <em>*.module</em> in the <em>File type</em> text box</li><li>Click the <em>Add…</em> button next to the <em>Associated editors</em> list (the bottom Add button), select PHP Source Editor from the list and click OK</li><li>Repeat steps 1 and 2 for each of these file types:<br /><em>*.engine<br />*.inc</em> (may already be associated with the PHP editor)<br /><em>*.theme<br />*.install<br />*.profile<br />*.test</em></li></ol></li><li>When you first start Aptana, you may get a Windows Firewall alert. If so, allow access as you see fit.</li></ol><p> </p><p></p><li>Install XDebug. Aptana <a href="https://jira.appcelerator.org/browse/APSTUD-769">finally has support for XDebug</a>, but you’ll need to grab a build greater than 3.2.0.201203202318. Obviously this is an optional step, but if you’ve been debugging your Drupal sites with a liberal sprinkling of dsm() calls, consider doing these steps. The time saved the first time you use the debugger will make it all worth it or your money back…<ol><li>Check your Eclipse version (<em>Help</em> –&gt; <em>About Aptana Studio 3</em>). Once Aptana 3.2 is released, this is will no longer be necessary.<ol><li>From <em>Windows</em> –&gt; <em>Preferences</em> –&gt; <em>Install/Update</em> –&gt; <em>Available Software Sites</em>, click <em>Add</em>, point the new update site to <em>http://preview.appcelerator.com/aptana/studio3/standalone/update/nightly/</em>, and OK the dialog.</li><li>Close Aptana. Right-click on the Aptana icon in the Taskbar, right-click on the <em>AptanaStudio 3</em> option, and select <em>Run as administrator</em>. This gives Aptana permissions to update itself.</li><li>In Aptana, <em>Help</em> –&gt; <em>Check for updates</em> and follow the instructions for updating Aptana Studio.</li></ol></li><li>Get the debugger plugin for Aptana. Note: Once Aptana 3.2 is released, the debugger plugin should come included and these steps will no longer be needed.<ol><li>Go to <a href="https://jira.appcelerator.org/browse/APSTUD-769">this issue</a> in the Aptana issue queue and download the zip file in the <em>Attachments</em> section.</li><li>Unzip the file and place the contents in a directory on your local machine.</li><li>In Aptana, <em>Help</em> –&gt; <em>Install new software</em>, click the <em>Add</em> button, click the <em>Local</em> button, and navigate to the directory with the unzipped files.</li><li>Click OK and follow the instructions to install the debugger.</li></ol></li><li>Edit your <em>php.ini</em> file (click the WAMP Manager icon, select <em>PHP</em> –&gt; <em>php.ini</em>) and scroll to the <em>XDebug</em> section. Change/Add the following values then restart Apache. You can verify the changes by creating a one-line PHP file with &lt;?php phpinfo(); ?&gt; and verify that <em>with XDebug v. 2.1.2 Copyright… etc.</em> appears just above the <em>PHP Credits</em> link. <pre>xdebug.remote_enable=1 xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.remote_handler="dbgp"</pre> </li><li>You can setup Debug Configurations in Aptana (<em>Run</em> –&gt; <em>Debug Configurations…</em>), but I find it easier to use Chrome’s <a href="https://chrome.google.com/extensions/detail/eadndfjplgieldjbigjakmdgkmoaaaoc">XDebug Helper</a> or Firefox’s <a href="https://addons.mozilla.org/en-US/firefox/addon/58688/">easy XDebug</a> plugins to tell Aptana when I want to break into the debugger. I know that Chrome’s can be set so the option is only available for some sites (eg: local.*) so it’s not cluttering my day-to-day browsing. I also like remapping the keyboard shortcuts for <em>Step Over</em> and <em>Step Into</em> to <em>F10</em> and <em>F11</em> to match what I’m used to from other debuggers. All I have to do is set a breakpoint in my code, then go to Chrome and make sure the “bug” at the end of the URL bar is green. I navigate to a page that will trip the breakpoint, switch to Aptana and it’s already waiting for me to step through the code!</li></ol></li><p></p><p> </p></div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming" hreflang="en">Programming</a></div> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=157&amp;2=comment&amp;3=comment" token="a1fe7a7b"></drupal-render-placeholder> </section> Tue, 08 Jan 2013 21:27:17 +0000 MikeKeran 157 at https://mikekeran.com Browsing the Drupal 7 Variable Table https://mikekeran.com/other/browsing-the-drupal-7-variable-table <span class="field field--name-title field--type-string field--label-hidden">Browsing the Drupal 7 Variable Table</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sun, 11/25/2012 - 2:39pm</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Drupal's <em>variable</em> table -- where most admin settings are saved -- had an overhaul between Drupal 6 and Drupal 7. No longer is it simple to browse the table with the SQL command line or using tools such as phpMyAdmin. Here are a few tricks to make browsing this table simple again.</p> <p> </p><p>The value of most of Drupal’s admin settings are saved in the <em>variable</em> table. In Drupal 6 is was easy to browse through this table – the <em>value</em> field was <code>longtext</code> and the value being saved was serialized allowing storage of both simple data (strings, numbers) and complicated data (arrays, objects). You could also find all instances of a given value with simple SQL:</p> <pre class="code-sample">SELECT * FROM variable WHERE value LIKE "%some_value%" </pre> <p>But serializing doesn’t work well for objects with protected or private members or for binary data.  So the <em>value</em> column <a href="http://drupal.org/node/690746">became a <code>blob</code></a> in Drupal 7.  This allowed us much greater flexibility in what we can save in the <em>variable</em> table at the cost of easy “reading” of the values in that table.  (It also prevents us from indexing that column, but that was already the case since we stored only serialized data in the D6 version of this column).</p> <p>Here are some tricks I’ve been using to make it easy to browse the <em>variable</em> table in Drupal 7:</p> <ul><li>When using SQL to browse the variable table: <ol><li>Use the MySQL command <code>CONVERT</code> to un-blob data you’re displaying. <pre class="code-sample" style="width: auto;">SELECT CONVERT (value USING utf8) FROM variable WHERE name="site_mail" </pre> </li> <li>Use the MySQL command <code>CAST</code> to un-blob data you’re querying. <pre class="code-sample" style="width: auto;">SELECT * FROM variable WHERE CAST(value AS CHAR) LIKE "%some_value%" </pre> </li> </ol></li> <li>In phpMyAdmin, select the <em>Show blob contents</em> option. This lets you browse a tables just like you did in Drupal 6. Just beware of actual binary data stored in <code>blobs</code>, they don't display well.<br /><img src="/sites/mikekeran.com/files/variable-1.PNG" /><br /><img src="/sites/mikekeran.com/files/variable-2.PNG" /></li> </ul><p>I feel the need to point out that this is exactly <strong>NOT</strong> how you would do it if you were writing code for Drupal – that’s what the <a href="http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/variable_set/7">variable_set()</a> and <a href="http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/variable_get/7">variable_get()</a> functions are for.</p> <p>Also, having never worked on a PostgreSQL project, I have no idea if CONVERT and CAST work similarly on that platform.</p> </div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> </div> <div class="field field--name-other field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/articles/drupal-planet" hreflang="en">Drupal Planet</a></div> <div class="field__item"><a href="/articles/drupal-bits" hreflang="en">Drupal Bits</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <a id="comment-508"></a> <article data-comment-user-id="0" about="/comment/508" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1447016744"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">John (not verified)</span> on Sun, 11/08/2015 - 1:05pm</span> <span property="schema:dateCreated" content="2015-11-08T21:05:44+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/508#comment-508" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/508" class="permalink" rel="bookmark" hreflang="en">change site_name from URL</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=508&amp;1=full&amp;2=en&amp;3=" token="e98aacf3"></drupal-render-placeholder> </div> </article> <a id="comment-535"></a> <article data-comment-user-id="0" about="/comment/535" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1468019128"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Mandy1954 (not verified)</span> on Fri, 07/08/2016 - 4:05pm</span> <span property="schema:dateCreated" content="2016-07-08T23:05:28+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/535#comment-535" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/535" class="permalink" rel="bookmark" hreflang="en">oh this is nice24</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item">nice resource here!</div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=535&amp;1=full&amp;2=en&amp;3=" token="61691edc"></drupal-render-placeholder> </div> </article> <a id="comment-541"></a> <article data-comment-user-id="0" about="/comment/541" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1487961687"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="" content="Legit Online Jobs for College Students">Legit Online J… (not verified)</span> on Fri, 02/24/2017 - 10:41am</span> <span property="schema:dateCreated" content="2017-02-24T18:41:27+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/541#comment-541" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/541" class="permalink" rel="bookmark" hreflang="en">http://www.agreedjobs.com/  </a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>http://www.agreedjobs.com/</p> <p> </p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=541&amp;1=full&amp;2=en&amp;3=" token="8616c107"></drupal-render-placeholder> </div> </article> <a id="comment-547"></a> <article data-comment-user-id="0" about="/comment/547" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1488291986"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Tue, 02/28/2017 - 6:26am</span> <span property="schema:dateCreated" content="2017-02-28T14:26:26+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/547#comment-547" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/547" class="permalink" rel="bookmark" hreflang="en">Drupal&#039;s variable table --…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item">Drupal's variable table -- where most admin settings are saved -- had an overhaul between Drupal 6 and Drupal 7. No longer is it simple to browse the table with the SQL command line or using tools such as phpMyAdmin. Here are a few tricks to make browsing this table simple again. <a href="http://csgoloungereview.com/">csgolounge</a></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=547&amp;1=full&amp;2=en&amp;3=" token="f661d7e1"></drupal-render-placeholder> </div> </article> <a id="comment-556"></a> <article data-comment-user-id="0" about="/comment/556" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1489155097"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Fri, 03/10/2017 - 6:11am</span> <span property="schema:dateCreated" content="2017-03-10T14:11:37+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/556#comment-556" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/556" class="permalink" rel="bookmark" hreflang="en">But serializing doesn’t work…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>But serializing doesn’t work well for objects with protected or private members or for binary data.  So the value column became a blob in Drupal 7.  This allowed us much greater flexibility in what we can save in the variable table at the cost of easy “reading” of the values in that table.  (It also prevents us from indexing that column, but that was already the case since we stored only serialized data in the D6 version of this column).</p> <p><a href="http://convertodownloader.com/">converto</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=556&amp;1=full&amp;2=en&amp;3=" token="104ba5f4"></drupal-render-placeholder> </div> </article> <a id="comment-570"></a> <article data-comment-user-id="0" about="/comment/570" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1490353631"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">xfgxg (not verified)</span> on Fri, 03/24/2017 - 4:07am</span> <span property="schema:dateCreated" content="2017-03-24T11:07:11+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/570#comment-570" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/570" class="permalink" rel="bookmark" hreflang="en">Engineering, Agriculture and…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>Engineering, Agriculture and Medical Common Entrance Test (EAMCET) is conducted by Jawaharlal Nehru Technological University Kakinada on behalf of APSCHE. <br />  </p> <p><strong><a href="http://www.apeamcet2017.org/ap-eamcet-results-2017/">ap eamcet results</a></strong></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=570&amp;1=full&amp;2=en&amp;3=" token="ee1b5ee4"></drupal-render-placeholder> </div> </article> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=156&amp;2=comment&amp;3=comment" token="00c7fe95"></drupal-render-placeholder> </section> Sun, 25 Nov 2012 22:39:49 +0000 MikeKeran 156 at https://mikekeran.com A Drupal Developer’s Setup on Windows https://mikekeran.com/drupal-developer-setup-windows <span class="field field--name-title field--type-string field--label-hidden">A Drupal Developer’s Setup on Windows</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Wed, 05/04/2011 - 1:22pm</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><strong>UPDATE</strong>: 3/23/2013: In general, these instructions still work for Windows 8. While some of the UI aspects have changed, the basic directions are the same. One exception is when downloading PuTTy. Since it’s an unsigned .exe file, Windows will boldly claim that “Windows protected your PC.” Click <em>More info</em> followed by <em>Run anyways</em> and you’re on your way.</p> <p><strong>UPDATE</strong>: 4/22/2012: A few more scattered updates, plus a new section on setting up XDebug on Aptana for super-easy  debugger config.</p> <p><strong>UPDATE</strong>: 12/1/2011: Got a new work laptop so I’ve updated these instructions – mostly with regards to Drush (5.x branch has great Windows support) and some optional performance tweaks when setting up MySQL.</p> <p>This page outlines what I’ve done to get a good Drupal dev environment – Apache, MySQL, PHP, Git, Drush and most Linux-style shell commands – running on Windows. There are other solutions out there and I’m always interested in hearing what others have done to optimize their setup. Please leave any suggestions is the comments.</p> <p>This page <strong>DOES NOT</strong> go into migrating content from dev/staging servers to live servers. If that’s what you’re lo0king for, sorry. I’ve been to endless DrupalCon BoF’s, Drupal group meetings and numerous online conversations around content migration and there is no real solution except “wait for 8.”</p> <p>I was lucky (???) enough to have my laptop’s motherboard fail so I was able to refine these steps on a brand-new computer with a clean install of Windows 7. It’s a pretty long process, but you only have to do it once…  Well, once per laptop failure.</p> <h2>Setting up a Drupal Dev Environment</h2> <ol><li>Install and configure WAMP Server: <ol><li>Install <a href="http://www.wampserver.com/en/download.php">WAMP Server</a> using the default settings. Be sure to pick the 64-bit version if you’re running a 64-bit Windows.  If you’ve got more than 4 GB of memory (which you should!) you need to run 64-bit Windows to take advantage of it. If you have a firewall running, you may get an alert about Apache HTTP Server communicating on various networks. If you’re only doing local development (meaning other computers will not need to access your localhost) then you can deny the firewall request.</li> <li><em>Start –&gt; Control Panel –&gt; System and Security –&gt; Administrative Tools –&gt; Services</em> <ol><li>Double click the <em>wampapache</em> service. Set the <em>Startup type</em> to <em>Automatic (Delayed Start)</em>, click the <em>Start</em> button, then OK.</li> <li>Repeat for the <em>wampmysqld</em> service.</li> <li>The delayed start option simple puts these services at the end of the list of services started when you computer boots up. If you really need to have your WAMP server running as soon as your computer starts, set the <em>Startup type</em> to <em>Automatic</em>.</li> </ol></li> <li>To start the WAMP Manager – which gives you easy access to the various WAMP services – automatically on start up, follow these steps. Otherwise you can run it off the <em>Start</em> menu as needed. <ol><li><em>Control Panel</em> –&gt; <em>System and Security</em> –&gt; <em>Administrative Tools</em> –&gt; <em>Task Scheduler</em> <ol><li>Click <em>Create task…</em> in the right-hand pane.</li> <li>General tab: name this task, tick the <em>Run with highest privileges</em> checkbox , ensure that <em>Run only when user is logged on</em> is selected, and that <em>Configure for</em> is set to <em>Windows 7</em>.</li> <li>Trigger tab: Click <em>New…</em> and set <em>Begin the task</em> to <em>At log on</em>, then click OK.</li> <li>Actions tab: Click <em>New…</em> and point <em>Program/script</em> to your <em>wampmanager.exe</em> (usually C:\wamp\wampmanager.exe) then click OK.</li> <li>Conditions tab: (if you’re on a laptop) uncheck <em>Stop if computer switches to battery power</em>, <em>Start the task only if the computer is on AC power</em> and every option in the <em>Idle</em> section. (Oddly, you need to check a parent item in order to uncheck a child item in this dialog…)</li> <li>Settings tab: uncheck <em>Stop the task if it runs longer than</em> and <em>If the task does not end when requested, force it to stop.</em></li> <li>Click OK to create the task and reboot your computer to test it out.</li> </ol></li> <li>You can force Windows to show the WAMP Manager icon all the time by clicking the little up arrow next to the notifications area, clicking <em>Customize…</em>, and setting <em>Aestan Tray Menu</em> to <em>Show icon and notifications</em>.</li> <li>If you want to use Clean URLs, click on the WAMP Manager icon and select <em>Apache –&gt; Apache Modules –&gt; rewrite_module.</em></li> <li>Click on the WAMP Manager icon in the task bar and select <em>Put online</em> .</li> </ol></li> <li>Decide where your localhost root directory will be. I recommend making this your dev root directory as well, such as <em>C:\dev</em> or <em>C:\Users\&lt;user-name&gt;\Documents\dev</em>. I use the latter option so I can keep all my important files in the same directory. In the following steps, we’ll call this <em>&lt;path_to_root&gt;</em>.</li> <li>Configure your httpd.conf file: click the WAMP Manager icon in the Taskbar notifications area and select <em>Apache –&gt; httpd.conf</em>. If the system asks, set <em>notepad.exe</em> as the editor for this file type. <ol><li>Search for the line <em>Include conf/extra/httpd-vhosts.conf</em> and uncomment it (remove the leading ‘#’ character) and save.</li> <li>Search for <em>DocumentRoot</em> and change the directory to your <em>&lt;path_to_root&gt;</em> directory. The line should look similar to <em>DocumentRoot "C:/Users/mikeker/Documents/dev"</em>. If you have spaces in your path name, the quotes are required.</li> <li>A couple lines below the <em>DocumentRoot</em> location you’ll find: <pre># This should be changed to whatever you set DocumentRoot to. # &lt;directory "c:/wamp/www"&gt;</pre> Do what  the man behind the curtain says and change <em>c:/wamp/www</em> to your <em>&lt;path_to_root&gt;</em>.</li> </ol></li> <li>If you have plenty of memory in your dev machine (and you should), give MySQL more room to work: in <em>&lt;path to wamp&gt;\bin\mysql\mysql&lt;version-number&gt; </em>rename the existing <em>my.ini</em> to <em>my-original.ini</em>, then rename <em>my-innodb-heavy-4G.ini</em> to <em>my.ini</em>.</li> <li>Drupal loads a lot of files and WAMP’s default <a href="http://php.net/manual/en/ini.core.php#ini.realpath-cache-size">realpath_cache_size</a> is easily overwhelmed. Click the WAMP Manager icon and select <em>PHP</em> –&gt; <em>php.ini</em>, uncomment (remove the leading semi-colon) the <em>realpath_cache_size = 16K</em> line and bump the number up to <em>16M</em> or <em>32M</em>. Save and close <em>php.ini</em>.</li> <li>Setup some convenient shortcuts: I usually put these on my desktop but they can go anywhere that makes sense for you. <ol><li>The system’s hosts file, which allows you to point certain Web addresses to your WAMP server instead of the Internet: Set the shortcut location to: <em>notepad.exe "&lt;path to hosts file&gt;"</em>  (You need to include the quotes if there are spaces in the path). The hosts file is usually located at <em>C:\Windows\System32\drivers\etc\hosts</em>.</li> <li>WAMP Server’s virtual hosts config file: <em>notepad.exe "&lt;path to wamp&gt;\bin\apache\&lt;apache-version-number&gt;\conf\extra\httpd-vhosts.conf"</em>  (Again, you need to include the quotes if you have spaces in the path). The virtual hosts config file is usually located at <em>C:\wamp\bin\apache\Apache2.2.17\conf\extra\httpd-vhosts.conf</em>, though the Apache version number can change with new builds of WAMP Server.</li> <li>Right-click on each shortcut and select <em>Properties</em>. On the <em>Shortcut</em> tab, click <em>Advanced…</em> and check the <em>Run as administrator</em> checkbox.</li> <li>Double-click on the virtual hosts shortcut, click <em>Yes</em> to the UAC warning, and either delete or comment out the examples that come with the file.</li> </ol></li> <li>Click the WAMP Manager icon and select <em>Stop All Services</em>. Navigate to <em>&lt;path to wamp&gt;\bin\mysql\&lt;mysql-version-number&gt;\data</em> and delete (or rename) <em>ib_logfile0</em> and <em>ib_logfile1</em>. Click the WAMP Manager icon again and select <em>Start All Services</em>.  If the icon doesn’t return to its green, “all is ok” state pretty quickly you’ve likely got an error in your <em>httpd.conf</em> file or your <em>httpd-vhosts.conf</em> file. Look at the Apache error log (WAMP Manager: <em>Apache –&gt; Apache error log</em>) for clues.</li> <li>If you have real-time malware detection software you may want to create an exemption for the MySQL data directory (eg: <em>C:\wamp\bin\mysql\mysql5.5.16\data</em>) since files in there will be changing all the time, causing your malware software to run overtime.</li> </ol></li> <li>Install <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">PuTTY</a> using the default options (I recommend using the Windows installer option): <ol><li>PuTTY allows you remote access to servers via SSH, as secure way to issue commands on your site’s server from your dev machine. If you do a lot of work on remote server, consider pinning the PuTTY program to the Taskbar.</li> <li>PuTTY also comes with PuTTYgen which lets you easily create and manage SSH key, which is what Git uses to authenticate a user on a given server. We use it in a bit.<!--EndFragment--></li> </ol></li> <li>Install and configure Git: <ol><li>Install <a href="http://git-scm.com/">Git for Windows</a> (follow the <em>Download for Windows</em> link) changing only one of the default settings: On the <em>Configure line endings</em> dialog select <em>Checkout as-is, commit as-is</em>. Unless you’re using a non-*nix aware code editor (possibly Visual Studio?) your it should be able to handle either type of line ending. If you’re unsure, go with the default as this is an option that is easy to change later, or even on a project-by-project basis.</li> <li>Click the <em>Start</em> menu and type <em>git</em>. Click on the <em>Git Bash</em> option then right-click on the Git Bash icon in the Taskbar.</li> <li>Click <em>Pin this program to the taskbar</em></li> <li> <p>Right-click (again) on the Git Bash icon in the Taskbar, right click on the <em>Git Bash</em> item and click on <em>Properties</em></p> <ol><li>Shortcut tab: Set the <em>Start in</em> option to your dev root directory, in my case: <em>%HOMEPATH%\Documents\dev</em></li> <li>Options tab: set <em>Buffer Size</em> to 900 (or however large you want your scrollbar to go back), ensure <em>Quick Edit</em> is checked.</li> <li>Layout tab: Set your preferred window size in the <em>Window size</em> and <em>Window position</em> fields, making note of the window width setting – you’ll use that later on.</li> <li>OK the <em>Properties</em> dialog.</li> </ol></li> <li> <p>Go to your <a href="http://drupal.org/user">drupal.org user account page</a>, click <em>Edit</em> followed by <em>Git access.</em></p> </li> <li> <p>Copy the <em>Git user configuration</em> lines and paste into your command shell.  This tells Git how to identify you to drupal.org and other Git servers. If you haven’t already, check the <em>I agree to these terms</em> checkbox in the <em>Git access agreement</em> section.</p> </li> <li> <p>I recommend the settings <a href="http://drupal.org/node/1542048">outlined on Drupal.org</a> for configuring Git. The most important one is setting <em>core.autocrlf</em> and <em>core.safecrlf</em> to <em>false</em> -- that prevents a lot of bogus end-of-line warnings if you use Coder to check your coding standards. Instructions to setup Coder to work with Drush is a little farther down.</p> </li> <li> <p>If you haven’t already uploaded an SSH key to drupal.org, switch to the <em>SSH Keys tab</em> and click the <em>Add a public key</em> link.</p> <ol><li>From the Windows Start menu, type <em>puttygen</em> and select the <em>PuTTygen</em> option that appears. This utility makes it easy to create and manage SSH keys.</li> <li>Click the <em>Generate</em> button and wiggle your mouse over the blank area as requested to provide some random input.  When the key is generated, add a passphrase to the key and click <em>Save public key</em> then <em>Save private key</em>.  Keep in mind that your public key is only as secure as your private key/passphrase, so use a reasonably complex passphrase and don't put your private key anywhere accessible to the general public.</li> <li>Copy the text generated in the large text box at the top of PuTTygen and paste it into the <em>Key</em> field on drupal.org and click <em>Save.</em></li> </ol></li> </ol></li> <li>Grab a few binaries that Git doesn’t install <ol><li>The Git shell install does not include the wget command and uses a piss-poor version of tar, both of which Drush uses extensively. We’ll grab better versions from GnuWin32, an open source collection of Linux shell commands for Windows. Download the <a href="http://gnuwin32.sourceforge.net/packages/wget.htm">wget</a> and <a href="http://gnuwin32.sourceforge.net/packages/libarchive.htm">libarchive</a> packages, grab the <em>Complete package, except sources</em> executable and run the installer using the default settings (feel free to uncheck the options to create Start menu folders, etc.)</li> <li>Navigate to the folder where GnuWin32 installed the binaries, usually similar to <em>C:\Program Files (x86)\GnuWin32\bin</em>, and rename <em>bsdtar.exe</em> to <em>tar.exe</em>.</li> <li>Add the <em>bin</em> directory to your path. While we're in here, we'll add a few other paths as well. In your Git shell type <em>vim ~/.bashrc</em> and add the following code and save: <pre class="code-sample"># GnuWin32 tools # Remove the " (x86)" if you're running 32-bit Windows PATH="/C/Program Files (x86)/GnuWin32/bin":$PATH # Support PHP from the command line # Update "php5.3.13" to point to the version of PHP installed PATH=/C/wamp/bin/php/php5.3.13:$PATH # MySQL for the commandline, in particular mysqldump # Update "mysql5.5.24" to point to the version of MySQL installed PATH="/C/wamp/bin/mysql/mysql5.5.24/bin":$PATH # Point Git to the correct SSH client export GIT_SSH="/C/Program Files (x86)/PuTTy/plink.exe" # This should come after any PATH additions export PATH </pre> If you are unfamiliar with vim, <a href="http://www.google.com/search?ie=UTF-8&amp;q=vim+quick+start">check Google</a> for some quick tutorials or use your favorite text editor. Note: if you have spaces in your path names, you need to enclose the entire path in double-quotes. The colon (:) character separates one entry from the next. The tilde character (~) can be used as a shortcut to <em>$HOME</em>, which on Windows is usually at <em>c:\Users\&lt;user-name&gt;</em><user-name>. Also note that we have to add the GnuWin32 binaries before the rest of the $PATH variables so that <em>bsdtar</em>, now renamed simply <em>tar</em>, will be found ahead of Git’s <em>tar</em> executable.</user-name></li> <li>There are plenty of other *nix commands not included with the Git shell (eg: more). If you grab GnuWin32 installers for those commands, they should use the same <em>bin</em> directory.</li> <li>Close and reopen your Git shell. Type <pre class="code-sample">wget --version</pre> and check that you don't get any error messages.</li> </ol></li> <li>Install and configure Drush – this part got a lot easier after the 12/1/2011 update of this page. (Note: there is a <a href="http://drush.ws/drush_windows_installer">Windows installer for Drush</a>, but I like having more control over where and what is installed. But if you’re not having fun playing around on the command line, it’s a completely acceptable option. Just be sure to unselect the PHP runtime option and skip steps 1 – 4, below). <ol><li>Go to the <a href="http://drupal.org/project/drush">Drush project page</a>, right-click on the <em>tar.gz</em> download option for the latest release of the 5.x branch, and select <em>Copy link address</em> (or whatever option your browser shows for copying a link address). The 5.x branch includes <strong>much</strong> better support for Windows than previous version of Drush. Kudos to the Drush developers for not treating Windows users as second class citizens!</li> <li>In your Git shell: Change directory to wherever you want to install Drush, (e.g.: <em>cd ~/Documents; mkdir bin; cd bin</em>).  Type <em>wget &lt;url_of_drush_5.x_download&gt;</em> followed by <em>tar –zxvf &lt;drush-5.x&gt;.tar.gz</em>.<br /><br /> Note: you can right-click on the Git shell to paste, or the keyboard combination of <em>alt+space e p</em> will select <em>Edit</em> –&gt; <em>Paste</em> from the system menu. You can also hit the <em>tab</em> button to autocomplete filenames, meaning you probably only need to type <em>tar –zxvf drush</em> and hit <em>tab</em> to unpack the download.</li> <li>In your Git shell type <em>vim ~/.bashrc</em> and add the following code between the GnuWin32 bit and the <em>export $PATH</em> line and save: <pre class="code-sample"># Drush export DRUSH_PHP=/C/wamp/bin/php/php5.3.8/php.exe # ^-- Replace with your path to php.exe export COLUMNS=110 # ^-- Replace with the window width noted above PATH=~/Documents/bin/drush:$PATH # ^-- Replace with your path to Drush</pre> </li> <li>While you’re in the <em>.bashrc</em> file add any alias or other shortcuts you like to have (e.g.: <em>alias ll=’ls -l’</em>)</li> <li>Exit and restart the shell. Type <em>drush status</em> to see if everything is working correctly: <pre>mikeker@MIKEKER-LAPTOP ~/Documents/dev $ drush status PHP configuration : C:\wamp\bin\php\php5.3.8\php.ini Drush version : 5.0-dev Drush configuration : Drush alias files :</pre> </li> </ol></li> <li>Optional: Install <a href="http://pear.php.net/">PEAR</a> and <a href="http://drupal.org/node/1419980">DrupalCS</a> to ensure your code adhears to the <a href="http://drupal.org/coding-standards">Drupal Coding Standard</a>. <ol><li>Install PEAR <ol><li>Download the <a href="http://pear.php.net/go-pear.phar">go-pear.phar</a> script and save it to <em>&lt;path_to_wamp&gt;/bin/php/php&lt;version_number&gt;/go-pear.phar</em>.</li> <li>Open a command shell as administrator (<em>Start</em> -&gt; type <em>cmd</em> -&gt; right-click on the <em>cmd.exe</em> option and select <em>Run as administrator</em>), navigate to where you saved <em>go-pear.phar</em> and type <em>php -d phar.require_hash=0 go-pear.phar</em> followed by Enter.</li> <li>The script should show you a list of file locations. Hit Enter to accept the defaults and continue.</li> <li>PEAR will install and may warn you about the PEAR directory not being in the PATH -- that's fine.</li> <li>When prompted, select Y when asked to alter php.ini. Don't close the command prompt, we'll need it in a bit.</li> <li>Open Windows Explorer and navigate to your PHP directory. You should find a PEAR_ENV.reg file here. Double-click it to add the PEAR environment variables to your registry.</li> <li>At this point you can run PEAR in command prompts (but NOT the Git shell -- .bat files don't play well with the MSysGit shell). Since I don't install PEAR packages more than once every blue moon, that works fine with me. If you do fiddle with PEAR packages regularly, you'll want to include the path to your PHP directory in your Windows path environment variable (as opposed to adding it to your <em>.bashrc</em> as we did earlier).</li> </ol></li> <li>Install Code Sniffer and configure it to work with Drush <ol><li>Back in the command prompt (not a Git shell), navigate to your PHP directory (eg: <em>c:\wamp\bin\php\php&lt;version_number&gt;</em>).</li> <li>Type <em>pear update-channels</em> and hit Enter to ensure you've got the latest and greatest.</li> <li>Type <em>pear install PHP_CodeSniffer</em> and hit Enter.</li> <li>The following commands will install Coder as a Drush extension, open a Git shell for these. This works fine UNLESS you have coder installed as a module in a project you're working on. My preferred config is to do my code checks with Drush, but if your situation doesn't allow it you can install coder anywhere else that Drush will pick it up on a project-by-project basis. See the <a href="http://drupalcode.org/project/drush.git/blob/refs/heads/7.x-5.x:/README.txt">Drush README</a> Commands section for details. <pre class="code-sample">cd ~ # Check if .drush exists, if not # mkdir .drush cd .drush drush dl coder</pre> </li> <li>Back in the command prompt with administrative permissions, navigate to your PHP directory (eg: <em>c:\wamp\bin\php\php&lt;version_number&gt;</em>) followed by <em>\pear\PHP\CodeSniffer\Standards</em>. From here type <em>mklink /j Drupal %HOMEPATH%\.drush\coder\coder_sniffer\Drupal</em> and hit Enter. If you placed coder someone other than your ~/.drush folder, you'll need to replace the second argument with the appropriate path.</li> <li>Test it out by opening a Git shell (we should be done with command prompts for now...), navigating to a Drupal install and typing <em>drush dcs index.php</em>. Note: if you're working in a Git repository, you'll get errors regarding invalid end-of-line characters and files not ending with a single newline. That's because Git converts Unix line endings to Windows when you checkout files.</li> </ol></li> </ol></li> <li>Install and configure your favorite code editor, in my case <strike><a href="http://www.aptana.com/">Aptana’s version of Eclipse</a></strike> <a href="http://www.sublimetext.com/">Sublime Text 2</a>. (Note Eclipse/Aptana config instructions <a href="http://mikekeran.com/webdev/eclipse-configuration-for-drupal-development">have been moved</a>). My ST2 configuration is a work-in-progress.</li> </ol><p><strong>You’re ready to rock! Go forth and build amazing Web sites.</strong></p> <h2>Basic workflow for a new project</h2> <p>When I’m starting work on a new site, here’s my basic workflow:</p> <ol><li>If needed, click the WAMP Manager icon, select <em>phpMyAdmin, </em>create a database and user for this project and give the user the needed permission for the new database.</li> <li>Edit the <em>hosts</em> file: Double-click the hosts shortcut created above, click <em>Yes </em>to the UAC warning, and add a line similar to <em>127.0.0.1  local.example.com</em> to the file and save. I like to preface all localhost addresses with the <em>local</em> subdomain so that it’s easy for me to tell what is live and what is dev. Plus <em>local.example.com</em> will still work with multi-site configurations of Drupal and it’s easy to switch from a given page on the live server to the same page on the dev server (assuming you’ve copied the database recently) by just swapping <em>www</em> for <em>local</em>.</li> <li>Edit <em>httpd-vhosts.conf</em>: Double-click the shortcut created above, click <em>Yes </em>to the UAC warning, and add code similar to: <pre>&lt;VirtualHost *:80&gt; DocumentRoot "&lt;path_to_root&gt;/example.com/drupal-7.0" ServerName local.example.com &lt;/VirtualHost&gt;</pre> (or whatever the current version of Drupal is) and save the file. (And make sure the example code is removed or commented out as mentioned above).</li> <li>Restart Apache: click the LAMP Manager icon then <em>Apache –&gt; Services –&gt; Restart Service</em>.</li> <li>Open the Git shell and navigate to <em>&lt;path_to_root&gt;/example.com</em>  and type <em>drush dl</em>.</li> <li>Point your browser to local.example.com and the Drupal install screen should come up</li> </ol></div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> <div class="field__item"><a href="/category/webdev/programming" hreflang="en">Programming</a></div> </div> <div class="field field--name-other field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/articles/drupal-planet" hreflang="en">Drupal Planet</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <a id="comment-230"></a> <article data-comment-user-id="0" about="/comment/230" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1306002283"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <a rel="nofollow" href="http://www.selection-1.blogspot.com" lang="" typeof="schema:Person" property="schema:name" datatype="" class="username">Anonymous (not verified)</a> on Sat, 05/21/2011 - 11:24am</span> <span property="schema:dateCreated" content="2011-05-21T18:24:43+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/230#comment-230" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/230" class="permalink" rel="bookmark" hreflang="en">selection</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=230&amp;1=full&amp;2=en&amp;3=" token="fffd2a67"></drupal-render-placeholder> </div> </article> <a id="comment-242"></a> <article data-comment-user-id="0" about="/comment/242" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1321913862"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <a rel="nofollow" href="http://www.itransition.com/sharepoint/" lang="" typeof="schema:Person" property="schema:name" datatype="" class="username">sharepoint 2010 (not verified)</a> on Mon, 11/21/2011 - 2:17pm</span> <span property="schema:dateCreated" content="2011-11-21T22:17:42+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/242#comment-242" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/242" class="permalink" rel="bookmark" hreflang="en">Great stuff! Just what I&#039;ve</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=242&amp;1=full&amp;2=en&amp;3=" token="68f5e35a"></drupal-render-placeholder> </div> </article> <a id="comment-249"></a> <article data-comment-user-id="0" about="/comment/249" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1327339864"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous (not verified)</span> on Mon, 01/23/2012 - 9:31am</span> <span property="schema:dateCreated" content="2012-01-23T17:31:04+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/249#comment-249" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/249" class="permalink" rel="bookmark" hreflang="en">One word - Quickstart</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=249&amp;1=full&amp;2=en&amp;3=" token="59555c9e"></drupal-render-placeholder> </div> </article> <div class="indented"><a id="comment-257"></a> <article data-comment-user-id="3" about="/comment/257" typeof="schema:Comment" class="comment js-comment by-node-author"> <mark class="hidden" data-comment-timestamp="1335151800"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/users/mikekeran" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span> on Sun, 04/22/2012 - 8:30pm</span> <span property="schema:dateCreated" content="2012-04-23T03:30:00+00:00" class="rdf-meta hidden"></span> </p> <p class="parent visually-hidden">In reply to <a href="/comment/249#comment-249" class="permalink" rel="bookmark" hreflang="en">One word - Quickstart</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Anonymous (not verified)</span></p> <a href="/comment/257#comment-257" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/257" class="permalink" rel="bookmark" hreflang="en">Sure, but...</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=257&amp;1=full&amp;2=en&amp;3=" token="67aa8834"></drupal-render-placeholder> </div> </article> </div><a id="comment-291"></a> <article data-comment-user-id="0" about="/comment/291" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1358942289"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <a rel="nofollow" href="http://www.metaabstraxion.com/" lang="" typeof="schema:Person" property="schema:name" datatype="" class="username">Web Design Firm (not verified)</a> on Wed, 01/23/2013 - 3:58am</span> <span property="schema:dateCreated" content="2013-01-23T11:58:09+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/291#comment-291" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/291" class="permalink" rel="bookmark" hreflang="en">This is simply amazing i like</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=291&amp;1=full&amp;2=en&amp;3=" token="85effe64"></drupal-render-placeholder> </div> </article> <a id="comment-302"></a> <article data-comment-user-id="0" about="/comment/302" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1360742060"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Hema (not verified)</span> on Tue, 02/12/2013 - 11:54pm</span> <span property="schema:dateCreated" content="2013-02-13T07:54:20+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/302#comment-302" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/302" class="permalink" rel="bookmark" hreflang="en">git usage</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=302&amp;1=full&amp;2=en&amp;3=" token="85e30695"></drupal-render-placeholder> </div> </article> <div class="indented"><a id="comment-303"></a> <article data-comment-user-id="3" about="/comment/303" typeof="schema:Comment" class="comment js-comment by-node-author"> <mark class="hidden" data-comment-timestamp="1360774020"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/users/mikekeran" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span> on Wed, 02/13/2013 - 8:47am</span> <span property="schema:dateCreated" content="2013-02-13T16:47:00+00:00" class="rdf-meta hidden"></span> </p> <p class="parent visually-hidden">In reply to <a href="/comment/302#comment-302" class="permalink" rel="bookmark" hreflang="en">git usage</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Hema (not verified)</span></p> <a href="/comment/303#comment-303" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/303" class="permalink" rel="bookmark" hreflang="en">Git is not needed, but...</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=303&amp;1=full&amp;2=en&amp;3=" token="24da827b"></drupal-render-placeholder> </div> </article> </div><a id="comment-319"></a> <article data-comment-user-id="0" about="/comment/319" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1367970020"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">frank (not verified)</span> on Tue, 05/07/2013 - 4:40pm</span> <span property="schema:dateCreated" content="2013-05-07T23:40:20+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/319#comment-319" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/319" class="permalink" rel="bookmark" hreflang="en">git</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=319&amp;1=full&amp;2=en&amp;3=" token="f3504faa"></drupal-render-placeholder> </div> </article> <a id="comment-346"></a> <article data-comment-user-id="0" about="/comment/346" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1374953259"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">sparker888 (not verified)</span> on Sat, 07/27/2013 - 12:27pm</span> <span property="schema:dateCreated" content="2013-07-27T19:27:39+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/346#comment-346" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/346" class="permalink" rel="bookmark" hreflang="en">Can&#039;t find .bashrc either</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=346&amp;1=full&amp;2=en&amp;3=" token="aba8c243"></drupal-render-placeholder> </div> </article> <div class="indented"><a id="comment-348"></a> <article data-comment-user-id="3" about="/comment/348" typeof="schema:Comment" class="comment js-comment by-node-author"> <mark class="hidden" data-comment-timestamp="1375373880"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/users/mikekeran" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span> on Thu, 08/01/2013 - 9:18am</span> <span property="schema:dateCreated" content="2013-08-01T16:18:00+00:00" class="rdf-meta hidden"></span> </p> <p class="parent visually-hidden">In reply to <a href="/comment/346#comment-346" class="permalink" rel="bookmark" hreflang="en">Can&#039;t find .bashrc either</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">sparker888 (not verified)</span></p> <a href="/comment/348#comment-348" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/348" class="permalink" rel="bookmark" hreflang="en">Location, location, location...</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=348&amp;1=full&amp;2=en&amp;3=" token="d244e012"></drupal-render-placeholder> </div> </article> </div><a id="comment-430"></a> <article data-comment-user-id="0" about="/comment/430" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1382904258"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <a rel="nofollow" href="http://gta5savegame.com/" lang="" typeof="schema:Person" property="schema:name" datatype="" class="username">Mister Di (not verified)</a> on Sun, 10/27/2013 - 1:04pm</span> <span property="schema:dateCreated" content="2013-10-27T20:04:18+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/430#comment-430" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/430" class="permalink" rel="bookmark" hreflang="en">Thank you for this great</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=430&amp;1=full&amp;2=en&amp;3=" token="030dbb2b"></drupal-render-placeholder> </div> </article> <a id="comment-442"></a> <article data-comment-user-id="0" about="/comment/442" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1389638765"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Adrian Casillas (not verified)</span> on Mon, 01/13/2014 - 10:46am</span> <span property="schema:dateCreated" content="2014-01-13T18:46:05+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/442#comment-442" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/442" class="permalink" rel="bookmark" hreflang="en">Worth Its&#039; Weight Gold</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=442&amp;1=full&amp;2=en&amp;3=" token="94057216"></drupal-render-placeholder> </div> </article> <div class="indented"><a id="comment-443"></a> <article data-comment-user-id="3" about="/comment/443" typeof="schema:Comment" class="comment js-comment by-node-author"> <mark class="hidden" data-comment-timestamp="1389653403"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/users/mikekeran" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span> on Mon, 01/13/2014 - 2:50pm</span> <span property="schema:dateCreated" content="2014-01-13T22:50:03+00:00" class="rdf-meta hidden"></span> </p> <p class="parent visually-hidden">In reply to <a href="/comment/442#comment-442" class="permalink" rel="bookmark" hreflang="en">Worth Its&#039; Weight Gold</a> by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Adrian Casillas (not verified)</span></p> <a href="/comment/443#comment-443" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/443" class="permalink" rel="bookmark" hreflang="en">Virtualboxes and yadda yadda...</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=443&amp;1=full&amp;2=en&amp;3=" token="353cf6f8"></drupal-render-placeholder> </div> </article> </div><a id="comment-473"></a> <article data-comment-user-id="0" about="/comment/473" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1406522556"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Philip Kiff (not verified)</span> on Sun, 07/27/2014 - 9:42pm</span> <span property="schema:dateCreated" content="2014-07-28T04:42:36+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/473#comment-473" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/473" class="permalink" rel="bookmark" hreflang="en">Git Extensions is a good Windows alternative to plain Git</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=473&amp;1=full&amp;2=en&amp;3=" token="fc08edf5"></drupal-render-placeholder> </div> </article> <a id="comment-486"></a> <article data-comment-user-id="0" about="/comment/486" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1413789306"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <a rel="nofollow" href="http://atlantaka.org/?document_srl=195126" lang="" typeof="schema:Person" property="schema:name" datatype="" class="username">reparatii (not verified)</a> on Mon, 10/20/2014 - 12:15am</span> <span property="schema:dateCreated" content="2014-10-20T07:15:06+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/486#comment-486" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/486" class="permalink" rel="bookmark" hreflang="en">A Drupal Developer’s Setup on Windows | MikeKeran.com</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=486&amp;1=full&amp;2=en&amp;3=" token="ef420bdb"></drupal-render-placeholder> </div> </article> <a id="comment-534"></a> <article data-comment-user-id="0" about="/comment/534" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1457096848"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">Jacob Harris (not verified)</span> on Fri, 03/04/2016 - 5:07am</span> <span property="schema:dateCreated" content="2016-03-04T13:07:28+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/534#comment-534" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/534" class="permalink" rel="bookmark" hreflang="en">A Drupal Developer’s Setup on Windows</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=534&amp;1=full&amp;2=en&amp;3=" token="c0509a32"></drupal-render-placeholder> </div> </article> <a id="comment-557"></a> <article data-comment-user-id="0" about="/comment/557" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1489155132"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Fri, 03/10/2017 - 6:12am</span> <span property="schema:dateCreated" content="2017-03-10T14:12:12+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/557#comment-557" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/557" class="permalink" rel="bookmark" hreflang="en">If you are unfamiliar with…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>If you are unfamiliar with vim, check Google for some quick tutorials or use your favorite text editor. Note: if you have spaces in your path names, you need to enclose the entire path in double-quotes. The colon (:) character separates one entry from the next. The tilde character (~) can be used as a shortcut to $HOME, which on Windows is usually at c:\Users\&lt;user-name&gt;. Also note that we have to add the GnuWin32 binaries before the rest of the $PATH variables so that bsdtar, now renamed simply tar, will be found ahead of Git’s tar executable.<br />  </p> <p><a href="http://faceit-reviews.com/">faceit</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=557&amp;1=full&amp;2=en&amp;3=" token="b172211a"></drupal-render-placeholder> </div> </article> <a id="comment-565"></a> <article data-comment-user-id="0" about="/comment/565" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1490097594"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">swati gupta (not verified)</span> on Tue, 03/21/2017 - 4:59am</span> <span property="schema:dateCreated" content="2017-03-21T11:59:54+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/565#comment-565" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/565" class="permalink" rel="bookmark" hreflang="en">movie</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p><a href="http://showboxmovies.net/">http://showboxmovies.net/</a> is now available with lots of new and attractive features like HD movies browsing and downloading .You can download lots of movies in just one click . <br /><a href="http://www.ashowbox.net/">http://www.ashowbox.net/</a><br />  </p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=565&amp;1=full&amp;2=en&amp;3=" token="e144358a"></drupal-render-placeholder> </div> </article> <a id="comment-567"></a> <article data-comment-user-id="0" about="/comment/567" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1490111159"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">tvportal (not verified)</span> on Tue, 03/21/2017 - 8:45am</span> <span property="schema:dateCreated" content="2017-03-21T15:45:59+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/567#comment-567" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/567" class="permalink" rel="bookmark" hreflang="en">TV Portal App, you can…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p><strong>TV Portal App</strong>, you can easily share the video to your social networking profile. <a href="http://www.tvportaldownload.com/">http://www.tvportaldownload.com/</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=567&amp;1=full&amp;2=en&amp;3=" token="78463a17"></drupal-render-placeholder> </div> </article> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=149&amp;2=comment&amp;3=comment" token="9f01aed1"></drupal-render-placeholder> </section> Wed, 04 May 2011 20:22:59 +0000 MikeKeran 149 at https://mikekeran.com New to Drupal: Better Core Community https://mikekeran.com/webdev/new-to-drupal-better-core-community <span class="field field--name-title field--type-string field--label-hidden">New to Drupal: Better Core Community</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Mon, 03/28/2011 - 12:29pm</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>The biggest change in Drupal over the past year is not the <a href="http://groups.drupal.org/drupal-org-git-team">Git migration</a> or the <a href="http://drupal.org/drupal-7-released">release of Drupal 7</a>, both of which were fantastic steps forward for Drupal. It’s the more inclusive developer community.</p><p>At <a href="http://sf2010.drupal.org/">DupalCon 2010</a> in San Francisco, there was a <a href="http://sf2010.drupal.org/conference/core-developer-summit">core developer’s summit</a>. It was an invite-only pre-conference session for core developers to talk about the future of Durpal. <a href="http://chicago2011.drupal.org/">This year’s DrupalCon</a>, instead, featured a “<a href="http://chicago2011.drupal.org/schedule/core">core conversations</a>” track during the conference. Somewhere between a BoF and regular session, it allowed anyone with an interest in the future of Drupal to join the discussion about what they find most interesting.</p><p>As someone who is a module maintainer, but not a core developer, I love this change. By removing some of the exclusivity surrounding working on core issues, Drupal makes it easier for future core contributors to ease their way into this elite developer community.</p><p>And just in time because, since the Git migration, anyone to contribute to Drupal. Not just answering questions in the forums – I’m talking about contributing code. Gone is the burdensome <a href="http://drupal.org/node/539608">CVS account application process</a> which required perspective developers to write an essay about their motivations, zip up their module or theme, post it to an  issue queue and wait.  And wait.  And wait…</p><p>Why the wait? Because it was equally burdensome for the application approvers to unpack, install and review the code. The laborious process rankled some developers used to free-for-all, wild-west style of other open source projects, but this deliberation ensured that code posted on drupal.org met a quality bar and did not duplicate the other efforts.</p><p>Now that the initial phase Git migration has completed, anyone with a drupal.org user account can build their own sandbox project. These project have everything a “full” project has: a home page, an issue queue and a Git repositor.  The only things missing are releases and, thus, support through the usual Drupal update mechanisms. Got an idea that <em>maybe just might</em> be something you think worthy of contributing? Build a sandbox project and post it. Invite folks to use it, enter bugs in the issue queue, suggest new features – in other words, use it as they would a “regular” module.</p><p>Rather than writing essays about motivations, developers can develop. And those that approve applications can see how a developer responds to bugs or feature request in their issue queue and review their individual check-ins. In other words, they can review if an applicant acts like a good developer and not on the quality of their prose.</p><p>To me this shows the willingness of the Drupal core community to increase their ranks. There are some who will raise concerns over lower quality contributions or more time spent by experienced core developers reviewing code rather than writing it. These are valid, but are outweighed by the benefit of a more inclusive community and more core developers means we can bring Drupal 8 to market <a href="http://www.imdb.com/title/tt0071054/quotes">better, stronger, faster</a>.</p><p>The six-million dollar release, built for free by an even  bigger community.</p></div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> </div> <div class="field field--name-other field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/articles/drupal-planet" hreflang="en">Drupal Planet</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <a id="comment-540"></a> <article data-comment-user-id="0" about="/comment/540" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1485855112"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="" content="Reviews of essay writing service">Reviews of ess… (not verified)</span> on Tue, 01/31/2017 - 1:31am</span> <span property="schema:dateCreated" content="2017-01-31T09:31:52+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/540#comment-540" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/540" class="permalink" rel="bookmark" hreflang="en">First of all, enough…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>First of all, enough discipline. I appear your article is exact for me, exceptional and that i find it irresistible. That's particularly perfect to study about it. I am particularly absolutely glad so satisfactory. This put up explains the put up very good. I've enjoyed the finding out and i'm hoping all the aspects with this share would very helpful for the readers.</p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=540&amp;1=full&amp;2=en&amp;3=" token="272f45e9"></drupal-render-placeholder> </div> </article> <a id="comment-559"></a> <article data-comment-user-id="0" about="/comment/559" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1489155185"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Fri, 03/10/2017 - 6:13am</span> <span property="schema:dateCreated" content="2017-03-10T14:13:05+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/559#comment-559" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/559" class="permalink" rel="bookmark" hreflang="en"> …</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p> </p> <p>Now that the initial phase Git migration has completed, anyone with a drupal.org user account can build their own sandbox project. These project have everything a “full” project has: a home page, an issue queue and a Git repositor.  The only things missing are releases and, thus, support through the usual Drupal update mechanisms. Got an idea that <em>maybe just might</em> be something you think worthy of contributing? Build a sandbox project and post it. Invite folks to use it, enter bugs in the issue queue, suggest new features – in other words, use it as they would a “regular” module.</p> <p><a href="http://fbvideo-downloader.com/">facebook video downloader</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=559&amp;1=full&amp;2=en&amp;3=" token="c89e034b"></drupal-render-placeholder> </div> </article> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=143&amp;2=comment&amp;3=comment" token="0f9895fb"></drupal-render-placeholder> </section> Mon, 28 Mar 2011 19:29:04 +0000 MikeKeran 143 at https://mikekeran.com SQL Injection Humor https://mikekeran.com/webdev/sql-injection-humor <span class="field field--name-title field--type-string field--label-hidden">SQL Injection Humor</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Wed, 12/15/2010 - 10:47am</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p><!-- break -->See the cartoon after the jump...</p><p><!--break--></p><p>Every  Drupal programmer has done it before, usually just being lazy:</p> <pre>$results = db_query("SELECT * FROM {node} WHERE nid = $some_number");</pre> <p>Why take the time to do it properly?  The folks as <a href="http://xkcd.com/327/">xkcd</a> explain it better in cartoon form than I ever could with words.</p><p><img src="http://imgs.xkcd.com/comics/exploits_of_a_mom.png" /></p><p>In case you were wondering, the proper way to query the database would be:</p> <pre>$results = db_query("SELECT * FROM {node} WHERE nid = %d", $some_number);</pre> <p>which lets Drupal core properly escape any variables.  While node ID's are generally not user-submitted content, you never know. What if the spec changes such that users can select a given page on your site when they are filling out a form?  What if they enter</p> <pre>1'; DROP DATABASE;</pre> <p>instead of a proper node ID? "But I've got an autocomplete text field so I control the data being entered in that field," you might say.  Unfortunately, it's easy to spoof form submissions. The mantra should not be "sanitize any user-submitted data" but simply "sanitize ANY data" sent to your database.</p><p>Better safe than digging around for a recent database backup...</p></div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> </div> <div class="field field--name-other field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/articles/drupal-planet" hreflang="en">Drupal Planet</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <a id="comment-545"></a> <article data-comment-user-id="0" about="/comment/545" typeof="schema:Comment" class="comment js-comment by-anonymous"> <mark class="hidden" data-comment-timestamp="1488291801"></mark> <footer class="comment__meta"> <article typeof="schema:Person" about="/user/0" class="profile"> </article> <p class="comment__submitted"><span rel="schema:author">Submitted by <span lang="" typeof="schema:Person" property="schema:name" datatype="">usps tracking (not verified)</span> on Tue, 02/28/2017 - 6:23am</span> <span property="schema:dateCreated" content="2017-02-28T14:23:21+00:00" class="rdf-meta hidden"></span> </p> <a href="/comment/545#comment-545" hreflang="en">Permalink</a> </footer> <div class="content"> <h3 property="schema:name" datatype=""><a href="/comment/545" class="permalink" rel="bookmark" hreflang="en">instead of a proper node ID?…</a></h3> <div property="schema:text" class="clearfix text-formatted field field--name-comment-body field--type-text-long field--label-hidden field__item"><p>instead of a proper node ID? "But I've got an autocomplete text field so I control the data being entered in that field," you might say.  Unfortunately, it's easy to spoof form submissions. The mantra should not be "sanitize any user-submitted data" but simply "sanitize ANY data" sent to your database.</p> <p><a href="http://ratemyprofessorreview.com/">rate my professor</a></p></div> <drupal-render-placeholder callback="comment.lazy_builders:renderLinks" arguments="0=545&amp;1=full&amp;2=en&amp;3=" token="6f63d87c"></drupal-render-placeholder> </div> </article> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=139&amp;2=comment&amp;3=comment" token="910b6871"></drupal-render-placeholder> </section> Wed, 15 Dec 2010 18:47:44 +0000 MikeKeran 139 at https://mikekeran.com Writing a Views 3.x Example Plugin https://mikekeran.com/other/writing-a-views-3x-example-plugin <span class="field field--name-title field--type-string field--label-hidden">Writing a Views 3.x Example Plugin</span> <span class="field field--name-uid field--type-entity-reference field--label-hidden"><span lang="" about="/users/mikekeran" typeof="schema:Person" property="schema:name" datatype="">MikeKeran</span></span> <span class="field field--name-created field--type-created field--label-hidden">Sun, 11/14/2010 - 11:01am</span> <div class="clearfix text-formatted field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>I'm posting this so I won’t forget it the next time I need to do something similar.  This is by no means a complete explanation of the new plugin architecture, it’s more of a quick list of gotchas.</p><h3>1. Building a skeleton example plugin</h3><p>You will need a module to implement a Views plugin.  Within that module, there are three items needed to create a minimal plugin:</p><ol><li>Implement <code>hook_views_api()</code> in test.module <pre class="code-sample">function test_views_api() { return array( 'api' =&gt; 3.0, ); }</pre> </li><li>Implement <code>hook_views_plugin()</code> in a new test.views.inc file <pre class="code-sample">function test_views_plugins() { return array( 'exposed_form' =&gt; array( 'test' =&gt; array( 'title' =&gt; t('Test'), 'help' =&gt; t('Test plugin'), 'handler' =&gt; 'test_exposed_form_plugin', 'uses row plugin' =&gt; FALSE, 'uses fields' =&gt; TRUE, 'uses options' =&gt; TRUE, 'type' =&gt; 'normal', 'parent' =&gt; 'basic', ), ), ); }</pre> In this example, I'm implementing an exposed form plugin called <code>test_exposed_form_plugin</code>, which will be a subclass of the basic exposed form plugin (<code>'parent' =&gt; 'basic'</code>)</li><li>Implement your plugin as a child class of an existing plugin in test_exposed_form_plugin.inc (note: the file needs to be named the same as the class it implements with the .inc extention): <pre class="code-sample">class test_exposed_form_plugin extends views_plugin_exposed_form_basic { function summary_title() { return t('Test Plugin'); } function exposed_form_alter(&amp;$form, &amp;$form_state) { parent::exposed_form_alter($form, $form_state); // ... do something... } // You can override any of the methods defined in the parent class here. // Just be sure to call parent::overriden_method() so as not to lose the // default functionality }</pre> </li></ol><h3>2. When adding submit handlers, call views_exposed_form_submit()</h3><p>I haven’t figured out the <em>why</em> for this one, but through trial and error (mostly error…) I realized that when I added a submit handler to an exposed form, it prevented the existing handlers from being called. I believe it has to do with the specialized submit handlers which are part of the plugin object and, thus, not available to the FormsAPI when a form is submitted.  But I’m just guessing about that.</p><p>When using regular FAPI-based form, you simple do the following:</p> <pre class="code-sample">function test_form_alter(&amp;$form, $form_state, $form_id) { if ('my_form_id' == $form_id) { $form['#submit'][] = 'my_submit_handler'; } } function my_submit_handler($form, &amp;$form_state) ( // ... do something... }</pre> <p>When tweaking a form using a Views plugin, you need to call <code>views_exposed_form_submit($form, $form_state)</code> within your submit handler to ensure the default processing of the form occurs.</p></div> <div class="field field--name-webdev field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/category/webdev/programming/drupal" hreflang="en">Drupal</a></div> </div> <div class="field field--name-other field--type-entity-reference field--label-hidden field__items"> <div class="field__item"><a href="/articles/drupal-planet" hreflang="en">Drupal Planet</a></div> <div class="field__item"><a href="/articles/views" hreflang="en">Views</a></div> </div> <section class="field field--name-comment field--type-comment field--label-hidden comment-wrapper"> <h2 class="title comment-form__title">Add new comment</h2> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=136&amp;2=comment&amp;3=comment" token="49decece"></drupal-render-placeholder> </section> Sun, 14 Nov 2010 19:01:13 +0000 MikeKeran 136 at https://mikekeran.com