Skip to Content

Drupal

Panelizer Variants

New Drupal Modules - 10 October 2014 - 6:35am
Panelizer Variants

This module adds the functionality to have Panelizer Variants based off of List Defaults in Panelizer Full Page Override. What this does is allows you to have multiple layouts for one content type based off a field selection. The functionality doesn't seem to really exist yet. WELL, now it does!

Categories: Drupal

Code Karate: Creating a Drupal 7 Entity Reference View

Planet Drupal - 10 October 2014 - 5:26am
Episode Number: 172

The Entity Reference module not only allows you to reference entities within your Drupal site, it also allows you to do so using a custom created entity reference view. This allows you to leverage the power of the views module to control how the entity reference selection field is displayed.

Tags: DrupalEntity ReferenceViewsDrupal 7Site BuildingDrupal Planet
Categories: Drupal

Collation Fixer

New Drupal Modules - 10 October 2014 - 4:35am

A 'runtime' requirements checker (admin/reports/status) for checking all database tables have the right database collation (probably very MySQL centric).

Offers the ability to fix tables with wrong database collation.

Categories: Drupal

Deeson: The value of Drupal mentoring at DrupalCon Amsterdam 2014

Planet Drupal - 10 October 2014 - 4:09am

Last week was my first time as a Drupal Core mentor at a DrupalCon event

Why does Drupal need mentors?

At DrupalCon Amsterdam, Dries mentioned in his key note that Drupal needs more people pitching in and contributing to Drupal Core. 

The Drupal community is growing, but the ratio of contributors to free loaders is getting worse. This is probably because people are struggling to get involved or don't understand which skills are needed.

To help overcome these barriers, DrupalCon events ask for people involved in Drupal Core to act as mentors.

How do you get involved?

First of all, you need to attend a mentor orientation session where you meet other mentors who share their experiences. At my orientation session, seasoned mentor Cathy Theys (YesCT) gave an excellent talk about what mentoring involves and what to expect.

