Newsfeeds

Scheduler content moderation integration

New Drupal Modules - 9 January 2019 - 1:05am

This is a submodule for the scheduler module to integrate with content moderation.

Categories: Drupal

Matt Glaman: Writing better Drupal code with static analysis using PHPStan

Planet Drupal - 8 January 2019 - 8:00pm
Writing better Drupal code with static analysis using PHPStan Published on Tuesday 8, January 2019

PHP is a loosely typed interpreted language. That means we cannot compile our scripts and find possible execution errors without doing explicit inspections of our code. It also means we need to rely on conditional type checking or using phpDoc comments to tell other devs or IDE what kind of value to expect. Really there is no way to assess the quality of the code or discover possible bugs without thorough test coverage and regular review.

Categories: Drupal

Karim Boudjema: 10 helpful Drupal 8 modules for 2019

Planet Drupal - 8 January 2019 - 3:04pm
It’s always hard to pick up the most useful Drupal 8 modules because it depends on the site you will create or manage. But there are some really helpful modules you can use in almost every situation.

In this post, I will share some modules that I use almost all the time in my Drupal 8 projects, they are not related to a particular type of site but they are always helpful, both in development or production environment.

1. Admin Toolbar

(D8) - https://www.drupal.org/project/admin_toolbar
The Admin Toolbar module will greatly save your time. By having a drop-down menu and extending the original Drupal menu, it helps to perform various admin actions faster and easier.

The module works on the top of the default toolbar core module, therefore it is a very light module and keeps all the toolbar functionalities (shortcut / media responsive).
Categories: Drupal

AdChoices Link (formerly Ghostery)

New Drupal Modules - 8 January 2019 - 1:31pm

This module provides a simple UI to add the AdChoices link to a menu.

Instructions

Install the module as you would any other Drupal module.

Categories: Drupal

mark.ie: Creating an 'Add to Calendar' Widget in Drupal

Planet Drupal - 8 January 2019 - 1:11pm
Creating an 'Add to Calendar' Widget in Drupal

A simple request: we need an 'Add to Calendar' widget to add our events to Google Calendar, iCal, and Outlook. Simple (once I had completed it!).

markconroy Tue, 01/08/2019 - 21:11

There's a module for that. There is, it's called, obviously, addtocalendar. It works very well, if you:

  • want to use the addtocalendar.com service,
  • want to pay for this service

If you don't want to use an external service for something as simple as adding an event to a calendar, then it looks like you'll need a custom solution. Their smallest plan only allows 2 events per month.

The PatternLab Part

Here's the custom solution I came up with (in the future, I'll look at creating a module for this with a settings/UI page for site builders). Note, it's a PatternLab implementation; if you don't use PatternLab and just want to work directly in your Drupal theme, it would be even easier.

