Skip to Content

Drupal

Drupal Easy: Creating a Talent Underpinning

Planet Drupal - 27 January 2015 - 6:09am

Having just completed presenting the Drupal career training portion of AcquiaU, we are anticipating great experiences for all ten students as they begin their eight weeks of rotations within three different business groups within Acquia. The past two months have been a whirlwind of teaching, learning and team building, which provided great insight into a forward-thinking approach to building Drupal talent, made possible by the commitment of Acquia.

We are pleased to have contributed to the new AcquiaU with the customization of our Drupal Career Online curriculum. I’d like to share some great lessons learned, as well as introduce the ten people who were lucky enough (luck favors the prepared) to be selected for this amazing program.

-->

read more

Categories: Drupal

Makina Corpus: Turning hackability into a use case

Planet Drupal - 27 January 2015 - 4:45am
When a CMS does not allow happy hacking anymore, it loses a very valid use case.
Categories: Drupal

InternetDevels: Drupal module for messages just like in Facebook

Planet Drupal - 27 January 2015 - 2:00am

We worked hard during a few days and developed our own module called Private message with node.js.

Read more
Categories: Drupal

Generator UI

New Drupal Modules - 27 January 2015 - 1:53am

Generator UI allows you to develop faster by allowing you to generate code from templates files packaged into the module. And this, inside of your Drupal installation.

Please help and provide you own code template ! Module is under heavy development and any help is appreciated !

Similar project : see console project for the same purpose, but through Drush.

Sponsored by French / Tunisian company émérya.

Categories: Drupal

AllPay

New Drupal Modules - 27 January 2015 - 1:30am

Provides an easy-to-use order system, a generic API, and a simple interface to AllPay's payment solutions.
Currently supported payment methods:

  • Credit card (under development)
  • ATM virtual account
  • Convenience store kiosk (under development)

The development of this module is NOT sponsored by AllPay, and the developers are in NO way affiliated with AllPay.

Categories: Drupal

Drush EFQ

New Drupal Modules - 26 January 2015 - 8:44pm

This is a simple drush plugin that adds the ability to perform a basic EntityFieldQuery (EFQ). This is useful when querying for counts or getting fully built entity data out of drupal as part of command-line scripts like bash. This allows you to pipe values out of drupal via drush, some basic examples are included below:

Categories: Drupal

Background Decorator

New Drupal Modules - 26 January 2015 - 5:50pm

Background Decorator allows you to attach images and parallax images to entity types.

Code coming soon.

Categories: Drupal

Appnovation Technologies: 5 Cool Drupal Websites

Planet Drupal - 26 January 2015 - 3:27pm
It’s hard enough trying to find cool websites in general, let alone cool websites made using Drupal. var switchTo5x = false;stLight.options({"publisher":"dr-75626d0b-d9b4-2fdb-6d29-1a20f61d683"});
Categories: Drupal

Phase2: Ultimate Flexibility: Open Atrium’s New Related Content Feature

Planet Drupal - 26 January 2015 - 1:00pm

The constant struggle between content editors and web developers:

  • Content editors want to embed rich media, callouts, and references to related content anywhere within their WYSIWYG.  They love the Body field and want more buttons added to the WYSIWYG.
  • Web developers want to add additional fields for media, attachments, related content to support rich content relationships and access control.  Web developers hate the Body field and wish they didn’t need a WYSIWYG.

In the latest 2.30 version of Open Atrium, we attempt to help both content editors and web developers with a new approach to building rich story content using the Paragraphs module.  Rather than having a single WYSIWYG body, content editors can build their story using multiple paragraphs of different types and layouts. The order of these paragraphs can be rearranged via drag and drop to create long-form content.

Site builders can add their own custom paragraph types to their sites, but Open Atrium comes with four powerful paragraph types “out of the box”:

(1) Text Paragraphs

The simplest paragraph type is the “Text” paragraph.  It works just like the normal Body field with it’s own WYSIWYG editor.  But an additional Layout field is added to control how the text is rendered.  There are options for multiple columns of wrapping text within the paragraph (something nearly impossible to do with the normal Body field), as well as options for left or right floating “callouts” of text.

