Drupal

Entity Browser Block

New Drupal Modules - 4 December 2017 - 2:27pm

This module provides a Block Plugin for every Entity Browser on your site.

You can embed multiple entities with this block in different view modes, which can then be rendered anywhere that blocks are normally used (theme regions, Panels, Layout Builder, etc).

Requirements
  1. Entity Browser
  2. Drupal core's block module
Categories: Drupal

Video Embed Aparat

New Drupal Modules - 4 December 2017 - 1:24pm

Drupal video_embed_field integration with Aparat.com.

This module provides Aparat handler for Video Embed Field.
Users can add easily Aparat videos to their site by pasting the video's URL into a video embed field.
In the settings users can set width and height.
This module also can get thumbnail image from Aparat website for using it as a teaser image.

Categories: Drupal

Ubercart Authorize.Net Accept.js

New Drupal Modules - 4 December 2017 - 11:03am

This module provides support for Ubercart credit card payments through the Authorize.Net Accept.js payment gateway.

Accept.js is compliant with PCI DSS SAQ A as no credit card information is entered on the site. It uses a modal window with an Authorize.net hosted iFrame to collect payment information, then returns a one time use token to the site to capture the payment.

Categories: Drupal

We have 10 days to save net neutrality

Dries Buytaert - 4 December 2017 - 10:51am

Last month, the Chairman of the Federal Communications Commission, Ajit Pai, released a draft order that would soften net neutrality regulations. He wants to overturn the restrictions that make paid prioritization, blocking or throttling of traffic unlawful. If approved, this order could drastically alter the way that people experience and access the web. Without net neutrality, Internet Service Providers could determine what sites you can or cannot see.

The proposed draft order is disheartening. Millions of Americans are trying to save net neutrality; the FCC has received over 5 million emails, 750,000 phone calls, and 2 million comments. Unfortunately this public outpouring has not altered the FCC's commitment to dismantling net neutrality.

The commission will vote on the order on December 14th. We have 10 days to save net neutrality.

Although I have written about net neutrality before, I want to explain the consequences and urgency of the FCC's upcoming vote.

What does Pai's draft order say?

Chairman Pai has long been an advocate for "light touch" net neutrality regulations, and claims that repealing net neutrality will allow "the federal government to stop micromanaging the Internet".

Specifically, Pai aims to scrap the protection that classifies ISPs as common carriers under Title II of the Communications Act of 1934. Radio and phone services are also protected under Title II, which prevents companies from charging unreasonable rates or restricting access to services that are critical to society. Pai wants to treat the internet differently, and proposes that the FCC should simply require ISPs "to be transparent about their practices". The responsibility of policing ISPs would also be transferred to the Federal Trade Commission. Instead of maintaining the FCC's clear-cut and rule-based approach, the FTC would practice case-by-case regulation. This shift could be problematic as a case-by-case approach could make the FTC a weak consumer watchdog.

The consequences of softening net neutrality regulations

At the end of the day, frail net neutrality regulations mean that ISPs are free to determine how users access websites, applications and other digital content.

It is clear that depending on ISPs to be "transparent" will not protect against implementing fast and slow lanes. Rolling back net neutrality regulations means that ISPs could charge website owners to make their website faster than others. This threatens the very idea of the open web, which guarantees an unfettered and decentralized platform to share and access information. Gravitating away from the open web could create inequity in how communities share and express ideas online, which would ultimately intensify the digital divide. This could also hurt startups as they now have to raise money to pay for ISP fees or fear being relegated to the "slow lane".

The way I see it, implementing "fast lanes" could alter the technological, economic and societal impact of the internet we know today. Unfortunately it seems that the chairman is prioritizing the interests of ISPs over the needs of consumers.

What can you can do today

Chairman Pai's draft order could dictate the future of the internet for years to come. In the end, net neutrality affects how people, including you and me, experience the web. I've dedicated both my spare time and my professional career to the open web because I believe the web has the power to change lives, educate people, create new economies, disrupt business models and make the world smaller in the best of ways. Keeping the web open means that these opportunities can be available to everyone.

