Planet Drupal

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

Acquia: Quick Tips for Writing Object Oriented Code in PHP

Thu, 07/09/2015 - 21:15
figure class=field-item even rel= resource=https://www.acquia.com/sites/default/files/php-code.jpg class=field-item even div id=styles-3 class=styles styles-field-image styles-style-scale_width_280 styles-container-image styles-preset-scale_width_280 img typeof=foaf:Image src=https://www.acquia.com/sites/default/files/styles/scale_width_280/public/php-code.jpg?itok=sxWIZJng alt= title= //div !-- render the title tag as caption -- /figure div class=field field-name-body field-type-text-with-summary field-label-hidden div class=field-items div property=content:encoded class=field-item evenpRecently I began working on a D8 module, but this isn't a story about a D8 module. The work I did provided me an opportunity to get back to my pre-Drupal object oriented (OO) roots. Writing OO code in PHP presented some curve balls I wasn’t prepared for. Here are some of the issues I encountered:/p h2PSR-4 Autoloading: How to set up your files to be loaded/h2 pFirst things first, how do you include OO code in your project? In D7 you had to add the files to a .info file for a module or do module_load_include. In D8 all you have to do is follow PSR-4 namespacing. If you follow the PSR-4 folder and namespace structure your classes will be auto-detected. No more need to add them to a .info file! If you are writing code for D8 then it’s done. Great. In D7 you can use the XAutoload module to get PSR-4 autoloading in D7 today!/p h2Namespacing In PHP: Loading your files/h2 pNamespacing in PHP can be confusing and misleading. In Java or .NET, in a file you first import other namespaces you intend to use. In the example below we use the “using” keyword. Then you declare the namespace wrapper for the code that is being implemented. /p p/pdiv class=codeblockcodeusing System;br /using Microsoft.VisualBasic.Devices;br /namespace SampleNamespacebr /{br /    class SampleClassbr /    {br /    }br /}/code/divbr / PHP is VERY different. It’s actually the opposite. First you declare the namespace then inside the namespace you have your “includes.” In PHP including the use statements outside of the namespace would contaminate the global-scope. p/pdiv class=codeblockcodenamespace SampleNamespacebr /use GuzzleHttp;br /use GuzzleHttp\Subscriber;br /br /class SampleClassbr /{br /}/code/divbr / Now this is where things get tricky. If there is a class called Client inside GuzzleHttp then you would expect that you could use it by writing the following. p/pdiv class=codeblockcodenamespace SampleNamespacebr /use GuzzleHttp;br /br /class SampleClass {br / function sampleFunction(){br /          $myClient  = new Client();br /      }br /}/code/divbr / And you would be wrong. The way that PHP interprets classes are RELATIVE to the current file’s namespace. So it actually sees “$myClient = new Client();” as “ $myClient = new SampleNamespace\Client();” which does not exist so the declaration fails. To work around this you can reference the actual class in the use statement. If you have multiple classes you must have an include for each one. It’s more verbose than what you might expect coming from .Net or Java e.g.: p/pdiv class=codeblockcodenamespace SampleNamespacebr /use GuzzleHttp\Client;br /use GuzzleHttp\Subscriber\Mock;br /br /class SampleClass {br / function sampleFunction(){br /          $myClient  = new Client();br /    $mock = new Mock();br /      }br /}/code/div h2Dynamic Typing: A variable can be anything!/h2 pPHP is a dynamically typed language. It provides great flexibility and velocity when coding, especially procedural code. However, this can be a nightmare when you are writing OO code. It means that you cannot make assumptions about the type being passed into an object. If you make assumptions and those assumptions are invalid your code can behave unpredictably. What are you to do? /p h3Type Hint ALL THE THINGS: /h3 pYou might be surprised to know that PHP allows you to apply and enforce function param types. PHP 5 introduced the concept of type hinting. With type hinting you can set type on objects. e.gbr / function sampleFunction(MySampleClass $a){/p pIf a type hint is violated, an InvalidArgumentException is thrown. There is a catch to type-hinting in PHP, it doesn’t work for scalar types e.g (string, int, bool). There is also no type hinting on return types. You’ll have to wait for PHP 7 for both. In order to work around the scalar limitation in PHP5 you’ll need to write your own functions. /p h3Setting up your code for an IDE/h3 pOne of the advantages to writing Object Oriented code is that it works really nicely with an IDE like PHPStorm. If you have written type hinted code PHPStorm will pick up on it and help you with auto completion as you work. For the things that aren’t explicitly hinted you can use PHPDoc comments. e.g/p p/pdiv class=codeblockcode/**br /* Gets a specific setting by its name/ID.br /*br /* @param string $idbr /*   The name/ID of the setting to retrieve.br /*br /* @return ZoneSettingBasebr /*   The setting object given the ID passed in.br /*/br /public function getSettingById($id) {br / return $this-gt;settings[$id];br /}/code/divbr / PHPDoc comments are actually mandatory as part of drupal-coding standards. Their omission causes coder’s code sniffer to fail. pYou can also type-hint variables:/p p/pdiv class=codeblockcode/* @var GuzzleHttp\Client $client/* br /private $client;/code/divbr / While these hints are comments and not syntax they make the developer experience a lot more pleasant. h2No Enums :(/h2 pPHP still doesn’t have a formal enumeration type so you will have to get creative and roll your own. /p pI often create CONST arrays and throw an exception if a function param is not in that array. It’s a poor-man’s enum. There is currently a proposal to add enums to PHP7. We’ll see if it makes the cut!/p h2Associative Arrays/h2 pAssociative arrays reflect the dynamic typed heritage of PHP. They are incredibly flexible and a quick and easy way to move data from one point of your app to another that being said the lack of structure requires a developer to know everything about the underlying implementation of the array. Also without a debugger they have no way to determine what is actually in an array. The dynamic nature of these arrays makes them undocumentable. That makes coding with someone else’s array hard. The idea of OO is that you have structured data and layers of abstraction so that a dev doesn’t need to know the low-level implementation details. When going OO you should try to convert arrays into structured, documentable classes that hide the underlying implementation. If you need to accept an array as input parse it and break it out into objects as soon as possible. Developers will praise you for it!/p h2No Function Overloading/h2 pPHP does not natively support function overloading. Since PHP is dynamic it’s possible to come up with some Frankenstein solutions to get around this. However, Frankenstein code often confuses other developers interacting with your code and is to be avoided. For better or worse you need to accept this constraint. /p h2Dusting off the design cobwebs. How to assign responsibility to classes./h2 pThe lack of overloading can actually be beneficial especially in the context of class constructors. Like normal functions you cannot have multiple constructors in PHP (You can technically write a static class method to work around this constraint). This sounds like a pain. However, it forces you to articulate the single responsibility of a class. Often overloaded class constructors can be a sign that a class is taking on too many responsibilities. For example if you have a constructor that take params and another for parsing an array you might ask why should my class know about another representation. Maybe it's a break in tiered architecture and violating a separation of responsibilities. In this case something that might be perceived as a limitation is actually supportive and liberating. /p h2Go Forth and Write OO Code/h2 pAs we transition into D8 writing solid PHP OO code is more important than ever. D8 is built around OO classes. Even in Drupal 7 we can start to strive towards an OO world. Obviously in Drupal 7 most problems don’t lend themselves to an OO approach. However, even having that option gives you new tools to solve problems in Drupal! The resulting code has a clarity and aesthetic that most procedural code just can’t match./p pFinding those opportunities to apply an OO solution keeps you sharp and ready to hit the ground running on Drupal 8. /p /div /div /div div class=field field-name-field-tags field-type-taxonomy-term-reference field-label-inline clearfix div class=field-labelTags:nbsp;/div div class=field-items div rel= class=field-item evena href=/resources/acquia-drupal-planet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=acquia drupal planet/a/div /div /div span property=dc:title content=Quick Tips for Writing Object Oriented Code in PHP class=rdf-meta element-hidden/span

Cruiskeen Consulting: Drupal 8 and hosting requirements

Thu, 07/09/2015 - 19:05
div class=field field-name-body field-type-text-with-summary field-label-hidden view-mode-teaserdiv class=field-itemsdiv class=field-item evenpI'm writing a little bit today about some of the concerns that folks are having about Drupal 8, the new hosting requirements it imposes, and particularly the concerns that smaller organizations will not be able to find Drupal 8 compatible hosting plans. There is a lot going on with us and with other hosting companies at the moment to support Drupal 8 and other PHP software that has more modern requirements. We don't think this will be an issue with most reliable hosting companies by the time Drupal 8 ships./pp/div/div/div

Acquia: Sustainable contribution 2/2 - Giving back is the same as making money.

