Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 27 min 2 sec ago

Four Kitchens: REST Easy Part 2: Sub Property Boogaloo

Mon, 08/10/2015 - 22:10
div class=field-body pThis week we#8217;ll continue where we left off after doing the ground work of creating a basic endpoint with the RESTful Drupal module. We skipped one crucial part: the body field. This week#8217;s installment will cover our missing field, which requires extra care when used within a RESTfulnbsp;endpoint./p /div

Promet Source: Feature Branch Workflow the Promet Way

Mon, 08/10/2015 - 21:50
pWhen you’re wrangling a slightly larger team of devs as we do here at Promet, the importance of strict naming conventions becomes apparent pretty quickly. Take the commonly referenced Git workflow from a href=http://nvie.com/posts/a-successful-git-branching-model/Victor Driessen/a, for example./p p/p

TimOnWeb.com: Happy birthday to me and Devel form debug module to you all

Mon, 08/10/2015 - 20:06
divIrsquo;m turning strong32/strong today. People love birthdays, to me itrsquo;s just another line numbernbsp;in a messed stack trace output (philosophy mode enabled)./div divnbsp;/div divTwo years ago I released a drupal module called Get form id em(deprecated from now on)/em that does one small tasknbsp;- it tells you any form#39;s id .../div pa href=http://timonweb.com/posts/happy-birthday-to-me-and-devel-form-debug-module-to-you-all/ class=btnRead now/a/p

Lullabot: Write Unit Tests for Your Drupal 7 Code (part 2)