If you're concerned about the future of net neutrality, please take action. Share your comments with the U.S. Congress and contact your representatives. Speak up about your concerns with your friends and colleagues. Organizations like The Battle for the Net help you contact your representatives — it only takes a minute!

Now is the time to stand up for net neutrality: we have 10 days and need everyone's help.

Categories: Drupal

Dries Buytaert: We have 10 days to save net neutrality

Planet Drupal - 4 December 2017 - 10:51am

Last month, the Chairman of the Federal Communications Commission, Ajit Pai, released a draft order that would soften net neutrality regulations. He wants to overturn the restrictions that make paid prioritization, blocking or throttling of traffic unlawful. If approved, this order could drastically alter the way that people experience and access the web. Without net neutrality, Internet Service Providers could determine what sites you can or cannot see.

The proposed draft order is disheartening. Millions of Americans are trying to save net neutrality; the FCC has received over 5 million emails, 750,000 phone calls, and 2 million comments. Unfortunately this public outpouring has not altered the FCC's commitment to dismantling net neutrality.

The commission will vote on the order on December 14th. We have 10 days to save net neutrality.

Although I have written about net neutrality before, I want to explain the consequences and urgency of the FCC's upcoming vote.

What does Pai's draft order say?

Chairman Pai has long been an advocate for "light touch" net neutrality regulations, and claims that repealing net neutrality will allow "the federal government to stop micromanaging the Internet".

Specifically, Pai aims to scrap the protection that classifies ISPs as common carriers under Title II of the Communications Act of 1934. Radio and phone services are also protected under Title II, which prevents companies from charging unreasonable rates or restricting access to services that are critical to society. Pai wants to treat the internet differently, and proposes that the FCC should simply require ISPs "to be transparent about their practices". The responsibility of policing ISPs would also be transferred to the Federal Trade Commission. Instead of maintaining the FCC's clear-cut and rule-based approach, the FTC would practice case-by-case regulation. This shift could be problematic as a case-by-case approach could make the FTC a weak consumer watchdog.

The consequences of softening net neutrality regulations

At the end of the day, frail net neutrality regulations mean that ISPs are free to determine how users access websites, applications and other digital content.

It is clear that depending on ISPs to be "transparent" will not protect against implementing fast and slow lanes. Rolling back net neutrality regulations means that ISPs could charge website owners to make their website faster than others. This threatens the very idea of the open web, which guarantees an unfettered and decentralized platform to share and access information. Gravitating away from the open web could create inequity in how communities share and express ideas online, which would ultimately intensify the digital divide. This could also hurt startups as they now have to raise money to pay for ISP fees or fear being relegated to the "slow lane".

The way I see it, implementing "fast lanes" could alter the technological, economic and societal impact of the internet we know today. Unfortunately it seems that the chairman is prioritizing the interests of ISPs over the needs of consumers.

What can you can do today

Chairman Pai's draft order could dictate the future of the internet for years to come. In the end, net neutrality affects how people, including you and me, experience the web. I've dedicated both my spare time and my professional career to the open web because I believe the web has the power to change lives, educate people, create new economies, disrupt business models and make the world smaller in the best of ways. Keeping the web open means that these opportunities can be available to everyone.

If you're concerned about the future of net neutrality, please take action. Share your comments with the U.S. Congress and contact your representatives. Speak up about your concerns with your friends and colleagues. Organizations like The Battle for the Net help you contact your representatives — it only takes a minute!

Now is the time to stand up for net neutrality: we have 10 days and need everyone's help.

Categories: Drupal

YouTube Push

New Drupal Modules - 4 December 2017 - 10:32am

Upload videos to YouTube and save the result using Video Embed Field.

All development and issue tracking occurs on the GitHub repository.

Categories: Drupal

google autopost

New Drupal Modules - 4 December 2017 - 9:26am
Categories: Drupal

Acquia Lightning Blog: Migrating to Content Moderation with Lightning

Planet Drupal - 4 December 2017 - 8:38am
Migrating to Content Moderation with Lightning Adam Balsam Mon, 12/04/2017 - 11:38

NOTE: This blog post is about a future release of Lightning. Lightning 2.2.4, with the migration path to Content Moderation, will be released Wednesday, December 6th.