Thu, 07/09/2015 - 18:35
div class=form-item form-type-item labelLanguage /label Undefined /div div class=field field-name-body field-type-text-with-summary field-label-hidden div class=field-items div property=content:encoded class=field-item evenp Part 2 of 2 - I spoke with John Faber, Managing Partner with a href=http://www.chapterthree.com/aboutChapter Three/a, on March 17th, 2015. /p p In a href=/podcast/drupal-8/sustainable-contribution%2C-part-1-of-2%3A-how-drupal-has-solved-and-evolved/02/07/2015/3285566part 1/a to talk about the business advantages of contribution and sustainability when basing your business on open source software. We also touch on Drupal 8's potential power as a toolset and for attracting new developers, doing business in an open source context, and more! /p/div /div /div figure class=field-item even rel= resource=https://www.acquia.com/sites/default/files/john_faber_mar15_mp4.png class=field-item even div id=styles-2 class=styles styles-field-image styles-style-scale_width_280 styles-container-image styles-preset-scale_width_280 img typeof=foaf:Image src=https://www.acquia.com/sites/default/files/styles/scale_width_280/public/john_faber_mar15_mp4.png?itok=0ZrqD9qc alt= title= //div !-- render the title tag as caption -- /figure span property=dc:title content=Sustainable contribution 2/2 - Giving back is the same as making money. class=rdf-meta element-hidden/span

Drupal Bits at Web-Dev: Drush sql-query output

Thu, 07/09/2015 - 16:47
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpDespite several tries, I have never had any luck using the native sql output formatting commands to work with drush/p/div/div/divul class=links inlineli class=node-readmore firsta href=/info/drush-mysql/drush-sql-query-output rel=tag title=Drush sql-query outputRead morespan class=element-invisible about Drush sql-query output/span/a/li li class=comment_forbidden last/li /ul

Drupalize.Me: Learning Drupal 8 from Boilerplate Code

Thu, 07/09/2015 - 15:02
div class=field field-name-body field-type-text-with-summary field-label-hidden text-content text-secondarydiv class=field-itemsdiv class=field-item evenDrupal 8 represents a lot of changes and a steep learning curve for many Drupal developers and themers. While many of these changes are exciting, there are many things to learn just to get started. One way to learn about the code involved with Drupal 8 modules and themes is to take a look at core's modules and themes for examples to follow. Another, is to use a code scaffolding tool like Drupal Console to generate boilerplate code and comments that you learn from and then customize./div/div/divdiv id=comment-wrapper-nid-2254/div

Drupal core announcements: Drupal 8's minimum PHP version increased to 5.5.9

Thu, 07/09/2015 - 06:17
pPursuant to the discussion at a href=https://www.drupal.org/node/2296557[policy] Require PHP 5.5/a, the minimum PHP version of Drupal 8 has been raised to 5.5.9, and this change will be included in the next Drupal 8 beta (8.0.0-beta13)./p p(a href=https://www.drupal.org/node/2508231PHP 5.5.9 was chosen/a because it is also the same minimum version as Ubuntu's LTS, which in turn influenced Symfony 3.0, Travis CI, etc.)/p pThis is a future-proofing move which buys us a few things:/p ul liSome a href=http://php.net/manual/en/migration55.new-features.phpnice language features/a and a built-in a href=http://php.net/manual/en/book.opcache.phpopcode cache/a./li liCompatibility with the latest versions of various external dependencies, including Guzzle 6 and the upcoming Symfony 3.0/li liBetter security for our end users, since PHP 5.4 will become end of life September 15, 2015 (most likely prior to Drupal 8's release)./li /ul pWe looked extensively into the adoption and hosting support of PHP 5.5 prior to making this move. While there is not a href=http://w3techs.com/technologies/details/pl-php/5/allwidespread adoption of PHP 5.5 as of today/a, we nevertheless found that most hosts offer the option for PHP 5.5, due to PHP's security policy./p

Mediacurrent: Mediacurrent Dropcast: Episode 7

Thu, 07/09/2015 - 04:39
img typeof=foaf:Image src=http://d1l4od7sxc8nwf.cloudfront.net/sites/default/files/styles/thumb_blog_spotlight/public/introducing-meidacurrent-dropcast-01.png?itok=f65GiXYs width=200 height=152 / pIn this episode we celebrate the founding of our country by talking up a few modules we have discovered and enjoy. Ryan talks about the Image Field Focus module and how it makes cropping a joy without the gamble of a cropping image style. Bob waxes poetic about the WYSIWYG Field module, which is very similar to his WysiField module. As always we keep you up to date about Drupal 8 and Ryan brings it home with The Final Bell. This was recorded on the day before all went out for the holiday weekend so there are times where we derail the train. At least this time we have an excuse./p

Drupal core announcements: API module seeking co-maintainer

Thu, 07/09/2015 - 00:24
pFor the past 8+ years, Neil Drumm (drumm) has been maintaining the a href=https://www.drupal.org/project/apiAPI module/a, and I've been co-maintaining it for the past 3+ years. (This is the module that builds and displays the a href=https://api.drupal.orgDrupal API reference site api.drupal.org/a). Both of us have some other responsibilities in the Drupal ecosystem, and we'd like to find a new co-maintainer./p pThe ideal person would be:br / - A good PHP coder familiar with and willing to follow the Drupal project's coding standardsbr / - Familiar with the api.drupal.org site and its featuresbr / - Familiar with the a href=https://www.drupal.org/node/1354API docs standards/abr / - Familiar with both Drupal 7 and Drupal 8 core code (or at least familiar with the kinds of code it contains and the Drupalisms that it has), since both are displayed on the sitebr / Of course, all of these ideals are negotiable and/or learnable, and it could be that a few co-maintainers would be better than just one./p pThe next step would be for the person or people who are interested to start making patches for a few issues, and once a few of those have happened, we would consider making you an official co-maintainer. The project page has a link to documentation for how to get a local API site set up, and the module also has a robust set of tests. The code in the API module is somewhat obtuse, but I'd be happy to start anyone out with a quick tour (or help you find an issue to work on). The module runs on Drupal 7 only at this time, and this is unlikely to need to change anytime soon (it emdisplays/em Drupal 8 code but emruns/em on Drupal 7, like the other *.drupal.org sites)./p pSo if you're interested, you can either jump in and find an API module issue to work on and make a patch, or use my contact form or IRC to contact me and discuss./p pSorry... by policy, comments on this post are disabled, since it is going into the Core group (as well as Documentation)./p

DrupalCon News: Save 100€ on Barcelona Tickets: Buy by Friday

Wed, 07/08/2015 - 20:32
div class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpAre you planning on attending DrupalCon Barcelona? If you are, we hope you’ll get your tickets this week and save 100€ in the process./p pEvery DrupalCon has varied ticket pricing levels, and DrupalCon Barcelona is no different. We’re offering earlybird pricing so that frugal DrupalCon attendees can get their tickets for less, but that pricing expires on Friday at 23:59 Barcelona local time (UTC +2)./p pFor those looking at purchasing tickets, be aware that prices are as follows as we lead up to the convention:/p/div/div/div

Drupal Watchdog: Caffeinated Drupal

Wed, 07/08/2015 - 16:34
div class=field field--article-edit-printtype field-type-list-text field-label-hidden field--rss Column /div div class=field field--article-body field-type-text-long field-label-hidden field--rss pimg src=/sites/default/files/images/web/DW50.1-Coffee.png alt= Coffee width=50% align=left class=img-responsive img-thumbnail margin-right / One of the signs that you’re in a good coffee shop is if they serve their milk-based espresso drinks with an artful emrosetta/em (floral pattern) on top. This is referred to as emLatte art/em. At first glance, it may appear to be an offhand flourish by the barista – similar to a bartender flipping a bottle in the air before pouring a drink – but it is actually much more than that. /p p Latte art is a representation of the care and expertise that went into creating your drink: a good quality coffee bean; the ideal grind in order to pull an espresso with the right amount of emcrema/em (the oily brownish foam that sits on top of a good shot of espresso); milk that has been steamed just right to have a emmicro-foam/em consistency (uniform small bubbles throughout); and, of course, the perfect pour to blend the milk and espresso just right until a flower, heart, or other artful creation emerges on top./p p While we sit back and enjoy today’s coffee – a Brazil Yellow Bourbon Latte (amazing bitter cocoa flavors, is this a latte or a hot chocolate?!?) – let’s consider how an optimally performing Drupal site compares to the creation of latte art./p p There are many factors that contribute to a high performance Drupal site. For starters, we can look at factors such as code quality, the use of caches where possible, database configuration, and front-end caching. For a Drupal site to perform at its best, all of these components must be done well. Even a small misconfiguration or a bit of buggy code can be enough to slow a site to a crawl, especially when serving a large amount of traffic. The same can be said for latte art: if the coffee beans aren’t fresh enough to produce crema, or the milk isn’t foamed properly, or the pour of the milk isn’t done with the correct technique, the result will be an ordinary-looking – and possibly poor-tasting – drink./p /div

Mpumelelo Msimanga: Drupal: Filters for External Data Views

Wed, 07/08/2015 - 16:18
div class=field field-name-titleh1Drupal: Filters for External Data Views/h1/divdiv class=field field-name-field-image img-responsivea href=/2015/07/drupal-filters-for-external-data-viewsimg typeof=foaf:Image class=img-responsive src=http://msiman.ga/sites/msiman.ga/files/styles/medium/public/2015/07/views-filters-vdc.png?itok=MMR5hjzh width=220 height=147 alt=Filtering Drupal views. //a/divdiv class=field field-name-bodypA Drupal View that uses a href=https://www.drupal.org/project/views_database_connectorViews Database Connector (VDC)/a to show external database tables will not have all features of a “normal” View. For example, select filters are only available for list fields, references and taxonomy terms. In this post I use two modules to improve the exposed filters in my external data View./p/div