(2) Media Gallery

The “Media Gallery” paragraph handles all of the images and videos you want to add to your story.  It can replace the normal Attachments field previously used to add media to a document.  Each Media paragraph can contain one or more images, videos, or files.  The Layout field controls how that media is displayed, providing options for left or right floating regions, or a grid-like gallery of media.  Videos can be embedded as preview images or full video players.

When floating media to the left or right, the text from other paragraphs will flow around it, just as if the media had been embedded into the WYSIWYG.  To move the images to a different part of the story, just drag the media paragraph to a new position in the story.

In Open Atrium, images directly embedded into the Body WYSIWYG field becomes Public, bypassing the normal OA access control rules.  However, anything added to a Media paragraph works more like the Attachment field and properly inherits the access permission of the story document being created.  Thus, the Media paragraph provides a way to embed Media within your story while retraining proper privacy permissions.

(3) Snippets

The “Snippet” paragraph type allows you to embed text from any other content on your site.  You can specify whether the Summary, Body, or full Node is embedded and also control the Layout the same as with Text paragraphs.  You can also either display the Title of the referenced content or hide the title, or override the title with your own text.

One of the best features of Snippets is the ability to lock which revision you want to display.  For example, imagine you want to embed a standard operating procedure (SOP) within your story document.  You create a Snippet paragraph that points to the SOP.  However, if the related SOP node is updated in the future, you don’t want your old document to change.  For compliance purposes it still needs to contain the original SOP text.  By “locking” the snippet to the old revision, the old document will continue to display the original SOP even if the SOP is updated later.  If you “unlock” the snippet, then it will display the latest version of the related SOP.

Open Atrium access controls are also respected when displaying snippets.  If you reference content that the user doesn’t have permission to view, that snippet will be removed from the displayed text.  Users still only see the content they are allowed.  This provides a very powerful way to create rich documents that contain different snippets of reusable content for different user roles and permissions.  Similar to adding additional fields with Field Permissions, but much more flexible and easy to use.

(4) Related Content

The “Related Content” paragraph type is similar to Snippets, but displays the Summary or Full rendered node of the related content.  Like the Media paragraph, the Related Content can contain one or more references to other content on the site.  The Layout provides options for displaying the content as a table of files, or a list of node summaries (teasers), or as full node content.  When full node content is used, any paragraphs used in the related content will also being displayed (paragraph “inception”!).  In addition, any special fields from the full related node can be shown.  For example, a Related Event will show the map of the event location.  A Related Discussion will show all of the discussion replies and even provide the Reply Form, allowing you to reply to a related discussion directly from the story document itself!

Related Content is also a bi-directional link.  When you view the related content node, a sidebar widget called “Referenced From” will show all of the stories that reference the node being viewed.

A Real World Example

To pull all of this together with a real-world example, imagine that you are scheduling a Meeting.  You want to create an Agenda for that meeting and allow your team to discuss and edit the agenda before the meeting.  In Open Atrium you can now do this all from a single document:

  1. Create the Event for the Meeting, adding your team to the Notifications
  2. Add a Related Content paragraph for the meeting Agenda document
  3. Add a Related Content paragraph for the agenda Discussion

Open Atrium is smart about where this related content is created.  If you already have a section for documents, the Agenda will be created within that section.  If you already have a section for discussions, the related discussion will be placed there.  You can change these locations if you wish, but the default behavior reflects the most common information architecture.

When your team members receive the email notification about the meeting and click the link, they will be taken to your Event and will see the agenda document and discussion as if they were a normal part of the event body.  They can view the agenda content directly and can post replies directly into the discussion reply field.  They don’t need to go to separate places on the site to see the document or discussion.  If you *do* view the document or discussion nodes directly, such as from a search results page, you’ll see a link back to the meeting event in the References From list in the sidebar.

Conclusion

