Into my Galaxy: GSoC’ 16: Port Search Configuration module; coding week #4

Planet Drupal - Tue, 2016/06/21 - 1:45pm

 

Google Summer of Code (GSoC), has entered into the mid-Term evaluation stage. This is a 1 week period from 21- 27 June, were students and mentors present the progress of their projects. Based on the reports submitted, students are made pass/ fail.

I have been working on porting Search Configuration to Drupal 8 in the past few weeks. If you would like to have a quick glimpse of my past activities on this port process, please go through these posts.

last week, I could learn some Drupal concepts which were really helpful for my project. In the previous versions of Drupal, the role permissions were stored in a role_permissions table in the Database. But now, in Drupal 8, the role permissions are directly stored in the role configuration entity.

So, as described above, in D7 and its preceding versions, role permissions were stored in a role_permissions database which had the role Id and the corresponding permissions. The permissions distributed to a role was retrieved in D7 using:

$permissions = role->getPermissions();

But, in D8, this is done by the

$permissions = role->getPermissions();

Another instance is that, to grant certain permissions to roles.

In D7 it was controlled by,

user_role_grant_permissions($rid, array(‘ access content’));

The role configuration entity remodels this functionality in D8 to:

$role->grantPermission(‘ access content’);

In connection with the term permissions, the most important aspect in Drupal is a hook: hook_permissions(). This hook, obviously as you might have guessed, distributes the permissions to various users; decides whether a particular user should be allowed to access a page or a content, granting and restricting the access.

This hook has been replaced in Drupal 8 by a module.permissions.yml file. This file contains the permissions and its specifications. We can write a driver function in a php file to add the dynamic permissions. This can be achieved by making a driver class in the php file and adding the behaviour of the permission we need in the member functions of the class. We also have to link this PHP file with our yml file to keep it active. This is done by adding a callback function in the yml file which references this php file.

To display special characters in a plain text string for display as HTML format, Drupal earlier versions used the function check_plain.  This had the general syntax:

check_plain($text); // where $text was the string to be processed.

This function has got deprecated in Drupal 8. This has been replaced by the \Drupal\Compoent\Utility\Html::escape($text).

 


Categories:

Miloš Bovan: Detecting a footer of an email

Planet Drupal - Tue, 2016/06/21 - 1:22pm
Detecting a footer of an email

This is the 5th blog post of the Google Summer of Code 2016 project - Mailhandler.

Implementing authentication and authorization for a mail sender provided an additional layer of security for Mailhandler project. The module was extended to support both PGP signed and unsigned messages.

The goal for the last week was to create a mail Footer analyzer and to add support for node (content) type detection via mail subject. The pull request has been created and it is in the review status. This analyzer has a purpose of stripping the message footer/signature from the message body. As of now, 2 types of signature/footer separators are supported:

  • -- \n as the separator line between the body and the signature of a message recommended by RFC 3676
  • On {day}, {month} {date}, {year} at {hour}:{minute} {AM|PM} pattern which is trickier and currently used by Gmail to separate replied message from the response.

First of all, we had to create inmail.analyzer.footer config entity and the corresponding analyzer plugin - FooterAnalyzer. Since footer, subject and content type properties are relevant for all types of mail messages supported by Mailhandler, these properties were put in MailhandlerAnalyzerResultBase class.

FooterAnalyzer currently depends on the analyzed result provided by MailhandlerAnalyzer. The reason why one plugin depends on another is to support PGP signed messages. MailhandlerAnalyzer will try to analyze the message body of signed (and unsigned) messages and extract the actual mail body. Next, FooterAnalyzer will parse the processed body stored in MailhandlerAnalyzerResult. As mentioned above, the footer analyzer currently supports footers separated by -- \n and On {day}, {month} {date}, {year} at {hour}:{minute} {AM|PM} lines. The content after these lines is put into the footer property of the analyzer result. In case the body message has one of the supported separators, detected footer is stripped out from the actual message body.

Furthermore, the content type detection via message subject has been implemented. As we are going to support creating comments via email in the following weeks, we had to create a “protocol” that will allow us to differentiate between nodes and comments. We agreed to add [{entity_type}][{bundle}] before the actual message subject. For now, only node entity type and its bundle (content/node type) are parsed and extracted. All the assertions of the analyzed message are happening in the handler plugin (MailhandlerNode). The handler plugin will check if the configured content type is set to “Detect” mode and if so, it will get the parsed content type and create an entity of the parsed node type.

This week, students and their mentors are requested to submit mid-term evaluations. The evaluation represents a sum of the project after 5 weeks of the work. By finishing FooterAnalyzer, Mailhandler is now capable of processing signed (and unsigned) emails, extracting the actual body and creating a node of the detected node type for an authorized user.

The plan for the next week is to extend the project with validation support. We will use entity (node) validation and extend content type to bundle validation too. Also, I will work on splitting the Mailhandler analyzer to the smaller analyzers and adapting the handler to the changes.

 

 