Realityloop: Custom Formatters 7.x-2.4

Wed, 07/08/2015 - 07:51
div class=field field-name-post-date field-type-ds field-label-hidden span class=day8/span Jul /div div class=field field-name-author field-type-ds field-label-hidden Stuart Clark /div div class=field field-name-field-imageimg typeof=foaf:Image src=http://realityloop.com/sites/realityloop.com/files/cf-header.png width=780 height=336 alt= //divdiv class=field field-name-bodypFull disclaimer, I am saying this as the developer of the module, but it is definitely the module that I am the most proud of./p pThat’s Custom Formatters with a capital CF; custom formatters (with lower case characters) are a core part of Drupal, they are the layer that takes Field data from the database and presents it to the frontend of your website in a more visually appealing style./p pThe Custom Formatters module quite simply adds the ability for site builders and developers to create or tweak their own custom formatters from within the website, never needing to touch the site file system./p pAnd now, with Custom Formatters 7.x-2.4, it’s even better./p pnbsp;/p h3What’s new in Custom Formatters 7.x-2.4?/h3 ol listrongNew Formatter format/engine; Formatter presets/strongbr / This is the big one, the catalyst for the new release; Formatter presets give you the ability to take complex Formatters with settings and turn them into new simplified, end-user approved formatters.br / br / More on this below.br / nbsp;/li listrongSupport for Display Suite fields/strongbr / I’ve been a big fan of a href=https://www.drupal.org/project/ds target=_blankDisplay Suite/a (DS) since I first came across it years ago. Custom Formatters did have support for DS in the Drupal 6 version, but I had made the decision to not support it in Drupal 7 due to DS’s own Code fields. Due to popular demand (my self included), that decision has been reversed.br / nbsp;/li listrongFixes to the HTML + Token format/strongbr / HTML + Tokens was always supposed to be the format that made this module site builder friendly, but to various issues with native Field tokens in Drupal 7 it has never worked overly well. I’m happy to say that this is no longer the case, and HTML + Tokens formatters work extremely well.br / br / More on this below.br / nbsp;/li listrongMiscellaneous bug fixes./strong/li /ol pnbsp;/p h3How to use Custom Formatters?/h3 pUsing custom formatters is relatively straight forward, anyone who has used any CTools Export UI based module (Views, Context, etc) should be familiar with the user interface:/p ppicture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/130/cf-ui-overview.png?itok=Yd91kRaNamp;timestamp=1436334684 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/130/cf-ui-overview.png?itok=GJYZCffVamp;timestamp=1436334684 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/130/cf-ui-overview.png?itok=5UKrAa5-amp;timestamp=1436334684 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/130/cf-ui-overview.png?itok=Z0_jmaAkamp;timestamp=1436334684 alt= title= / /picture/p pBy default it comes with some example formatters, and you can import others from your own collection or from a href=http://customformatters.com target=_blankCustomFormatters.com/a, but chances are you are most likely going to want to create your own Custom Formatters./p pTo do so, simply click the strong+ Add/strongnbsp;button and you will be presented with the following interface:/p ppicture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/130/cf-ui-add.png?itok=drgAjUzhamp;timestamp=1436334684 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/130/cf-ui-add.png?itok=4WwzGygtamp;timestamp=1436334684 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/130/cf-ui-add.png?itok=A-oteOMyamp;timestamp=1436334684 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/130/cf-ui-add.png?itok=ZY_uA6RHamp;timestamp=1436334684 alt= title= / /picture/p pYou will need to provide the following information:/p ol listrongFormatter name/strongbr / The human readable name of the formatter, what the site-builder, or possibly end user will see when choosing a formatter.br / br / Entering this value will auto-generate the Machine name, which can also be manually edited.br / nbsp;/li listrongDescription/strongbr / Only used within the Custom Formatters interface, useful to explain what the purposes of the formatter are, where it’s to be used and what modules it requires.br / nbsp;/li listrongFormat/strongbr / The format/engine of the formatter you are about to create. Out of the box there are three formats, but additional modules are able to provide additional formats. The format determines the method of how the Formatter is created, and as such I will go into more detail for each individual format below.br / nbsp;/li listrongField type(s)/strongbr / Depending on the chosen format, you need to assign the formatter to one or many field types types (image, file, textfield, etc).br / nbsp;/li listrongFormatter/strongbr / The formatter interface itself is dependent on the chosen format, more details on each format below./li /ol pOnce you have created your formatter, you can preview the formatter within the Preview interface. This allows you to apply the formatter to an existing field on an existing entity, or if the Devel generate module (provided by the a href=http://drupal.org/project/devel target=_blankDevel/a module) is present you can apply the formatter against a devel generated item./p ppicture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/130/cf-ui-add-preview.png?itok=WYqPjY1Vamp;timestamp=1436334684 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/130/cf-ui-add-preview.png?itok=o1_KwghNamp;timestamp=1436334684 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/130/cf-ui-add-preview.png?itok=9V4lPWfJamp;timestamp=1436334684 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/130/cf-ui-add-preview.png?itok=T4YN5IxVamp;timestamp=1436334684 alt= title= / /picture/p pLastly, ensure you save your formatter, as you don’t want all your hard work to go down the drain. Alternatively, strongSave amp; Edit/strong frequently during the creation of the formatter./p pnbsp;/p h3Format types/h3 pOut of the box there are three formats available with Custom Formatters, but the module is written in such a way that any 3rd part module could add an additional format./p pnbsp;/p h4PHP/h4 pThe PHP format was the original format engine for the Custom Formatters module, it mimics as closely to writing a formatter within a Drupal custom module as feasible, and as such is only recommended for use by those with knowledge of PHP and the Drupal API./p ppicture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/130/cf-engine-php.png?itok=FCSpWOIzamp;timestamp=1436334684 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/130/cf-engine-php.png?itok=JiX74A5hamp;timestamp=1436334684 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/130/cf-engine-php.png?itok=ZbJkohtTamp;timestamp=1436334684 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/130/cf-engine-php.png?itok=7t_Fh8AWamp;timestamp=1436334684 alt= title= / /picture/p pThe PHP format is provided with all required data for writing a formatter in the strong$variable/strong array, as well as an individual variable per array key (strong$variable['#items']/strong is the same as strong$items/strong):/p ol li pstrong$obj_type/strong: The entity type (node, taxonomy_term, etc)/p /li li pstrong$object/strong: The entity object./p /li li pstrong$field/strong: The field definition./p /li li pstrong$instance/strong; The field instance./p /li li pstrong$langcode/strong; The language code./p /li li pstrong$items/strong; An array of all field item data for formatting./p /li li pstrong$display/strong; The formatter display settings and formatter settings./p /li /ol pWith this data you are free to do with what you will. However, in general a standard pattern is to iterate over the strong$items/strong array and populate an strong$elements/strong array which is finally returned to Drupal:/p div class=geshifilterpre class=php geshifilter-phpolli class=li1div class=de1span class=re0$elements/span span class=sy0=/span a href=http://www.php.net/arrayspan class=kw3array/span/aspan class=br0#40;/spanspan class=br0#41;/spanspan class=sy0;/span/div/lili class=li1div class=de1nbsp;/div/lili class=li1div class=de1span class=kw1foreach/span span class=br0#40;/spanspan class=re0$items/span span class=kw1as/span span class=re0$delta/span span class=sy0=gt;/span span class=re0$item/spanspan class=br0#41;/span span class=br0#123;/span/div/lili class=li1div class=de1 span class=re0$elements/spanspan class=br0#91;/spanspan class=re0$delta/spanspan class=br0#93;/span span class=sy0=/span a href=http://www.php.net/arrayspan class=kw3array/span/aspan class=br0#40;/span/div/lili class=li1div class=de1 span class=st_h'#markup'/span span class=sy0=gt;/span span class=re0$item/spanspan class=br0#91;/spanspan class=st_h'value'/spanspan class=br0#93;/spanspan class=sy0,/span/div/lili class=li1div class=de1 span class=br0#41;/spanspan class=sy0;/span/div/lili class=li1div class=de1span class=br0#125;/span/div/lili class=li1div class=de1nbsp;/div/lili class=li1div class=de1span class=kw1return/span span class=re0$elements/spanspan class=sy0;/span/div/li/ol/pre/div pThis pattern allows support for multiple items, as well as taking advantage of Drupal's a href=https://www.drupal.org/node/930760 target=_blankRender Arrays/a system./p pnbsp;/p h4HTML + Tokens/h4 pThe HTML + Tokens format allows you to create simple and easy Custom Formatters with no more than HTML and Tokens, as the name implies. While this has been available for a long time in Custom Formatters, in the latest release it has been vastly improved upon, primarily with improved support for the Entity tokens module (provided by the a href=http://drupal.org/project/entity target=_blankEntity API/a module)./p ppicture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/130/cf-engine-html_tokens.png?itok=0jC-q03vamp;timestamp=1436335548 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/130/cf-engine-html_tokens.png?itok=M5alS0Ulamp;timestamp=1436335548 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/130/cf-engine-html_tokens.png?itok=3UilXTPmamp;timestamp=1436335548 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/130/cf-engine-html_tokens.png?itok=wwtzJZCIamp;timestamp=1436335548 alt= title= / /picture/p pAny entity type token can be used, as well as chained tokens specific to the field in use, but it is important to take into account where the formatter will be used when choosing the formatters. For instance, if you were to use a Taxonomy term token on an Image field formatter that is going to be displayed on a Node entity, the Taxonomy term token will not work./p pThe markup in your formatter is rendered per field item, so if you are using a multi-value field, each value will run through your formatter. This is where the improvements to the Entity tokens module support is important, as you can target the field values directly./p pstrongExample:/strongbr / If you are formatting an Image field, you can target the URL using the Entity tokens chained token strong[file:url]/strong, which is unique to each item value./p pIn addition to the improvements with the Entity tokens module integration, I also released a new module, a href=https://www.drupal.org/project/field_tokens target=_blankField tokens/a, which adds two different type of tokens which are extremely useful with HTML + Tokens formatters:/p ol listrongFormatted field tokens/strongbr / Tokens that allow you to pass the field through an existing Formatter with provided formatter settings.br / br / Example: strong[formatted_field-image:image:image_style-thumbnail]/strong would pass the current image field value through the Drupal core Image formatter via the thumbnail image style.br / nbsp;/li listrongField property tokens/strongbr / Tokens that provide you with the specific property of a field value.br / Example: [field_property:alt] would return the Alt value for the current image field value./li /ol pnbsp;/p h4Formatter preset/h4 pA new addition to the Custom Formatters module, and while maybe not the most obvious, it is a great addition that was a direct response to the a href=http://realityloop.com/blog/2015/06/17/wysiwyg-fields target=_blankWysiwyg Fields/a module./p pThe Formatter preset format allows you to replace formatters with complex formatter settings forms with simple preconfigured formatters with more user friendly names. Especially useful when the formatter choice is exposed to a non-technical user./p pBelow you can see an example of the Youtube field and formatter in use in Wysiwyg Fields with it’s abundance of formatter settings (on the left) and a Formatter preset of the same formatter preconfigured as desired (on the right)./p ppicture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/130/cf-engine-formatter_preset-example.png?itok=btSG-H2Tamp;timestamp=1436335548 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/130/cf-engine-formatter_preset-example.png?itok=0JrM9_8Iamp;timestamp=1436335548 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/130/cf-engine-formatter_preset-example.png?itok=YuoY9_9wamp;timestamp=1436335548 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/130/cf-engine-formatter_preset-example.png?itok=HnLfGCVVamp;timestamp=1436335548 alt= title= / /picture/p pIt’s obvious a lot simpler, so simple in fact that there’s no evidence that a formatter or formatter settings are present, it will just work./p pCreating a Formatter preset is quite different to the other Custom Formatter formats. There is no textarea field, instead you are presented with an interface similar to screenshot below:/p ppicture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/130/cf-engine-formatter_preset.png?itok=y9ILYHcVamp;timestamp=1436335548 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/130/cf-engine-formatter_preset.png?itok=MI17ONtEamp;timestamp=1436335548 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/130/cf-engine-formatter_preset.png?itok=IOMCVc9Uamp;timestamp=1436335548 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/130/cf-engine-formatter_preset.png?itok=ZfaYwCCYamp;timestamp=1436335548 alt= title= / /picture/p pThings to note are:/p ol li pstrongFormatter/strongbr / The existing formatter which you are using as a source for this Formatter preset./p /li li pstrongFormatternbsp;settings/strongbr / Everything below the Formatter field are specific to the chosen Formatter, they are that Formatter’s settings./p /li /ol pExtremely simple, but a huge improvement to the user experience./p pnbsp;/p h4Twig/h4 pWhile not an out of the box Format for the Custom Formatters module, I think it’s important to mention this for two reasons:/p ol liDrupal 8 is coming, and it’s bringing the a href=http://twig.sensiolabs.org/ target=_blankTwig/a templating system with it./li liThis is a great example of how other modules can create new Custom Formatters format types./li /ol pThe Twig format requires the a href=https://www.drupal.org/project/twig_filter target=_blankTwig filter/a module, which doesn’t yet have a stable release, but is still well worth a look./p pThe interface is much like the PHP and HTML + Tokens formats, with the difference of using the Twig templating language, which is said to be simpler for frontend developers./p ppicture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/130/cf-engine-twig.png?itok=T7ABy9iFamp;timestamp=1436335548 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/130/cf-engine-twig.png?itok=JLG5Ea1Gamp;timestamp=1436335548 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/130/cf-engine-twig.png?itok=PWl58dT8amp;timestamp=1436335548 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/130/cf-engine-twig.png?itok=V6O34i4Ramp;timestamp=1436335548 alt= title= / /picture/p pnbsp;/p h3Using a formatter/h3 pOnce you’ve created your formatter, that formatter can be used in many different ways, as the the Formatter system is just the theme layer to Drupal’s field system, so in general a Formatter should be able to be used anywhere a Drupal field is used./p pExamples of ways to use a Formatter include, but are not limited to:/p ol li pDrupal’s core Manage display interface/p /li li pa href=https://www.drupal.org/project/views target=_blankViews/a using the Field style/p /li li pWysiwyg Fields/p /li li pFormatted field tokens with the Field tokens and a href=https://www.drupal.org/project/token_filter target=_blankToken filter/a modules/p /li /ol pnbsp;/p h3CustomFormatters.com/h3 ppicture !--[if IE 9]video style=display: none;![endif]-- source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_wide_1x/public/images/article/130/cf-cf_com.png?itok=AyPBJEGRamp;timestamp=1436335548 1x media=all and (min-width: 1220px) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_normal_1x/public/images/article/130/cf-cf_com.png?itok=wD7IgNGDamp;timestamp=1436335548 1x media=all and (min-width: 980px) and (min-device-width: 980px), all and (max-device-width: 1024px) and (min-width: 1024px) and (orientation:landscape) / source srcset=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full_breakpoints_theme_realityloop_theme_narrow_1x/public/images/article/130/cf-cf_com.png?itok=WgoGnwuGamp;timestamp=1436335548 1x media=(min-width: 740px) and (min-device-width: 740px), (max-device-width: 800px) and (min-width: 740px) and (orientation:landscape) / !--[if IE 9]/video![endif]-- img src=http://realityloop.com/sites/realityloop.com/files/styles/article_inline_image_full/public/images/article/130/cf-cf_com.png?itok=djIjNAE_amp;timestamp=1436335548 alt= title= / /picture/p pa href=http://customformatters.com target=_blankCustomFormatters.com/a is a companion website for the CustomFormatters module./p pIt contains various Formatters which can be used as they are, or as examples of how to write your own formatters./p pThere are also plans to provide the ability for uses to share their own formatters with others./p pThe website is completely opennbsp;source, and anyone wishing to steal the site or contribute to the site can do so at a href=https://github.com/Decipher/customformatters.com target=_blankhttps://github.com/Decipher/customformatters.com/a/p pnbsp;/p h3Download Custom Formatters now/h3 pHead on over to the a href=https://www.drupal.org/project/custom_formatters target=_blankCustom Formatters project page/a and download Custom Formatters 7.x-2.3 now./p /divdiv class=field field-name-field-tagsdrupal planetdrupal 7custom formatters/div