Not only do the Paragraph features help content editors build rich stories quickly and easily, they allow web developers to create related documents, linked content, better search results, better data structures.  It’s still not a magical unicorn wysiwig of content editor’s dreams, but it’s a significant step for Open Atrium and Drupal. It opens a whole new world of collaboration where all related content can be viewed together.

Looking for more information about Open Atrium? Sign up to receive Open Atrium newsletters and updates! Don’t miss our winter release webinar on Wednesday, January 28th, at 11am EST!

Categories: Drupal

On the hard choices we make every day

Dries Buytaert - 26 January 2015 - 11:41am

Every morning when I wake up, I have choices to make. While I want to turn Acquia into a billion dollar company, I also want to grow Drupal to be the leading digital experience platform. Both are connected and some of the work overlaps, but it still requires me to decide how much of my energy to focus on my duties as the CTO of Acquia as well as my duties as the project lead of Drupal.

It has been a few years since I wrote a good amount of code and I miss the thrill of programming -- both roles with Drupal and Acquia have evolved into management positions. Going back to writing software is a choice too, and one that I would undoubtedly enjoy. I think about it almost daily, and every time I decide not to.

At the same time, I also want to say 'yes' to the many invitations to travel the world, to speak at conferences, or to spend time with people I look up to. I also want to reply to all the emails I receive; I don't like it when emails fall through the cracks. I want to use my network and experience to advise other startups and Open Source projects. I'd love to increase my responsibilities as a Young Global Leader at the World Economic Forum (I'm bummed I couldn't attend Davos last week) and contribute to solving some of humanity's biggest problems. Other times I ask myself; why not kick back and have more time with friends and family? That is really important too.

When I push open the drapes in the morning, I have choices to make. The choices looked simpler when I was younger — most days I don't remember having to make choices at all. But as my work has grown in reach and impact, the choices in front of me have expanded as well. Every day, I struggle with these choices and ask myself how to spread my energy. I realize I'm not alone, as I know many others that have tough choices to make.

My guiding principle is to optimize for impact, purpose and passion — it is a delicate and personal balance based on the belief that somehow all the dots will connect.

My deep-wired desire to optimize for impact has not been without challenges. It has been an extremely strong force pulling me away from other relative priorities involving family, friends and personal health. Recently, I've gotten better at making time for family, friends, eating well and exercising. There is no denying that every decision has trade-offs: when I choose to do one thing it means I choose not do something else. Not doing something means I let people down, and as more and more choices present itself over time, it means letting down more and more people as well. If I let you down, I hope you understand. And one of the people I let down is myself, as I may never write software myself again -- it may never be the most impactful to do.

The best thing a human being can do is to help another human being. The organizations I'm building, the things I'm passionate about, the things I read about and the decisions I make will hopefully all lead to helping many more people. In turn, I hope that some of the people I have coached and worked with will pay it forward. Making choices is difficult but all in all, it's a wonderful feeling to see how many people I've touched by doing what I enjoy and love.

Categories: Drupal

Chocolate Lily: Drupal 8 and distributions part 2: problems and prospects

Planet Drupal - 26 January 2015 - 11:10am

This is part two of a series on configuration management challenges in Durpal 8. Part 1 looked at challenges for small sites and distriubtions.

What is the state of support for distributions in Drupal 8?

Trying to gauge the state of anything in Drupal 8 has its inherent pitfalls. The software itself is still changing rapidly, and efforts in the contributed extensions space have barely begun.

Categories: Drupal

Another Drop in the Drupal Sea: Seeking Pilot members for Udemy Drupal Training course

Planet Drupal - 26 January 2015 - 10:22am

The Kickstarter campaign was not funded, but that does not mean that it was not successful! We are still moving ahead. I've just published my first course on Udemy and would like to get pilot members to provide feedback so that I can make sure the course ends up being world class.

Here is a coupon code to access the course for free: https://www.udemy.com/getting-started-with-drupal-for-total-beginners/?c...

read more

Categories: Drupal

Views Fast Field

New Drupal Modules - 26 January 2015 - 9:12am