The second of two major migrations this quarter is complete! Lightning 2.2.4 will migrate you off of Workbench Moderation and onto Core Workflows and Content Moderation. (See our blog post about Core Media, our first major migration.)

The migration was a three-headed beast:

  1. The actual migration which included migrating states and transitions into Workflows and migrating the states of individual entities into Content Moderation.
  2. Making sure other Lightning Workflow features continued to work with Content Moderation, including the ability to scheduled state transitions for content.
  3. Feature parity between Workbench Moderation and Content Moderation.
Tryclyde - the three-headed CM migration beastThe actual migration

Content Moderation was not a direct port of Workbench Moderation. It introduced the concept of Workflows which abstracts states and transitions from Content Moderation. As a result, the states and transitions that users had defined in WBM might not easily map to Workflows - especially if different content types have different states available.

To work around this, the migrator generates a hash of all available states per content type; then groups content types with identical hashes into Workflows. As an example, a site with the following content types and states would result in three Workflows as indicated by color:

WMB states/transition mapping to Workflows

The second half of the migration was making sure all existing content retained the correct state. Early prototypes used the batch API to process states, but this quickly because unscalable. In the end, we used the Migrate module to:

  1. Store the states of all entities and then remove them from the entities themselves.
  2. Uninstall Workbench Moderation and install Workflows + Content Moderation.
  3. Map the stored states back to their original entities as Content Moderation fields.

Note: This section of Lightning migration was made available as the contrib module WBM2CM. The rest of the migration is Lightning-specific.

Other Lightning Workflow features

Lightning Workflow does more than just provide states. Among other things, it also allows users to schedule state transitions. We have used the Scheduled Updates module for this since its introduction. Unfortunately, Scheduled Updates won't work with the computed field that is provided by Content Moderation. As a result, we ended up building a scheduler into Lightning Workflow itself.

Scheduled Updates is still appropriate and recommended for more complex scheduling - like for body fields or taxonomy term names. But for the basic content state transitions (i.e., publish this on datetime) you can use native Lightning Workflow.

As an added bonus, we sidestep a nasty translation bug (feature request?) that has been giving us problems with Scheduled Updates.

Feature parity

While Workflows is marked as stable in Core, Content Moderation is still in beta. This is partially because it's still missing some key features and integrations that Lightning uses. Specifically, Lightning has brought in patches and additional code so that we can have basic integration between Content Moderation ↔ Views and Content Moderation ↔ Quick Edit.

Want to try it out?

Assuming a standard Composer setup, you can update to the latest Lightning with the following. The migration is included in Lightning 2.2.4 and above:

$ composer update acquia/lightning --with-dependencies

Once you have updated your code, you can have Lightning automatically apply all pending updates, including the Content Moderation migration with the following (recommended):

$ /path/to/console/drupal update:lightning --no-interaction

Or you can just enable the WBM2CM module manually and trigger the migration with:

$ drush wbm2cm-migrate

 

Categories: Drupal

Flysystem - Google Cloud Storage

New Drupal Modules - 4 December 2017 - 8:04am
Categories: Drupal

Mediacurrent: Annotate to Communicate

Planet Drupal - 4 December 2017 - 7:34am

Someone once said, “if you have to explain the joke, it takes the fun out of it.” Well, the same can be said for designing a website. Explaining the important and sometimes technical details can be a tedious process many designers would avoid if possible. But when it comes to communicating the form and function of the user experience through wireframes, explaining each element can make or break the project. It’s always a good idea to include annotations.
 

Categories: Drupal

LakeDrops Drupal Consulting, Development and Hosting: Welcome Matthias

Planet Drupal - 4 December 2017 - 6:50am
Welcome Matthias Jürgen Haas Mon, 12/04/2017 - 15:50

We are so glad to announce that Matthias Walti decided to join LakeDrops. He brings skills and experience in building e-commerce solutions, is a user experience expert and is well known for writing great content which is driven by his marketing background.

Categories: Drupal

Agaric Collective: Change the text field maximum length in Drupal 8

Planet Drupal - 4 December 2017 - 4:39am

