Rick and Morty: Total Rickall Now Available

Tabletop Gaming News - 21 June 2016 - 6:00am
Well, it would seem as though extraterrestrial parasites are invading the Earth. Don’t you just hate it when that happens? They’re impersonating friends and relatives in order to try and move stealth-ily through the populace. But their plans have been found out. Now it’s up to you to stop them before their invasion plans can […]
Categories: Game Theory & Design How to write a PHPUnit test for Drupal 8

Planet Drupal - 21 June 2016 - 5:00am

This article will talk you through the steps to follow to write a simple PHPUnit test for Drupal 8.

I have been doing a lot of work on Drupal 8 migrations for the past few months so that will be the focus of the test.

Step 1: Create a Fixture

To quote the PHPUnit manual:

Categories: Drupal

Web Wash: Debug Site Performance Using Web Profiler in Drupal 8

Planet Drupal - 21 June 2016 - 4:50am

In the beginning of any Drupal project the site loads very quickly because there aren't many modules installed. But as you add modules, the performance of the site will become slower and slower.

There's always a certain point in the project where you realize it's time to look at the problem and see if it's a rogue module or some dodgy code, we've all seen this.

Trying to debug a performance issue can be tedious work. But often, it comes down to having too many queries loaded on a page.

If you're on Drupal 7, just enable query logging using the Devel module. This will show all the queries generated at the bottom of the page.

But for Drupal 8 we have something better: Web Profiler.

Web Profiler is a Drupal 8 port of the Symfony WebProfiler bundle. The port is possible because Drupal 8 uses Symfony components.

Web Profiler adds a toolbar at the bottom of every page and shows you all sorts of stats such as the amount of database queries loaded on the page, which services are used and much more.

Categories: Drupal

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

Planet Drupal - 21 June 2016 - 4:45am


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: Drupal

Miloš Bovan: Detecting a footer of an email

Planet Drupal - 21 June 2016 - 4:22am
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: Drupal

TheodorosPloumis blog: DrupalCamp Greece is 3B!

Planet Drupal - 21 June 2016 - 4:19am

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.

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: Drupal

L10N Context

New Drupal Modules - 21 June 2016 - 2:07am

Add a search filter on admin/config/regional/translate/translate for filtering translations by context.

Categories: Drupal

Blog: What to do before asking a publisher for money for your game

Social/Online Games - Gamasutra - 21 June 2016 - 1:25am

Political Animals dev Ryan Sumo wraps up his blog series on finding a publisher (in Positech Games) by detailing the work and research that went in to getting ready to pitch a publishing deal. ...

Categories: Game Theory & Design

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

Planet Drupal - 21 June 2016 - 1: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: Drupal

Contact Storage Export

New Drupal Modules - 21 June 2016 - 12:12am

This module provides a simple export operation automatically for messages from each created contact form. It exports all fields and base data about the submission (such as logged in user and date submitted). It also handles fields that allow multiple options to be selected.

Categories: Drupal

Observations From A Gamer's Chair: Wing and Milk

RPGNet - 21 June 2016 - 12:00am
Or: how to run a game without really trying.
Categories: Game Theory & Design Default Search API Sorts Per View in Drupal 7

Planet Drupal - 20 June 2016 - 7:46pm

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 ( that provides custom sorts and a global sort block for Search API. The module itself is ok, but ...

Read now

Categories: Drupal

Red Panda Miniatures Launches Wander Kickstarter

Tabletop Gaming News - 20 June 2016 - 3:00pm
Long-time readers of TGN will no doubt know the name of Heath “BA” Foley (artist to the stars). He’s done artwork for quite a few companies out there, including On the Lamb, Gangfight Games, and Mantic. Well, recently he’s made his own company, Red Panda Miniatures (or RPM for short. I told him to go […]
Categories: Game Theory & Design

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

Planet Drupal - 20 June 2016 - 2: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: Drupal

Hero Board Game Up On Kickstarter

Tabletop Gaming News - 20 June 2016 - 2:00pm
Well, it would seem as though a dragon is attacking the countryside. Sounds like a problem that a good batch of heroes can take care of. … … … What’s that? There aren’t any heroes around? … … … Oh… I guess we’ll just have to find poor schlub… I mean, new brave individual to […]
Categories: Game Theory & Design

Isstvan Campaign Expansion Now Available For Digital Versions of Talisman

Tabletop Gaming News - 20 June 2016 - 1:00pm
Some board games can seem a bit intimidating in terms of “moving parts” for it. And while they might really be all that complicated, having a digital version that does some of the bookkeeping for you is pretty handy. Such is the case with the digital version of Talisman. There’s also a new expansion for […]
Categories: Game Theory & Design

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

Planet Drupal - 20 June 2016 - 12: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: Drupal

Limited Copies of CitiesUP Available From Spectacled Bear Games

Tabletop Gaming News - 20 June 2016 - 12:00pm
Having your Kickstarter product available for general sale, I see, is the final step to a successful campaign. Spectacled Bear Games has a limited number of their CitiesUP board game now available over in their webshop. Have you ever wanted to be in charge of your own city? That’s just what you get to do […]
Categories: Game Theory & Design

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

Planet Drupal - 20 June 2016 - 11:16am
How to fix a testbot bug when adding new tests
Categories: Drupal

Monday Terrain Corner

Tabletop Gaming News - 20 June 2016 - 11:00am
Hello summer! Or for you Southern-hemisphere folks: Hello winter! Yup, it’s the solstice. So enjoy either the longest or shortest day you’re going to get for another 6 months. The sun was almost coming up when I got to the office. Guess I won’t actually be seeing it on my drives in. Well, seeing as […]
Categories: Game Theory & Design


Subscribe to As If Productions aggregator