This module provides Views fields which display entity fields without entity loading and, optionally, without standard logic of field formatter processing.

By implementing views_fast_field_formatter() hook, custom formatters can be defined for fields having complex data.

Categories: Drupal

MediaFront: Popcorn Player

New Drupal Modules - 26 January 2015 - 8:30am

Mozilla Popcorn player plugin for the MediaFront module... more details to follow.

Categories: Drupal

Views Node Type Default Arg

New Drupal Modules - 26 January 2015 - 6:38am

This module makes it possible to create a block view and filter it by the node type of the current node throught a default argument.

The code for this module was published on Stack Exchange http://drupal.stackexchange.com/questions/11979/contextual-filters-and-n.... Since this is a problem multiple people encounter, it makes sense to have this in a project.

Categories: Drupal

Bootstrap Calendar

New Drupal Modules - 26 January 2015 - 6:11am

A Full view calendar based on Twitter Bootstrap.
Uses the Bootstrap Calendar widged from @serhioromano.
This module requieres bootstrap framework installed, either on a bootstrap theme or just the library.

Categories: Drupal

File Field Icons

New Drupal Modules - 26 January 2015 - 5:05am
Categories: Drupal

Web Omelette: Creating a custom Views filter in Drupal 8

Planet Drupal - 26 January 2015 - 12:05am

In the previous article we've seen how we can interact programatically with Views in Drupal 8 in order to create a custom field in our Views results. Today, we will be looking a bit at how we can create a custom filter you can then add to the View in the UI and influence the results based on that.

The code we write here will be available also in this repository together with the one we explored in the previous tutorial.

Filters in Views have to do with the query being run by Views on the base table. Every filter plugin is responsible with adding various clauses in this query in an attempt to limit the results. Some (probably most) take on configuration parameters so you can specify in the UI how the filtering should be done.

If you remember from the last article, to create our field we extended the FieldPluginBase class. Similarly, for filters, there is a FilterPluginBase class that we can extend to create our own custom filter. Luckily though, Views also provides a bunch of plugins that extend the base one and which we can use or extend to make our lives even easier. For example, there is a BooleanOperator class that provides a lot of the functionality needed for this type of filter. Similarly, there is an InOperator class, a String class, etc. You can find them all inside the views/src/Plugin/views/filter directory of the Views core module.

In this tutorial, we will create 2 custom filters. One will be a very simple one that won't even require creating a new class. The second one will be slightly more complex and for which we will create our own plugin.

The code we write will go in the same module we started in the previous article and that can be found in this repository.

Node type filter

The first filter we will write is very simple. We want to be able to filter our node results by the machine name of the node type. By default, we can use a filter in which we select which node types to be included. Let's say, for the sake of argument, we want a more complex one, such as the one available for a regular text value like the title. The String class will be perfect for this and will provide actually 100% of our needs.

So let's go to our hook_views_data_alter() implementation and add a new filter:

... $data['node_field_data']['node_type_filter'] = array( 'title' => t('Enhanced node type filter'), 'filter' => array( 'title' => t('Enhanced node type filter'), 'help' => t('Provides a custom filter for nodes by their type.'), 'field' => 'type', 'id' => 'string' ), ); ...

Since the table that we are interested in altering the query for is the node_field_data table, that is what we are extending with our new filter. Under the filter key we have some basic info + the id of the plugin used to perform this task. Since our needs are very simple, we can directly use the String plugin without us having to extend it. The most important thing here though is the field key (under filter). This is where we specify that our node_type_filter field (which is obviously a non-existent table column) should be treated as being the type column on the node_field_data table. So, by default, the query alter happens on that column. And this way we don't have to worry about anything else, the String plugin will take care of everything. If we didn't specify that, we would have to extend the plugin and make sure the query happens on the right column.

And that's it. You can clear your cache, create a View with nodes of multiple types and add the Enhanced node type filter to it. In its configuration you'll have many matching options such as equals, contains, does not contain etc you can use. For example, you can use contains and specify the letters art in order to return results whose node type machine names contain these letters.

