Newsfeeds

DrupalCon News: Sneak peek at DrupalCon Speakers

Planet Drupal - 6 February 2018 - 10:41am

Our full session list will be announced on February 21 - but we just couldn’t wait to tell you about a few of the sessions that have us really excited.

Categories: Drupal

TGN Review: Munchkin CCG

Tabletop Gaming News - 6 February 2018 - 10:00am
Just about all of us have at least seen all the variations of Munchkin out there. It’s been a staple of Steve Jackson Games’ line since it came out. Most of the sets have been illustrated by the illustrious John Kovalic. Well, a new set of Munchkin is about to come out. One that’s different […]
Categories: Game Theory & Design

No Sender

New Drupal Modules - 6 February 2018 - 9:31am

No Sender suppresses the inclusion of a Sender header in email generated from the site. The Mime Mail module also happens to do what this module does, amidst plenty of other features.

Categories: Drupal

Aten Design Group: Drupal 8 Views: Entity Reference Exposed Filter as a Select List

Planet Drupal - 6 February 2018 - 9:18am

I have two content types: Art and Artist. The first content type, Art, has an entity reference field to the second content type, Artist. I have a view named “Art” which shows all Art content with an exposed “Artist” filter that lets a user pare down their results. For example, a user might use the “Artist” filter to only show art by Cleon Peterson. By default this exposed filter will be rendered by Views as an empty text input, which is pretty much entirely useless! Users may not know of Cleon Peterson and wouldn’t know to search for him.

A much better solution would be to show the options available for this filter as a select list.

This is exactly the problem I was faced with while working on The Octopus Initiative, a soon-to-launch Drupal 8 project by the Museum of Contemporary Art Denver that allows citizens of Denver the opportunity to take art from the museum home with them.

The solution

Let’s jump into the code.  You’ll need to either create a new module or add the code below from mca_artwork.module to the .module file of an existing one.  I created a new module called “MCA Artwork” and placed it in my project’s modules/custom directory.  My file structure looks like this:

- mca_artwork - mca_artwork.info.yml - mca_artwork.module

Here’s my mca_artwork.info.yml:

name: MCA Artwork type: module description: Customizes Artwork Display core: 8.x package: Custom

And here’s the mca_artwork.module file, where the magic happens:

<?php   /** * @file * Contains mca_artwork.module. */   use Drupal\Core\Form\FormStateInterface;   /** * Implements hook_form_FORM_ID_alter(). * * Alters the artist options on artwork pages. */ function mca_artwork_form_views_exposed_form_alter(&$form, FormStateInterface $form_state, $form_id) {   // If not the view we are looking, move on if ($form['#id'] != 'views-exposed-form-the-art-block-1') { return FALSE; }   // Query nodes $storage = Drupal::getContainer()->get('entity_type.manager')->getStorage('node'); $nids = $storage->getQuery();   // Gather published artist nodes and sort by title $nids = $nids->condition('type', 'artist') ->condition('status', 1) ->sort('title') ->execute();   // If there are no nodes, move on if (!$nids) { return FALSE; }   // Start building out the options for our select list $options = []; $nodes = $storage->loadMultiple($nids);   // Push titles into select list foreach ($nodes as $node) { $options[$node->id()] = $node->getTitle(); }   // Start building out our new form element $artist_field = 'artist'; $form[$artist_field]['#type'] = 'select'; $form[$artist_field]['#multiple'] = FALSE;   // Specify the empty option for our select list $form[$artist_field]['#empty_option'] = t('Artist');   // Add the $options from above to our select list $form[$artist_field]['#options'] = $options; unset($form[$artist_field]['#size']); }

If you read through the comments in the above code, you’ll see we are essentially doing the following things:

  1. We load all published artist nodes, sorted by name
  2. We create an array of Artist names keyed by node id. These will be our select list options.
  3. We change the existing artist form input to a select list and populate it with our new options array.

It turns out this is a common UX need in Drupal 8 Views.  My comrade at Aten, John Ferris, also ran across this problem for a recently-launched Drupal 8 project he worked on for the Center for Court Innovation, a non-profit seeking to to create positive reforms in the criminal justice system.  The code snippet for The Octopus Initiative was largely adapted from his work on the Center for Court Innovation.

For the Center for Court Innovation site, the Chosen JS library was added to provide an interface for searching through a larger list of items.

In summary, the module I created for The Octopus Initiative provides a useful UX over what Drupal Views offers out-of-the-box.  If you have a larger number of items in your select list, then you may consider adding something like Chosen JS to make it easier to sort through, as was done for the Center for Court innovation.  Whatever you do, don't leave your users stranded with an empty text element!

Categories: Drupal

Wreck Age: 2nd Edition Rulebook Now Available

Tabletop Gaming News - 6 February 2018 - 9:00am
Well, the world’s come to an end again. Damnit, Todd, I told you that “the nuclear option” didn’t mean just launching all the missiles and hoping for the best. Now we’ve got to find ways to survive in this post-apocalyptic wasteland. Thankfully, we used to play a bunch of Wreck Age, so we’re well-prepared. And […]
Categories: Game Theory & Design

Acro Media: Introducing the Urban Hipster (UH) Demo for Drupal Commerce 2

Planet Drupal - 6 February 2018 - 8:51am

Because Drupal has so many options and so much flexibility, it can be a bit intimidating to newcomers. It doesn't show you examples of what it can do, and it kind of seems to do nothing by default. We realized people needed to be shown just how cool it really is, so we built a demo site to do just that. Check it out here: http://commerce.acromedia.com

The setup

We focused on making it only with out-of-the-box stuff, restricting ourselves to the features and functionality that exist within Drupal Commerce ecosystem itself. No custom code or modifications other than normal theming. That's right: Using only what's available out there now, we came up with a pretty amazing ecommerce site, if we do say so ourselves.

One caveat: we did make a custom theme for the demo, which you'll probably want to do anyway. There are the default Drupal themes, but most people are going to want to create a custom one. But that's a relatively simple task for a front-end developer; you don't need a back-end developer as well.

All the other setup can be done through basic Drupal UI point-and-click configuration. If you're somewhat savvy with configuring Drupal, you can do it all yourself in a very short time, and produce a truly phenomenal site.

Sometimes you need some guidance

Many people wonder how it could possibly be so easy. We've been getting a lot of questions like, "How did you build this big amazing catalog?" And the truth is we didn't actually do that much. We just enabled and configured the functionality that was already available. Drupal has this great Search API (and associated modules, Solr and Facets) that lets you do a ton of search customizations for anything that's stored in Drupal (blog articles, users, products, whatever), so all you have to do is tweak the configurations and you get this amazing catalog.

It's not that hard, but it's not that intuitive either; you just need a little guidance and direction. Sometimes just seeing an example is enough to make you realize how easy it can be. And that's exactly what the demo provides. It features a checkout, tax configurations, some shipping options, and even a sample payment system. You can click around and check it out without fear of breaking things, the database resets every night.

When you go to the demo site initially, a popup is preseted with a bunch of guided tours, but you are of course free to ignore that and just play around with it yourself. We're also releasing a bunch of tutorial videos to help you. We also have a resources page that shows a lot of the different features you can check out.

Plus, all the source code for the demo, including the custom theme, is available on GitHub. Within the repo is a full database dump so you can set up the entire thing yourself locally (see the README.md). AND one of the Commerce module maintainers, Bojan Živanović, is taking some of the content and configuration from the demo and turning it into an installable demo store module.

It's seriously awesome. Check it out!

Chat with us

If you'd like a personalized tour to discuss how Drupal Commerce fits into your omnichannel solution, give us a shout. We're happy to show and tell.

Categories: Drupal

Smartly containing the cloud increases computing efficiency, says first-of-its-kind study

Virtual Reality - Science Daily - 6 February 2018 - 8:49am
Researchers discovered ways to further improve computing efficiency using management tools for cloud-based light-weight virtual machine replacements called containers.
Categories: Virtual Reality

Anvil Eight Previews The Vector For Aetherium

Tabletop Gaming News - 6 February 2018 - 8:00am
In physics, a vector is something that has both velocity and direction. In Aetherium, it’s a nasty program that is part of the Rhommox faction. That isn’t to say that it doesn’t also have velocity and direction. The velocity is “as fast as it can” and the direction is “into the heart of the enemy […]
Categories: Game Theory & Design

Worm 'uploaded' to computer and taught amazing tricks

Virtual Reality - Science Daily - 6 February 2018 - 7:58am
The tiny worm C. elegans is the only living being whose neural network has been analyzed completely. It can therefore be transferred to a computer, creating a virtual copy of the worm which behaves in exactly the same way to external stimuli. Such a 'virtual worm' can learn amazing tricks -- its neural network can even be used to balance a pole, which is a standard control problem in computer science.
Categories: Virtual Reality

Nice FileMime

New Drupal Modules - 6 February 2018 - 7:10am
Categories: Drupal

Dissecting Design -- The (In) Accessible Nature of Celeste - by Josh Bycer

Gamasutra.com Blogs - 6 February 2018 - 7:10am
Each week, Game Design Analyst Josh Bycer takes a deep dive into a title. This week, we're focusing on Celeste and how its assist mode and level design are at odds with one another.
Categories: Game Theory & Design

GIFin&#039; Ain&#039;t Easy (But It Gets Easier): Tips for Great GIFs - by Dora Breckinridge

Gamasutra.com Blogs - 6 February 2018 - 7:10am
Screenshots are great, but sometimes a still image just doesn't cut it. Here are some general tips and advice to make GIFs that don't suck to promote your game, cribbed from my own experience of learning how to do the same.
Categories: Game Theory & Design

Visual Studio Code is My Favorite Text Editor - by Terry Nguyen

Gamasutra.com Blogs - 6 February 2018 - 7:09am
Visual Studio Code has grown on me as a great text editor that is made versatile through its powerful extension community. It doesn't completely replace Visual Studio, but is robust enough for most text editing scenarios.
Categories: Game Theory & Design

Tencent Targets Casual Mobile Gamers with WeChat Mini Games - by Lisa Hanson

Gamasutra.com Blogs - 6 February 2018 - 7:08am
The WeChat Mini Games platform is a hot topic. The platform is an extension of Tencent’s gaming business, particularly the Mini Programs platform, designed to target the casual mobile gamer.
Categories: Game Theory & Design

Why people don&#039;t buy your game - by Chris Zukowski

Gamasutra.com Blogs - 6 February 2018 - 7:07am
If you feel like you are just throwing darts trying random marketing schemes then understanding what a marketing funnel is can really help. In this post I will introduce this concept and illustrate where things can go wrong.
Categories: Game Theory & Design

Once upon a time – Fairy tales as a tool for game devs - by Tabea Iseli

Gamasutra.com Blogs - 6 February 2018 - 7:07am
Creating a meaningful game can be quite challenging, especially when it comes to how to embed a message. For my upcoming game, I decided to use fairy tales as a tool for that. The post talks about that choice and fairy tales as the mystic medium they are.
Categories: Game Theory & Design

Fantasy Flight Previews the Rebel Troopers Unit Expansion for Star Wars: Legion

Tabletop Gaming News - 6 February 2018 - 7:00am
While the Empire had their huge, military machine. The Rebels could only count on those individuals willing to pick up arms and fight. Most of these troopers weren’t career soldiers, but just wanted a better form of government for the galaxy. However, though they might not have been soldiers before, they trained just as hard […]
Categories: Game Theory & Design

Level Design: Understanding a level - by Jonathon Wilson

Gamasutra.com Blogs - 6 February 2018 - 6:42am
Recently, I decided that I wanted to start a blog to discuss various aspects of game development and the game industry. This post focuses on the area of level design, with the idea that future posts will expand upon some of what is disscussed here.
Categories: Game Theory & Design

Outrealm Post-Mortem, Part 1 - by Nick Thandi

Gamasutra.com Blogs - 6 February 2018 - 6:42am
Part 1 of my multi-part series on Outrealm's Post-mortem.
Categories: Game Theory & Design

Anonymous Comment User Info

New Drupal Modules - 6 February 2018 - 6:17am

Provides anonymous user info on comments.

When a comment is authored by a user, the users 'compact' view mode will berendered. By default this view mode includes the user picture/avatar. For comments posted anonymously, there is no built-incapability to show info related to the account, because these anonymous accounts are not user entities. This module provides a way to show user info for anonymous users. You have the option of using a comment display mode in combination with a Twig template.

Categories: Drupal

Pages

Subscribe to As If Productions aggregator