OpenConcept: The Drupal North Code Sprint

Tue, 07/07/2015 - 23:40
div class=field field-name-body field-type-text-with-summary field-label-hidden view-mode-rssdiv class=field-itemsdiv class=field-item even property=content:encodedpThe inaugral a href=http://www.drupalnorth.org/Drupal North Regional Summit/a was a blast!/p pThe official Drupal North sprint was held on Sunday, June 28th, starting around 10am and ending at 4pm, in a href=http://www.ryerson.ca/Ryerson University's/a Rogers Communication Centre Transmedia Zone. 21 attendees showed up from all over Canada, the United States, and even Costa Rica:/p ullia href=https://www.drupal.org/u/adamwhiteAdam White/a from a href=https://www.drupal.org/node/2457335Upper Rapids/a,/li lia href=https://www.drupal.org/u/betovargAlberto Rojas/a from a href=https://www.drupal.org/node/2254291Manatí/a,/li lia href=https://www.drupal.org/u/Chris-LuckhardtChris Luckhardt/a,/li lia href=https://www.drupal.org/u/calystodClaire Desbois/a from a href=https://www.drupal.org/node/1897214Floe design + technologies/a,/li lia href=https://www.drupal.org/u/ericjenkinsEric Jenkins/a from a href=https://www.drupal.org/node/2316673Digital Bridge Solutions/a,/li lia href=https://www.drupal.org/u/bohemierJean-François Bohémier/a,/li lia href=https://www.drupal.org/u/greenskunkJeremy Knab/a,/li lia href=https://www.drupal.org/u/enzoJose Eduardo García Torres/a from a href=https://www.drupal.org/marketplace/anexus-itAnexus IT/a,/li lia href=https://www.drupal.org/u/HelloNewmanKevin Newman/a from a href=https://www.drupal.org/node/1705754Digital Echidna/a,/li lia href=https://www.drupal.org/u/mandcluMartin Anderson-Clutz/a,/li lia href=https://www.drupal.org/u/mathieuheliemathieuhelie/a from a href=https://www.drupal.org/node/1897214Floe design + technologies/a,/li lia href=https://www.drupal.org/u/crasxMatthew Ramir/a from a href=https://www.drupal.org/node/2316673Digital Bridge Solutions/a,/li lia href=https://www.drupal.org/u/cyborg_572Michael Gossmann/a from a href=https://www.drupal.org/node/1705754Digital Echidna/a,/li lia href=https://www.drupal.org/u/nafesNik Alexandrov/a,/li lia href=https://www.drupal.org/u/pbuylePierre Buyle/a from a href=https://www.drupal.org/node/1897214Floe design + technologies/a,/li lia href=https://www.drupal.org/u/ryan-wealRyan Weal/a from a href=https://www.drupal.org/node/2348505Kafei Interactive Inc./a,/li lia href=https://www.drupal.org/u/sseguinSabine Séguin/a from a href=https://www.drupal.org/node/1897214Floe design + technologies/a,/li lia href=https://www.drupal.org/u/CottserScott Cottser Reeves/a from a href=https://www.drupal.org/node/1705754Digital Echidna/a,/li lia href=https://www.drupal.org/u/tonyjnashTony Nash/a,/li lia href=https://www.drupal.org/u/trevorkjorlienTrevor Kjorlien/a from a href=https://www.drupal.org/node/1897214Floe design + technologies/a, and,/li lia href=https://www.drupal.org/u/mparker17yours truly/a from OpenConcept Consulting./li /ulpAfter everyone introduced themselves, Cottser and I gave an introduction to writing patches, and how issues move through the issue queue from Active to Closed (video to follow)./p pThen, we paired up to get Drupal 8, a href=https://github.com/drush-ops/drushDrush/a, and a href=https://www.drupal.org/project/consoleDrupal Console/a working on our computers, and work on issues we were interested in. a href=https://www.drupal.org/project/issues/search?issue_tags=DrupalNorth2015We worked on 9 issues/a:/p ullia href=https://www.drupal.org/node/2358319#2358319: Alt tag missing on user images/a/li lia href=https://www.drupal.org/node/2426579#2426579: Change method name for pgsql driver's ensureIdentifiersLength() to accurately describe what the method is doing/a/li lia href=https://www.drupal.org/node/2501701#2501701: Remove SafeMarkup::set in template_preprocess_color_scheme_form()/a/li lia href=https://www.drupal.org/node/2501757#2501757: Remove SafeMarkup::set in NodeSearch::prepareResults()/a/li lia href=https://www.drupal.org/node/2508637#2508637: Changing password should invalidate all other sessions/a/li lia href=https://www.drupal.org/node/2510348#2510348: Datetime select list widget has options for time interval on date only mode/a/li lia href=https://www.drupal.org/node/2512466#2512466: Config translation needs to be validated on input for XSS (like other t string input)/a/li lia href=https://www.drupal.org/node/2512468#2512468: Clean up margins and paddings rules for indented comments/a/li lia href=https://www.drupal.org/node/2513560#2513560: JSDoc file module/a/li /ulpAt time-of-writing, 2 of these issues are fixed, and 5 more need review./p pAlso, congratulations to a href=https://www.drupal.org/u/greenskunkJeremy Knab/a for his first commit mention in Drupal core (from a href=https://www.drupal.org/node/2501701#2501701/a)!/p pOverall, we had a great time and learned a lot! Thanks to everyone who came out, and to the DrupalNorth organizers for organizing everything!/p h2Photos/h2 pimg alt=DrupalNorth 2015 sprinters sitting around a table, introducing themselves. src=/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-1.jpg style=width: 100%; /br /img alt=DrupalNorth 2015 sprinters sitting around a table, listening to Cottser. src=/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-2_0.jpg style=width: 100%; /br /img alt=DrupalNorth 2015 sprinters gathering around and setting up a television, about to set up Drupal Console. src=/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-3.jpg style=width: 1280px; /br /img alt=cyborg_572 and crasx setting up. src=/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-4.jpg style=width: 100%; /br /img alt=Cottser demonstrating how to turn on the automated testing module in Drupal 8 to enzo, bohemier, adamwhite, and HelloNewman. src=/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-5.jpg style=width: 100%; /br /img alt=bohemier and adamwhite working together on an issue and laughing. src=/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-6.jpg style=width: 100%; /br /img alt=HelloNewman eating a Timbit while nafes amp; Cottser concentrate on their work. In the foreground is an iconic Tim Hortons coffee. src=/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-7.jpg style=width: 100%; //p /div/div/divdiv class=field field-name-upload field-type-file field-label-hidden view-mode-rssdiv class=field-itemsdiv class=field-item eventable class=sticky-enabled theadtrthAttachment/ththSize/th /tr/thead tbody tr class=oddtdspan class=fileimg class=file-icon alt= title=image/jpeg src=/modules/file/icons/image-x-generic.png / a href=https://openconcept.ca/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-1.jpg type=image/jpeg; length=171476 title=2015-06-28-drupalnorth-codesprint-1.jpgDrupalNorth 2015 sprinters sitting around a table, introducing themselves./a/span/tdtd167.46 KB/td /tr tr class=eventdspan class=fileimg class=file-icon alt= title=image/jpeg src=/modules/file/icons/image-x-generic.png / a href=https://openconcept.ca/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-2_0.jpg type=image/jpeg; length=193991 title=2015-06-28-drupalnorth-codesprint-2.jpgDrupalNorth 2015 sprinters sitting around a table, listening to Cottser./a/span/tdtd189.44 KB/td /tr tr class=oddtdspan class=fileimg class=file-icon alt= title=image/jpeg src=/modules/file/icons/image-x-generic.png / a href=https://openconcept.ca/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-3.jpg type=image/jpeg; length=168607 title=2015-06-28-drupalnorth-codesprint-3.jpgDrupalNorth 2015 sprinters gathering around and setting up a television, about to set up Drupal Console./a/span/tdtd164.66 KB/td /tr tr class=eventdspan class=fileimg class=file-icon alt= title=image/jpeg src=/modules/file/icons/image-x-generic.png / a href=https://openconcept.ca/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-4.jpg type=image/jpeg; length=181899 title=2015-06-28-drupalnorth-codesprint-4.jpgcyborg_572 and crasx setting up./a/span/tdtd177.64 KB/td /tr tr class=oddtdspan class=fileimg class=file-icon alt= title=image/jpeg src=/modules/file/icons/image-x-generic.png / a href=https://openconcept.ca/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-5.jpg type=image/jpeg; length=145850 title=2015-06-28-drupalnorth-codesprint-5.jpgCottser demonstrating how to turn on the automated testing module in Drupal 8 to enzo, bohemier, adamwhite, and HelloNewman./a/span/tdtd142.43 KB/td /tr tr class=eventdspan class=fileimg class=file-icon alt= title=image/jpeg src=/modules/file/icons/image-x-generic.png / a href=https://openconcept.ca/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-6.jpg type=image/jpeg; length=147077 title=2015-06-28-drupalnorth-codesprint-6.jpgbohemier and adamwhite working together on an issue and laughing./a/span/tdtd143.63 KB/td /tr tr class=oddtdspan class=fileimg class=file-icon alt= title=image/jpeg src=/modules/file/icons/image-x-generic.png / a href=https://openconcept.ca/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-7.jpg type=image/jpeg; length=95831 title=2015-06-28-drupalnorth-codesprint-7.jpgHelloNewman eating a Timbit while nafes amp; Cottser concentrate on their work. In the foreground is an iconic Tim Hortons coffee./a/span/tdtd93.58 KB/td /tr /tbody /table /div/div/divsection class=field field-name-field-portfolio-topic field-type-taxonomy-term-reference field-label-above view-mode-rssh2 class=field-labelTopic:nbsp;/h2ul class=field-itemsli class=field-item evena href=/topic/drupal-development typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Drupal Development/a/lili class=field-item odda href=/topic/planet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Planet/a/lili class=field-item evena href=/topic/community typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Community/a/lili class=field-item odda href=/topic/open-source typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Open Source/a/li/ul/sectionsection class=field field-name-field-primary-image field-type-image field-label-above view-mode-rssh2 class=field-labelPrimary Image:nbsp;/h2div class=field-itemsfigure class=clearfix field-item evenimg typeof=foaf:Image class=image-style-none src=https://openconcept.ca/sites/openconcept/files/2015-06-28-drupalnorth-codesprint-2.jpg width=1280 height=960 alt=DrupalNorth 2015 sprinters sitting around a table, listening to Cottser //figure/div/section