Node title filter

The second custom filter we build will allow Views UI users to filter the node results by their title from a list of possibilities. In other words, they will have a list of checkboxes which will make it possible to include/exclude various node titles from the result set.

Like before, we need to declare our filter inside the hook_views_data_alter() implementation:

... $data['node_field_data']['nodes_titles'] = array( 'title' => t('Node titles'), 'filter' => array( 'title' => t('Node titles'), 'help' => t('Specify a list of titles a node can have.'), 'field' => 'title', 'id' => 'd8views_node_titles' ), ); ...

Since we are filtering on the title column, we are extending again on the node_field_data table but with the title column as the real field to be used. Additionally, this time we are creating a plugin to handle the filtering identified as d8views_node_titles. Now it follows to create this class:

src/Plugin/views/filter/NodeTitles.php:

<?php /** * @file * Definition of Drupal\d8views\Plugin\views\filter\NodeTitles. */ namespace Drupal\d8views\Plugin\views\filter; use Drupal\views\Plugin\views\display\DisplayPluginBase; use Drupal\views\Plugin\views\filter\InOperator; use Drupal\views\ViewExecutable; /** * Filters by given list of node title options. * * @ingroup views_filter_handlers * * @ViewsFilter("d8views_node_titles") */ class NodeTitles extends InOperator { /** * {@inheritdoc} */ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); $this->valueTitle = t('Allowed node titles'); $this->definition['options callback'] = array($this, 'generateOptions'); } /** * Override the query so that no filtering takes place if the user doesn't * select any options. */ public function query() { if (!empty($this->value)) { parent::query(); } } /** * Skip validation if no options have been chosen so we can use it as a * non-filter. */ public function validate() { if (!empty($this->value)) { parent::validate(); } } /** * Helper function that generates the options. * @return array */ public function generateOptions() { // Array keys are used to compare with the table field values. return array( 'my title' => 'my title', 'another title' => 'another title', ); } }

Since we want our filter to be of a type that allows users to select from a list of options to be included in the results, we are extending from the InOperator plugin. The class is identified with the @ViewsFilter("d8views_node_titles") annotation (the id we specified in the hook_views_data_alter() implementation).

Inside our plugin, we override three methods:

Inside init(), we specify the title of the set of filter options and the callback that generates the values for options. This callback has to be a callable and in this case we opted for the generateOptions() method on this class. The latter just returns an array of options to be presented for the users, the keys of which being used in the query alteration. Alternatively, we could have also directly created the options inside the init() method by filling up the $this->valueOptions property with our available titles. Using a callback is cleaner though as you can perform various logic in there responsible for delivering the necessary node titles.

The point of overriding the query() and validate() methods was to prevent a query and validation from happening in case the user created the filter without selecting any title. This way the filter has no effect on the results rather than returning 0 results. It's a simple preference meant to illustrate how you can override various functionality to tailor your plugins to fit your needs.

And that's it. You can add the Node titles filter and check the box next to the titles you want to allow in the results.

Conclusion

In this article we've looked at how we can create custom filters in Drupal 8 Views. We've seen what are the steps to achieve this and looked at a couple of the existing plugins that are used across the framework which you can use as is or extend from.

The best way to learn how all these work is by studying the code in those plugin classes. You will see there if they are enough for what you want to build or extending them makes sense. In the next article we are going to look at some other Views plugins, so stay tuned.

var switchTo5x = true;stLight.options({"publisher":"dr-8de6c3c4-3462-9715-caaf-ce2c161a50c"});
Categories: Drupal

Media Field Collection

New Drupal Modules - 25 January 2015 - 5:48am

Small tweaks to better integrate the Media and Field Collection modules.

Categories: Drupal

Bundle Resource

New Drupal Modules - 25 January 2015 - 5:43am

Bundle Resource is a simple module that provides separate Services resource entry for each node and taxonomy bundles defined in the system. The module is extendible, so it's easy to provide bundle resources for other entities using hook_bundle_resources().

Categories: Drupal
Syndicate content


Google+
about seo