Newsfeeds

Dev Diary #8 - Global Content and Characters - by gumi Team

Gamasutra.com Blogs - 4 July 2018 - 8:53am
We’ll be breaking down the creation process to design our first Global Exclusive Character, Siegfried. Samuel, the Global Content Game Designer, will introduce the process on how we create the character for the global audience.
Categories: Game Theory & Design

Through Video Game Colored Glasses - by Nikhil Murthy

Gamasutra.com Blogs - 4 July 2018 - 8:51am
How video games can affect the way you look at the world around you and how to use that artistically.
Categories: Game Theory & Design

How Small Details Can Make Big Difference To Gameplay Experience - by Eduardas Klenauskis

Gamasutra.com Blogs - 4 July 2018 - 8:50am
An overview of how small things can improve player's experience in the game. Some examples from our own game development experience are given and compared.
Categories: Game Theory & Design

Making a hard game isn't easy - by Nick Defossez

Gamasutra.com Blogs - 4 July 2018 - 8:50am
It’s incredibly easy to make a game that no one will beat - It’s much harder to make a game that players will push themselves to overcome. A difficult game needs to teach players how to gain mastery over it, and show them the depth of what you've built.
Categories: Game Theory & Design

Domain metatag integration

New Drupal Modules - 4 July 2018 - 8:39am
Domain metatag integration.

This module provide possibility to use different metatags for each domain.
Dependencies:

Categories: Drupal

Valve's content policy and the First Amendment - by Brandon Huffman

Gamasutra.com Blogs - 4 July 2018 - 8:19am
Back in May, Valve changed its content policy to crack down on visual novels containing adult content. Just a few weeks later, Valve again changed its policy to allow anything that isn't "illegal" or "straight-up trolling." Let's talk about the law stuff:
Categories: Game Theory & Design

DrupalEasy: Introducing our online, hands-on, 2-hour Professional local development with DDEV workshop

Planet Drupal - 4 July 2018 - 6:49am

We're happy to announce that we've partnered with the folks at DRUD Tech to create and deliver a live, online, hands-on workshop that will teach the basics of professional local Drupal development using DDEV-Local.

DDEV-Local is a Docker-based local development environment that is designed to get your projects up-and-running quickly on your local development machine. DDEV-Local can be used with Drupal 7 and 8 as well as WordPress and other content management systems.

One of the big advantages of using this type of local development environment (as opposed to an old-school WAMP/MAMP-type solution) is that DDEV helps to ensure that every member of the development teams is using the exact same development environment, increasing productivity and decreasing the chances of environment specific bugs. Furthermore, you'll find that getting team projects up-and-running on your local machine is super-fast!

If you've been reading our recent blog posts or listening to our podcast, then you probably already know that we've taken a keen interest in local development environments lately. 

In fact, we've been diving deep into local development environments for almost a full year now, as we're in the process of evolving our long-form training classes to teach and utilize a more professional local development environment solution. A couple of months ago, we decided to standardize our trainings on DDEV, and since then we've been talking with the DRUD Tech folks (the creators of DDEV) about putting together a workshop that will provide students what they need to get up-and-running with DDEV-Local.

Here's a quick overview of what this new workshop will cover:

  • What is DDEV? 
  • Installing DDEV-Local (Mac OS X and Windows 10 Pro)
  • Getting an existing project up-and-running in DDEV-Local
  • Everyday DDEV-Local commands and functionality
  • DDEV-Local integration with hosting providers  
  • Updating DDEV-Local
  • DDEV-Local Tips and Tricks
  • Getting help with DDEV-Local

The first workshop will take place on Wednesday, July 18, 2018, 1-3pm EDT, and the cost is $75. Following the completion of the workshop, you'll have access to the 20+ page curriculum PDF as well as more than 10 screencasts demonstrating installation and basic usage of DDEV-Local. 

Register today and start using a professional local development environment!

We’ll be running the workshop monthly, so If you can't make it on July 18, upcoming dates include: 

  • Wednesday, August 22, 2018, 10am-noon EDT
  • Wednesday, September 19, 2018, 9-11am EDT

Quotes on this page were shared by participants in our beta-test of the course


 

Categories: Drupal

Sarbacane

New Drupal Modules - 4 July 2018 - 6:38am

This module provides a form block displaying an email field to subscribe to a Sarbacane list. Sarbacane is a french third-party emailing service.

Categories: Drupal

Evolving Web: How to Create a Custom Views Argument Plugin in Drupal 8

Planet Drupal - 4 July 2018 - 6:24am