Once a text field has data stored, it is not very easy or obvious how to change its maximum length. In the UI there is a message warning you that the field cannot be changed, because there is existing data. Sometimes it is necessary to change these values. It seems that there are a few ways and some resources to do this in Drupal 7, but I could not find a way to do this in Drupal 8. I decided to create a small function to do it:

Caution: Any change in the database needs to be done carefully. Before you continue please create a backup of your database.

/** * Update the length of a text field which already contains data. * * @param string $entity_type_id * @param string $field_name * @param integer $new_length */ function _module_change_text_field_max_length ($entity_type_id, $field_name, $new_length) { $name = 'field.storage.' . $entity_type_id . "." . $field_name; // Get the current settings $result = \Drupal::database()->query( 'SELECT data FROM {config} WHERE name = :name', [':name' => $name] )->fetchField(); $data = unserialize($result); $data['settings']['max_length'] = $new_length; // Write settings back to the database. \Drupal::database()->update('config') ->fields(array( 'data' => serialize($data))) ->condition('name', $name) ->execute(); // Update the value column in both the _data and _revision tables for the field $table = $entity_type_id . "__" . $field_name; $table_revision = $entity_type_id . "_revision__" . $field_name; $new_field = ['type' => 'varchar', 'length' => $new_length]; $col_name = $field_name . '_value'; \Drupal::database()->schema()->changeField($table, $col_name, $col_name, $new_field); \Drupal::database()->schema()->changeField($table_revision, $col_name, $col_name, $new_field); // Flush the caches. drupal_flush_all_caches(); }

This method needs the name of the entity, the name of the field, and the name and the new length.

And we can use it like this:

_module_change_text_field_max_length('node', 'field_text', 280);

Usually, this code should be placed in (or called from) a hook_update so it will be executed automatically in the update.

And if the new length is too long to be placed in a regular input area, you can use the Textarea widget for text fields which will allow you to use the larger text area form element for text fields.

Categories: Drupal

Commerce stepped proportional pro-rata

New Drupal Modules - 4 December 2017 - 3:38am

This module provides a pro-rata plugin for Commerce Recurring which allows
proportional pro-rata prices at specific intervals in the billing period.

For example, with a billing period of 1 year, and 4 steps, a price of 100 would
be charged at:

  • 0-3 months: 25
  • 3-6 months: 50
  • 6-9 months: 75
  • 9-12 months: 100
Categories: Drupal

Token UUID

New Drupal Modules - 4 December 2017 - 2:55am
Categories: Drupal

Amazee Labs: GraphQL for Drupalers - the fields

Planet Drupal - 4 December 2017 - 2:20am
GraphQL for Drupalers - the fields

GraphQL is becoming more and more popular every day. Now that we have a beta release of the GraphQL module (mainly sponsored and developed by Amazee Labs) it's easy to turn Drupal into a first-class GraphQL server. In this series, we'll try to provide an overview of its features and see how they translate to Drupal.

Blazej Owczarczyk Mon, 12/04/2017 - 11:20

In the last post we covered the basic building blocks of GraphQL queries. We started with the naming conventions, then we took a look at how and when to use fragments. Finally, we moved on to aliases, which can be used to change names of the fields as well as to use the same field more than once in the same block. This week we'll delve into the ambiguous concept of Fields.

What exactly are GraphQL fields?

Fields are the most important of any GraphQL query. In the following query nodeById, title, entityOwner, and name are all fields.

Types

Each GraphQL field needs to have a type that is stored in the schema. This means that it has to be known up front and cannot be dynamic. At the highest level, there are two types of values a field can return: a scalar and an object.

Scalars

Scalar fields are leafs of any GraphQL query. They have no subfields and they return a concrete value, title and name in the above query are scalars. There are a few core scalar types in GraphQL, e.g.:

  • ​String: A UTF‐8 character sequence.
  • Int: A signed 32‐bit integer.
  • Float: A signed double-precision floating-point value.
  • Boolean: true or false.

If you're interested in how Drupal typed data is mapped to GraphQL scalars check out the the graphql_core.type_map service parameter and graphql_core.type_mapper service.

Complex types

Objects, like nodeById and entityOwner in the query above, are collections of fields. Each field that is not a scalar has to have at least one sub-field specified. The list of available sub-fields is defined by the object's type. If we paste the query above into graphiQL (/graphql/explorer), we'll see that the entityOwner field is of type User and name is one of User's subfields (of type String).

Arguments

Fields can also have arguments. Each argument has a name and a type. In the example above nodeById field takes two arguments: id (String) and langcode. The same field can be requested more than once with a different set of arguments by using aliases, as we've seen in the last post.

How do Drupal fields become GraphQL fields?

One of the great new traits of Drupal 8 core is the typed data system. In fact, this is the feature that makes it possible for GraphQL to expose Drupal structures in a generic way. For the sake of improving the developer experience, especially the experience of the developers of decoupled frontends, Drupal fields have been divided into two groups.

Multi-property fields

The first group comprises all the field types that have more than one property. These fields are objects with all their properties as sub-fields.

This is how we'd retrieve values of a formatted text field (body) and a link field. Date fields and entity references also fall into this category. The latter have some unique features so let's check them out.

Entity reference fields

This type of field has 2 properties: the scalar target_id and the computed entity. This special property inherits its type from the entity that the field is pointing to. Actually, we've already seen that in the named fragments example in the last post, where fieldTags and fieldCategory were both term reference fields. Let's bring a simplified example.

Since fieldCategory links to terms, its entity property is of type TaxonomyTerm. We can go further.

The entityOwner property is of type User, so we get their email. Apparently, we can go as deep as the entity graph is. The following query is perfectly valid too.

It retrieves the title of an article that is related to the article that is related to the article with node id one and this is where GraphQL really shines. The query is relatively simple to read, it returns a simple-to-parse response and does it all in one request. Isn't it just beautiful? :)

Single-property fields

The second group comprises all the field types that have exactly one property (usually called value), like core plain text fields, email, phone, booleans and numbers. There's been a discussion about whether such fields should be rolled up to scalars or remain single-property objects. The former option won and in 3.x members of this group have no sub-fields.

That's it for the fields. Next week we're going to talk about... fields again :) but this time we'll see how to create one.

 
Categories: Drupal