Milos Tue, 06/21/2016 - 13:22 Tags Drupal Open source Google Summer of Code Drupal Planet Add new comment
Categories:

TheodorosPloumis blog: DrupalCamp Greece is 3B!

Planet Drupal - Tue, 2016/06/21 - 1:19pm

DrupalCamp Greece is "3B". Back, Bigger, Better!

The Greek community orginizes the 3rd (or 4th I can't remember) Drupal Camp Athens, 1 - 3 July 2016.

3 days with our "true one love" Drupal with social events straight in the heart of Athens and so many interesting sessions for Drupal and the new ecosystem around it (yes we are out of the island now and so are our DrupalCamps :-)

Schedule is ready.

MortenDK is going to open the event with a special keynote and a session about - what else - "DrupalTwig". There will be several sessions about Drupal 8.x Plugin system, migration, CKEditor, frontend, backend, REST API, content strategy, Aegir, security and my - temporary - favourite topic: Docker!

Oh, I forgot to mention the workshops. An introduction to Drupal 8.x and a special workshop about 8.x Commerce Kickstart. There will also be a sprint.

Are you a Drupal <whatever> traveling to Greece, why not join us? You can still get your ticket.

drupal-camp.gr

And don’t forget to register for news and updates about the event.

Hope to see you around.

(PS. I am not representing the organizers or the Greek Drupal community and this post contains my own opinion)

Categories:

Drop Guard: Live webinar recording: Build your recurring revenue machine

Planet Drupal - Tue, 2016/06/21 - 10:00am
Were you too busy to join our live webinar on 06/20? No problem, we present you the whole story right here: Enjoy 30 minutes about how to
  • sell support contracts with value to your clients
  • automate update processes to save developer time
  • establish a support process with existing resources
  • maximise data security for clients as added value support
Drupal Drupal Planet Business
Categories:

TimOnWeb.com: Default Search API Sorts Per View in Drupal 7

Planet Drupal - Tue, 2016/06/21 - 4:46am

It's been a while since I've written a post here (especially, Drupal-related). But today I have something interesting to share.

There's a module called Search API sorts (https://drupal.org/project/search_api_sorts) that provides custom sorts and a global sort block for Search API. The module itself is ok, but ...

Read now

Categories:

GVSO Blog: [GSoC 2016: Social API] Week 4: First widget!

Planet Drupal - Mon, 2016/06/20 - 11:14pm
[GSoC 2016: Social API] Week 4: First widget!

The Social API project is divided into four different modules. One of them is Social Widgets (social_widgets), which covers widgets (sometimes called plugins but for the Social API plugins refers to something else) such as buttons (like, tweet, share, etc.), embedded content (post, videos, tweets, etc.), among other things.

So since my last entry about the progress done with the Social API project, I have been working on adapting the functionality of Facebook Like Button (fblikebutton) to work with the Social API and Social Widgets.

The initial point was to declare a module called Facebook Buttons (facebook_buttons) as a integration of Social Widgets, so the module will be listed in the configuration environment of the Social API. To declare a module as a integration of Social Widgets, a Network Plugin must be declared similar to the following.

Social Widgets Integration List gvso Mon, 06/20/2016 - 17:14 Tags Drupal Drupal Planet GSoC 2016
Categories:

Jeff Geerling's Blog: DrupalCamp St. Louis 2016 - Call for Sessions!

Planet Drupal - Mon, 2016/06/20 - 9:33pm

DrupalCamp St. Louis 2016 will be held on September 10-11 in St. Louis, MO, on the campus of the University of Missouri, St. Louis, and we're excited to announce that session submissions are open!

We'd love to hear people speak about Drupal business, case studies, coding, community, DevOps, front end, PHP, project management, security, or any other Drupal topic. If you're interested in speaking, please submit a session for consideration, and we'll announce the selected sessions before August 1st.

Categories:

Mediacurrent: How to Fix a Testbot Bug When Adding New Tests

Planet Drupal - Mon, 2016/06/20 - 8:16pm
How to fix a testbot bug when adding new tests
Categories:

DrupalCon News: Let's be human at DrupalCon

Planet Drupal - Mon, 2016/06/20 - 6:07pm

Being human comes with a broad spectrum of emotions and experiences. Amongst the hustle and bustle of life, we often forget that we are only human.

The Being Human track stands proud amongst all of the other techie tracks at DrupalCon. We put the software and tools aside to put the spotlight on the human beings who are behind it all.

Here are the main topics that we invite you to speak about.

Categories:

Daniel Pocock: WebRTC and communications projects in GSoC 2016

Planet Drupal - Mon, 2016/06/20 - 5:02pm

This year a significant number of students are working on RTC-related projects as part of Google Summer of Code, under the umbrella of the Debian Project. You may have already encountered some of them blogging on Planet or participating in mailing lists and IRC.

WebRTC plugins for popular CMS and web frameworks

There are already a range of pseudo-WebRTC plugins available for CMS and blogging platforms like WordPress, unfortunately, many of them are either not releasing all their source code, locking users into their own servers or requiring the users to download potentially untrustworthy browser plugins (also without any source code) to use them.

Mesut is making plugins for genuinely free WebRTC with open standards like SIP. He has recently created the WPCall plugin for WordPress, based on the highly successful DruCall plugin for WebRTC in Drupal.

Keerthana has started creating a similar plugin for MediaWiki.

What is great about these plugins is that they don't require any browser plugins and they work with any server-side SIP infrastructure that you choose. Whether you are routing calls into a call center or simply using them on a personal blog, they are quick and convenient to install. Hopefully they will be made available as packages, like the DruCall packages for Debian and Ubuntu, enabling even faster installation with all dependencies.

Would you like to try running these plugins yourself and provide feedback to the students? Would you like to help deploy them for online communities using Drupal, WordPress or MediaWiki to power their web sites? Please come and discuss them with us in the Free-RTC mailing list.

You can read more about how to run your own SIP proxy for WebRTC in the RTC Quick Start Guide.

Finding all the phone numbers and ham radio callsigns in old emails

Do you have phone numbers and other contact details such as ham radio callsigns in old emails? Would you like a quick way to data-mine your inbox to find them and help migrate them to your address book?

Jaminy is working on Python scripts to do just that. Her project takes some inspiration from the Telify plugin for Firefox, which detects phone numbers in web pages and converts them to hyperlinks for click-to-dial. The popular libphonenumber from Google, used to format numbers on Android phones, is being used to help normalize any numbers found. If you would like to test the code against your own mailbox and address book, please make contact in the #debian-data channel on IRC.

A truly peer-to-peer alternative to SIP, XMPP and WebRTC

The team at Savoir Faire Linux has been busy building the Ring softphone, a truly peer-to-peer solution based on the OpenDHT distribution hash table technology.

Several students (Simon, Olivier, Nicolas and Alok) are actively collaborating on this project, some of them have been fortunate enough to participate at SFL's offices in Montreal, Canada. These GSoC projects have also provided a great opportunity to raise Debian's profile in Montreal ahead of DebConf17 next year.

Linux Desktop Telepathy framework and reSIProcate

Another group of students, Mateus, Udit and Balram have been busy working on C++ projects involving the Telepathy framework and the reSIProcate SIP stack. Telepathy is the framework behind popular softphones such as GNOME Empathy that are installed by default on the GNU/Linux desktop.

I previously wrote about starting a new SIP-based connection manager for Telepathy based on reSIProcate. Using reSIProcate means more comprehensive support for all the features of SIP, better NAT traversal, IPv6 support, NAPTR support and TLS support. The combined impact of all these features is much greater connectivity and much greater convenience.

The students are extending that work, completing the buddy list functionality, improving error handling and looking at interaction with XMPP.

Streamlining provisioning of SIP accounts

Currently there is some manual effort for each user to take the SIP account settings from their Internet Telephony Service Provider (ITSP) and transpose these into the account settings required by their softphone.

Pranav has been working to close that gap, creating a JAR that can be embedded in Java softphones such as Jitsi, Lumicall and CSipSimple to automate as much of the provisioning process as possible. ITSPs are encouraged to test this client against their services and will be able to add details specific to their service through Github pull requests.

The project also hopes to provide streamlined provisioning mechanisms for privately operated SIP PBXes, such as the Asterisk and FreeSWITCH servers used in small businesses.

Improving SIP support in Apache Camel and the Jitsi softphone

Apache Camel's SIP component and the widely known Jitsi softphone both use the JAIN SIP library for Java.

Nik has been looking at issues faced by SIP users in both projects, adding support for the MESSAGE method in camel-sip and looking at why users sometimes see multiple password prompts for SIP accounts in Jitsi.

If you are trying either of these projects, you are very welcome to come and discuss them on the mailing lists, Camel users and Jitsi users.

GSoC students at DebConf16 and DebConf17 and other events

Many of us have been lucky to meet GSoC students attending DebConf, FOSDEM and other events in the past. From this year, Google now expects the students to complete GSoC before they become eligible for any travel assistance. Some of the students will still be at DebConf16 next month, assisted by the regular travel budget and the diversity funding initiative. Nik and Mesut were already able to travel to Vienna for the recent MiniDebConf / LinuxWochen.at

As mentioned earlier, several of the students and the mentors at Savoir Faire Linux are based in Montreal, Canada, the destination for DebConf17 next year and it is great to see the momentum already building for an event that promises to be very big.

Explore the world of Free Real-Time Communications (RTC)

If you are interesting in knowing more about the Free RTC topic, you may find the following resources helpful:

RTC mentoring team 2016

We have been very fortunate to build a large team of mentors around the RTC-themed projects for 2016. Many of them are first time GSoC mentors and/or new to the Debian community. Some have successfully completed GSoC as students in the past. Each of them brings unique experience and leadership in their domain.

Helping GSoC projects in 2016 and beyond

Not everybody wants to commit to being a dedicated mentor for a GSoC student. In fact, there are many ways to help without being a mentor and many benefits of doing so.

Simply looking out for potential applicants for future rounds of GSoC and referring them to the debian-outreach mailing list or an existing mentor helps ensure we can identify talented students early and design projects around their capabilities and interests.

Testing the projects on an ad-hoc basis, greeting the students at DebConf and reading over the student wikis to find out where they are and introduce them to other developers in their area are all possible ways to help the projects succeed and foster long term engagement.

Google gives Debian a USD $500 grant for each student who completes a project successfully this year. If all 2016 students pass, that is over $10,000 to support Debian's mission.

Categories:

Drupalize.Me: Learn Views in Drupal 8

Planet Drupal - Mon, 2016/06/20 - 4:44pm

One of the big changes in Drupal 8 is that Views, the most popular contributed module in Drupal 7, is now included as part of core. Learning Views is a key component of learning to build Drupal sites. Aside from having this tool built in core now, the beauty of this new feature is that it is almost identical to Views in Drupal 7. You can get started site-building with Views in Drupal 8 without waiting for any fancy version-specific instructions.

Categories:

Mediacurrent: Dropcast: Episode 21- Finally Oscar Menjivar

Planet Drupal - Mon, 2016/06/20 - 4:00pm

This episode we celebrate our fine podcast finally coming of drinking age and finally get our act together to welcome Oscar Menjivar back, again, for a third time, to talk about his project Exploring Tech which helps youths in south central LA learn how to develop technology. As always we have the latest Drupal news, Bob talks about the most recent Mediacurrent blog posts and Ryan rings us home with the final bell.

Categories:

Liip: Let’s debug in Drupal 8 !

Planet Drupal - Mon, 2016/06/20 - 9:01am

It has been nearly 7 months since Drupal 8 first release and as a developer, I am still in the learning process. It can be hard sometimes to know what is going wrong with your code and how to solve it. I will tell you about few things to know on how to develop and debug Drupal 8 projects and continue learning, learning and learning !

Disabling cache

First of all, to avoid having a crazy terminal with thousands of drupal cr hits, you can disable Drupal caching during development. You need to copy and rename sites/example.settings.local.php file to sites/default/settings.local.php. Then uncomment/update some values:

  • uncomment this line to enable the “null cache service”:
    $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
  • uncomment these lines to disable CSS/JS aggregation:
    $config['system.performance']['css']['preprocess'] = FALSE; $config['system.performance']['js']['preprocess'] = FALSE;
  • uncomment these lines to disable the render cache and the dynamic page cache:
    $settings['cache']['bins']['render'] = 'cache.backend.null'; $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
  • you can allow test modules and themes to be installed if needed with:
    $settings['extension_discovery_scan_tests'] = TRUE;

To include this file as part of Drupal’s settings file, open sites/default/settings.php file and uncomment these lines:

if (file_exists(__DIR__ . '/settings.local.php')) { include __DIR__ . '/settings.local.php'; }

Then, to disable Twig caching, open sites/development.services.yml file and add the following settings:

parameters: twig.config: debug: true auto_reload: true cache: false

Finally, rebuild the Drupal cache and it is done !

Displaying errors

As in Drupal 7, you can set different levels of errors display (by visiting this page: /admin/config/development/logging in the administration interface):

  • None
  • Errors and warnings
  • All

In Drupal 8, there is a fourth level called “All messages, with backtrace information”. This is native to Drupal core and it allows to display the error backtrace in the message area.

You can also adjust the level of errors in your local setting file:

$config['system.logging']['error_level'] = 'verbose';

Creating log messages

Developers from Drupal 7 know the Database Logging module that allows to log messages in the database using the famous watchdog() function.
Well, this module still exists in Drupal 8 but the function has a replacement : the Drupal 8 logger class.
It looks like this:

// Logs an error \Drupal::logger('my_module')->error($message);

Let’s have a look at the different parts of the code:

  • \Drupal::logger(‘my_module’) is the helper method that quickly creates a copy of the logger service. As a parameter, it takes the module name from where we log the information;
  • ->error: this is the severity-level method (it can be debug, info, notice, warning, error, critical, alert, emergency);
  • $message is the log message. It can be a simple string or it can contain some placeholders. In this case, you can pass the associative array (placeholders as keys) as a second parameter.

All the messages created with the logger service can be viewed in the reports page of the administration interface in /admin/reports/dblog as it used to be in Drupal 7.

Debugging Twig templates

Drupal core comes with a theming debug mode that is really helpful for local environments. To enable it, copy-and-paste the following code into sites/default/services.yml file (if you haven’t already added these lines in development.services.yml):

parameters: twig.config: debug: true

Thanks to this mode, it will be easier to find out which portion of HTML code has been written in which templates: in the source code, you will see each part of Twig templates (pages, nodes, blocks, menus etc.) surrounded by HTML comments that contain the matching suggestion templates. The one in current use will be checked.
Make sure to enable comments in your web browser debug tab and also note that this feature has been backported to Drupal 7.

Used templates mentioned in HTML comments

Inside a Twig template, you will also be able to use {{ dump(my_variable) }} syntax to print a variable content.
If you have Devel Kint module installed, you can use {{ kint(my_variable) }} to dump the variable in a nice formatted structure: you can hide/show levels of arrays/objects which is very helpful as Drupal variables can have many levels inside. Kint is indeed the successor of the krumo() function from Drupal 7.

Print content_attributes variable with kint from node.html.twig template

Profiling pages

When dealing with performance issues, profiling a website will help finding what is the root cause.
The well-known debugging module Devel offers in its latest version a Webprofiler. It is actually a (partial) port of the Symfony profiler and it displays a footer bar on every page with useful data collectors such as:

  • Drupal current version;
  • PHP configuration (current version, loaded modules);
  • route and controller name;
  • page load timeline and memory use;
  • query time and number of queries;
  • number of blocks loaded and rendered;
  • number of views;
  • number of modules and themes available;
  • cache statistics.

Webprofiler bar in Drupal 8

By clicking on each section, you will be redirected to a specific page with more details about the collected data. For instance, if you look at the page request details, you will see which was the matching route, the route object with the passed parameters, response headers etc. Well, all the information needed to debug requests.

Details of a page request provided by Webprofiler

Using command line tools

The Drupal Console project is a powerful command line tool that makes use of the Symfony Console and other third-party components. It is complementary to Drush and allows you to generate code to build modules and themes (code scaffolding), to interact with your Drupal installation and help to debug your code.

Once the Drupal Console installed, you can run the drupal list command to show all available commands.

Here are some useful commands for debug:

  • drupal check: check system requirements;
  • drupal site:status: show current Drupal installation status (Versions of Drupal, PHP, MySQL and libraries, updates status, cron last run, database connection etc.);
  • drupal database:table:debug: show all tables of the database;
  • drupal database:table:debug my_table: show columns of my_table table;
  • drupal config:debug: list all configurations;
  • drupal config:debug image.settings: show configuration for image.settings;
  • drupal config:settings:debug: display current key:value from the settings file;
  • drupal container:debug: display all services ID with the matching class name;
  • drupal router:debug: display all route names with the matching paths;
  • drupal router:debug dblog.overview: display route information about dblog overview page;
  • drupal database:log:debug: display current log events;
  • drupal database:log:debug 107: display one log event in details;
  • drupal site:statistics: show some statistics about the website (number of modules enabled/disabled, number of users and comments etc.).

The Drupal Console is already used by many companies well known in the Drupal community such as Acquia, Amazee Labs, Phase2 and Commerce Guys and is becoming the standard command line tool for Drupal 8.
But note that the current version is not yet fully compatible with Drupal 8.1.x, for instance, there are still some issues with migration commands. The team of the project is currently looking for some financial support and more contributors to get a full stable release.

For more information about the project, check out the official website and the documentation.

Categories:

Vardot: Facebook Comments Block

Planet Drupal - Sun, 2016/06/19 - 12:49pm
Resources Read time: 5 minutes

In this article I’d like to share with you a module that I’ve recently created for Drupal 7 and 8 called Facebook Comments Block. It gives visitors of your website the opportunity to comment on your site’s content using a widget that is directly integrated with Facebook. Here is the screenshot showing you how the commenting box will be displayed on your website:

 

 

What was missing in other Drupal commenting modules?

The historical background of my contribution to the Drupal society was pretty easy. While working on Vardot’s distribution Uber Publisher our main goal was to make Drupal as user-friendly as possible. One of the increasing users’ convenience factors was a maximal easiness in adding comments on the website, and one of the main satisfaction criterias from the user's perspective is the number of clicks and the total time needed to proceed with a request.

The big UX disadvantage of popular solutions is that users are required to create an account on a new website. The number of services we are using is increasing every year, and managing, remembering passwords or even logging in to all of them becomes very time-consuming. As a site visitor I’d prefer to be able to comment on posts without signing up, because otherwise, if I read several blogs, I waste too much time for nothing.

Another important disadvantage of commenting widgets I worked with (this time more for a developer and site owner than for an end-user) was that most of them were based on URL aliases. As a result some of our clients were facing the issue when they were losing all comments after changing the URL of the page or its title (in Uber Publisher short SEO-friendly URLs are generated automatically based on the title of the post).

 

What are the advantages of Facebook Comments Block module?

Addressing issues that were described above, and adding some new benefits, I’ve made a list of reasons why you may go for the Facebook Comments Block module:

 

  1. Facebook Comments Block relies on a node ID

The widget minimizes risks of changing the URL, because it relies on a node ID that is always constant. As a result, even if you rewrite the title of your article or the link of the page, comments that were added before won’t be lost.

 

  1. Facebook Comments Block allows for the main domain configuration

If you have multiple domains associated with your website, you can configure the module to recognize the main domain and share comments across all domains. For example, we have two URLs for the same site - www.example.com/article-title and www.myexample.com/article-title. Configure Facebook Comments Block to use www.example.com as a main domain, and comments of the main domain will be shared to and from www.myexample.com.

 

  1. Facebook Comments Block uses basic configurations

It doesn’t have dependencies which makes it easy to install and use. Just go to "Admin" -> "Structure" -> "Block", and you’ll find "Facebook Comments" settings. Choosing “Configure” you’ll see the menu with options to customize the widget:

 

 

  1. You don’t need to log in

Most of the site visitors are already logged in with their Facebook profiles. As a result, they comment using their real social media (Facebook) account and don’t need to make additional clicks to be able to comment. The idea of this widget is to be organically implemented to the page and be percepted as its natural part, so the visitor doesn’t even realize that there is a special block for commenting that is connected to an external service.

 

  1. Facebook Comments Block is easy to integrate with other modules

The widget uses Drupal block API, so it can be easily integrated with most of the Drupal modules that support blocks (i.e. Rules, Context, Panels, …etc.). The integration is straightforward and doesn’t require any additional development efforts or customization.

 

Porting Facebook Comments Block to Drupal 8

Facebook Comments Block was a new step in my developer’s career, because it introduced me to the world of Drupal 8. After D8 release I’ve decided to learn it by porting this block, and use Drupal 8’s new block API, block configurations and the new twig templates to apply changes to my new module. Now the widget is available in two latest Drupal versions - D7 and D8. It can be used by site owners that already realized benefits of Drupal 8 as well as by site owners that prefer to wait, evaluate, and choose.

 

Bottom line

The usage statistics of the widget shows that the number of people installing it is constantly growing and reached 380 sites by the beginning of June:

 

 

Drupal modules are developed by community and grown by community. If you’d like to try the Facebook Comments Block, feel free to download it from drupal.org. To report any bug issue, support or feature request you can fill a new ticket on Drupal issue queue. And of course I would be really thankful if you share this blog post in your social networks, so more interested people could learn about the widget and try it out.

  Tags:  Drupal Planet drupal 8 Modules Title:  Facebook Comments Block
Categories:

Freelock : A Flash of Insight

Planet Drupal - Sat, 2016/06/18 - 2:45am

Its name is Watney. Watney lives in Matrix. Watney is a bot I created about 6 months ago to start helping us with various tasks that are instrumental for day-to-day tasks we need to do in our business.

Watney patiently waits for requests in a bunch of chat rooms we use for internal communications about each website we manage, each project we work on. Watney does a bunch of helpful things already, even though it is still really basic -- it fetches login links for us, helps us assemble release notes for each release we do to a production site, reminds us when it's time to do a release, and kicks off various automation jobs.

DevOpsConcourseMatrixBotWatneyDrupalDrupal Planet
Categories:

Acquia Developer Center Blog: Drupal 8 for beginners - meet Brandon Relph

Planet Drupal - Fri, 2016/06/17 - 7:01pm

I met 15-year-old serial entrepreneur--CEO of goCreative--and budding Drupalist Brandon Relph at the inaugural ThinkNation event in Canterbury, in December 2015. In this podcast, we talk about how he got to know Drupal 8 and what he thought of it. And I was surprised to learn that there is a world of professional Minecraft out there, in which Brandon runs two professional ventures and employs a couple dozen people around the world.

Brandon met Drupal when he began building the ThinkNation website in Drupal 8 as part of a work-experience week with the UK Agency Miggle. From an interview with Brandon on the ThinkNation website, Putting young people at the heart of ThinkNation: “Working on the ThinkNation site seemed a daunting process at first. I had just arrived to the Miggle office for my work experience and was given the task of converting the pre-made designs of ThinkNation into HTML/CSS that afternoon!” Miggle founder, Alick Mighall talks about Brandon and ThinkNation in this post: Young Thinking.

Interview video - 10 min.

Guest dossier
  • Name: Brandon Relph
  • Work affiliation:
    • CEO goCreative - “We create awesome Minecraft creations”
    • Block Arts - “The new way to share all things Minecraft”
  • Twitter: @brandonrelph
  • 1st version of Drupal: Drupal 8!

jam: Right. We – this guy and I have just spent the whole day at this thing called ThinkNation and ThinkNation – what did you think of the day?

Brandon Relph: It was very well put together. It was very interesting and engaging.

jam: If you had to describe it to someone else who wasn’t here, how would you describe this event?

Brandon Relph: Something to almost answer those big questions that you may have.

jam: Right. So the format was roughly five big questions involving human life at the deepest level. Should we invest in technology to extend it, should we invest in space flights, questions about mortality, really kind of serious stuff. And it was put together ... So there were a series of experts, speakers and artists and a poet and some dancers and everybody addressing these questions in different ways. I found it incredibly rich and I was pretty excited and the plan is to have more of these. Would you come back?

Brandon Relph: For sure.

jam: So please introduce yourself.

Brandon Relph: My name is Brandon Relph. I’m from Bishop Bell School in Eastbourne. I did my work experience with the company Miggle, which helped design the website for this event.

jam: That’s our secret Drupal connection of the day. So what did you do on your work experience?

Brandon Relph: I was the first person to start the ThinkNation site.

jam: Which was built in...?

Brandon Relph: Drupal 8.

jam: Oh, lovely!

Brandon Relph: This was back in June time. So it was when - before it had even been released. Yes, I built lots of the front end and I also got to use Drupal 8, which I’ve never used before.

jam: So what’s your development, IT, web sort of background?

Brandon Relph: In school, I study computer science. Outside the school, I do lots of computer-related activities. I also own my own company, which ... we do stuff on the computer and everyday internet.

jam: So you’re an entrepreneur.

Brandon Relph: Yes, you could call me that.

jam: In geek terms, Alick Mighall said, “Go make a Drupal 8 site,” and just set you loose, right? How was it to open up Drupal for the first time and...?

Brandon Relph: It was a challenge. I have to say it’s very easy to install it and when we were doing – on the first day, I basically got told, “Oh yes, we use Drupal.” I got talked through what it was. I got left a bit to decide and get to know it and they were like, “Oh, here’s the site. We want you to start.” So I started. I think pretty much in the first afternoon.

jam: Conceptually, was it an easy thing to get into, given your background?

Brandon Relph: It was very different because I’m used to coding raw PHP and it actually probably was a lot easier than what I do. So I suppose in a way, I was doing lots of the front end to begin with but we explored the back end of Drupal afterwards and getting to know how it will work opened my eyes up to how I kind of over-complicate stuff.

jam: Wow! That’s really interesting. So in Drupal, we talked a lot about how we empower people to use this very complex technology stack by making a great user interface and a great experience. Did it feel that way? Can you identify with that?

Brandon Relph: Yes, it felt like the process was a lot quicker than it would necessarily been if I would have had to hard code it.

jam: Now, most people that I interview – I’ll ask them something like, “What’s your first Drupal memory?” but your first Drupal memory is only June and it sounds like it was entirely positive.

Brandon Relph: Yes.

jam: Is Drupal something that you are going to try out for your own projects and get back to at some point?

Brandon Relph: I probably will. It’s busy time at the moment with school and everything to running your own company but it’s definitely something that I want to look into in the future as it seems like a really good alternative to hard coding stuff.

jam: So now, I’m just going to stand in front of you so that we can get the height comparison. How old are you?

Brandon Relph: I’m 15.

jam: You are 15. Thank you very much. So entrepreneurialism is a big theme at this event today. A guy called Ben Towers just had a bit of a speech. He’s 17 and he’s a serial entrepreneur as well and quite well known here in Britain. Do you think he’s sort of a role model?

Brandon Relph: Yes, I suppose he’s one of those where maybe I could be even – he could be my target for the next two years because as I progress and I move on, I’d hope that one day I will be standing up at events like this. I think around now is kind of the starting point of that with a television interview coming up in the next couple of weeks and it’s going to be taking it from there.

jam: So how did you discover programming was for you and how did you become an entrepreneur?

Brandon Relph: I discovered programming was for me when I sat down and I realized that I had a problem and that I needed to find the solution and programming was that type of thing. So I learned my first programming language when I was 12 or 11 – 12 and that was pretty much basic HTML/CSS and then I got into more of the backend and I did some Java and a bit of C. I suppose I became an entrepreneur when I found something that I enjoyed and I have a friend of mine in Germany who is my business partner, so to speak and we now – over the past two years, have kind of built up the company and we now have – there’s 25 of us and we all live all around the world.

jam: Wow! So getting into tech was a scratch-your-own-itch story. You had a problem that you needed to solve and you went and figured it out.

Brandon Relph: Yes. Then, I noticed that other people also have problems and why can't I capitalize on that?

jam: Hey! Presto! You have a business.

Brandon Relph: Yes.

jam: So what are the 25 of you doing now?

Brandon Relph: Some of you may know the game Minecraft. If not, you can Google it. We use it as like an ...

jam: For that one person who hasn’t heard of Minecraft.

Brandon Relph: Yes. We use it like a tool, a marketing tool that companies – and they employ us to make software and also stuff in the actual game in order to sell their product or sell their movie or like that. We also use Minecraft in education and we have recently taken on a chemistry project with a school where we make Minecraft – we made atoms in Minecraft and then we show children how they work and how they interact with each other. So I suppose it’s kind of that that drives me forward with everything.

jam: Minecraft seems to me to be another sort of perfect system where they’ve made something so abstract and yet so easy to use that you can sort of turn it into anything.

Brandon Relph: Yes, it’s one of those. People describe it as Lego and especially when you’re building. It’s so much like Lego but in the computer. So it’s like Lego on steroids type of thing and it can be used for pretty much anything and the beauty of the game is once you play it, it’s so simple to understand and it’s engaged with so many children and not just children but generations. Yes, it’s just great.

jam: You do have a passion for it. I mean otherwise, you wouldn’t be in business at this point either.

Brandon Relph: There’s still a market for it even five years after its development. There’s still a big market for it and it’s still on the rise.

jam: Are you working on the next big idea?

Brandon Relph: Oh, maybe.

jam: Oh, cagey! Cagey! Very good. So let’s sum up. ThinkNation, yes – no?

Brandon Relph: Yes.

jam: You’re going to be back?

Brandon Relph: Definitely!

jam: Are you going to submit a talk maybe?

Brandon Relph: Oh, I might be submitting – maybe.

jam: Okay. Alright! Drupal, yes-no?

Brandon Relph: Yes, in the future.

jam: Are you going to come back to it?

Brandon Relph: After my studies, yes.

jam: Alright! Cool! Anytime you want, you call any of us. There are several hundred thousand of us who can help you out with that. We’d love to. Start with Alick and then – you know. Awesome! And Minecraft, yes or no?

Brandon Relph: Yes, but not forever. It’s going to die one day but for now, it’s a great tool and I plan on using it for the future.

jam: So Brandon, give us your shameless pitch.

Brandon Relph: So if you’re looking to further your brand, you can contact us. We’re called goCreative. We’re an international company of 25 and that’s in 13 different countries and seven different time zones. You can find us online at go-creative.co and you can also find us on Twitter @goCreativeMC.

jam: It’s so nice to meet you.

Brandon Relph: Nice to meet you too.

jam: Thanks for taking the time to talk.

Brandon Relph: Thanks for having me.

Podcast series: Drupal 8Skill Level: BeginnerIntermediateAdvanced
Categories:

Acquia Developer Center Blog: Review GitHub Pull Requests with Ease

Planet Drupal - Fri, 2016/06/17 - 4:35pm

If you are like me and have to spend a lot of time reviewing large patches on GitHub you know it is a daunting task.

There is no easy way to navigate through multiple diffs so you have to scroll a lot (and I mean a LOT) and watch very carefully to not to miss what you are looking for.

It is tiring and frustrating.

Tags: acquia drupal planet
Categories:

DrupalEasy: DrupalEasy Podcast 179 - Need to Pee (Michael Schmid, amazee.io, Drupal Community Keynote)

Planet Drupal - Fri, 2016/06/17 - 3:58pm

Direct .mp3 file download.

Michael Schmid (Schnitzel), Group CTO of Amazee Group, CTO of amazee.io and super-active Drupal community contributor joins Kelley, Anna, and Mike to discuss amazee.io and Michael's recent DrupalCon New Orleans Community Keynote. This episode also touches on the new (also Swiss!) king of the hill in Drupal code contributions as well as the recent changes at the Drupal Association.

Interview DrupalEasy News Three (Two) Stories Sponsors Picks of the Week
  • Mike - Rules module again, because it is so freakin' awesome.
  • Anna - Teleport.org uses “Big Data” to compare different places to live. Focused on start-ups and other knowledge workers. Fun to look at (and scope out places where I might need to move after November!).
  • Kelley - Headspace mindfulness app to reduce stress, improve focus, relax.
  • Michael - Drop Guard - Updates your Core and Modules automatically.
Upcoming Events Follow us on Twitter Five Questions (answers only)
  1. Drones! FPV and Video/Photo Drones.
  2. Alexa and Wink (Home Automation).
  3. Life.
  4. An Elephant.
  5. At DrupalCon Copenhagen's closing ceremony - the Kitten Killers performance.
Intro Music Subscribe

Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.

Categories:

Drop Guard: The risk of ignoring Drupal updates

Planet Drupal - Fri, 2016/06/17 - 12:30pm

There is no question about the importance of regularly updating your Drupal installation, including core, contribs, and libraries.

No matter how you manage the workflow - by using dedicated tools, custom scripts, or just update the codebase via FTP - keeping the application's 3rd party code always up-to-date is a must for every open source project.

Without getting into the details of why this is important (in fact we believe our readers don't need to be convinced at all), we decided to imagine the consequences of intentionally ignoring all updates in your project or updating the codebase selectively, when some modules get their new versions regularly and the rest remains outdated.

workflow Drupal Planet Security
Categories:

PreviousNext: Native PHPStorm Drupal Test Runner

Planet Drupal - Fri, 2016/06/17 - 5:08am

PHPStorm has a lot of built in test runners, but it doesn't support Drupal's Simpletest test runner. In this blog post we'll see how we can execute Drupal tests inside PHPStorm using Drupal test runner.

Categories: