Skip to Content

Drupal

Drupal.org Featured Case Studies: EIT Avionics

Planet Drupal - 25 January 2016 - 12:11pm
Completed Drupal site or project URL: http://www.eitavionics.com/

EIT Avionics produces devices for aircraft to increase safety and situational awareness. They needed a new site to showcase their products and introduce their company, and they wanted to be able to edit the site themselves. We built the site with Drupal 8 and a custom responsive Drupal theme.

Key modules/theme/distribution used: ViewsOrganizations involved: PlethoraTeam members: caspervoogtjesse.voogt
Categories: Drupal

Drupal Camp NJ 2015: Mentoring & Collaboration day - Sunday, January 31

Planet Drupal - 25 January 2016 - 10:06am

We are hosting a free Mentoring & Collaboration day, Sunday at the FFW office.

Categories: Drupal

Mediacurrent: Drupalcamp Atlanta 2015: Decoupled Drupal 8

Planet Drupal - 25 January 2016 - 8:14am
Trending Toward “Headless”

Lately, there has been an increased interest in decoupled Drupal (a.k.a. headless Drupal). Lullabot and TWIT.tv are two organizations that have recently announced new sites that feature decoupled Drupal.

Categories: Drupal

Mediacurrent: Drupalcamp Atlanta 2015: Using Data-Driven Documents (D3) with Drupal

Planet Drupal - 25 January 2016 - 7:57am

At DrupalCamp Atlanta 2015, I led a discussion on the d3.js library for an audience of site builders, themers and developers.

Data-Driven Documents or D3 refers to a javascript library combining html, css and sag to build graphic visualizations for data. The d3.js library uses scalable vector graphics to generate charts, graphs and maps that are scalable and interactive.

Check out my session recording below. It covers: 

Categories: Drupal

Microserve: Optimising your Drupal CKEditor

Planet Drupal - 25 January 2016 - 6:13am
Optimising your Drupal CKEditorJan 25th 2016 Configuring CKEditor

First rule to configure your WYSIWYG's:  Only give your users what they need.

When you install CKEditor it gives you almost every option in the toolbar. This is fine for an admin who knows what they do and how to use them, but for most users they are going to be overwhelmed or they can go too over the top with the formatting options, which can result in some ugly looking content on the website. 

Below is a configured CKEditor for a full profile using the full html text format. (…/admin/config/content/ckeditor/edit/Full). This would generally be used for site admins and editors. You can setup different CKEditor profiles and text formats for different users according to what you need. 

Here's a couple of useful buttons to use:

  • Format: I don’t know why you wouldn’t have this set! It gives the option to have headings or paragraphs etc. What you should always do is change the font formats under ‘CLEANUP AND OUTPUT’ and take out H1. It is a nightmare if the client gets a hold of that! You only want one H1 tag on your page and that tends to be the node title. Any more than this is bad for SEO.
  • Remove Format: This removes inline styling which usually happens when pasting text into the editor. They're are ways to add paste filters to strip out html you do and don't want.
  • Full page/Maximize: I just prefer this for myself really. I find the text area constraining and I like seeing the bigger picture without extending the box or scrolling a lot. There is an auto grow plugin or you can manually set the editors height in the settings config file.
  • Link: I use a plugin module to easily link to internal paths called CKEditor link.
  • Div: To add a div wrapper. This is handy because it keeps div classes/ids when saved as full html, also when using templates and custom styles.
  • Show blocks: Adds an outline to each element with their tag displayed next to them.
  • Templates: Gives the ability to add custom code into your editor. For example: If you want to add a two column layout with images you can write a template file for this and select it here. 
  • Styles: Gives the ability to create custom styles for your text editor. Such as, give a p tag a certain class to style differently.
Advanced content filter -

I would recommend enabling the Advanced content filter (ACF). This cleans up and strips out unwanted html such as inline styling, font styles, scripts or risky code and converts b tags to strong tags etc. However, if you did want something like text colors on all elements or the use of spans. Add this code :

config.extraAllowedContent = 'span;*{color}';

to 'Custom JavaScript configuration' under 'Advanced options' at the bottom of settings page. Alternatively, you can load CKEditor.config.js from your theme directory (remember to clear the browsers cache when using this file).

The above option is per CKE profile. See here about ACF and other samples.

If you have any examples or other ways you filter HTML I would be interested to hear them - simply leave a comment at the end of the post!

Theming CKE contents

As an option you can load your theme's CSS into the CKE body. This helps your users see how it will look on without having to preview the page. 

This is quite simple:

Under CSS in the profile settings, there are three options - 'CKEditor default', 'Use theme CSS' or 'Define CSS'. You can only use the theme CSS if you are using plain CSS for your site, as this doesn't work with SASS/LESS etc. The other option is to define the CSS and write some custom CSS for the editor itself. So, if I have a CSS file in my theme directory under - /sites/all/themes/custom_theme/css/editor.css then the path to the CSS file would be - %h%tcss/editor.css .

NOTE: The styles you write in this CSS file will not apply to the rest of the site unless it's added in the themes .info file.

Finally, images! Using the Picture module you can ask users to set an image style when inserting a new image into the editor. This will mean the content editor can't insert images that are just too big for what they need to be.

Written by: Kirsty Bewley, Front-end Developer

Microserve is a Drupal Agency based in Bristol, UK. We specialise in Drupal Development, Drupal Site Audits and Health Checks, and Drupal Support and Maintenance. Contact us for for further information.

Categories: Drupal

Fast tracking life-saving innovations

Dries Buytaert - 25 January 2016 - 5:54am

Last week, a member of my family died in a car accident. Jasper was on his way home and was hit by a taxi. He fought for his life, but died the next day. Jasper was only 16 years old. I was at Davos and at one point I had to step out of the conference to cry. Five years ago, another family member died after she was hit by a truck when crossing the road.

It's hard to see a tragedy like this juxtaposed against a conference filled with people talking about improving the state of the world. These personal losses make me want to fast-forward to a time in the future where self-driving cars are normal, and life-saving innovations don't have as much regulatory red tape to cut through before they can have an impact. It's frustrating that we may have the right technology in sight today, but aren't making it available, especially when people's lives are at stake.

Imagine two busses full of people crashing, killing everyone on board, every single day. That is how many people die on America's roads every day. In fact, more people are killed by cars than guns, but I don't see anyone calling for a ban on automobiles. Car accidents (and traffic jams) are almost always the result of human error. It is estimated that self-driving cars could reduce deaths on the road by 90%. That is almost 30,000 lives saved each year in the US alone. The life-saving estimates for driverless cars are on par with the efficacy of modern vaccines. I hope my children, now ages 6 and 8, will never need a driver's license and can grow up in a world with driverless cars.

The self-driving car isn't as far off as you might think but is still being held back by government regulators. Delayed technology isn't limited to self-driving cars. Life-saving innovations in healthcare are often held back by regulatory requirements. The challenge of climate change could be addressed faster if the regulatory uncertainty around solar and wind power permits and policies were reduced. The self-serving interest of lobbying groups focused on maintaining the status quo for industries like Big Oil make it harder for alternative energies to gain momentum.

Regulators need to frame their jobs differently; they need to ask how they can facilitate and enable emerging disruptive innovations, rather than maintain existing systems. Their job should focus more on removing any barriers that prevent disruptions from having a faster impact. If they do this job well, some established institutions will fail. In some cases, economic sacrifices by the incumbents should be of lesser concern than advancing social health and safety for the benefit of society. I'm less concerned about technology destroying jobs, and more concerned about our children not being able to benefit from available technical advances that improve their lives. We should realize that opportunities for long-term economic growth come with short-term disruption or temporary pain.

Losing family members in fatal accidents makes one think about what could have been done. I'm often asked how one can create a "Silicon Valley" model elsewhere in the world. I may have an answer. If you want to out-"Silicon Valley" Silicon Valley, create a region with a regulatory environment that supports prompt, responsible innovation to drive the adoption and iteration of new technologies. A region where people can responsibly launch self-driving cars, fast-track healthcare and address climate change. A region where long-term advantages are valued more than short-term disadvantages. Such a region would attract capital and entrepreneurs, and would be much better for our children.

Categories: Drupal

Form mode manager

New Drupal Modules - 25 January 2016 - 4:58am

Allows management of form drupal modes for the different entities.

Categories: Drupal

Code Enigma: Drupal Views: Combined fields filter

Planet Drupal - 25 January 2016 - 2:32am
Drupal Views: Combined fields filter Language English Drupal Views: combined filters

How to search content across multiple content types, without limiting your data model.

Mon, 2016-01-25 10:32By salva

When building a Drupal site, it's very easy to be tempted to build the data model based on the features and options that one can get out of the box in other contributed modules (and I had my rant about it). And that's fine. Sometimes. For small sites, taking this path can pay off in development speed, since it will reduce the number of steps needed to accomplish something, as well as offer more reusability of components, and simplify overall configuration of the site. For large scale sites, this might become a performance problem as the software (and the content grows).