Here's the code for the 'Add to Calendar' pattern in PatternLab (some classes and things are removed to make it easier to read):

  1. {%
  2. set classes = [
  3. "add-to-calendar"
  4. ]
  5. %}
  6.  
  7. {% set ical_link = 'data:text/calendar;charset=utf8,BEGIN:VCALENDAR%0AVERSION:2.0%0ABEGIN:VEVENT%0ADTSTART:' ~ atc_start_date|date("Ymd\\THi00\\Z") ~ '%0ADTEND:' ~ atc_end_date|date("Ymd\\THi00\\Z") ~ '%0ASUMMARY:' ~ atc_title ~ '%0ADESCRIPTION:' ~ atc_details|striptags ~ '%0ALOCATION:' ~ atc_location|replace({'
    ': ' ', '
    ': ' ', '

    ': ' ', '

    ': ''}) ~ '%0AEND:VEVENT%0AEND:VCALENDAR' %}
  8.  
  9. {% set google_link = 'https://www.google.com/calendar/r/eventedit?text=' ~ atc_title ~ '&dates=' ~ atc_start_date|date("Ymd\\THi00\\Z") ~ '/' ~ atc_end_date|date("Ymd\\THi00\\Z") ~ '&details=' ~ atc_details|striptags ~ '&location=' ~ atc_location|replace({'
    ': ' ', '
    ': ' ', '

    ': ' ', '

    ': ''}) %}
  10.  
  11. {{ attributes.addClass(classes) }}>
  12.  
  13. {{ google_link }}">Add to Google Calendar
  14.  
  15. {{ ical_link }}">Add to iCal
  16.  
  17. {{ ical_link }}">Add to Outlook
  18.  

What does the above code do?

  • Creates a Google Calendar variable and creates an iCal variable. Outlook will also use iCal.
  • Uses these variables as links to add the event to their respective calendars.

Within the variables, we have some more variables (start date, end date, etc), which we should probably wrap in conditional statements so that their clauses don't print unless they are present in Drupal (some fields might be optional on your event content type, such as end time).

These variables are:

  • atc_start_date: Start Date and time
  • atc_end_date: End Date and time
  • atc_title: the name of the event
  • atc_details: description for the event
  • atc_location: place of event

In our Event pattern in PatternLab, we then have a variable called 'add_to_calendar' so that events have the option to have this widget or not. In event.twig, we simply print:

  1. {% if add_to_calendar %}
  2. {% include '@site-components/add-to-calendar/add-to-calendar.twig' %}
  3. {% endif %}
The Drupal Part

In Drupal we create a boolean field on our event content type field_event_add_to_calendar, if this is ticked, we will display the Add to Calendar widget.

Here's the code from node--event--full.html.twig

  1. {# Set the Add to Calendar Variables #}
  2.  
  3. {% if node.field_add_to_calendar.value %}
  4. {% set add_to_calendar = true %}
  5. {% endif %}
  6.  
  7. {% if node.field_event_date.value %}
  8. {% set atc_start_date = node.field_event_date.value %}
  9. {% endif %}
  10.  
  11. {% if node.field_event_date.end_value %}
  12. {% set atc_end_date = node.field_event_date.end_value %}
  13. {% endif %}
  14.  
  15. {% if node.title.value %}
  16. {% set atc_title = node.title.value %}
  17. {% endif %}
  18.  
  19. {% if node.field_event_intro.value %}
  20. {% set atc_details = node.field_event_intro.value %}
  21. {% endif %}
  22.  
  23. {% if node.field_event_location.value %}
  24. {% set atc_location = node.field_event_location.value %}
  25. {% endif %}
  26.  
  27. ...
  28.  
  29. {% include "@content/event/event.twig" %}

To explain:

If the 'Add to Calendar' boolean is on, we set the add to calendar variable as true

This in turn tells patternlab to render the Add to Calendar component.

We then check if each field we might use has a value in it - such as a start date and end date

If so, we map the values from each of those fields to variables in our Add to Calendar component (such as atc_start, atc_title, etc)

Now, when you view a node, you will see your Add to Calendar widget on any nodes that the editors choose to put it. You can see a sample of the Add to Calendar widget in my PatternLab.

Simple, once I figured it out.

Got an improvement for this? The comments are open.

Categories: Drupal

Robot Entertainment closing servers for Orcs Must Die! Unchained and Hero Academy games

Social/Online Games - Gamasutra - 8 January 2019 - 1:10pm

Robot Entertainment is all at once closing down three games, saying that it's no longer sustainable to continue to keep them online and playable. ...

Categories: Game Theory & Design

A2J Viewer

New Drupal Modules - 8 January 2019 - 12:51pm

This module integrates the Center for Computer-Assisted Legal Instruction' A2J Author Viewer 6 into Drupal, allowing for the delivery of standalone A2J interviews within Drupal websites. It requires the A2J Viewer library.

Categories: Drupal

Splash Damage is cutting monetization from its free-to-play game Dirty Bomb

Social/Online Games - Gamasutra - 8 January 2019 - 12:10pm

Dirty Bomb is going free-to-play, in the most literal interpretation of the term. Following an update next week, all monetization will be patched out of the game. ...

Categories: Game Theory & Design

Img Extended

New Drupal Modules - 8 January 2019 - 11:04am

The Image Extended module allows you to add files with extensions like eps, svg, pdf or tiff on your website fully integrated into the image module.
Instead of having a form with multiple fields, an image field and a file field for pdf, eps, tiff, svg, this functionality is integrated into one field.

If you upload a file, you can have a preview in the upload section as well as an image linked to the source in a new browser tab for each format.

You can choose which format is available, the size of the file, if private or public like the core image module.

Categories: Drupal

Come to GDC 2019 and learn to help more people find (and play!) your game

Social/Online Games - Gamasutra - 8 January 2019 - 10:45am

Knowing how to get your game in front of the people who will enjoy it most has never been more important, and if you want to sharpen your skills, GDC 2019 in March is the place to be! ...

Categories: Game Theory & Design

Entity Quicklook

New Drupal Modules - 8 January 2019 - 9:55am

Render an entity in a modal using views.

Categories: Drupal

Request info

New Drupal Modules - 8 January 2019 - 9:43am

This is a tiny helper to add request information to Drupal's status report. This is helpful to verify that Drupal is configured correctly; e.g., trusted reverse proxy addresses are configured correctly and HTTP headers are followed.

Categories: Drupal

Dries Buytaert: Refreshing the Drupal administration UI

Planet Drupal - 8 January 2019 - 8:20am

Last year, I talked to nearly one hundred Drupal agency owners to understand what is preventing them from selling Drupal. One of the most common responses raised is that Drupal's administration UI looks outdated.

This critique is not wrong. Drupal's current administration UI was originally designed almost ten years ago when we were working on Drupal 7. In the last ten years, the world did not stand still; design trends changed, user interfaces became more dynamic and end-user expectations have changed with that.

To be fair, Drupal's administration UI has received numerous improvements in the past ten years; Drupal 8 shipped with a new toolbar, an updated content creation experience, more WYSIWYG functionality, and even some design updates.

A comparison of the Drupal 7 and Drupal 8 content creation screen to highlight some of the improvements in Drupal 8.

While we made important improvements between Drupal 7 and Drupal 8, the feedback from the Drupal agency owners doesn't lie: we have not done enough to keep Drupal's administration UI modern and up-to-date.

This is something we need to address.

We are introducing a new design system that defines a complete set of principles, patterns, and tools for updating Drupal's administration UI.

In the short term, we plan on updating the existing administration UI with the new design system. Longer term, we are working on creating a completely new JavaScript-based administration UI.

The content administration screen with the new design system.

As you can see on Drupal.org, community feedback on the proposal is overwhelmingly positive with comments like Wow! Such an improvement! and Well done! High contrast and modern look..

Sample space sizing guidelines from the new design system.

I also ran the new design system by a few people who spend their days selling Drupal and they described it as "clean" with "good use of space" and a design they would be confident showing to prospective customers.

Whether you are a Drupal end-user, or in the business of selling Drupal, I recommend you check out the new design system and provide your feedback on Drupal.org.

Special thanks to Cristina Chumillas, Sascha Eggenberger, Roy Scholten, Archita Arora, Dennis Cohn, Ricardo Marcelino, Balazs Kantor, Lewis Nyman,and Antonella Severo for all the work on the new design system so far!

We have started implementing the new design system as a contributed theme with the name Claro. We are aiming to release a beta version for testing in the spring of 2019 and to include it in Drupal core as an experimental theme by Drupal 8.8.0 in December 2019. With more help, we might be able to get it done faster.

Throughout the development of the refreshed administration theme, we will run usability studies to ensure that the new theme indeed is an improvement over the current experience, and we can iteratively improve it along the way.

Acquia has committed to being an early adopter of the theme through the Acquia Lightning distribution, broadening the potential base of projects that can test and provide feedback on the refresh. Hopefully other organizations and projects will do the same.

How can I help?

The team is looking for more designers and frontend developers to get involved. You can attend the weekly meetings on #javascript on Drupal Slack Mondays at 16:30 UTC and on #admin-ui on Drupal Slack Wednesdays at 14:30 UTC.

Thanks to Lauri Eskola, Gábor Hojtsy and Jeff Beeman for their help with this post.

Categories: Drupal

Refreshing the Drupal administration UI

Dries Buytaert - 8 January 2019 - 8:20am

Last year, I talked to nearly one hundred Drupal agency owners to understand what is preventing them from selling Drupal. One of the most common responses raised is that Drupal's administration UI looks outdated.

This critique is not wrong. Drupal's current administration UI was originally designed almost ten years ago when we were working on Drupal 7. In the last ten years, the world did not stand still; design trends changed, user interfaces became more dynamic and end-user expectations have changed with that.

To be fair, Drupal's administration UI has received numerous improvements in the past ten years; Drupal 8 shipped with a new toolbar, an updated content creation experience, more WYSIWYG functionality, and even some design updates.

A comparison of the Drupal 7 and Drupal 8 content creation screen to highlight some of the improvements in Drupal 8.

While we made important improvements between Drupal 7 and Drupal 8, the feedback from the Drupal agency owners doesn't lie: we have not done enough to keep Drupal's administration UI modern and up-to-date.

This is something we need to address.

We are introducing a new design system that defines a complete set of principles, patterns, and tools for updating Drupal's administration UI.

In the short term, we plan on updating the existing administration UI with the new design system. Longer term, we are working on creating a completely new JavaScript-based administration UI.

The content administration screen with the new design system.

As you can see on Drupal.org, community feedback on the proposal is overwhelmingly positive with comments like Wow! Such an improvement! and Well done! High contrast and modern look..

Sample space sizing guidelines from the new design system.

I also ran the new design system by a few people who spend their days selling Drupal and they described it as "clean" with "good use of space" and a design they would be confident showing to prospective customers.

Whether you are a Drupal end-user, or in the business of selling Drupal, I recommend you check out the new design system and provide your feedback on Drupal.org.

Special thanks to Cristina Chumillas, Sascha Eggenberger, Roy Scholten, Archita Arora, Dennis Cohn, Ricardo Marcelino, Balazs Kantor, Lewis Nyman,and Antonella Severo for all the work on the new design system so far!

We have started implementing the new design system as a contributed theme with the name Claro. We are aiming to release a beta version for testing in the spring of 2019 and to include it in Drupal core as an experimental theme by Drupal 8.8.0 in December 2019. With more help, we might be able to get it done faster.

Throughout the development of the refreshed administration theme, we will run usability studies to ensure that the new theme indeed is an improvement over the current experience, and we can iteratively improve it along the way.

Acquia has committed to being an early adopter of the theme through the Acquia Lightning distribution, broadening the potential base of projects that can test and provide feedback on the refresh. Hopefully other organizations and projects will do the same.

How can I help?

The team is looking for more designers and frontend developers to get involved. You can attend the weekly meetings on #javascript on Drupal Slack Mondays at 16:30 UTC and on #admin-ui on Drupal Slack Wednesdays at 14:30 UTC.

Thanks to Lauri Eskola, Gábor Hojtsy and Jeff Beeman for their help with this post.

Categories: Drupal

All the ways of doing a beta - by Joost van Dongen

Gamasutra.com Blogs - 8 January 2019 - 7:10am
There are many different ways to give players access to a beta. Which to choose? In this article I'll give a comprehensive list of options in today's market and discuss the differences.
Categories: Game Theory & Design

Scanning the Iconic Treasury Al-Khazneh of Petra - by Joseph Azzam

Gamasutra.com Blogs - 8 January 2019 - 7:09am
I needed to give a presentation in Jordan on Photogrammetry, and I challenged myself to scan the iconic treasury Al-Khazneh of Petra, put it in a game engine, and prepare a presentation, all in the span of 3 days.
Categories: Game Theory & Design

An Artifact Card Review - by James Margaris

Gamasutra.com Blogs - 8 January 2019 - 7:02am
20 pages of thoughts on Artifact cards that begin with the letter 'A'
Categories: Game Theory & Design

Direction Tools For Your Game's Dialogues - by Pietro Polsinelli

Gamasutra.com Blogs - 8 January 2019 - 7:01am
We present some concepts with which one can enrich the available toolset when writing and designing in-game dialogues, mostly inspired by comic design. In a linked video we also show the toolset in use.
Categories: Game Theory & Design

In VR boys learn best when the teacher is a drone -- girls lean better from virtual Marie

Virtual Reality - Science Daily - 8 January 2019 - 6:51am
The teacher is just as important in a virtual learning environment as in a normal classroom, but a new study shows that boys and girls differ greatly in terms of how they learn best: Boys learn best when their virtual teacher comes in the form of a drone, while girls get more knowledge from VR-teaching when they are taught by a young, female researcher-type named Marie.
Categories: Virtual Reality

Agiledrop.com Blog: Interview with Shawn McCabe, CTO of Acro Media

Planet Drupal - 8 January 2019 - 2:24am

This time we had a chat with none other than Shawn McCabe, the CTO of Acro Media. In our interview, the avid Drupal contributor talked about his most memorable Drupal moments, his love for open source and his reasons to opt for a more sustainable lifestyle. Have a read!

READ MORE
Categories: Drupal

Pages

Subscribe to As If Productions aggregator