Darryl Norris's Blog: How To Request A Node via REST Using Web Services in Drupal 8

Tue, 07/07/2015 - 22:05
img src=https://www.darrylnorris.com/sites/default/files/field/image/HowToRequest.png style=max-width: 100%; alt=Banner /br /br / Drupal 8 is going to be a central place to store data and can easily connect with different third-party applications. Dries Buytaert has talked about this idea multiple times in a href=https://www.youtube.com/watch?v=gnERPdAiuSoDrupalCon Austin/a and a href=https://www.youtube.com/watch?v=UcSEjzgEBU8DrupalCon Bogota/a, where Drupal 8 is going to be an API to connect to other places. For this reason, Drupal 8 is now integrated with web services in core. In other words, this is an easy way to export data into Hal-JSON, JSON, and XML. I decided to start playing with web services in Drupal 8 to see how I can export my data in JSON format and connected with third party app. I found many tutorials that talks about Drupal how to export JSON data using the Views module, which for many use cases can be very good. I started to think, “What...a href=/blog/how-request-node-rest-using-web-services-drupal-8 class=more-linkRead more/a

Acquia: How to Evaluate Drupal Modules for Performance Optimization

Tue, 07/07/2015 - 19:58
figure class=field-item even rel= resource=https://www.acquia.com/sites/default/files/performance_round_1.jpg class=field-item even div id=styles-2 class=styles styles-field-image styles-style-scale_width_280 styles-container-image styles-preset-scale_width_280 img typeof=foaf:Image src=https://www.acquia.com/sites/default/files/styles/scale_width_280/public/performance_round_1.jpg?itok=B7qGyfma alt= title= //div !-- render the title tag as caption -- /figure div class=field field-name-body field-type-text-with-summary field-label-hidden div class=field-items div property=content:encoded class=field-item evenpDrupal was designed from the ground-up to be modular. Once you install Drupal core, you can add any number of modules to enhance Drupal's basic functions. /p pUnfortunately, contributed modules can also impede performance. For example, it's common to find contributed third-party modules that are incompatible with newer versions of Drupal, or other modules. Besides being a security hassle, this can often curb performance./p pEvaluating Drupal modules for such issues is thus essential for a smooth Drupal experience. As part of this ongoing a href=/blog/drupal-website-performance target=_blankblog series/a on ways to improve Drupal website performance, let’s review how you can evaluate modules. /p h2General module evaluation/h2 pThe first step in module evaluation is to consider general usage reports, statistics, and maintainer reputation. One by one, go through the following:/p ulliDoes the module officially support your version of Drupal?/li liGood maintainers write good code. If you see the same maintainer's name crop up on a number of well-regarded modules, you know you will at least get quality code./li liA high maintainer activity level (i.e. commits to a module) indicates a proactive maintainer who takes care of issues quickly./li liHigher total module usage generally means it's a well-regarded module with fewer performance issues./li li A large number of stagnant, open issues can point to poor code quality and maintenance./li li Sudden changes in usage patterns over a short period of time can be indicative of performance issues. For example, if people suddenly stop using a popular module, it could mean that users encountered performance or security problems./li /ulpOnce you've gone through these steps, you can undertake a performance evaluation./p h2Module performance evaluation/h2 pNow you need to analyze the module performance on your own site./p ulliRecord site performance before installing any modules. This should include page load time, server load, and user scenario completion time./li liRecord site performance immediately after installing the module./li liMonitor memory usage continuously to correlate the performance before and after module installation./li liPerform the same steps for every module individually over time./li /ulpThese actions will give you quantifiable results on each module's performance as it relates to your site. You might find that highly rated, widely used modules sometimes don't play well with your version of Drupal, while less used modules work perfectly well./p h2Final questions/h2 pBesides evaluating performance, you also need to ask a few questions before using a module./p ulliDoes the module scale? A module that works perfectly well for a small enterprise website might break when used on a large community-powered platform. Scale is difficult to measure but it is one of the biggest performance bottlenecks in any website./li liIs performance a top priority? While performance is important, it is by no means necessary for certain types of websites. For example, a small corporate website visited mostly by internal team members may not need top-notch performance./li liWhat happens if the module fails? This is an important question. If your module stops working, does it break the site completely, or can the users at least access parts of the site? For example, if the module that controls the login system fails, your users won't be able to use their accounts at all./li liDo I really need the module? Far too many websites use more modules than necessary. This leads to module bloat. Ask yourself: “Do I really need this module? Is there a simple manual workaround to enable this function?” If yes, try to avoid using a module. Keep in mind that the fewer modules you use, the smaller chance of failure./li /ulpModules are crucial for running a Drupal website, but they are also one of the leading causes of website performance issues. Evaluating and understanding modules is essential for running a fast and secure Drupal website./p /div /div /div div class=field field-name-field-tags field-type-taxonomy-term-reference field-label-inline clearfix div class=field-labelTags:nbsp;/div div class=field-items div rel= class=field-item evena href=/resources/acquia-drupal-planet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=acquia drupal planet/a/div /div /div span property=dc:title content=How to Evaluate Drupal Modules for Performance Optimization class=rdf-meta element-hidden/span