When you're building a site, it's standard to set up "pretty URLs". For example, we'd rather see /catalog/accessories than /taxonomy/term/18 and we'd rather see /about-us than /node/19. With Drupal, we use the Pathauto module to configure these types of standard content paths. But in some cases, there's no option to create a nice URL pattern, so we end up seeing those URLs.

This happens with Views that are filtered by a taxonomy term in the URL. The result is that you end up seeing taxonomy term IDs in the URL (e.g. catalog/19/search) rather than a pretty URL (e.g. catalog/accessories/search).

In this tutorial, I'll walk you through how to create a field that is used to make generate URLs for Views pages that take taxonomy terms as contextual arguments. Using this approach, a site editor will be able to configure what the URL path will look like.

Assumptions

It has been assumed that you know:

  • The basic concepts of Drupal 8.
  • How to configure fields.
  • How to configure a view with a contextual filter.
  • How to create a custom module in Drupal 8.
  • How to create a custom plugin in Drupal 8.
The solution

We're going to use the core taxonomy argument plugin (Drupal\taxonomy\Plugin\views\argument\Taxonomy) to help us fix this problem. The plugin takes a term ID from the URL and passes it to Views. We'll override the plugin so that it takes a string from the URL (slug), and then looks up the associated term ID. All the rest of the functionality we'll leave as is.

Step 1: Content and field configuration

