drupal module development http://alexmoreno.net/ en Changing Short project name in a Drupal.org project http://alexmoreno.net/changing-short-project-name-drupalorg-project/24-09-2013 <article role="article" about="http://alexmoreno.net/changing-short-project-name-drupalorg-project/24-09-2013" class="node node--type-blog node--promoted node--view-mode-teaser"><header><div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="http://alexmoreno.net/alejandro-moreno" lang="" about="http://alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 24 September, 2013 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="http://alexmoreno.net/changing-short-project-name-drupalorg-project/24-09-2013" rel="bookmark"> <span>Changing Short project name in a Drupal.org project</span> </a> </h2> </div> </header><div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Typical problem, you have just gained your full project permissions role in Drupal.org, and you make your first mess... you have promoted your so loved first project without changing the Short project name.</p><p>Well, you have a problem, but not too big. Drupal.org will not allow you to rename your Short project name, so you will have to create a new one if you don't want to have an ugly url like that: https://drupal.org/project/2062343</p><p>Fortunately git can help. You will simply have to:</p></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"><li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal" hreflang="es">drupal</a></li> <li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal-module-development" hreflang="es">drupal module development</a></li> </ul></div> </div> </article> Tue, 24 Sep 2013 15:24:12 +0000 alexmoreno 101 at http://alexmoreno.net Howto patch a Drupal module http://alexmoreno.net/howto-patch-drupal-module/09-02-2013 <article role="article" about="http://alexmoreno.net/howto-patch-drupal-module/09-02-2013" class="node node--type-blog node--promoted node--view-mode-teaser"><header><div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="http://alexmoreno.net/alejandro-moreno" lang="" about="http://alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 9 February, 2013 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="http://alexmoreno.net/howto-patch-drupal-module/09-02-2013" rel="bookmark"> <span>Howto patch a Drupal module</span> </a> </h2> </div> </header><div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p>Some contributtion to add to this Drupal module with which you have been working on?</p><p>Very easy, take note:</p><p> </p></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"><li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal-developer" hreflang="es">drupal developer</a></li> <li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal-module-development" hreflang="es">drupal module development</a></li> <li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal-developer-london" hreflang="es">drupal developer london</a></li> </ul></div> </div> </article> Sat, 09 Feb 2013 15:40:27 +0000 alexmoreno 93 at http://alexmoreno.net Get Drupal fields for a particular content type http://alexmoreno.net/get-drupal-fields-particular-content-type/09-01-2013 <article role="article" about="http://alexmoreno.net/get-drupal-fields-particular-content-type/09-01-2013" class="node node--type-blog node--promoted node--view-mode-teaser"><header><div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="http://alexmoreno.net/alejandro-moreno" lang="" about="http://alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 9 January, 2013 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="http://alexmoreno.net/get-drupal-fields-particular-content-type/09-01-2013" rel="bookmark"> <span>Get Drupal fields for a particular content type</span> </a> </h2> </div> </header><div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p> </p><p>Sometimes in Drupal you need to get the fields for a particular content types. </p><p>"$type = 'mytype';</p><p>$fields = content_fields();</p><p>$type_fields = array();</p><p>foreach ($fields as $field_name => $field_data)</p><p>{</p><p>  if ($field_data['type_name'] == $type)</p><p>  {</p><p>    $type_fields[$field_name] = $field_data;</p><p>  }</p><p>}"</p><p> </p><p>in drupal7 is easier, since we have a direct function:</p><p>field_info_instances($entity_type = NULL, $bundle_name = NULL)</p><p> </p><p> </p></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"><li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal" hreflang="es">drupal</a></li> <li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal-developer" hreflang="es">drupal developer</a></li> <li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal-module-development" hreflang="es">drupal module development</a></li> </ul></div> </div> </article> Wed, 09 Jan 2013 09:28:31 +0000 alexmoreno 78 at http://alexmoreno.net get current drupal theme http://alexmoreno.net/get-current-drupal-theme/09-01-2013 <article role="article" about="http://alexmoreno.net/get-current-drupal-theme/09-01-2013" class="node node--type-blog node--promoted node--view-mode-teaser"><header><div class="node__meta"> <span> By <span class="node__author"><span><a title="View user profile." href="http://alexmoreno.net/alejandro-moreno" lang="" about="http://alexmoreno.net/alejandro-moreno" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">alexmoreno</a></span></span>, 9 January, 2013 </span> </div> <div class="node__top-wrapper"> <h2 class="node__title"> <a href="http://alexmoreno.net/get-current-drupal-theme/09-01-2013" rel="bookmark"> <span>get current drupal theme</span> </a> </h2> </div> </header><div class="node__content text-content"> <div class="text-content field field--name-body field--type-text-with-summary field--label-hidden field__item"><p></p><p>very simple:</p><p>        global $theme_key;</p><p>      echo $theme_key;</p><p> </p><p>if we need more information, we can use this:</p><p>       $themes = list_themes();</p><p>       $theme_object = $themes[$theme_key];</p><p> </p><p>        // print all the object fields</p><p>       var_dump($theme_object);</p><p> </p><p>via http://drupal.org/node/46961#comment-88354</p></div> <div class="field field--name-taxonomy-vocabulary-1 field--type-entity-reference field--label-hidden field--tag-ref"> <ul class="links field__items field--tag-ref__items"><li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal" hreflang="es">drupal</a></li> <li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal-developer" hreflang="es">drupal developer</a></li> <li class="field--tag-ref__item"><a href="http://alexmoreno.net/drupal-module-development" hreflang="es">drupal module development</a></li> </ul></div> </div> </article> Wed, 09 Jan 2013 09:27:30 +0000 alexmoreno 77 at http://alexmoreno.net