Our introductions to each other were very amusing as we shared our Drupal.org usernames. Most of us felt it necessary to defend our choice of usernames with a full entomology and my personal favourite was eojthebrave (you'll have to ask him!).

What did I do as a mentor?

Last Wednesday I spent two hours triaging the issue queue, which contains issues with possible tasks suitable for novice contributors.

A novice is unlikely to complete a whole issue on their own, but there may be components of the issue, called tasks, that they can do. Tasks could include providing steps to reproduce a problem, feeding back on UX or design, taking screen shots or writing documentation. You do not always need to be a developer to contribute.

On Thursday I manned the mentor desk for a few hours. The DrupalCon events have a mentor desk manned by mentors who can advocate to delegates about contributing to Drupal Core and explain how to get involved. A key priority is to encourage delegates to attend a mentored sprint on the last day of DrupalCon, their first steps into the world of the Drupal Core community.

During the mentored sprints, more than 100 people got together to listen to a community tools presentation which covered the installation of everything you need to contribute, how to use the issue queue and comment and IRC etiquette.

Drupal 8 presentation

As a mentor, I gave a presentation to a small group of new contributors which helped them configure the tools and install Drupal 8 for the first time. For some, this was quite an achievement in itself.

Once set up with the tools, the new contributors broke up into smaller groups and selected issues to work on together with the aid of a mentor.

Critical issues

Some of the contributors I worked with looked at an issue to provide more user-friendly text on the 'Extend' section of the site. This was called 'Modules' on Drupal 7 and is where site administrators searched for modules to enable or disable them.

If the patch the contributors provided is committed, then the text they chose may appear on thousands of websites throughout the world - not bad for a short period of collaborative working!

The contributors also uncovered an issue in Drupal Core which we decided to mark as critical. Some of the new contributors were selected to have their finished patches committed directly into Drupal 8 by Drupal Core maintainer Angie Byron (webchick). Angie showed how the process of patch review and committing a patch to core works.

Après sprint

After a tiring, yet satisfying day, the mentors went to dinner together, where we discussed Drupal, development and PHPStorm.

Give it a try!

Being a mentor was a fantastic experience and I recommend it highly. I met some pretty incredible mentors and new contributors.

The Drupal community is made of a wide and varied skill base and everyone can get involved to make a difference to Drupal Core's quality.

If you've not contributed before, come along to the mentored sprint at the next DrupalCon.

If you can't wait that long, there is the Drupal Ladder which describes the small steps you can take to become a regular and useful contributor to Drupal Core.

Categories: Drupal

Janez Urevc: Drupal 8 from my media perspective - update #2

Planet Drupal - 10 October 2014 - 3:20am

It's been a while since my last post and with DrupalCon Amsterdam behind us it seems a good timing for another update.

Categories: Drupal

Purencool Website Developer: How to set-up Compass on Ubuntu 14.04 for Omega 4 Development

Planet Drupal - 10 October 2014 - 2:34am

I had some issues installing Compass on Ubuntu 14.04 this is what I did and the errors I came up against that gave me a large headache. I hope others can benefit from what I learnt. This assumes that you have already created a sub-theme in Omega4. I installed the following packages initially:

Tags Drupal Planet Web Development SASS
Categories: Drupal

Drupal Association News: Doei Doei, DrupalCon Amsterdam

Planet Drupal - 10 October 2014 - 1:49am

DrupalCon Amsterdam has wrapped up, and now that we’re over the jet lag, it’s time to look back on one of the most successful DrupalCons to date. DrupalCon Amsterdam was the largest European DrupalCon yet, by far. Just to knock your socks off, here are some numbers:

  • More than 2,300 attendees showed up to 120 sessions and nearly 100 BoFs
  • 115 attendees showed up to the community summit and the business summit
  • 146 training attendees, 400 trivia night attendees, and 400 Friday sprinters made the week a success
  • …and through it all, we ate 1,200 stroopwafels.

The fun extended to more than just the conference — with 211 transit passes and 56 bike rentals, attendees from over 64 countries were able to enjoy all the city of Amsterdam had to offer. What a success!

As with any DrupalCon, DrupalCon Amsterdam wouldn’t have been a success without lots and lots of help from our passionate volunteers. We’d like to take a moment to send out a big THANK YOU to all of our track chairs and summit organizers:

  • Pedro Cambra - Coding and Development
  • Théodore Biadala - Core Conversations
  • Steve Parks - Drupal Business
  • Lewis Nyman and Ruben Teijeiro - Frontend
  • Michael Schmid - Site Building
  • Bastian Widmer - DevOps
  • Cathy Theys, Ruben Teijeiro, Gábor Hojtsy and the Core Mentors - Sprints
  • Adam Hill and Ieva Uzule - Onsite Volunteer Coordinators
  • Social Media - Baris Wanschers
  • Emma Jane Westby - Business Summit
  • Morten Birch and Addison Berry - Community Summit

We also appreciate everything our core mentors did to make DrupalCon Amsterdam a hit — and it’s thanks to lots of hard work from our passionate community members that Drupal 8 is in Beta!

We hope you had as fun and exiting a time in Amsterdam as we did. For those of us who weren’t able to make it, and even for those who were, you can relive the fun on the flickr stream, or catch any number of great sessions on the Drupal Association YouTube channel.  And remember to mark your calendar for DrupalCon Barcelona in September 2015. See you there! Below is Holly Ross' set of slides from the Amsterdam closing session. 

DrupalCon Amsterdam Closing Session from DrupalAssociation

Image credit to Pedro Lozano on Flickr.

Categories: Drupal

Commerce Box

New Drupal Modules - 9 October 2014 - 1:54pm

Commerce Box provides a fieldable entity for storing data related to the boxes that are used to ship commerce products. The goal is to implement this with commerce_shipment and the suite of shipping modules to provide a more advanced and flexible fulfillment process.

Categories: Drupal

Blair Wadman: How to backup your Drupal database to Amazon S3

Planet Drupal - 9 October 2014 - 11:31am

We all know the importance of backing up the database for each Drupal site we build and maintain. But it is not uncommon for this to be put on the back burner and never actually implemented. Fortunately, it is really easy to setup with a combination of Amazon S3 and Backup and Migrate. In this tutorial, you will be shown how to set this up so that it runs on auto pilot.

Tags: Drupal Site buildingPlanet Drupal
Categories: Drupal

Tyler Frankenstein: Drupal Commerce Order Owner Autocomplete with E-mail Address

Planet Drupal - 9 October 2014 - 10:59am

When creating an order as an admin in Drupal Commerce, we can specify the user that owns the order if we know their user name. This works well in most cases, but to be able to search by the user's e-mail address would be helpful too. I've had a few requests from clients for this feature. So without further ado, let's ado it!

/** * Implements hook_menu(). */ function my_module_menu() { $items = array(); $items['my_module/commerce/order-owner/autocomplete'] = array( 'page callback' => 'my_module_commerce_order_owner_autocomplete', 'access arguments' => array('configure order settings'), 'type' => MENU_CALLBACK ); return $items; } /** * Implements hook_form_FORM_ID_alter(). */ function my_module_form_commerce_order_ui_order_form_alter(&$form, &$form_state, $form_id) { // Attach our custom autocomplete to the order owner name input so we can // search by e-mail address. $form['user']['name']['#autocomplete_path'] = 'my_module/commerce/order-owner/autocomplete'; } /** * Queries results for the commerce order owner autocomplete. */ function my_module_commerce_order_owner_autocomplete($string) { $matches = array(); $query = db_select('users', 'u'); $query ->fields('u', array('uid', 'name', 'mail')) ->condition(db_or() ->condition("u.mail", '%' . db_like($string) . '%', 'LIKE') ->condition("u.name", '%' . db_like($string) . '%', 'LIKE') ) ->condition('u.uid', 0, '<>') ->range(0, 10); $results = $query->execute(); foreach ($results as $row) { $key = "$row->name"; $matches[$key] = "$row->name - $row->mail ($row->uid)"; } drupal_json_output($matches); }

Categories: Drupal

Open Atrium Markdown

New Drupal Modules - 9 October 2014 - 10:27am

Provides a markdown filter for Open Atrium

Submit an Issue or See issue queue

Categories: Drupal

Open Atrium Analytics

New Drupal Modules - 9 October 2014 - 10:26am

Provides per space analytics reporting for Open Atrium

Submit an Issue or See issue queue

Categories: Drupal

Open Atrium Devel

New Drupal Modules - 9 October 2014 - 10:19am

Adds development functionality for Open Atrium

Submit an Issue or See issue queue

Categories: Drupal

Freelock : Why tech work is so hard to estimate

Planet Drupal - 9 October 2014 - 8:57am

"Hey, since the upgrade, I can't use the power edit feature anymore!" came the request. Ok. There have been several different upgrades over the past few months. The menu editor module has been updated. The server has been upgraded. The site is in heavy use, so there are lots of content changes.

EstimatingProject ManagementDrupal Planet
Categories: Drupal

Integer Format

New Drupal Modules - 9 October 2014 - 8:21am

This module adds a widget and display formatter to the basic "integer" field to edit and display it as a decimal field. It is generally considered a best practice to store ecommerce prices as integers in the lowest denomination such as cents. This avoids a whole class of rounding and other calculation errors.

There are other modules for Drupal that support "price" fields, but they all have a limitation that makes them unsuitable for many use cases:

Categories: Drupal

Lightning Features

New Drupal Modules - 9 October 2014 - 7:58am

Decoupled components used by the Lightning distribution and others built upon it.

For more information, check out the Lightning project page.

Categories: Drupal

Vasily Yaremchuk: Turn off maintenance mode on separate paths in Drupal 7

Planet Drupal - 9 October 2014 - 7:32am

We have faced with the problem. We use Ajax Login/Register module but put site in Maintenance mode.

But we need to have Sign up ability. Ajax Register module show Sign up form in popup, content is requested from "ajax_register/register". But in maintenance mode we can see Maintenance page response...

But fortunately we have hook_menu_site_status_alter. Thus we can turn off Maintenance mode in our module on separate path:

<?php
function ajax_register_fix_menu_site_status_alter(&$menu_site_status, $path) {
  if ($menu_site_status == MENU_SITE_OFFLINE && user_is_anonymous() && $path == 'ajax_register/register') {
    $menu_site_status = MENU_SITE_ONLINE;
  }
}
?>

This is content of ajax_register_fix.module custom module.

Blog tags:
Categories: Drupal

Deeson: Drupal's Picture element and Image Field Focus for mobile images

Planet Drupal - 9 October 2014 - 6:51am

We know people get really frustrated when images viewed on desktop look great but are hard to see on a mobile device.

In this blog, I’ll show you how to use the Picture and Image Field Focus modules to crop images for display on desktop, tablet and mobile and make the lives of content creators easier.

It means goodbye to preparing several images for optimum display across all devices and hello to just one image upload and smart image crop control.

The new Drupal Picture element

Picture is a new(ish) HTML5 element which allows different images to be displayed for different devices and also for retina displays. Handy.

This means mobile users no longer have to download images optimised for desktop display when the image is displayed on a much smaller screen. 

How Picture works

Picture considers the way images are served and the needs of content creators, including:

  • Size: Images are often served optimised for desktop and then mobile devices reduce them to size. This means that mobiles are often downloading more data than they need to.
  • Art direction: For some images it would be better if the image was cropped for mobile display. This is called the ‘art direction’ use case, and I recommend reading this article over here
  • Image quality: Using <picture> images can be served at a higher pixel density, which means higher quality images can be served for retina devices.
Picture's HTML and browser support

The picture element at its most basic looks like this:

<picture>  <source media="(max-width: 480px)" srcset="mobile.jpg"> <source media="(max-width: 768px)" srcset="tablet.jpg">  <img src="fallback.jpg" alt=""> </picture>

You can see it's been spec'd out by the responsive images community group http://responsiveimages.org/.  It's supported in Chrome 38, implemented in Firefox 33, and can be tested by tweaking FireFox’s settings.  Microsoft is considering supporting it, and Safari hasn’t confirmed their status yet.

If a browser doesn’t support the Picture element, the HTML degrades gracefully and the fallback <img> is displayed. There is also a well-supported, and tested, polyfill - picture fill - on GitHub.

The Picture module

The good news is that Drupal already has a Picture module which includes the picture fill js library. It has a dependency on the breakpoints module.

To set up Picture, you need to setup your breakpoints first (/admin/config/media/breakpoints).  Each breakpoint needs a name and a media query. I've set up my breakpoints to match the Bootstrap breakpoints. For example, I've got a Mobile breakpoint with a media query '(max-width: 480px)' - see image to the left.

Once that's all sorted, you need to setup images styles for each breakpoint.

To setup Picture, install the module and go to /admin/config/media/picture/list. This page lists all the picture displays you have setup. Click 'Add', select the breakpoints you want this picture display to use, and select an image style for each breakpoint - see left.

Once you have a picture display set up, you'll be able to select picture as a display field formatter for an image field. You can then display different images for mobile, tablet and desktop!

Image Field Focus

Some people worry that the art direction use case places a large administrative burden on content editors, as it means preparing several images instead of just one.

You can avoid this if you use Image Field Focus - content admins select a focus area and a crop area for each image and image field focus does the rest, which is a lot less hassle all round.

In the example I've cropped out the person stood on the right, which is represented in the outer selected area. The inner selected area has become the focus area. 

Essentially, any image created will be from within the crop area and will always contain the focus area. The focus area will be, where possible, in the middle of the picture.

In our example, the paragliders in the air might be to small to see if the full image was scaled down to be displayed on mobile. I’ve added a focus area around one of the paragliders so when a mobile optimised image is created it will be a close up image of this area.

To setup image field focus you'll need to enable it for each field you want to use it on.

Defining images styles

When you define your images styles, you need to add the Focus Scale And Crop style - see left. I've set up three distinct image styles, one for each breakpoint, see image below. If you want to more detail on setting up images styles, read this.

What do you think?

Hopefully you can see that the Picture and Image Field Focus modules work together as a great combination!  

We asked our marketing and content team what they thought and they said, “This is literally the best thing since sliced bread.” 

Categories: Drupal

HTTPS Node

New Drupal Modules - 9 October 2014 - 3:59am

Allows to set HTTPS per node. When set, node view page automatically redirected to HTTPS.

Categories: Drupal

Clemens Tolboom: The state of ReST in Headless Drupal 8

Planet Drupal - 9 October 2014 - 1:37am

One of the Drupal 8 initiatives was to make "headless" Drupal core work out of the box. Drupal now has a ReST API.

This allows you to use all the Drupal 8 features to edit your content but present the content not only on a Drupal frontend but also on mobile apps or anything else that can work with JSON data.

Categories: Drupal
Syndicate content


Google+
about seo