To make the example work, we need the following configuration to be in place (most of this you get out-of-the-box with Drupal, you'll just need to add the Slug field):

  • A taxonomy vocabulary named tags.
  • Tags should have the following field:
    • Field name: Slug
    • Machine name: field_slug
    • Type: Text (Plain)
    • Size: 32 characters
  • A content type named article.
  • Article should have the following field:
    • Field name: Tags
    • Machine name: field_tags
    • Type: Entity reference (to taxonomy terms from Tags)
    • Number of values: At least one

Configuring field slug on taxonomy term

Step 2: Create a custom module

Create a custom module called custom_views_argument. Declare a dependency on the views module in the .info.yml file.

Step 3: Implement hook_views_data_alter()

Reference: custom_views_argument.module

The hook_views_data_alter() hook tells Views about the various database tables, fields and the relevant plugins associated to them. We implement this hook to tell Drupal to include our custom argument plugin which we will create in the next step.

Step 4: Create a custom views argument plugin

Reference: CustomTaxonomySlug.php

Next we implement the CustomTaxonomySlug class with a proper annotation @ViewsArgument("custom_taxonomy_slug"). This tells the Views module that the class is a special class which implements a custom Views argument plugin. We extend the Drupal\taxonomy\Plugin\views\argument\Taxonomy class and override one important method CustomTaxonomySlug::setArgument().

public function setArgument($arg) { // If we are not dealing with the exception argument, example "all". if ($this->isException($arg)) { return parent::setArgument($arg); } // Convert slug to taxonomy term ID. $tid = is_numeric($arg) ? $arg : $this->convertSlugToTid($arg); $this->argument = (int) $tid; return $this->validateArgument($tid); }

All we do here is catch the argument from the URL and if it is a slug, we use a convertSlugToTid() method to retrieve the underlying taxonomy term ID. That is it! The rest of the things are handled by the taxonomy plugin.

Step 5: Create Demo Content

Now that everything is in place, we'll put our solution to the test. Start by creating some demo content. Create 2-3 articles and assign them some tags. The tags are created, however, they don't have a slug.

Once done, go to the Admin > Structure > Taxonomy > Tags page and edit the tags and give them nice URL slugs containing only English alphabet letters, numbers and dashes. For real projects, you might need to use a custom or contrib module to automatically generate slugs (see the machine_name module).

Step 6: Configure a View

Now we're all set! The last step is to create and configure a View which will put everything together.

  • Create a View of Content. You can name it Blog.
  • Create a page display and set it's URL to /blog/%.
  • Add a relationship to taxonomy terms referenced from field_tags.
    • We do this to be able to use the Slug field in a filter. 

Configure a relationship with taxonomy terms

  • Now, define a contextual filter for the Slug using the custom argument plugin which we created.
    • Click on the Add button for Contextual filters
    • Choose the Slug filter which we created. It should have the name we had defined in our plugin, i.e. Custom: Has taxonomy term with slug.
    • Optionally, specify a validation criteria for Taxonomy Term and specify the Tags vocabulary.

Configuring the custom views argument plugin for contextual filters

  • Save the view for the new configuration to take effect.

And we're done! If you visit the /blog/SLUG, you should see all the articles which have the taxonomy term associated to SLUG. Here, SLUG refers to the value you put in the Slug field for the tag. E.g. if you have a tag named Accessories and you wrote accessories in the Slug field, you should go the the URL /blog/accessories.

Next steps

If you're looking for hands-on training about how to develop Drupal modules, we offer professional Drupal training online and in-person. See the full Drupal 8 Module Development training curriculum for details.

+ more awesome articles by Evolving Web
Categories: Drupal

OPTASY: These Are the 15 Best Drupal Security Modules Worth Installing on Your Website

Planet Drupal - 4 July 2018 - 6:22am
These Are the 15 Best Drupal Security Modules Worth Installing on Your Website adriana.cacoveanu Wed, 07/04/2018 - 13:22

See? I'm a woman of my word as you can see: here I am now, as promised in my previous post on the most effective ways to secure a Drupal website, ready to run a “magnifying glass” over the best Drupal security modules. To pinpoint their main characteristics and most powerful features and thus to reveal why they've made it to this list.

And why you should put them at the top of your own Drupal security checklist.

So, shall we dig in?
 

1.  Login Security  

It's only but predictable that since the login page/form is the entry to your Drupal site, it is also the most vulnerable page there, as well.

Therefore, secure it!

Categories: Drupal

Happy 4th of July

Tabletop Gaming News - 4 July 2018 - 6:01am
Hey everyone! For us here in the States, it’s the 4th of July. As such, I’m taking the day off to… go play some D&D, as our Founding Fathers would have wanted. Have a happy and save day, and even if you’re not here in the US, go have a BBQ and (safely and responsibly) […]
Categories: Game Theory & Design

Paragraphs frontend ui

New Drupal Modules - 4 July 2018 - 4:36am
Paragraphs Frontend ui

Paragraphs Frontend ui is intended as a POC for editing paragraphs from the frontend.

It is based on ideas from geysir and landingspage, but is based on paragraphs_edit.
That way it has better support for QuickEdit

The following features are currently available in the frontend trough contextual links:

Categories: Drupal

Droptica: Droptica: How does the Droptica team continuously improve its work? See examples from our Sprint Retrospective meetings

Planet Drupal - 4 July 2018 - 4:07am
Your development team constantly makes the same mistakes and does not improve the quality of its work. Are you familiar with this issue? If so, we have a solution for you and it’s really simple – it’s called Sprint Retrospective.  What is Sprint Retrospective? This is one of the meetings in the SCRUM methodology. The meeting takes place on a regular basis, at the end of each sprint. At Droptica, we hold a meeting once every two weeks. During the meeting, the development team analyses the previous sprints and deliberates about what can still be improved – how to eliminate errors and blockers, and how to speed up work.
Categories: Drupal

Basic Auth Limited

New Drupal Modules - 4 July 2018 - 2:38am

Basic Auth Limited module makes Drupal to apply Basic authentication only to usernames matching configured regular expression pattern.

Categories: Drupal

Google reveals how DeepMind AI learned to play Quake III Arena like a pro

Social/Online Games - Gamasutra - 3 July 2018 - 4:57pm

A team of Google DeepMind researchers have trained AI agents to 'act independently, yet learn to interact and cooperate with other agents' by letting them play CTF in (what else?) Quake III Arena. ...

Categories: Game Theory & Design

PreviousNext: Decoupling the model from Drupal

Planet Drupal - 3 July 2018 - 4:17pm

Back in the Drupal 6 days, I built the BOM Weather Drupal module to pull down weather data from the Australian Bureau of Meteorology (BOM) site, and display it to users.

We recently had a requirement for this in a new Drupal 8 site, so decided to take a more modern approach.

by Kim Pepper / 4 July 2018 Not that kind of decoupled Drupal

We often hear the term Decoupled Drupal but I'm not talking about a Javascript front-end and Drupal Web Service API backend.

This kind of decoupling is removing the business logic away from Drupal concepts. Drupal then becomes a wrapper around the library to handle incoming web requests, configuration and display logic.

We can write the business logic as a standalone PHP package, with it's own domain models, and publish it to Packagist.org to be shared by both Drupal and non-Drupal projects.

The Bom Weather Library

We started by writing unit-testable code, that pulled in weather forecast data in an XML format, and produced a model in PHP classes that is much easier for consuming code to use. See the full BOM Weather code on GitHub 

For example:

$client = new BomClient($logger); $forecast = $client->getForecast('IDN10031'); $issueTime = $forecast->getIssueTime(); $regions = $forecast->getRegions(); $metros = $forecast->getMetropolitanAreas(); $locations = $forecast->getLocations(); foreach ($locations as $location) { $aac = $location->getAac(); $desc = $location->getDescription(); /** @var \BomWeather\Forecast\ForecastPeriod[] $periods */ $periods = $location->getForecastPeriods(); // Usually 7 days of forecast data. foreach ($periods as $period) { $date = $period->getStartTime(); $maxTemp = $period->getAirTempMaximum(); $precis = $period->getPrecis(); } }

The library takes care of fetching the data, and the idiosyncrasies of a fairly crufty API (no offence intended!).

Unit Testing

We can have very high test coverage with our model. We can test the integration with mock data, and ensure a large percentage of the code is tested. As we are using PHPUnit tests, they are lightning fast, and are automated as part of a Pull Request workflow on CircleCI.

Any consuming Drupal code can focus on testing just the Drupal integration, and not need to worry about the library code.

Dependency Management

As this is a library, we need to be very careful not to introduce too many runtime dependencies. Also any versions of those dependencies need to be more flexible than what you would normally use for a project. If you make your dependency versions too high they can introduce incompatibilities when used a project level. Consumers will simply not be able to add your library via composer.

We took a strategy with the BOM Weather library of having high-low automated testing via CircleCI. This means you test using both: 

composer update --prefer-lowest

and

composer update

The first will install the lowest possible versions of your dependencies as specified in your composer.json. The second will install the highest possible versions. 

This ensures your version constraints are set correctly and your code should work with any versions in between.

Conclusion

At PreviousNext, we have been using the decoupled model approach on our projects for the last few years, and can certainly say it leads to more robust, clean and testable code. We have had projects migrate from Drupal 7 to Drupal 8 and as the library code does not need to change, the effort has been much less.

If you are heading to Drupal Camp Singapore, make sure to see Eric Goodwin's session on Moving your logic out of Drupal.

Tagged Decoupled Logic, PHP Libraries, Composer, PHP Unit
Categories: Drupal

Fantasy Football Ogres, Halflings, and Female Norse Teams Up On Kickstarter

Tabletop Gaming News - 3 July 2018 - 3:00pm
Impact! Miniatures is no stranger when it comes to Kickstarter campaigns. In fact, they’re currently working on their 40th. In this case, it’s for a trio of new fantasy football teams. There’s the Ogres, the Halflings, and a female Norse team all going right now. About the campaign: Impact! has returned with their 40th KickStarter […]
Categories: Game Theory & Design

September Releases for Dark Souls Board/Card Games Available For Pre-Order

Tabletop Gaming News - 3 July 2018 - 2:00pm
You died. That’s a pretty common thing to see when playing a Dark Souls game. Well, come September, you might be seeing it more often if you’re playing the Dark Souls board or card game from Steamforged. A new batch of expansions will be available, and you can get your name down on the list […]
Categories: Game Theory & Design

Zombie Doctor & The Classic Horror Expansion Pack Up On Kickstarter

Tabletop Gaming News - 3 July 2018 - 1:00pm
Zombies might be a pretty classic horror monster, but there are plenty of other horrible and terrifying creatures out there. Dracula, the Mummy, the Invisible Man. They’re looking to join in on the fun of Zombie Doctor, and that’s just what you get in the Classic Horror Expansion. Both the main game and the new […]
Categories: Game Theory & Design

Mediacurrent: Good People, Good Marketing: A Podcast Interview with Mediacurrent’s Dave Terry

Planet Drupal - 3 July 2018 - 12:31pm

What’s the greatest entrepreneurship lesson that Mediacurrent partner Dave Terry has learned?

In a recent guest spot on the Good People, Good Marketing podcast, Dave weighs in on the evolution of open source technology and shares his path to building a leading Drupal-based agency.

Interview Sound Bites 

Technology should be shared and free. 

 

Giving back to the Drupal community is embedded in Mediacurrent’s DNA. Dave explains why that’s so important.

Culture is about people and who we hire. I know a lot of companies say that, but it’s really about putting the processes behind how you identify the right people within the company.

 

A successful company culture attracts great talent while also managing accountability with a distributed team. Here, Dave shares the three tenets of culture at Mediacurrent.

Tune in

Listen to the complete podcast, Episode 47: Interview with Dave Terry, on the Sideways8 blog.

Related Content 
Why Should Companies Support Drupal? | Blog
Drupal Contrib: Why it's Important | Video
Creating a Culture of Giving in Your Organization | Blog
 

Categories: Drupal

Pages

Subscribe to As If Productions aggregator