Mon, 08/10/2015 - 19:12
div class=rich-textpThis article is a continuation of a href=/node/1313Write Unit Tests for Your Drupal 7 Code (part 1)/a, where I wrote about how important it is to have unit tests in your codebase and how you can start writing OOP code in Drupal 7 that can be tested with PHPUnit./p pIn this article I show you how this can be applied to a real life example./p h2TL;DR/h2 pI encourage you to start testing your code. Here are the most important points of the article:/p ulliWrite small and focused classes and inject the object#x2019;s dependencies: a href=https://www.drupal.org/project/xautoloadXAutoload/a, a href=https://www.drupal.org/project/registry_autoloadRegistry Autoload/a, a href=https://www.drupal.org/project/service_containerService Container/a./li liLeverage the tools that ease creating test doubles: a href=http://phpunit.dePHPUnit/a, a href=https://github.com/padraic/mockeryMockery/a and a href=https://github.com/mateu-aguilo-bosch/drupal-unit-autoloadDrupal Unit Autoload/a./li liWrite tests until you get 100% test coverage, or a a href=http://www.artima.com/weblogs/viewpost.jsp?thread=204677satisfactory number/a./li /ul h2Dependency Injection and Service Container/h2 pJeremy Miller defines a href=http://codebetter.com/jeremymiller/2005/10/06/the-dependency-injection-pattern-%E2%80%93-what-is-it-and-why-do-i-care/dependency injection/a as:/p div class=quote quote--highlightblockquote class=quote__quotediv class=quote__content [...] In a nutshell, dependency injection just means that a given class or system is no longer responsible for instantiating their own dependencies. /div/blockquote/div pIn our codeMyClass/code we avoided instantiating codeCacheController/code by passing it through the constructor. This is a basic form of dependency injection. a href=http://martinfowler.com/articles/injection.html#FormsOfDependencyInjectionAcoording to Martin Fowler/a:/p div class=quote quote--highlightblockquote class=quote__quotediv class=quote__content There are three main styles of dependency injection. The names Iapos;m using for them are Constructor Injection, Setter Injection, and Interface Injection. /div/blockquote/div pAs long as you are injecting your dependencies, you will be able to swap those objects out with#xA0; their test doubles in your unit tests./p pAn effective way to pass objects into other objects is by a href=https://drupalize.me/videos/introduction-dependency-injection?p=1780using dependency injection/a via a service container. The service container will be in charge of giving the receiving class all the needed objects. Then, the receiving object will only need to get the service container. In our System Under Test (SUT), the service container will yield the actual objects, while in the unit test domain it will deliver mocked objects. Using a service container can be a little bit confusing at first, or even daunting, but it makes your API more stable and robust./p pUsing the service container, our example is changed to:/p pre code class=language-phpclass MyClass implements MyClassInterface { // ... public function __construct(ContainerInterface $service_container) { $this-gt;cacheController = $service_container-gt;get(apos;cache_controllerapos;); $this-gt;anotherService = $service_container-gt;get(apos;my_services.another_oneapos;); } // ... public function myMethod() { $cache = $this-gt;cacheController-gt;cacheGet(apos;cache_keyapos;); // Here starts the logic we want to test. // ... } // ... }/code/pre pNote that if you need to use a new service called codeapos;my_services.another_oneapos;/code, the constructor signature remains unchanged. The services need to be declared separately a href=https://github.com/mateu-aguilo-bosch/typed_entity/blob/7.x-1.x/src/ServiceContainer/ServiceProvider/TypedEntityServiceProvider.phpin the service providers/a./p pDependency injection and service encapsulation is not only useful for mocking purposes, but also to help you to encapsulate your components #x2013;and services#x2013;. Borrowing, again, a href=http://docs.structuremap.net/DependencyInjection.htm#section6Jeremy Miller#x2019;s words/a:/p div class=quote quote--highlightblockquote class=quote__quotediv class=quote__content Making sure that any new code that depends on undesirable legacy code uses Dependency Injection leaves an easier migration path to eliminate the legacy code later with all new code. /div/blockquote/div pIf you encapsulate your legacy dependencies you can ultimately write a new version and swap them out. Just like you do for your tests, but with the new implementation./p pJust like with almost everything, there are several modules that will help you with these tasks:/p ullia href=https://www.drupal.org/project/registry_autoloadRegistry autoload/a will help you to structure your object oriented code by giving you autoloading if you follow the a href=http://www.php-fig.org/psr/psr-0/PSR-0/a or a href=http://www.php-fig.org/psr/psr-4/PSR-4/a standards./li lia href=https://www.drupal.org/project/service_containerService container/a will provide you with a service container, with the added benefit that is very similar to the one that Drupal 8 will ship with./li lia href=https://www.drupal.org/project/xautoloadXAutoload/a will give you both autoloading and a dependency injection container./li /ul pWith these strategies, you will write code that can have it#x2019;s dependencies mocked. In the previous article I showed how to use emfake classes/em or emdummies/em for that. Now I want to show you how you can simplify that by using Mockery./p h2Mock your objects/h2 pMockery is geared towards providing even more flexibility when creating mocks. Mockery is not tied to any test framework which makes it useful even if you decided to move away from PHPUnit.br/ In our previous example the test case would be:/p pre code class=language-php// Called from the test case. $fake_cache_response = (object) array(apos;dataapos; =gt; 1234); $cache_controller_fake = \Mockery::mock(apos;CacheControllerInterfaceapos;); $cache_controller_fake-gt;shouldReceive(apos;cacheGetapos;)-gt;andReturn($fake_cache_response); $object = new MyClass($cache_controller_fake); $object-gt;myMethod();/code/pre pHere, I did not need to write a codeCacheControllerFake/code only for our test, I used Mockery instead.br/ PHPUnit comes with a great mock builder as well. Check a href=https://phpunit.de/manual/current/en/test-doubles.html#test-doubles.stubsits documentation/a to explore the possibilities. Sometimes you will want to use one or the other depending on how you want to mock your dependency, and the tools both frameworks offer. See the same example using PHPUnit instead of Mockery:/p pre code class=language-php// Called from the test case. $fake_cache_response = (object) array(apos;dataapos; =gt; 1234); $cache_controller_fake = $this -gt;getMockBuilder(apos;CacheControllerInterfaceapos;) -gt;getMock(); $cache_controller_fake-gt;method(apos;cacheGetapos;)-gt;willReturn($fake_cache_response); $object = new MyClass($cache_controller_fake); $object-gt;myMethod(); /code/pre pMocking your dependencies can be hard #x2013;but valuable#x2013; work. An alternative is to include the real dependency, if it does not break the test runner. The next section explains how to save some time using a href=https://github.com/mateu-aguilo-bosch/drupal-unit-autoloadDrupal Unit Autoload/a./p h2Cutting corners/h2 pSometimes writing tests for your code makes you realize that you need to use a class from another Drupal module. The first instinct would be, #xAB;no problem, let#x2019;s create a mock and inject it in place of the real object#xBB;. That is a very good approach. However, it can be tedious to create and maintain all these mocks, especially for classes that don#x2019;t depend on a bootstrap. That code could just be required in your test case./p pSince your unit test can be considered a standalone PHP script that executes some code #x2013;and makes some assertions#x2013; you could just use the coderequire_once/code statement. This would include the code that contains the class definitions that your code needs. However, a better way of achieving this is by using a href=https://getcomposer.org/doc/Composer/a#x2019;s autoloader. An example codecomposer.json/code in your tests directory would be:/p pre code class=language-json{ quot;require-devquot;: { quot;phpunit/phpunitquot;: quot;4.7.*quot;, quot;mockery/mockeryquot;: quot;0.9.*quot; }, quot;autoloadquot;: { quot;psr-0quot;: { quot;Drupal\\Component\\quot;: quot;lib/quot; }, quot;psr-4quot;: { quot;Drupal\\typed_entity\\quot;: quot;../src/quot; } } }/code/pre pWith the previous example, your unit test script would know how to load any class in the codeDrupal\Component/code and codeDrupal\typed_entity/code namespaces. This will save you from writing test doubles for classes that you emdon#x2019;t have to/em mock./p pAt this point, you will be tempted to add classes from your module#x2019;s dependencies. The big problem is that every drupal module can be installed in a different location, so a simple code../../contrib/modulename/code will not do. That would only work for your installation, but not for others. This is one of the reasons why I wrote with a href=https://www.drupal.org/u/penyaskitoChristian Lopez (penyaskito)/a the a href=https://github.com/mateu-aguilo-bosch/drupal-unit-autoloadDrupal Unit Autoload/a. By adding Drupal Unit Autoload to your codecomposer.json/code you can add references to Drupal core and other contributed modules. The following example speaks for itself:/p pre code class=language-json{ quot;require-devquot;: { quot;phpunit/phpunitquot;: quot;4.7.*quot;, quot;mockery/mockeryquot;: quot;0.9.*quot;, quot;mateu-aguilo-bosch/drupal-unit-autoloadquot;: quot;0.1.*quot; }, quot;autoloadquot;: { quot;psr-0quot;: { quot;Drupal\\Component\\quot;: quot;lib/quot;, quot;Symfony\\quot;: [quot;DRUPAL_CONTRIBlt;service_containergt;/libquot;] }, quot;psr-4quot;: { quot;Drupal\\typed_entity\\quot;: quot;../src/quot;, quot;Drupal\\service_container\\quot;: [quot;DRUPAL_CONTRIBlt;service_containergt;/srcquot;] }, quot;class-locationquot;: { quot;\\DrupalCacheInterfacequot;: quot;DRUPAL_ROOT/includes/cache.incquot;, quot;\\ServiceContainerquot;: quot;DRUPAL_CONTRIBlt;service_containergt;/lib/ServiceContainer.phpquot; } } }/code/pre pWe added codemateu-aguilo-bosch/drupal-unit-autoload/code to the testing setup, so we can include emDrupal aware/em autoloading options to our codecomposer.json/code./p h2Striving for the green/h2 pOne of the most interesting possibilities that PHPUnit offers is a href=https://en.wikipedia.org/wiki/Code_coveragecode coverage/a. Code coverage is a measure used to describe the degree to which the methods are tested. Having a high coverage reduces the number of bugs in your code greatly. Moreover, adding new code with test coverage will help you ensure that you are not introducing any bugs along with the new code./p img src=https://assets.lullabot.com/styles/dynamic_resize/w768/assets/2015-08/mpx-php_2015-07-28_10-35-56.png alt=PhpStorm coverage integration. title=PhpStorm highlights the coverage status in the editor window. /divPhpStorm coverage integration./div pA test harness with coverage information is a valuable tool to include in your a href=https://en.wikipedia.org/wiki/Continuous_integrationCI/a tool. One way to execute all your PHPUnit cases is by adding a codephpunit.xml/code file describing where the tests are located and a href=https://phpunit.de/manual/current/en/organizing-tests.html#organizing-tests.xml-configurationother integrations/a. Running the phpunit command in that folder will execute all the tests./p pAnother good 3rd party service is a href=https://coveralls.iocoveralls/a. It will tell your CI tool how the coverage of your code will change with the pull request #x2013;or patch#x2013; in question; since Coveralls knows about most of the major CI tools almost no configuration is needed. Coveralls also provides a web UI to see what parts of the code are covered and the ones that are not./p img src=https://assets.lullabot.com/styles/dynamic_resize/w768/assets/2015-08/drupal-unit-autoload_coveralls_-_test_coverage_history_statistics_2015-07-28_10-40-54.png alt=Coveralls.io dashboard. title=Coveralls.io dashboard. /divCoveralls.io dashboard./div pWrite tests until you get 100% test coverage, or a href=http://www.artima.com/weblogs/viewpost.jsp?thread=204677a satisfactory number/a. The higher the number the higher the confidence that the code is bug free./p pRead the next section to see all these tools in action in contributed Drupal 7 module./p h2A real life example/h2 pI applied the tips of this article to the a href=https://github.com/mateu-aguilo-bosch/typed_entityTypedEntity module/a. TypedEntity is a nice little module that helps you get your code organized around your Drupal entities and bundles, as first class PHP objects. This module will help you to emchange your mindset/em.br/ Make sure to check the contents of the codetests//code directory. In there you will see a href=https://github.com/mateu-aguilo-bosch/typed_entity/tree/7.x-1.x/testsreal life examples/a of a a href=https://github.com/mateu-aguilo-bosch/typed_entity/blob/7.x-1.x/tests/composer.jsoncodecomposer.json/code/a and a href=https://github.com/mateu-aguilo-bosch/typed_entity/blob/7.x-1.x/tests/src/TypedEntity/TypedEntityManagerTest.phptest/a a href=https://github.com/mateu-aguilo-bosch/typed_entity/blob/7.x-1.x/tests/src/TypedEntity/TypedEntityTest.phpcases/a. To run the tests follow these steps:/p olliDownload the latest version of the module in your Drupal site./li liNavigate to the codetyped_entity /codemodule directory./li liExecute codetests/run-tests.sh/code in your terminal. You will need to have composer installed to run them./li /ol pThis module executes both PHPUnit and Simpletest tests on every commit using a href=https://travis-ci.orgTravis CI/a configured through a href=https://github.com/mateu-aguilo-bosch/typed_entity/blob/7.x-1.x/.travis.ymlcode.travis.yml/code/a and a href=https://github.com/mateu-aguilo-bosch/typed_entity/blob/7.x-1.x/tests/phpunit.xmlcodephpunit.xml/code/a./p pAnother great example, this one with a very high test coverage, is the a href=https://www.drupal.org/project/amazons3Amazon S3 module/a. A new release of this useful module was created recently by fellow Lullabot a href=/node/91Andrew Berry/a, and he added a href=http://cgit.drupalcode.org/amazons3/tree/testsunit tests/a!/p pDo you do things differently in your Drupal 7 modules? Leave your thoughts in the comments!/p /div

SitePoint PHP Drupal: Drupal 8 Theming Revamped – Updates and New Features