ADCI Solutions: How we built the Symfony CRM for Oxford Business Group

Planet Drupal - 3 December 2017 - 10:35pm

As you know, now the Symfony components are in Drupal Core, and this encourages our team to get to know this framework better. In this article, we will tell you how a CRM system on Symfony may look like, what goals it reaches, and what features includes. This article is written on the base of our real project for Oxford Business Group - a global publisher and consultancy that has offices all around the globe.

 

Learn about the Symfony CRM

 

 

 

 

Categories: Drupal

Field UI Extras

New Drupal Modules - 3 December 2017 - 8:19pm

This module provides additional information on Field UI screens (e.g., Manage Fields). The main goal of the project is to reduce the number of clicks it takes to get information about the fields on your site. After installing you will immediately notice the enhancements.

Extras Include:

Categories: Drupal

Pilot

New Drupal Modules - 3 December 2017 - 6:46pm
Categories: Drupal

Hook 42: November Accessibility (A11Y) Talks

Planet Drupal - 3 December 2017 - 4:57pm

This month we did something a little bit different with the meet-up format. Instead of one person presenting a slide deck, we had a panel discussion on all things accessibility with four accessibility experts - Eric Bailey, Helena McCabe, Scott O'Hara, and Scott Vinkle!

There were some questions lined up to keep the conversation going, but we ended up having some amazing on-the-fly questions from the audience, so it was a bit more spontaneous and a lot of fun!

Categories: Drupal

Agiledrop.com Blog: AGILEDROP: In the beginning, Drupal had an ambition

Planet Drupal - 3 December 2017 - 4:41pm
Since Dries' keynote at the DrupalCon in Vienna how Drupal is for ambitious digital experiences, it became somehow more obvious how does its founder see the future. And what the agencies should focus on in a more than ever competing world of content management systems. Although we have to admit that some of the agencies already embraced the idea of building their businesses on delivering such digital experiences.  So what does differentiate ambitious digital experiences from, let's say, websites? Or "just plain" digital experiences? And what qualities an ambitious digital experience has? It… READ MORE
Categories: Drupal

Pages

Subscribe to As If Productions aggregator - Drupal