An example of simplicity in the short term vs performance in the long run is often easily explained with the Views module. A few years ago, it was "too easy" to decide to share plenty of fields between different Content Types, because of all the speed gained in development. In a recent project, we chose not to do this, and keep things as split as possible. However, we still needed to search content across different content types, using a single textbox. Well, it turns out this is very easy to achieve in Views too.

Entering Views combined fields filter

Since a few years ago, the Views module includes a Global filter that allows a site builder to add filtering options based on the value of multiple fields. Our use case was as follows:

  • Two ContentTypes with a "Full Description" field (textarea), called field_{type}_description.
  • A site section that should allow searching by the contents of both of those content types.

That might seem a case where one would jump into code and implement a hook_views_query_alter() to amend configuration as needed. However, it turns out this can be easily done in config with the mentioned filter. First things first, we add all the fields that we want to include in the combined fields filter. We needed the content title, plus the Full Description of the contents (which appears twice because the label of the fields is the same, even though the fields are completely different.

Finally, all we have to do is add the filter, which is in the "Filters" section of the View configuration, as any other filter (see first picture of this post). After adding it, we'll be presented with the standard settings popup for the filter. From there, we select all the fields that will be considered part of the filter, click "Apply", and then save the view. The other options are the standard ones provided by other Views filters (e.g: operator, label, description, etc).

Now we're ready to embed the view in a page and use it. This is just a suitable solution for many use cases, but not for all of them. While in our case we kept the goodness of the Views module and a sane data model, the combined fields filter wouldn't be suitable in a case where we had several more fields to filter by, as it would just add more overhead to the underlying database query. However, it proves to be an useful tool to have in your kit!

WordPress ServicesPage Drupal Help Haiti: Day 3Blog Drupal Distributions - Getting Going FasterBlog Views DependenciesBlog
Categories: Drupal

Skeletons

New Drupal Modules - 25 January 2016 - 1:26am

Skeletons is an experimental project to help developers to create D8 modules and install profiles skeleton.

Categories: Drupal

Missing Administrator Role Permissions

New Drupal Modules - 25 January 2016 - 12:38am

This module grants the missing permissions for the Administrator role in hook_cron.

Categories: Drupal

Drop Guard: Drop Guard celebrates full Drupal 8 support

Planet Drupal - 25 January 2016 - 12:00am
Drop Guard celebrates full Drupal 8 support Manuel Pistner Mon, 01/25/2016 - 08:00

Drop Guard - your service for automated Drupal updates, just announced its full support of Drupal 8. This includes the Drop Guard service, client module and our friendly support, of course!

In case you’re up and running with latest and greatest Drupal release (or if you're just a Drupal and Drop Guard enthusiast), you'll enjoy this update support for your D8 projects.

You'll find a very short survey below. Your participation will help us to keep on rocking our Drop Guard optimization, so thank you very much in advance!

Show me this awesome survey

Also we want to figure out how D8 affects Drupal users thoughts and feelings about the new release and its security. Feel free to exchange your thoughts on Drupal 8 and its security, especially if you felt more safe with Drupal 7 than with D8.

Give feedback to our CEO Manuel (pistner@brightsolutions.de) or in our slack channel dropguard slack (join it at the bottom of the formular). We welcome any type of feedback; so feel free to contact us any time you have questions, we look forward to your response! 

 

Thank you for considering Drop Guard as your Drupal update automation service.

Drupal Drop Guard Drupal Planet Drupal 8
Categories: Drupal

Dave Hall Consulting: Per Environment Config in Drupal 8

Planet Drupal - 24 January 2016 - 11:55pm

One of the biggest improvements in Drupal 8 is the new configuration management system. Config is now decoupled from code and the database. Unlike Drupal 6 and 7, developers no longer have to rely on the features module for moving configuration around.

Most large Drupal sites, and some smaller ones, require per environment configuration. Prior to Drupal 8 this was usually achieved using a combination of hard coding config variables and features. Drupal 8 still allows users to put config variables in the settings.php file, but putting config in code feels like a backward step given D8 emphasis on separating concerns.

For example we may have a custom module which calls a RESTful API of a backend service. There are dev, stage and production endpoints that we need to configure. We also keep our config out of docroot and use drush to import the config at deployment time. We have the following structure in our git repo:

/ +- .git/ | +- .gitignore | +- README.md | +- config/ | | | +- README.md | | | +- base/ | | | +- dev/ | | | +- prod/ | | | +- stage/ | +- docroot/ | +- scripts/ | +- and-so-on/

When a developer needs to export the config for the site they run drush config-export --destination=/path/to/project/config/base. This exports all of the configuration to the specified path. To override the API endpoint for the dev environment, the developer would make the config change and then export just that piece of configuration. That can be done by runing drush config-get mymodule.endpoint > /path/to/project/config/dev/mymodule.endpoint.yml.

Drupal 8 and drush don't allow you to import the 2 config sets at the same time, so we need to run 2 drush commands to import our config. drush config-import --partial --source=/path/to/project/config/base && drush config-import --partial --source=/path/to/project/config/dev. The first command imports the base config and the second applies any per environment overrides. The --partial flag prevents drush deleting any missing config. In most cases this is ok, but watch out if you delete a view or block placement.

Best practices are still emerging for managing configuration in Drupal 8. While I have this method working, I'm sure others have different approaches. Please leave a comment if you have an alternative method.

Categories: Drupal

Savas Labs: It actually is 2016, your site is running on Drupal 6, now what? Part 3: the options.

Planet Drupal - 24 January 2016 - 4:00pm

Part 3 of a series investigating what options you have with your Drupal 6 site as EOL approaches. We discuss what your options really are given the many difficult decisions you are likely faced given your organization's budget, level of risk and tolerance for it, and other business priorities. Continue reading…

Categories: Drupal

Web Wash: How to Create Powerful Container Paragraphs in Drupal 8

Planet Drupal - 24 January 2016 - 11:56am

In the last Paragraphs tutorial, you were introduced to the module and we created a basic paragraph type called Content. We only skimmed the surface of what the module can really do. To utilize Paragraphs to its full potential you need to learn how to create a container paragraph type and nest paragraph items.

The concept of a container is fairly simple. It's a paragraph type that has its own paragraph field on it and allows a user to nest paragraph items.

In this tutorial, we'll create a container paragraph called Banner, it'll have two fields: image and paragraphs.

When a banner paragraph is created and an image is uploaded, the image will be displayed as a background style. Now, I do understand there're multiple ways of doing this, but for simplicity we'll set it using a background style on the paragraph element.

All nested paragraphs will be rendered inside the container and displayed with the background. If you want to add any other settings, i.e., parallax configuration, you would place it on the container paragraph.

Categories: Drupal

Image Whirlpool

New Drupal Modules - 24 January 2016 - 7:28am


Image Whirlpool

provides the user the flexibility to present their images
in a more attractive and modern way
in front of the users.
It just modifies the views of the images in form of a 3d whirlpool which the user can hover upon to have a nice view of the images.
There is no restriction on the number and types of images used.
Note: Images should have minimum dimensions of 180 pixelsx150 pixels.

Modules Required

Views

Categories: Drupal

Akshay Kalose: Drupal Console: Generate Module & Theme Code

Planet Drupal - 24 January 2016 - 7:11am

Drupal Console is software which allows you to alter your Drupal installation through the command line. According to the official website, “The Drupal Console is a CLI tool to generate boilerplate code, interact and debug Drupal 8.” Unlike Drush, Drupal Console is specifically for Drupal 8, the latest major release. Although Drupal Console and Drush … Continue reading "Drupal Console: Generate Module & Theme Code"

The post Drupal Console: Generate Module & Theme Code appeared first on Akshay Kalose.

Categories: Drupal

Modules Unraveled: Install Drush 7 and 8 Side-by-Side and Automatically Switch Versions Based on Each Project

Planet Drupal - 24 January 2016 - 4:48am

Have you started working with Drupal 8 yet? If so, you might have noticed that Drush 7 doesn't play nice with Drupal 8. And if you install Drush 8, that won't work with your Drupal 7 sites. Yikes!

Have no fear!

Here's how to install BOTH Drush 7 and Drush 8 AND have each project automatically use the version that corresponds to that install. It's stinkin' awesome!

Uninstall existing Drush instances

Okay, the first thing you'll want to do is uninstall every version of Drush that you already have installed. This process varies depending on how you installed it, but for example, if you installed with homebrew, the command would be something like brew remove --force drush.

Install Composer

We're going to install multiple versions of Drush using Composer, so we need to make sure you have that installed first. Detailed instructions on how to install Composer globally are on their website, but here's the gist.

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Note: If this fails due to permissions, run the mv line again with sudo. You may also have to create the /usr/local/bin directory first, depending on your existing system.

  • To confirm composer was successfully installed, type composer --version and you should see something like "Composer version 1.0-dev (...) 2016-01-20 11:17:40"
Install Drush 8

Okay, let's install Drush 8!

cd /usr/local/bin
mkdir drush-8
cd drush-8
composer require drush/drush:8.0.x-dev
ln -s /usr/local/bin/drush-8/vendor/bin/drush /usr/local/bin/drush8
  • The "composer require..." line will download the latest dev release, you could replace "8.0.x-dev" with "8.0.2", for example, to download that specific version.
  • The "ln -s..." line creates a "symbolic link" called "drush8" in the /usr/local/bin directory to the location where Drush 8 is installed. This means that we can call it from anywhere on the system by typing "drush8 --version", for example.

Easy!

Install Drush 7

Now, we'll install Drush 7!

cd /usr/local/bin
mkdir drush-7
cd drush-7
composer require drush/drush:7.x-dev
ln -s /usr/local/bin/drush-7/vendor/bin/drush /usr/local/bin/drush7
  • The "composer require..." line will download the latest dev release, you could replace "7.x-dev" with "7.1.0", for example, to download that specific version.
  • The "ln -s..." line creates a "symbolic link" called "drush7" in the /usr/local/bin directory to the location where Drush 7 is installed. This means that we can call it from anywhere on the system by typing "drush7 --version", for example.
Create Shell Script to Automatically Select Version Based on Git Config

Now, if you're already used to typing something like "drush --version" (without the specific version number), remembering to use it can be a little cumbersome, so now, we're going to create a little shell script that will automatically use the correct one for each project based on a git config variable that we set.

cd /usr/local/bin
vi drush
  • Press the "i" key to enter "insert" mode
  • Paste the following
#!/bin/sh
version=$(git config --get drush.version)
if [ "$version" = '7' ];
then
drush7 "$@"
else
drush8 "$@"
fi
  • Press "esc", then type ":wq" and press "enter" to save and quit this file
  • Type chmod +x drush (This makes the "drush" script we just created executable.)

Now, when we type a command like "drush --version" it will use Drush 8 by default. In order to use Drush 7, we need to set a configuration variable in the git repo of the project that should use it.

Set Drush 7 as the Required Version for a Project cd /path/to/project
drush --version
git config drush.version 7
drush --version
  • The first time you run "drush --version" it should return something like "Drush Version : 8.0.0-rc3" showing that you're using Drush 8
  • The "git config..." line declares that you want to use Drush 7 for this project
  • The second time you run "drush --version" It should show somethign like "Drush Version : 7.1.0". If so, you're all set!
YAY!!!

You might want/need to close and re-open all terminal windows to make sure it takes effect.

If you have any questions about, or issues with, this setup, let me know in the comments!

Tags: DrushDrupal 7Drupal 8Command Lineplanet-drupal
Categories: Drupal

ARREA-Systems: Create list view in custom module (part 2)

Planet Drupal - 23 January 2016 - 6:15pm
Create list view in custom module (part 2) JK Sun, 01/24/2016 - 10:15

In previous article we have seen how to declare the data accessible in a custom view in MyModule.

Now that the data from our tables mymodule_tb (and mymodule_tb_2) are available, let's create the list view.

First navigate to "/admin/structure/views/add" and create the view by entering basic information as per the example below.

 

 

After "save" you are redirected to "Edit" form where further settings will be set.

1) Add fields from you source table

 

 

From this form, select the fields to display. We will select 2 here "name" and "type" (refer to the table structure declared in MyModule_views_data())

Categories: Drupal

Larry Garfield: Giving Back in 2016

Planet Drupal - 23 January 2016 - 3:18pm

Three years ago, I ended 2012 with a call to the Drupal community to Get Off the Island. Mainly I wanted to encourage Drupal developers to prepare themselves for the major changes coming in Drupal 8 by connecting with other PHP projects and with the broader community, and called on people to attend non-Drupal conferences in order to visit and learn from other communities.

read more

Categories: Drupal

Gizra.com: Entity Relationships Graph

Planet Drupal - 23 January 2016 - 2:00pm

We are often challenged with the maintenance of existing projects that were developed by other agencies, or a new developer arrives and we need to quickly bring them on board. The complexity of legacy projects can be very high and the risk of breaking existing logic is something we want to avoid.

One way we like to look at a project before diving into the code is through its data structure. The different entities and their relations can tell us a lot about the business logic of the site and its internal logic. We assumed that if we could easily generate a graph with all the bundles, entities, and their relations this complex task would be easier.

Having done this for a while now, I believe our assumption was right. Taking our open-source Productivity project (Gizra's internal ERP/Project management system) as an example, it's much easier to look at the following graph and understand that Work session, Time tracking, Payment, and Github Issue bundles are pointing at a Project, which in turn points to an Account bundle. Github Issue can also reference itself.

Continue reading…

Categories: Drupal
Syndicate content


Google+
about seo