Mon, 08/10/2015 - 18:00
pIf you are a Drupal developer who has dabbled in theming older versions of Drupal (5, 6, 7) you understand why frustration is the trusty companion of any Drupal themer. Luckily, though, Drupal 8 promises so many improvements that even the Angry Themer is happy for a change. It is only natural we jump in [#8230;]/p pemContinue reading %a rel=nofollow href=http://www.sitepoint.com/drupal-8-theming-revamped-updates-and-new-features/Drupal 8 Theming Revamped #8211; Updates and New Features/a%/em/p

Appnovation Technologies: Overriding queue classes used in the Batch API in Drupal 7

Mon, 08/10/2015 - 17:04
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encoded There are lots of benefits in working with a platform such as Drupal, that come packed full of goodies for developers like myself and my colleagues, that enable us to build intelligent and innovative solutions. /div/div/divdiv class=field field-name-field-blog-header-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evena href=/blog/overriding-queue-classes-used-batch-api-drupal-7img typeof=foaf:Image src=http://www.appnovation.com/sites/default/files/BlogPost081015.jpg width=1400 height=400 alt= //a/div/div/divdiv class=sharethis-buttonsdiv class=sharethis-wrapperspan st_url=http://www.appnovation.com/blog/overriding-queue-classes-used-batch-api-drupal-7 st_title=Overriding queue classes used in the Batch API in Drupal 7 class=st_facebook/span span st_url=http://www.appnovation.com/blog/overriding-queue-classes-used-batch-api-drupal-7 st_title=Overriding queue classes used in the Batch API in Drupal 7 class=st_twitter/span span st_url=http://www.appnovation.com/blog/overriding-queue-classes-used-batch-api-drupal-7 st_title=Overriding queue classes used in the Batch API in Drupal 7 class=st_sharethis/span /div/div

Nuvole: Drupal 8 Configuration Management: beware of pitfalls

Mon, 08/10/2015 - 16:35
div class=field field-name-field-blog-subtitle field-type-text-long field-label-hiddendiv class=field-itemsdiv class=field-item evenNuvole#039;s Configuration Management workshop at Drupalaton 2015 in Hungary/div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpDrupalaton in Hungary last weekend gave the opportunity for a 90 minutes workshop about Configuration Management (CMI) and how it changes a Drupal developers work flow with the coming Drupal 8./p pCMI allows you to have the whole site configuration under control and that is a great improvement. But it also comes with its pitfalls. Developers have to be more vigilant when sharing configuration with each other: mindless exporting configuration may override the configuration shared by others, mindless importing may override one's own work and forgetting to import merged configuration leads to ignoring the work of your co-developers at a later stage./p pCMI, while it is much more awesome than anything we have in Drupal 7, is also much more unforgiving. So it would be all too easy to not use it properly and what it was designed for and then wonder why you can't have nice things./p pFortunately, a methodical git workflow can help recover from mistakes (except importing configuration before exporting it first). So don't forget the order of the steps:/p ollistrongconfig export/strong/li listronggit commit/strong/li listronggit merge/strong/li listrongconfig import/strong/li /olpAnd do it often to keep the merges and failures simple and easy to resolve./p pPlease find the full Drupalaton 2015 workshop slides attached below./p /div/div/divdiv class=field field-name-field-blog-tags field-type-taxonomy-term-reference field-label-inline clearfixdiv class=field-labelTags:nbsp;/divdiv class=field-itemsdiv class=field-item evenDrupal Planet/divdiv class=field-item oddDrupal 8/div/div/divdiv class=field field-name-field-blog-attachments field-type-file field-label-abovediv class=field-labelAttachments:nbsp;/divdiv class=field-itemsdiv class=field-item evenspan class=fileimg class=file-icon alt= title=application/pdf src=/modules/file/icons/application-pdf.png / a href=http://nuvole.org/sites/default/files/CMI-drupalaton2015.pdf type=application/pdf; length=763769 title=CMI-drupalaton2015.pdfCMI presentation Drupalaton 2015/a/span/div/div/div

KnackForge: Solr Streaming Expressions

Mon, 08/10/2015 - 13:12
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-items id=md1div class=field-item evenpSolr 5.1 introduced a revolutionary Streaming API. With Solr 5.2, you get Streaming Expressions on top of it. Ever wondered on how to run nested queries in SOLR or running parallel computing capabilities, this could be the answer. /p pStreaming Expressions provide a simple query language for SolrCloud that merges search with parallel computing. Under the covers Streaming Expressions are backed by a java Streaming API that provides a fast map/reduce implementation for SolrCloud. Streaming Expressions are composed of functions. All functions behave like Streams, which means that they don't hold all the data in memory at once. Read more about the basics herea href=http:// https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions https://cwiki.apache.org/confluence/display/solr/Streaming+Expressions/a/p pstrongSetup:/strong/p pAssuming a debian based system, say Ubuntu 12.04 or 14.04. If you have not installed Solr 5.2, go grap latest codebase (For eg a href=http://apache.mirror1.spango.com/lucene/solr/5.2.1http://apache.mirror1.spango.com/lucene/solr/5.2.1/a/), extract it. /p pstrongSetup Solr in cloud mode. /strong/p pCloud mode lets you create collection and nodes. See a href=https://cwiki.apache.org/confluence/display/solr/Getting+Started+with+SolrCloudhttps://cwiki.apache.org/confluence/display/solr/Getting+Started+with+SolrCloud/a for more details. bin/solr -e cloud Enter the port and other details./p pTo start a single node, use,/p pbin/solr start -cloud -s example/cloud/node1/solr -p 8983/p pstrongStreaming API:/strong/p pNow comes the interesting part. We have the following streaming API functions, /p/div/div/divmeta itemprop=name content=Solr Streaming Expressions id=md2 /

OSTraining: New Video Class: Google Search Console

Mon, 08/10/2015 - 11:06
div class=ost-intro-imagea href=https://www.ostraining.com/courses/class/tools/gsc/img src=https://www.ostraining.com/images/joomla3/google-webmaster-tools-large.jpg alt=google webmaster tools search console width=200 height=150 //a/div pWhen it comes to getting your website noticed by the world, your best friend is Google. Many websites rely on Google for far over 50% of their traffic./p pIn this class, Topher introduces you to a fantastic set of tools called Google Search Console (formerly Google Webmaster Tools)./p pWhether you run a Drupal, WordPress or Joomla site, Google Search Console helps you understand how Google sees your site and gives you advanced warning of any problems./pimg src=http://feeds.feedburner.com/~r/ostrainingdrupal/~4/pDkC4ZgzAdg height=1 width=1 alt=/

Tim Millwood: Composer in contrib: Step 2

Mon, 08/10/2015 - 10:45
Now that we have an initiative to get get a composer.json file in each contrib module, we cal start...

Microserve: Getting Bootstrap Grid Classes Into Drupal 7 CMS Markup

Mon, 08/10/2015 - 10:10
img typeof=foaf:Image src=https://microserve.io/sites/default/files/styles/banner_image/public/blog/drupal-bootstrap.png?itok=3dE3Vbsfamp;c=73da98521c5d3c03ed69ae37007ffb92 width=760 height=250 alt=Getting Bootstrap Grid Classes Into Drupal 7 CMS Markup /div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedp Bootstrap is wonderfully useful and robust, mobile first framework for creating fully responsive, grid based web layouts./p p span style=line-height: 1.6em;The application of the Bootstrap framework relies on the principle of applying existing Bootstrap CSS classes to HTML mark-up, which in turn harness a suite of existing,  integrated LESS classes, mixins and variables as well as some useful, included JavaScript plugins to create Bootstrap layout./span/p p When building HTML from scratch, the principle and practice is pretty straight forward. Once your Bootstrap library files are in the right place and working, you simply need to add Bootstrap classes to your mark-up as you go./p blockquotep When developing with Drupal, it can be a challenge to 'crowbar' in the Bootstrap classes you need./p /blockquote p When developing with Drupal, things are not quite so straight forward out-of-the-box and it can be quite a challenge trying to 'get at' all of the code where you would need to crowbar in the Bootstrap classes you need./p p Luckily there a number of ways to tackle this challenge, four of which are listed below. I've kept the neatest, life changing trick till last, because it's important to understand your options. (There's a time and place for all these approaches.)/p h2 1. PHP Templating/h2 p a href=https://api.drupal.org/api/drupal/modules!system!page.tpl.php/7https://api.drupal.org/api/drupal/modules!system!page.tpl.php/7/a/p p So tactic number 1 shouldn't come as massive surprise to most Drupal front enders and that is of course to harness the existing Drupal templating system to create templates containing Bootstrap specific mark-up./p p The most obvious example of this (and the bare minimum required to even begin utilising the Bootstrap grid system) is good old page.tpl.php.  Here you'll most likely want to be applying Bootstrap classes to Drupal regions like the main content area and sidebars, so that they respond to screen size and probably 'stack' on top of each other at a smaller sizes./p p Of course the above 'regions' example is a simple scenario (and If you're using the Drupal Bootstrap starter theme (a href=https://www.drupal.org/project/bootstraphttps://www.drupal.org/project/bootstrap/a) a lot of this basic, mark-up will already be in place.) but things will no doubt have to get a lot more fine grain than this and at some point It's a distinct possibility you'll also want to inject Bootstrap column classes into node templates, views templates etc. /p h2 2. Helper Modules/h2 p One of my favourite 'helper modules' is a href=https://www.drupal.org/project/views_responsive_gridViews Responsive Grid/a./p p As the name suggests this module helps create responsive (div based) grid layouts for your views. span style=line-height: 1.6em;By /spanspan style=line-height: 1.6em;itself the module doesn't do anything to auto-magically  'Bootstrapize' your views, rather it gives you an extra view format (Responsive Grid) which at odds with the default Drupal, table based grid format, produces a simple set of nested divs and the ability to assign your own responsive classes to the view wrapper, rows and columns, all through the admin interface, without need for template editing./span/p p In our case we'd use it to add Bootstrap classes, but because it's framework agnostic, you could just as easily use it on sites using omega or foundation themes or your own bespoke responsive approach./p h2 3. Display Suite/h2 p a href=https://www.drupal.org/project/dsDisplay Suite can be found here/a./p p To people who are already advocates of Display Suite, this one should be a no-brainer./p p The Display Suite module (DS) is the ultimate tool in customising Drupal layout through the front end admin interface.  Again no need for editing PHP templates directly./p p If like me, you haven't used DS a massive amount in the past, Bootstrap presents a pretty good case for further investigation. /p p Simply put, DS presents to you through the Drupal admin interface, every default and custom field of a content type, stripped of mark-up and allows you to create multiple view modes where you can choose to show or hide specific fields, re-arrange their order, group them together, create custom page regions, wrappers and assign custom classes, IDs and various other formatting options to each of these elements.  For all intents and purposes it lets you create complex node templates without necessarily writing a line of code./p p So, say we have a 'case study' content type, for example, we could create a node view mode for presenting a single case study article, a teaser view mode to use in views listings where results should appear in a grid layout, and a second teaser view mode to use in views where results appear in a simple list format. We can show/hide whichever fields we like per view mode, group them together any way we choose and more importantly for us, we can use this method to insert all the Bootstrap mark-up and/or classes we require./p h2 4. Bootstrap's Default Mixins/h2 blockquotep I said at the beginning of this blog, that I was saving the best till last and here it is./p /blockquote p This won't be news to everyone, but I'm willing to bet there are going to be a pretty large portion of bootstrap users, who, even though they have studied the Bootstrap documentation available on the a href=http://getbootstrap.com/getbootstrap site/a will have missed this nifty feature./p p If you visit the CSS page of the Bootstrap site and specifically a href=http://getbootstrap.com/css/#gridthe 'grid' section/a, you will no doubt be familiar with the explanation and examples of the grid system itself and which classes to use where, but right at the bottom of this section (just before the section on 'Typography'), there's a sub-section on LESS mixins./p p Now, far be it from me to advise Bootstrap on how to write their documentation, but this section seems to me to be ordered in a quite counter-intuitive manner.  There's a large section of very over complicated example code, showing mixins being used in conjunction with various media queries and LESS variables without seemingly explaining what any of the individual lines of code actually mean. Complicated and confusing enough for may visitors to give up trawling through before reaching the end of the section. And this is the crime, because here, right at the end of the section under the heading 'Example usage',  in one short example piece of code, the keys to the Bootstrap kingdom are presented:/p pre class=prettyprint .wrapper { .make-row(); } .content-main { .make-lg-column(8); } .content-secondary { .make-lg-column(3); .make-lg-column-offset(1); }/prepre class=prettyprint lt;div class=wrappergt; lt;div class=content-maingt;...lt;/divgt; lt;div class=content-secondarygt;...lt;/divgt; lt;/divgt;/preh3 What does this mean?/h3 p Well it means, with a little thoughtful coding, you can create an entire Bootstrap layout without needing to physically insert classes into your HTML mark-up at all. You could in theory use just LESS mixins to style existing, non-Bootstrap markup elements to appear as if they had certain Bootstrap classes, without having to edit their HTML output directly./p p span style=line-height: 1.6em;The example code above would produce layout equivelent to the following HTML mark-up:/span/p pre class=prettyprint lt;div class=wrapper rowgt; lt;div class=content-main col-lg-8gt;...lt;/divgt; lt;div class=content-secondary col-lg-3 col-lg-offset-1gt;...lt;/divgt; lt;/divgt;/preh3 Further examples/h3 p span style=line-height: 1.6em;For instance you have a wrapper div, which contains 6 child divs and you want those 6 children to appear as if they were 6 Bootstrap columns with a class of .col-sm-4. They should have a width of 100% on mobile and stack above each other and then at the 'sm' breakpoint of 768px screen width and above, each of the 6 columns should float left in  2 rows of 3 and have a width of 33.33333333%, or in other words ocuppy 4 of the default 12 Bootstrap columns./span/p p strongspan style=line-height: 1.6em;*The below layout examples are best viewed on larger screens, so that you can  see the layout change as you resize the browser. (on mobile, layouts will all appear stacked at 100% as no 'xs' breakpoint has been declared.)/span/strong/p div class=show-grid-container div class=row show-grid div class=col-sm-4 col Col 1/div div class=col-sm-4 col Col 2/div div class=col-sm-4 col Col 3/div div class=col-sm-4 col Col 4/div div class=col-sm-4 col Col 5/div div class=col-sm-4 col Col 6/div /div /div p If you were editing the HTML directly, you would need to give the wrapper div a class of 'row' and each child div a class of '.col-sm-4'. Using the mixins available to Bootstrap you could do this indirectly, assigning the mixin .make-row(); to your wrapper and then the mixin of .make-sm-column(4); to each of the children. Bingo Bootstrap will now take care of the rest. /p pre class=prettyprint div.wrapper { .make-row(); } div.child { .make-sm-column(4); }/prep You can also stack Bootstrap classes just like in HTML like so:/p pre class=prettyprint div.child { .make-sm-column(4); .make-md-column(6); }/prep strongResulting in:/strong/p div class=show-grid-container div class=row show-grid div class=col-sm-4 col-md-6 col Col 1/div div class=col-sm-4 col-md-6 col Col 2/div div class=col-sm-4 col-md-6 col Col 3/div div class=col-sm-4 col-md-6 col Col 4/div div class=col-sm-4 col-md-6 col Col 5/div div class=col-sm-4 col-md-6 col Col 6/div /div /div p span style=line-height: 1.6em;*Each child div will be 4 columns (33.33333333%) at the 'sm' breakpoint and above, until the 'md' breakpoint when each child div will be 6 columns (50%) wide. Because we haven't decared a specific number of columns at 'xs' (below the 'sm' breakpoint), the divs will revert to their 100% wide default and stack one on top of each other./span/p p strongYou can even add offsets like so:/strong/p pre class=prettyprint div.child { .make-sm-column(4); .make-md-column(6); } div.thisclass { .make-sm-column-offset(4); .make-md-column-offset(6); } /prediv class=show-grid-container div class=row show-grid div class=col-sm-4 col-md-6 col Col 1/div div class=col-sm-4 col-md-6 col Col 2/div div class=col-sm-4 col-md-6 col Col 3/div div class=col-sm-4 col-md-6 col Col 4/div div class=col-sm-4 col-sm-offset-4 col-md-6 col-md-offset-6 col Col 5 span class=hidemobileOffset on larger screens/span/div /div /div p span style=line-height: 1.6em;*In this example, at the 'md' breakpoint each div occupies 5 columns with an empty column to it's left. (5+1 = 6 cols - or 50% in total)./span/p h2 Conclusion/h2 p So there you go, there's my 4 favourite ways of getting Bootstrap into Drupal. span style=line-height: 1.6em;You could exclusively use tactics 1,3 or 4 in isolation (2 is more of a 'bolt-on' to be harnessed by the others), depending on your preferred work flow and how much you want to 'get your hands dirty' by digging down into the code of Drupal, but in practice all methods should be viewed as complimentary tools available in a themer's toolbox, each with it own advantages and disadvantages in any one given situation./span/p /div/div/diva href=/about/martin-whiteimg typeof=foaf:Image src=https://microserve.io/sites/default/files/styles/thumbnail/public/pictures/picture-38-1430233880.jpg?itok=wgtd8vpT alt=Martin White#039;s picture title=Martin White#039;s picture //aa href=/about/martin-white title=View user profile. class=usernameMartin White/a

Web Omelette: New contrib module: Info Plugins

Mon, 08/10/2015 - 09:02
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpToday I would like to introduce a new module that I released for the Drupal (developer) community to use and share: a href=https://www.drupal.org/project/info_pluginsInfo Plugins/a. This is for developers who are tired of implementing a bunch of messy code_info/code hooks (and their corresponding callbacks), lumping together functionality that frankly shouldn't even touch. I'm talking about those ugly switch statements in which we have cases for the various extensions we provide. Don't get me wrong Drupal, I love your hook system./p pWith strongInfo Plugins/strong, much (and progressively more and more) of this becomes cleaner by exposing all those extension points to the cTools plugin system. What I mean by this is that using this module you will be able to declare things like Drupal blocks, filters, field formatters and more, as cTools plugins. This way, all the logic related to one plugin (block, filter or field formatter to continue with the above examples) resides neatly within one single plugin include file./p pLet us look at an example a bit more in depth: the Drupal block. Instead of implementing up to 4 hooks (code_info/code, code_view/code, code_configure/code and code_save/code) to manage your blocks, you can now define a new codecore_block/code plugin within your cTools plugins folder like so:/p precode$plugin = array( 'title' =gt; t('Example block'), // Your own callback for building the display of the block (called by `hook_block_view()`) // Leaving this empty, the function name would default to `my_module_example_block_view()` 'view' =gt; 'my_module_render_example_block', // Your own callback for building the config form for the block (called by `hook_block_configure()`) // Leaving this empty, the function name would default to `my_module_example_block_configure()` 'configure' =gt; 'my_module_configure_example_block', // Your own callback for saving the config for the block (called by `hook_block_saved()`) // Leaving this empty, the function name would default to `my_module_example_block_save()` 'save' =gt; 'my_module_save_example_block', // ... all other options you may want to pass to `hook_block_info()` ); /** * Returns a renderable array that represents the block content, i.e. * the same as you would return from `hook_block_view()`. * * @param $delta * The block delta */ function my_module_render_example_block($delta) { return array( '#type' =gt; 'markup', '#markup' =gt; 'My custom example block' ); } /** * Returns a form to be used as the block configuration form, i.e. the same * as you would return from `hook_block_configure()` * * @param $delta * The block delta */ function my_module_configure_example_block($delta) { $form = array(); $form['my_custom_field'] = array( '#type' =gt; 'textfield', '#title' =gt; t('My custom block field'), '#default_value' =gt; variable_get($delta, '') ); return $form; } /** * Saves the block configuration, i.e. the same as you would do inside * `hook_block_save()` * * @param $block * An array of values representing the block with it's configuration, i.e. the * `$edit` array passed to `hook_block_save()` */ function my_module_save_example_block($block) { variable_set($block['delta'], $block['my_custom_field']); } /code/pre pSo as you can see, your block definition, render and configuration resides in one file. If you need more blocks, you just define more plugins and you are good to go. There is such a documentation oriented example inside the codeplugin_examples/code folder of the module for each available plugin type. Plus, don't forget the a href=http://cgit.drupalcode.org/info_plugins/plain/README.md?h=7.x-1.xREADME.md/a file./p pdiv id=block-inject-2 class=block-inject block-inject-2/divdiv class=clearfix/divpOnce you install the module, you will have only one administration screen at codeadmin/config/info-plugins/code where you'll be able to select which plugin types you need. For example, if you need to define a custom block, enable the codeCore Block/code plugin type. If you need others, enable them as well. But I recommend you keep them disabled if you don't use them so that their logic doesn't get included in memory (all the relevant hooks and what not). My goal here is to keep a very low foot print./p pTo see which plugin types are available to use, please consult the a href=https://www.drupal.org/project/info_pluginsproject page/a. And keep checking back because I will add more. And if you want to contribute, please don't hesitate. Take it out for a spin, give it a test and please open issues to let me know of any bugs you find. I will be active on this for a while and want to hammer out all the potential problems before creating a stable release./p pCheers!/p /div/div/divdiv class=field field-name-field-categories field-type-taxonomy-term-reference field-label-hiddenIn span class=field-itemsspan class=field-item evena href=/drupalDrupal/a/span/span/divdiv class=sharethis-buttonsdiv class=sharethis-wrapperspan st_url=http://www.webomelette.com/new-contrib-module-info-plugins st_title=New contrib module: Info Plugins class=st_facebook/span span st_url=http://www.webomelette.com/new-contrib-module-info-plugins st_title=New contrib module: Info Plugins class=st_twitter st_via=drupalexp/span span st_url=http://www.webomelette.com/new-contrib-module-info-plugins st_title=New contrib module: Info Plugins class=st_googleplus/span script type='text/javascript'var switchTo5x = true;/scriptscript type='text/javascript' src='http://w.sharethis.com/button/buttons.js'/scriptscript type='text/javascript'stLight.options({publisher:dr-8de6c3c4-3462-9715-caaf-ce2c161a50c});/script/div/div

DrupalCon News: Drupal Business Summit: The Next Generation

Sun, 08/09/2015 - 07:00
div class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpWhat do the businesses in the Drupal community need to do to survive and grow in the next three years?/p pDrupal 8 will attract a new wave of agencies to compete in the market, and will also enable Drupal businesses to compete at a higher level. A time of big change and competition is coming, and it will no longer be enough just to say you 'do Drupal' and then sit back and watch sales roll in./p/div/div/div

Chen Hui Jing: Drupal 101: Starting Drupal development

Sun, 08/09/2015 - 02:00
pI recently moved from an agency specialising in building Drupal sites to one which is platform-agnostic, and uses all variety of technologies. As my team was not very familiar with Drupal, I started writing some documentation on setting up locally, installing Drush and commonly used modules, and some other stuff so everyone could get up and running quickly. I’ve modified it to be even more beginner-friendly, for people who’ve never built websites before. This is sort of opinionated so feel free not to follow along exactly./p h3 id=the-basic-technology-stackThe basic technology stack/h3 pAs with most content management systems, Drupal has some a href=https://www.drupal.org/requirementssystem requirements/a in order to run, commonly known as a technology stack. This simply means you have to install...

Drupal Watchdog: Drupal Should Use an External Front End Framework

Fri, 08/07/2015 - 22:15
div class=field field--body field-type-text-with-summary field-label-hidden field--rss h2Preface/h2 pThe purpose of this blog post is intended to be a comprehensive analysis and response to:br / a href=https://www.drupal.org/node/2289619 target=_blank#2289619: [meta] Add a new framework base theme to Drupal core/a; to encapsulate how I believe core should move forward with a default theme. For brevity, the term framework in this post will always refer to front end framework./p h2The Problem/h2 pCore has always provided its own themes, however the benefit of sustaining this model is becoming increasingly difficult to justify./p h3Fast Moving Front End Technologies/h3 pIn regards to the front end, core has historically been more reactive than proactive. This isn’t all that surprising, nor a bad approach, when you take into account what core originally had to deal with./p pNow consider for a moment, all the different technologies and techniques that are used on the front end today and compare that with when Bartik was created ~6 years ago. Things have changed rather drastically with the advent of Responsive Web Design, HTML5 and CSS preprocessors like SASS and LESS./p pWeb Components are possibly the next major milestone in front end development with an impact potentially just as large, if not larger, than that of HTML5 and Responsive Web Design. While the concept isn't necessarily new (frameworks have had components for years), it is definitely being sought to become a web standard with Google leading the way. Web Components are an encapsulation of multiple front end technologies supported directly by the browser. This could also likely be the future of what we now consider frameworks today: a consolidation of web components. Perhaps the web as a whole, only time can tell./p pVideo:br / a href=https://events.drupal.org/losangeles2015/sessions/drupal-9-components-library-next-theme-system target=”_blank”2015 DrupalCon Los Angeles Session: Drupal 9 Components Library: The next theme system/a/p h3The 1% of the 1%/h3 pGenerally known as the a href=https://en.wikipedia.org/wiki/1%25_rule_(Internet_culture) target=_blank1% rule/a, only ~1% of any given internet community is responsible for creation. In regards to Drupal, this figure is actually a href=http://www.jenlampton.com/blog/breakdown-drupal-community target=_blankeven more drastic/a with only about 0.02% that are core developers./p pThis fact is what makes core developers a rare commodity. I would, however, like to take this a step further. Of that 0.02%, how many of those core developers are front end developers? I’m sure no one knows the emexact/em ratio, but it is commonly accepted that core front end developers are an even rarer commodity./p pBack end developers are the majority. They have little to no interest in current front end technologies, techniques or Best Practices™. I'm not discounting the fact that there are back end developers that cross over or vice versa, but there are just a handful of unicorns ./p pWithout enough of a front end ratio in core development, it is impractical and unfair for everyone involved to expect any sort of solid theme from core. It is because of this fact that emnot/em having an external framework is actually hurting us from a community, development and maintainability standpoint./p h3Getting off the Island/h3 pCore has already adopted the Proudly Found Elsewhere mentality for a lot of its back end architecture. The benefits that this approach has brought to our community has proven predominantly fruitful. The front end should be no different./p pCore really hasn't accepted this direction for front end themes, but doing so would allow core development to focus solely on the integration of an external framework. This would reduce a lot of the technical debt required to sustain the design and implementation of CSS and JS in a core theme./p pVideo:br / a href=”https://www.youtube.com/watch?v=69yHgJwcc-g” target=”_blank”Keynote: Angela Byron — Drupal 8: A Story of Growing Up and Getting Off the Island — php[world] 2014/a/p h3Automated testing/h3 pWhile the automated testing infrastructure (a href=https://www.drupal.org/project/drupalci target=_blankDrupalCI/a) is definitely improving, it is still primarily focused on the back end side of things./p pCore has wonderful unit testing. These unit tests include and ensure that a theme can implement the necessary hooks available to it via the theme system APIs. It is also great at ensuring that a theme's markup is correctly generated./p pHowever, that is where the benefits of automated testing of core themes ends. Any patch that affects CSS or JS must undergo a very manual process which requires contributors to physically apply patches and test changes in multiple browsers. This often results in bucket loads of before and after screenshots on an issue. This is hardly ideal./p pThe reason many front end oriented projects live on GitHub is because of their ability to integrate amazing automated tests through tools like Travis CI and Sauce Labs. Being on GitHub allows front end projects to rigorously test around the specific areas for which their technologies implement and leads to the stability of their codebase./p pPerhaps one day the core and contrib themes could leverage the same type of abilities on drupal.org, perhaps not./p pstrongRegardless, testing is just as paramount to the front end as it is for the back end./strong/p pUnless the testing infrastructure is willing to entertain the possibility of theme-based CSS and JS testing, an external framework is really our only alternative for stable front end code. At the very least, implementing an external framework allows us to defer this decision./p h3Popular Drupal-grown base themes/h3 pThere will always be use cases for the popular Drupal-grown base themes. It really just depends on the project and capabilities of a front end developer. There's nothing wrong with them and I have used them all. They are without a doubt a very powerful and necessary part of our ecosystem./p pThere is often a lot of misunderstanding around what these base themes actually are, though. Many of them started out simply as a way to reset core. Over time, many have added structural components (grid systems), useful UI toggle and other tools. However, the foundation for many of them is simply to provide a starting point to create a completely custom sub-theme. Intended or not, they are essentially by front end emDrupal/em developers for front end emDrupal/em developers./p pThe priority for these base themes is not out-of-the-box visual consumption, but rather providing a blank canvas supported by a well groomed toolset. It is because of this bare nature that they can actually become more of an obstacle than a benefit for most. They essentially require an individual to possess knowledge of CSS or more, to get even the most basic of themes up and running./p pTheir target audience is not the other 99.9998% and not viable for core./p h2The Solution/h2 pDue to the complexity of the theme system, the work with Twig has been a daunting task. This alone has pushed a lot of what we thought we would get to into even later stages. I propose that the next stage for a default core theme is to think long term: adoption of an external framework./p h3Proudly Found Elsewhere/h3 pCore cannot continue to support in-house theme development, at least until there is a higher ratio of core front end developers. External frameworks live outside of Drupal and helps ensure fewer Drupalisms are added to our codebase. It also allows Drupal to engage more with the front end community on a level it never has before./p h3Vast and Thriving Ecosystems/h3 pBecause frameworks typically live outside of larger projects, they usually have a vast and thriving ecosystem of their own. These often produce a flurry of additional and invaluable resources like: documentation, blog posts, in-depth how-to articles, specific Qamp;A sites, support sites, template sites, forums, custom plugins/enhancements. Drupal would instantly benefit from these existing resources and allow our community to offset some of the learning curves./p h3Back end developer friendly/h3 pThese resources also allow a back end developer to focus more on how to implement existing patterns than worrying about having to create new ones. This would allow core developers to focus solely on the theme system itself and providing the necessary APIs for theme integration, rather than the more complicated front end CSS or JS implementations./p h2Why Bootstrap?/h2 pThere are many frameworks out there and, quite frankly, attempting to find the one that is better than the other is futile; frameworks are simply opinionated standards. You may agree with one’s opinion or you may not. It does not change the fact that they all work./p pThe question that remains is: Which framework do we put in in core?/p pI strongly believe that it should be Bootstrap. A lot of individuals, including myself, have already put in a great deal of time and effort in contrib to solve this exact issue: how to use an external framework with Drupal./p pAnother advantage of using Bootstrap is that it is already backed by a massive external community./p blockquotedivThe main strength of Bootstrap is its huge popularity. Technically, it’s not necessarily better than the others in the list, but it offers many more resources (articles and tutorials, third-party plug-ins and extensions, theme builders, and so on) than the other four frameworks combined. In short, Bootstrap is everywhere. And this is the main reason people continue to choose it./div div class=smalla href=http://www.sitepoint.com/5-most-popular-frontend-frameworks-compared/ target=_blankIvaylo Gerchev/a/div /blockquote pIn just strongtwo and half years/strong, the a href=https://www.drupal.org/project/bootstrap target=_blankDrupal Bootstrap base theme/a has grown exponentially at a whopping a href=http://www.miniwebtool.com/percent-growth-rate-calculator/?present_value=1070amp;future_value=70531amp;num=2.5 target=_blank2596.67%/a (based on a href=https://www.drupal.org/project/usage/bootstrap target=_blank7.x installs/a from: 1,070 on January 6, 2013 to: 70,531 on July 12, 2015*) and has become the a href=https://www.drupal.org/project/project_theme target=_blankthird top most installed Drupal theme/a on drupal.org.br / span class=help-block*Note: I have chosen to exclude the past two weeks of statistics as I believe they are in error due to a href=https://www.drupal.org/node/2509574 target=_blank#2509574: Project usage stats have probably gone bad (again)/a./span/p pWhile I cannot attest to the emexact/em reason this rapid adoption has occurred, here is an educated guess: it's what the people emwant/em. I purposefully made something that was easy to install and worked right out-of-the-box. Ensuring that the focus of the project was on the other 99.9998%./p pNo other Drupal project that implements an external framework can claim this or even come close to it./p pEase of use is paramount and often overlooked by developers. This philosophy is what has allowed sites like a href=https://dreditor.org target=_blankDreditor/a to be born and this one, a href=/blog/2014/6/drupalcon-or-bust target=_blankDrupal Watchdog/a, to be redesigned given some rather severe time constraints./p h2Conclusion: Drupal 8, 9, 10.../h2 pAdopting an external framework is just the logical next step in core's Proudly Found Elsewhere mission on the front end. Regardless of which framework is ultimately chosen, I think it is more important to see emwhy/em Drupal needs an external framework./p pWe already have too many issues and tempers flaring around even the smallest of details on the front end. By outsourcing a theme's design (CSS amp; JS), we would allow our community to instead focus on the integrations of themes, like the future of a href=https://www.drupal.org/node/1804488 target=_blankcomponents/a and a href=https://www.drupal.org/node/1382350 target=_blankmuch larger issues/a./p pWhile this issue isn't about trying to add a framework to core just yet, I think it is very important to have this discussion early on. I do think that ultimately, a framework based theme in core should replace Bartik, but that won't and should not happen until D9./p pSince adding an external framework base theme would be purely an API addition, there isn't anything that would prevent us from adding it in an 8.Y.0 release (solely opt-in, of course). In fact, I would strongly recommend that we add one before D9 so we can smooth out any remaining details before tackling something as gigantic as a href=https://www.drupal.org/node/1843798 target=_blank#1843798: [meta] Refactor Render API to be OO/a./p pI have a feeling that D9 will be the year(s) of the front end. While yes, Twig is awesome, the fact remains that the underlying theme system (and default theme) itself hasn't changed all that much and needs some serious tough love./p pI believe integrating an external framework is an excellent way for us to, not only reduce both our technical debt and maintenance burden, but also focus how we should be developing our theme system. We have an opportunity to transform the first visual impression of Drupal./p pLet's do it for the 99.9998%./p /div div class=field field--tags field-type-taxonomy-term-reference field-label-above field--rss div class=field-labelspan class=icon glyphicon glyphicon-tag aria-hidden=true/spanTags:nbsp;/div div class=field-items a href=/tags/drupal-8 typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Drupal 8/a a href=/tags/drupal-9 typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Drupal 9/a a href=/tags/proudly-found-elsewhere typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Proudly Found Elsewhere/a a href=/tags/themes typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Themes/a a href=/tags/theming typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Theming/a a href=/tags/community typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Community/a a href=/tags/front-end typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Front End/a a href=/tags/framework typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Framework/a a href=/tags/bootstrap typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Bootstrap/a /div/div

Drupal Watchdog: Got Game?

Fri, 08/07/2015 - 18:16
div class=field field--article-edit-printtype field-type-list-text field-label-hidden field--rss Feature /div div class=field field--article-body field-type-text-long field-label-hidden field--rss pimg src=/sites/default/files/images/web/DW5.01-GotGame-Dragon.png alt=Dragon Drawing width=50% align=left class=img-responsive img-thumbnail margin-right / This is not an article about gamification. Unless your website is devoted to dragons, adding quests and hit points won’t improve your users’ engagement with your content. (If your website emis/em devoted to dragons, well that’s just awesome.)/p p Content – be it text, images, video, data, or a combination of mediums – is the reason we build websites in the first place. It’s right there in the acronym: CMS. Drupal is a system – or more accurately, a framework – for managing content. We strongly believe that all website features, layout, and design choices must support the goal of serving your target audiences with the critical information – the content – they need to engage meaningfully with your organization./p p Your content is the connection between your organizational goals and your audiences’ motivations. There’s usually a reason a piece of content is added to a website; somebody, at some point, thought it would be useful. Unless that content has meaning to your users, however, it has little value to your organization. Without a strategy guiding the creation and governance of that content, your quest, noble though it may be, is almost doomed to fail./p p Fortunately, it’s not hard to start creating a strategy. We believe you can learn the foundations of content strategy for Drupal websites by breaking down what the team at BioWare did in creating emDragon Age: Inquisition/em./p h3Goals and Audiences/h3 p You have to start with goals. /p p BioWare’s basic goal is easy to suss out: they want to make money. To support such a massive undertaking – creating emInquisition/em involved programmers, writers, producers, graphic artists, vocal talent, project management, and more – the end result had to be a game that would appeal to enough people not only to pay for expenses, but to turn a profit. (We have a strong suspicion the team also wanted to turn around the negative reception emDragon Age 2/em met by releasing something that would blow more than a few minds.)/p /div

Drupal core announcements: Recording from Aug 7th 2015 Drupal 8 critical issues discussion

Fri, 08/07/2015 - 14:00
pWe met again today to discuss critical issues blocking Drupal 8's release (candidate). (a href=https://groups.drupal.org/taxonomy/term/138603See all prior recordings/a). Here is the recording of the meeting video and chat from today in the hope that it helps more than just those who were on the meeting:/p !--break--!--break--piframe width=600 height=338 src=https://www.youtube.com/embed/LoY4GYx9O14?feature=player_embedded frameborder=0 allowfullscreen/iframe/p pIf you also have significant time to work on critical issues in Drupal 8 and we did not include you, a href=https://www.drupal.org/user/4166/contactlet me know as soon as possible/a./p pThe meeting log is as follows (all times are GMT real time at the meeting):/p pcodebr / 10:10 WimLeers a href=https://www.drupal.org/node/2543332 title=https://www.drupal.org/node/2543332https://www.drupal.org/node/2543332/abr / 10:10 Druplicon a href=https://www.drupal.org/node/2543332 title=https://www.drupal.org/node/2543332https://www.drupal.org/node/2543332/a = Auto-placeholdering for #lazy_builder without bubbling [#2543332] = 40 comments, 8 IRC mentions/code/p p10:11 WimLeers a href=https://www.drupal.org/node/2503963 title=https://www.drupal.org/node/2503963https://www.drupal.org/node/2503963/abr / 10:11 Druplicon a href=https://www.drupal.org/node/2503963 title=https://www.drupal.org/node/2503963https://www.drupal.org/node/2503963/a = XSS in Quick Edit: entity title is not safely encoded [#2503963] = 27 comments, 2 IRC mentions/p p10:12 plach a href=https://www.drupal.org/node/2544954 title=https://www.drupal.org/node/2544954https://www.drupal.org/node/2544954/abr / 10:12 Druplicon a href=https://www.drupal.org/node/2544954 title=https://www.drupal.org/node/2544954https://www.drupal.org/node/2544954/a = SqlContentEntityStorageSchema does not detect column-level schema changes in non-base-fields [#2544954] = 16 comments, 1 IRC mention/p p10:12 plach a href=https://www.drupal.org/node/2542748 title=https://www.drupal.org/node/2542748https://www.drupal.org/node/2542748/abr / 10:12 Druplicon a href=https://www.drupal.org/node/2542748 title=https://www.drupal.org/node/2542748https://www.drupal.org/node/2542748/a = Automatic entity updates are not safe to run on update.php by default [#2542748] = 60 comments, 14 IRC mentions/p p10:14 dawehner a href=https://www.drupal.org/node/2540416 title=https://www.drupal.org/node/2540416https://www.drupal.org/node/2540416/abr / 10:14 Druplicon a href=https://www.drupal.org/node/2540416 title=https://www.drupal.org/node/2540416https://www.drupal.org/node/2540416/a = Decide whether we need hook_upgrade_N()/upgrade.php front controller [#2540416] = 43 comments, 11 IRC mentions/p p10:17 webchick a href=https://assoc.drupal.org/d8accelerate title=https://assoc.drupal.org/d8acceleratehttps://assoc.drupal.org/d8accelerate/a/p p10:17 webchick a href=https://www.drupal.org/node/2485119 title=https://www.drupal.org/node/2485119https://www.drupal.org/node/2485119/abr / 10:17 Druplicon a href=https://www.drupal.org/node/2485119 title=https://www.drupal.org/node/2485119https://www.drupal.org/node/2485119/a = [meta] The Drupal 8.0.0-rc1 Release Checklist [#2485119] = 32 comments, 11 IRC mentions/p p10:17 webchick a href=https://www.drupal.org/node/2042447 title=https://www.drupal.org/node/2042447https://www.drupal.org/node/2042447/abr / 10:17 Druplicon a href=https://www.drupal.org/node/2042447 title=https://www.drupal.org/node/2042447https://www.drupal.org/node/2042447/a = Install a module user interface does not install modules (or themes) [#2042447] = 178 comments, 25 IRC mentions/p p10:18 webchick a href=https://www.drupal.org/node/2267715 title=https://www.drupal.org/node/2267715https://www.drupal.org/node/2267715/abr / 10:18 Druplicon a href=https://www.drupal.org/node/2267715 title=https://www.drupal.org/node/2267715https://www.drupal.org/node/2267715/a = [meta] Drupal.org (websites/infra) blockers to a Drupal 8 release [#2267715] = 53 comments, 17 IRC mentions/p p10:19 alexpott a href=https://www.drupal.org/node/2280965 title=https://www.drupal.org/node/2280965https://www.drupal.org/node/2280965/abr / 10:19 Druplicon a href=https://www.drupal.org/node/2280965 title=https://www.drupal.org/node/2280965https://www.drupal.org/node/2280965/a = [meta] Remove or document every SafeMarkup::set() call [#2280965] = 109 comments, 24 IRC mentions/p p10:19 alexpottbr / a href=https://docs.google.com/document/d/1wBSwpCa0tm_CKAV1_R0xTAdKZSsVSUc2fQuSVf386O0/edit#heading=h.kj8livfx2bqq title=https://docs.google.com/document/d/1wBSwpCa0tm_CKAV1_R0xTAdKZSsVSUc2fQuSVf386O0/edit#heading=h.kj8livfx2bqqhttps://docs.google.com/document/d/1wBSwpCa0tm_CKAV1_R0xTAdKZSsVSUc2fQuS.../a/p p10:21 dawehner a href=https://www.drupal.org/node/2503963 title=https://www.drupal.org/node/2503963https://www.drupal.org/node/2503963/abr / 10:21 Druplicon a href=https://www.drupal.org/node/2503963 title=https://www.drupal.org/node/2503963https://www.drupal.org/node/2503963/a = XSS in Quick Edit: entity title is not safely encoded [#2503963] = 27 comments, 3 IRC mentions/p p10:23 WimLeers dawehner: catch: alexpott: a href=https://www.drupal.org/node/2547127#comment-10194525 title=https://www.drupal.org/node/2547127#comment-10194525https://www.drupal.org/node/2547127#comment-10194525/abr / 10:23 Druplicon a href=https://www.drupal.org/node/2547127 title=https://www.drupal.org/node/2547127https://www.drupal.org/node/2547127/a = [regression] Empty messages container appearing when a Notice occurs [#2547127] = 19 comments, 4 IRC mentions/p p10:37 alexpott a href=https://www.drupal.org/node/2527360 title=https://www.drupal.org/node/2527360https://www.drupal.org/node/2527360/abr / 10:37 Druplicon a href=https://www.drupal.org/node/2527360 title=https://www.drupal.org/node/2527360https://www.drupal.org/node/2527360/a = Review all usages of Xss::filter(), Xss::filterAdmin(), SafeMarkup::checkPlain() and SafeMarkup::escape() [#2527360] = 0 comments, 2 IRC mentions/p p10:38 alexpott a href=https://www.drupal.org/node/2546232 title=https://www.drupal.org/node/2546232https://www.drupal.org/node/2546232/abr / 10:38 Druplicon a href=https://www.drupal.org/node/2546232 title=https://www.drupal.org/node/2546232https://www.drupal.org/node/2546232/a = Remove SafeMarkup::checkPlain() from UrlHelper [br / #2546232] = 3 comments, 1 IRC mention/p p10:40 dawehner a href=https://www.drupal.org/node/2540416 title=https://www.drupal.org/node/2540416https://www.drupal.org/node/2540416/abr / 10:40 Druplicon a href=https://www.drupal.org/node/2540416 title=https://www.drupal.org/node/2540416https://www.drupal.org/node/2540416/a = Decide whether we need hook_upgrade_N()/upgrade.php front controller [#2540416] = 43 comments, 12 IRC mentions/p p10:55 webchick a href=https://www.drupal.org/node/2542748 title=https://www.drupal.org/node/2542748https://www.drupal.org/node/2542748/abr / 10:55 Druplicon a href=https://www.drupal.org/node/2542748 title=https://www.drupal.org/node/2542748https://www.drupal.org/node/2542748/a = Automatic entity updates are not safe to run on update.php by default [#2542748] = 60 comments, 15 IRC mentions/p p10:58 alexpott a href=https://www.drupal.org/node/2544932 title=https://www.drupal.org/node/2544932https://www.drupal.org/node/2544932/abr / 10:58 dawehner a href=https://www.drupal.org/node/2497243 title=https://www.drupal.org/node/2497243https://www.drupal.org/node/2497243/abr / 10:58 Druplicon a href=https://www.drupal.org/node/2544932 title=https://www.drupal.org/node/2544932https://www.drupal.org/node/2544932/a = Do not rely on loading php from shared file system [#2544932] = 6 comments, 2 IRC mentionsbr / 10:58 Druplicon a href=https://www.drupal.org/node/2497243 title=https://www.drupal.org/node/2497243https://www.drupal.org/node/2497243/a = Rebuilding service container results in endless stampede [#2497243] = 208 comments, 48 IRC mentions/p p11:02 webchick Ok. Time to pass out. ;)br / /p pemThanks to @alexpott for the video and log./em/p

Tim Millwood: Composer in contrib: Step 1

Fri, 08/07/2015 - 13:38
Drupal 8 has seen a lot of love for Composer. As various posts have mentioned, it’s possible to...

InternetDevels: Web developer tools for Drupal 7

Fri, 08/07/2015 - 10:18
div class=field field--name-field-preview-image field--type-image field--label-hiddendiv class=field__itemsdiv class=field__item evenimg src=http://st2.internetdevels.net/sites/default/files/public/blog_preview/webdevelopertools.jpeg width=816 height=580 alt=Web developer tools for Drupal 7 //div/div/divdiv class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpTo create a simple website on Drupal 7, an administrative interface and a simple text editor will be enough, but when it comes to more serious projects, you cannot do without additional Drupal web developer tools and powerful code editors./ppTools used in a target=_blank href=http://internetdevels.com/services/drupal-developmentDrupal web development/a can be divided into two types:/p a href=http://internetdevels.com/web-developer-tools-for-drupal-7Read more/a/div/div/div

KnackForge: Drupal 8 Accelerate

Fri, 08/07/2015 - 07:48
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-items id=md1div class=field-item evenpimg alt= class=media-image style=padding-right: 10px; padding-bottom: 10px; font-size: 14.6666669845581px; white-space: pre-wrap; line-height: 22.0799999237061px; text-align: center; width: 120px; height: 120px; float: left; typeof=foaf:Image src=/sites/default/files/drupal8_0.jpg width=375 height=375 //p/div/div/divmeta itemprop=name content=Drupal 8 Accelerate id=md2 /