Drupal core announcements: Drupal 8 core updates for July 7th, 2015

Tue, 07/07/2015 - 19:40
pSince the last Drupal 8 Core Update, a href=https://events.drupal.org/losangeles2015DrupalCon Los Angeles/a took place, a href=https://www.drupal.org/node/2457875the proposed organizational structure for the Drupal project/a was approved and codeMAINTAINERS.txt/code was updated to reflect this (although it still needs to be updated in the Drupal 7 branch), and a href=https://assoc.drupal.org/blog/holly.ross.drupal/updates-our-2015-financial-planthe Drupal Association announced updates to their 2015 financial plan/a./p h2What's new with Drupal 8?/h2 pDrupal a href=https://www.drupal.org/node/24960198.0.0-beta11/a and a href=https://www.drupal.org/node/25141768.0.0-beta12/a were released, a new category for issues, a href=https://www.drupal.org/node/1815826plan, was added to categorize meta issues/a, the a href=https://groups.drupal.org/node/470788Drupal 8 Security bug bounty program/a was launched, a href=https://www.drupal.org/user/24967Angie webchick Byron/a analyzed a href=http://webchick.net/node/129Drupal major version adoption/a and walked us through a href=https://groups.drupal.org/node/471473the new DrupalCI testing infrastructure/a, a href=https://groups.drupal.org/node/472163codehook_update_N()/code became required for core patches that introduce data model changes/a, the number of outstanding criticals was reduced to a href=https://twitter.com/alexpott/status/618457672388603904a new all-time low of 15/a, and for a while, a href=https://twitter.com/xjmdrupal/status/617679297512386560every single critical was RTBC or being addressed/a!/p pSome other highlights of the month were:/p ul lia href=https://www.drupal.org/u/Mac_WeberWeber Macedo/a became a href=https://www.drupal.org/node/2474677a maintainer of core's Link module/a; a href=https://www.drupal.org/u/dropletKay Leung/a became a href=https://www.drupal.org/node/2489834a core JavaScript maintainer/a; a href=https://www.drupal.org/u/Jelle_SJelle Sebreghts/a became a href=https://www.drupal.org/node/2485611a maintainer of core's Responsive Image module/a; a href=https://www.drupal.org/u/mpdonadioMatthew Donadio/a became a href=https://www.drupal.org/node/2504893a maintainer of the DateTime module/a; a href=https://www.drupal.org/u/davidhernandezDavid Hernandez/a and a href=https://www.drupal.org/u/mortendkMorten Birch Heide-Jørgensen/a became a href=https://www.drupal.org/node/2496789maintainers for the Classy theme/a; and a href=https://www.drupal.org/u/dawehnerDaniel Wehner/a and a href=https://www.drupal.org/u/pwolaninPeter Wolanin/a became a href=https://www.drupal.org/node/2496367Menu subsystem maintainers/a./li lia href=https://www.drupal.org/u/mtiftMatthew Tift/a at a href=https://www.drupal.org/marketplace/lullabotLullabot/a talked about a href=https://www.lullabot.com/blog/article/cultural-construction-drupalthe culture of Drupal and how Drupal is for emeveryone/em/a, and a href=https://www.drupal.org/user/228712Jingsheng Wang/a wrote about a href=https://assoc.drupal.org/blog/skyredwang/what-have-chinese-drupalers-been-doing-2015the state of Drupal in China/a./li liTo improve usability, a href=https://www.drupal.org/node/1493324form errors now appear next to the form element/a, a href=https://www.drupal.org/node/2470807the Messages region in page templates was renamed to Highlighted/a, a href=https://www.drupal.org/node/2475483users can now quickedit image and date fields/a, and a href=https://www.drupal.org/node/2477641one-time login link failures are reported as errors instead of status messages/a./li lia href=https://www.drupal.org/u/yanniscYannis Karampelas/a at a href=https://www.drupal.org/node/1478902Netstudio/a wrote an overview of a href=https://www.netstudio.co.uk/blog/drupal-8-is-around-the-cornerthe most-exciting features in Drupal 8/a, a href=https://www.drupal.org/u/heidi.tobias.wongHeidi Wong/a at a href=https://www.drupal.org/marketplace/acquiaAcquia/a explained a href=https://www.acquia.com/blog/build-your-drupal-8-team-technical-roles-and-required-skillshow to build an awesome Drupal 8 development team/a, our fearless leader a href=https://www.drupal.org/u/driesDries/a delivered a href=https://www.youtube.com/watch?v=uNRtZDAS0xIhis semi-annual Driesnote on the history of Drupal and how it is scaling/a, a href=https://groups.drupal.org/node/470648the Documentation Working Group proposed creating a Drupal 8 Manual/a, and a href=https://www.drupal.org/u/jzechJerome Zech/a at a href=https://www.drupal.org/marketplace/md-systemsMD Systems/a announced a href=http://www.md-systems.ch/en/blog/2015-06/relaunch-of-www-suedostschweiz-chthe full launch of the first news portal based on Drupal 8/a./li liOn the front-end, a href=https://www.drupal.org/node/2456225the formUpdated JS event now triggers on backspace, delete, copy/paste, and CJK-input/a, a href=https://www.drupal.org/node/2473957class names required for JavaScript are being prefixed with codejs-/code/a, a href=https://www.drupal.org/node/2486413Seven's primary tabs look better on small screens/a, a href=https://www.drupal.org/node/1835016date inputs now use the HTML5 date element if possible/a, and a href=https://www.drupal.org/node/2182153we started documenting Drupal's JavaScript using JSDoc/a./li lia href=https://www.drupal.org/u/amyvsAmy Vaillancourt-Sals/a at a href=https://www.drupal.org/marketplace/thinkshoutThinkShout/a shared the story of a href=http://thinkshout.com/blog/2015/05/commiting-to-d8/how she got her first commit (live-committed) into core/a, a href=https://www.drupal.org/u/friendlymachineJohn Hannah/a at a href=https://www.drupal.org/marketplace/lullabotLullabot/a wrote about a href=https://www.lullabot.com/articles/drupal-8-theming-fundamentals-part-1the fundamentals of Drupal 8 theming/a, a href=https://www.drupal.org/u/xjmJess (xjm)/a explained a href=http://xjmdrupal.org/blog/getting-d8-done-drupalcon-lawhat happens at Critical Burndown sprints/a, a href=https://www.drupal.org/u/mparker17yours truly/a at a href=https://www.drupal.org/marketplace/openconceptOpenConcept Consulting Inc./a detailed a href=https://openconcept.ca/blog/mparker/best-practices-generating-patches-and-interdiffshow I generate patches and interdiffs/a, and a href=https://www.drupal.org/u/jhaskinsJoe Haskins/a at a href=https://www.drupal.org/marketplace/trellonTrellon, LLC/a wrote about a href=http://www.trellon.com/content/blog/how-drupalorg-lowering-barrier-become-module-maintainerthe proposed changes to the Drupal project applications process/a./li liTo improve performance, caching was added for a href=https://www.drupal.org/node/1805054fully-rendered menu trees/a, a href=https://www.drupal.org/node/2506369CSS/JS asset resolution/a, a href=https://www.drupal.org/node/2480811path processing and route matching/a. Also, a href=https://www.drupal.org/node/2430219configuration entity lookups/a, a href=https://www.drupal.org/node/2482295field map rebuilds/a, and a href=https://www.drupal.org/node/2254865codetoolbar_pre_render()/code/a were optimized, a href=https://www.drupal.org/node/2339447the time needed to rebuild the theme registry was reduced by 85%/a, a href=https://www.drupal.org/node/2433591views using pagers can now specify a cache context/a, and a href=https://www.drupal.org/node/2381277Views no longer uses it's own internal caching mechanism/a./li lia href=https://www.drupal.org/u/rakesh.gectcrRakesh James/a at a href=https://www.drupal.org/node/2479963Red Crackle/a explained a href=http://redcrackle.com//blog/adding-contextual-filter-view-drupal-8how to add contextual filters to D8 views/a, a href=https://www.drupal.org/u/greg.1.andersonGreg Anderson/a at a href=https://www.drupal.org/marketplace/pantheonPantheon/a proposed a href=https://pantheon.io/blog/configuration-workflow-drupal-8-sitesa configuration workflow for Drupal 8 sites/a, and a href=https://www.drupal.org/u/kvantommeKristof Van Tomme/a at a href=https://www.drupal.org/node/2225251Pronovix/a reported on a href=http://pronovix.com/blog/d8upgradeorg-first-batch-drupal-8-upgrade-reports-finishedthe first batch of Drupal 8 module upgrade reports/a./li liSome notable bugs were fixed, including a href=https://www.drupal.org/node/2465053page caching breaking user registrations/a, a href=https://www.drupal.org/node/2507509changes to services no longer causes fatal errors/a, a href=https://www.drupal.org/node/2486177deleting an entity translation no longer deletes the whole entity/a, and a href=https://www.drupal.org/node/1314214the MySQL driver now supports full UTF-8/a./li lia href=https://www.drupal.org/u/upchukDaniel Sipos/a explained a href=http://www.webomelette.com/adding-new-html-tags-drupal-8how to add tags to the HTML codelt;headgt;/code in Drupal 8/a, a href=http://www.sitepoint.com/using-ajax-forms-drupal-8/how AJAX forms work in D8/a, a href=http://www.webomelette.com/creating-pseudo-fields-drupal-8how to add pseudo-fields in Drupal 8/a, and a href=http://www.webomelette.com/drupal-8-custom-data-configuration-entities-using-thirdpartysettingsinterfacehow to use ThirdPartySettingsInterface to add custom data on config entities/a. a href=https://www.drupal.org/u/benjyBen Dougherty/a at a href=https://www.drupal.org/marketplace/code-dropCode Drop/a talked about a href=https://codedrop.com.au/blog/creating-custom-config-entities-drupal-8Creating Custom Config Entities/a, a href=https://www.drupal.org/u/mrfMark Ferree/a at a href=https://www.drupal.org/marketplace/chapter-threeChapter Three/a showed us a href=http://www.chapterthree.com/blog/drupal-8-automated-testing-travis-cihow to test D8 with Travis CI/a, and a href=https://www.drupal.org/u/alexpottAlex Pott/a at a href=https://www.drupal.org/marketplace/chapter-threeChapter Three/a explained a href=http://www.chapterthree.com/blog/principles-configuration-management-part-threeconfiguration dependencies/a./li liOn the development side, a href=https://www.drupal.org/node/2416109configuration dependencies are validated before importing/a; a href=https://www.drupal.org/node/1838242Views now properly integrates with datetime fields/a; a href=https://www.drupal.org/node/2361423it's now possible to automatically create content when importing configuration/a; a href=https://www.drupal.org/node/2503083PasswordInterface and UserInterface were decoupled/a, as were a href=https://www.drupal.org/node/2522600CMI and migration templates/a; a href=https://www.drupal.org/node/2296885the codeformat_xml_elements()/code function was removed/a; the a href=https://www.drupal.org/node/2493807codesymfony/console/code/a and a href=https://www.drupal.org/node/2497691codesymfony/psr-http-message-bridge/code/a components were added; we upgraded to a href=https://www.drupal.org/node/2470693use Symfony 2.7.0/a; and we a href=https://www.drupal.org/node/2401519decided on a Composer package naming convention/a./li liTo improve security, a href=https://www.drupal.org/node/2508591the codevendor/code directory is no longer web-accessible/a, a href=https://www.drupal.org/node/2508627changing a user's e-mail address will invalidate any active one-time login links/a, a href=https://www.drupal.org/node/2508637changing a user's password will invalidate all other active sessions/a, and a href=https://www.drupal.org/node/2514136a blanket clickjacking defense was added to core/a./li /ul h3How can I help get Drupal 8 finished?/h3 pSee a href=https://www.drupal.org/drupal-8.0/get-involvedHelp get Drupal 8 released!/a for updated information on the current state of the software and more information on how you can help./p pWe're also looking for more contributors to help compile these posts. a href=https://www.drupal.org/user/536298/contactContact mparker17/a if you'd like to help!/p h2Drupal 8 In Real Life/h2 ul lia href=http://www.nyccamp.org/NYC Camp 2015/a will be held strongJuly 16–19/strong in strongNew York City, NY, USA/strong. It's not a Drupal-specific camp, but there are ema lot/em of Drupal sessions, and there will be a href=http://www.nyccamp.org/program/sprintssprints the entire week/a!/li lia href=https://www.drupalgovcon.org/drupal-govcon-2015Drupal GovCon 2015/a will be held strongJuly 22–24/strong in strongBethesda, MD, USA/strong, featuring both a href=https://www.drupalgovcon.org/drupal-govcon-2015/code-sprintcore and contrib sprints, and extended sprints after the conference/a. Don't forget to a href=https://docs.google.com/spreadsheets/d/1zbhJoz1KkHmaN0JOQXb_-0dvR010fUzvYc_jfHRJ7yg/editsign up for the sprints/a!/li lia href=http://drupalcampnorth.org/DrupalCamp North/a (not to be confused with a href=http://www.drupalnorth.org/DrupalNorth/a) will be held in strongTavistock Place, Sunderland, Tyne and Wear, England/strong on strongJuly 24–26/strong. Sprints run strongJuly 22–24/strong, but you must a href=https://docs.google.com/spreadsheets/d/1sdTXynIPCPfuUQ7BhGVQuhKN45mDxlnltvMzVz9f8FQ/edit?pli=1#gid=0preregister for the sprint/a./li lia href=https://drupalcampottawa.com/DrupalCamp Ottawa/a will be strongJuly 24/strong in strongOttawa, ON, Canada/strong. The event is free, but you should a href=https://drupalcampottawa.com/drupalcamp-ottawa-2015/registrationregister if you want to attend/a./li lia href=http://www.drupalcamp.cr/Drupal Camp Costa Rica/a will be strongJuly 29–31/strong in strongSan Pedro Montes de Oca, San José, Costa Rica/strong./li /ul h2Whew! That's a wrap!/h2 pDo you follow a href=https://drupal.org/planetDrupal Planet/a with devotion, or keep a close eye on the a href=http://www.drupical.com/Drupal event calendar/a, or codegit pull origin 8.0.x/code every morning without fail before your coffee? We're looking for more contributors to help compile these posts. You could either take a few hours once every six weeks or so to put together a whole post, or help with one section more regularly. If you'd like to volunteer for helping to draft these posts, please a href=https://drupal.org/node/2220285follow the steps here/a!/p

Gábor Hojtsy: Win prizes by playing with Drupal 8's multilingual site building features!

Tue, 07/07/2015 - 15:03
div class=field field-name-body field-type-text-with-summary field-label-hidden view-mode-rssdiv class=field-itemsdiv class=field-item evenpDrupal 8 packs a historic amount of site building features which make producing websites easier than ever with core or just a couple contributed modules only. There are a href=http://www.drupal8multilingual.org/showcasealready various live Drupal 8 multilingual sites/a using little more but core./p pIt is hard to grasp the many things with useful levers and knobs in Drupal 8. Think about combining views with entity view modes and blocks; block language visibility with menus; user preferences with comment submission; language filtering and entity rendering; translatable fields with administration views; and so on and on. /p pWouldn't it be fun to experiment with the possibilities and come up with clever ways to combine core features to solve common problems? You may be familiar with the name and format of a href=http://shop.oreilly.com/category/series/hacks.doO'Reilly's Hacks Series/a which emreclaims the term hacking for the good delguys/delinsfolks/ins — innovators who explore and experiment, unearth shortcuts, create useful tools, and come up with fun things to try on their own./em /p pLong story short, hereby, we announce the Drupal 8 multilingual site building hacks contest! /p h3Rules/h3 olliCome up with clever ways to combine Drupal 8 core features (and if needed one or at most two contributed modules) to fulfill a multilingual site building need./li liWrite up the steps taken. See a href=hacks/drupal-8-multilingual-hack-1-build-unique-menus-languagesan example in hack #1/a. (We'll do light editing of the post if needed, don't let perfection be the enemy of good)./li liRegister on a href=http://drupal8multilingual.org/userhttp://drupal8multilingual.org/user/a to submit entries (requires approval for spam protection)./li lia href=http://drupal8multilingual.org/node/addSubmit entries/a by end of day (CEST) July 31st./li liOne person may submit as many entries as they wish./li liAll entries will be published after review (and possible light editing)./li /olh3What is in it for you?/h3 pThe top 3 best hacks will receive unique presents from a href=http://www.hook42.com/Hook42/a and a href=http://www.amazeelabs.com/enAmazee Labs/a! (Further sponsors welcome). You'll either receive the presents at DrupalCon Barcelona or we'll mail it to you if you are not coming to DrupalCon. This is of course additionally to the joy of getting to play with some of the less frequented but definitely no less fun features of Drupal 8./p h3What is in it for us?/h3 pAll hacks will be published under a href=http://creativecommons.org/licenses/by-sa/4.0/Creative Commons Attribution-ShareAlike 4.0/a, so the community will benefit. Additionally to that Gábor Hojtsy and Vijayachandran Mani are building an open source presentation with the best tips (same license). This will be presented at a href=http://2015.drupalaton.hu/Drupalaton Hungary/a and a href=https://events.drupal.org/barcelona2015/DrupalCon Barcelona/a. Similar to a href=http://www.drupal8multilingual.org/workshopour existing open source workshop/a, everyone will be able to present this at local meetups and camps or follow along at home at their own pace./p h3What kind of hacks are we looking for?/h3 pa href=hacks/drupal-8-multilingual-hack-1-build-unique-menus-languagesHack #1 is hopefully a good example/a. Really the only common thread between the hacks would be to satisfy a multilingual site need or use multilingual features in some other clever way (even for features that are not necessarily multilingual). Some ideas for hacks that may help you start off experimenting:/p ollistrongSwap textual site logo/strong Need to swap a site logo with text on it for different languages? Use a translatable custom block with an image field. Configure the display mode and add some custom CSS if needed./li listrongTranslator todo helper/strong Create a views block for content translators to summarize the number of outdated translations they have to update (and link to content administration filtered to that language)/li listrongLanguage dependent front page/strong Use block visibility to display up to date content on a well maintained language while an emAbout us / Contact us/em page on languages where resources are limited to maintain useful fresh content./li /olpOf course these are just some things we made up (although still eligible for the contest). Looking for your creative ideas and solutions!/p pQuestions, concerns? a href=http://www.drupal8multilingual.org/contactContact us!/a/p pemThis is a crosspost from a href=http://www.drupal8multilingual.org/hackshttp://www.drupal8multilingual.org/hacks/a./em/p /div/div/div

InternetDevels: 6 Reasons Why You Should Use Drupal For Website Development

Tue, 07/07/2015 - 14:50
div class=field field--name-field-preview-image field--type-image field--label-hiddendiv class=field__itemsdiv class=field__item evenimg src=http://st4.internetdevels.net/sites/default/files/public/blog_preview/choose_drupal.jpg width=937 height=624 alt=6 Reasons Why You Should Use Drupal For Website Development //div/div/divdiv class=field field--name-body field--type-text-with-summary field--label-hiddendiv class=field__itemsdiv class=field__item evenpemOur guest blogger Jack Dawson, founder of Big Drop Inc, expains why he thinks Drupal is the best choice for a target=_blank href=http://internetdevels.com/serviceswebsite development services/a. /em/p a href=http://internetdevels.com/blog/6-reasons-why-you-should-use-drupal-for-website-developmentRead more/a/div/div/div

ERPAL: Drop Guard vs. Drupalgeddon - The 1:0 knockout in just a few minutes

Tue, 07/07/2015 - 11:00
div class=field field-name-field-blog-intro-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg src=http://www.erpal.info/de/sites/default/files/styles/blog_detail_image_700x180_/public/erpal_titelbild.png?itok=rOT8LDnt width=700 height=180 alt= //div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpGet ready to rumble! Watch how Drop Guard won against Drupalgeddon on 15.10.2014 at 6:00 PM in this live webinar! We're going to run a live demo re-enacting the whole epic match, and you'll learn about the techniques and strategies that Drop Guard uses to sucker-punch any future Drupal security threats. Don't expect a second round: it'll be a technical KO within minutes!/p pThis free, 45-minute webinar takes place via Google Hangout on 27.07.2015 at 4 PM GMT+2. You'll learn the following:/p pnbsp;/p ol liHow to set up an automated workflow to keep your Drupal site updated and secure/li liThree simple prerequisites for starting with Drop Guard/li liHow Drop Guard integrates with your individual development and deployment workflows/li /ol pnbsp;/p pWe'll use a Drupalgeddon-infected Drupal installation including several other modules with security issues. This exclusive live demo shows the current status of Drop Guard. All attendees also get free Drop Guard access until the end of September 2015. All attendees strong get free Drop Guard access/strong until the end of September 2015./p pnbsp;/p p class=rtecentera href=http://dropguard.net/webinar.html style=background-color:#0ea166;padding:10px 20px;color:white;strongSign up for free!/strong/a/p pnbsp;/p pstrongimg alt= src=http://www.erpal.info/blog/sites/default/files/grafiken_dropguard_webinar_grau.png style=height:567px; width:700px //strong/p /div/div/div

Mpumelelo Msimanga: Drupal: Using Views Database Connector (VDC) To Display Data in External Database

Mon, 07/06/2015 - 22:17
div class=field field-name-titleh1Drupal: Using Views Database Connector (VDC) To Display Data in External Database/h1/divdiv class=field field-name-field-image img-responsivea href=/2015/07/drupal-using-views-database-connector-vdc-display-data-external-databaseimg typeof=foaf:Image class=img-responsive src=http://msiman.ga/sites/msiman.ga/files/styles/medium/public/2015/07/external-data-in-drupal.png?itok=WM1nEr9v width=220 height=153 alt= //a/divdiv class=field field-name-bodypApart from Drupal most organisations may have many systems such as a CRM, HR and e-commerce system. The field of Business Intelligence (BI) deals with bringing disparate data sources into a single data warehouse(DW). If you wanted to display data from your DW using Drupal, the a href=https://www.drupal.org/project/viewsViews/a module is a good place to start. Before you can use the Views module you need to connect to the database and describe the tables to Views. I am a SQL developer so I am reluctant to write my own module./p/div