Newsfeeds

Way of the Fighter Relaunches on Kickstarter

Tabletop Gaming News - 29 November 2016 - 2:00pm
Round 2… Fight! So, round 1 didn’t go so well for Way of the Fighter, the Street-Fighter-Style board game from Soda Pop Miniatures. The campaign was stagnating badly and hadn’t reached its goal a week from the end. So it was taken down. With a bit of refactoring, the game’s back up on Kickstarter not […]
Categories: Game Theory & Design

Cheeky Monkey Media: Hacking DrupalCon: A Behind the Scenes Look at the Event Design and Planning Process

Planet Drupal - 29 November 2016 - 1:58pm
Hacking DrupalCon: A Behind the Scenes Look at the Event Design and Planning Process Spela Tue, 11/29/2016 - 21:58

Ever wonder what goes into a conference or other business event that participants will gush about (in a good way) for years? After an event of these mythical proportions, participants walk away raving about the food, the speakers, the social events, the aura, and the list goes on ...

But pulling off such an event is no easy feat. Thus, I decided to speak with Lead DrupalCon Coordinator Amanda Gonser to find out how she manages to make sure the DrupalCon event design is flawless and fits into the overall event planning process seamlessly.

(This video may cause unexpected bursts of laughter. If you cannot laugh in your current environment, please scroll down for the written version.)

Categories: Drupal

Mediacurrent: Communicating Design to Clients

Planet Drupal - 29 November 2016 - 1:06pm

What makes a good designer? Well, of course you have to be creative, understand how to solve problems in unconventional ways, and do it all within budget. But wait, there's more to it than being super creative and solving problems. You must be able to make others understand how your design vision solves their problems.

Categories: Drupal

Fantasy Flight Games Posts New Angeles Rule Book

Tabletop Gaming News - 29 November 2016 - 1:00pm
I don’t know about you, but I can’t afford to just go out and buy every game that comes out onto the market. Even games that fit a particular interest grouping of mine, there’s just so many, and I only have so much storage space and gaming time, I like to know what I’m getting […]
Categories: Game Theory & Design

CC1 Calidar, Beyond the Skies

New RPG Product Reviews - 29 November 2016 - 12:08pm
Publisher: Calidar Publishing
Rating: 5
Bruce Heard, formerly of TSR and of Mystara and "Voyage of the Princess Ark" fame has been working on his new world Calidar for a little bit now. I reviewed the premier product, Calidar in Stranger Skies, a while back and I really loved it. I have used bits and pieces of this world in my own games now for a couple of years; building up to something a little bigger. The great thing about Calidar, and what Bruce is doing with it, is it can be added to any game world or campaign with only a little bit of fuss. OR you can go whole hog with it and have it as your game world.

The newest book out, Calidar, Beyond the Skies, really helps with either plan.

Ethics in Game Reviewing: I received a copy of hard bound book in exchange for a fair review. All links are affiliate sponsored links. Further disclosure: I was planning on reviewing this anyway, I just moved it up a little bit.

Calidar, Beyond the Skies is part campaign book, part cultural reference and part guide to gods. There is only minimal stats in this book. This is both an advantage and a disadvantage. The obvious disadvantage is of course judging the power levels of the various gods. I am going to say right now that this REALLY is not a disadvantage. Gods are not Monsters. Even in Calidar where the Gods often interfere in the affairs of mortals, those mortals are not going to pick a fight with them. Relative powers are given and that really is enough.
The advantage is a true advantage. Playing old school D and D? Great! Playing Pathfinder? Great! D and D5? Equally great! But I am getting WAY ahead of myself.

I am reviewing the hard cover version of the book. It is 248 full color pages on decent weight paper and full color covers. I put the production values at the same level of the best of WotC's D and D or Paizo's Pathfinder.

The book begins with discussing the common abilities given to all divine beings and a discussion on what they are and do. This follows a brief overview of the "planes". This is a section worthy of the best of the TSR-era Manual of the Planes and right next to the 3rd Ed Manual of Planes. I have to admit I love seeing the "energy" planes configured like a d10. Totally using that one.

Since this is system free there is section on how to convert your system to something the book uses. The easiest of course is a percentage system. Depending on your game's chosen system there is a conversion here.

All of that and we are now into the "meat" of the book. The map of the Great Caldera is given again with the countries and cultures highlighted. This is important and a page I found myself coming back to as I read each section. There is a great table on pages 14-15 that has every god, their cultures and their area of interest. I was happy to see some overlap and missing areas. Gods are not supposed to be neat and tidy things. Some interests are over-represented, some have none at all and some gods stretch across more than one culture.
Ok at this point if you have ever read any "Gods" or "Pantheon" D and D book you can easily start making sense of things.

After this we cover the different pantheons and cultures. We cover 10 such groupings of gods along with chapters on Rewards, the World Soul of Calidar and various godly trappings.

This is a book that takes full advantage of color. Greater gods are in bold, evil gods are listed (title only not text) in red and benevolent gods are likewise in blue. So a greater evil god is in bold Red.

When each grouping of gods is introduced we get the names and interests (spheres) of all that pantheon. Common attributes for all the gods are given (what they have in common) and an overview of their Genesis story with a timeline. We then get into some really interesting material.
A kind of flow chart is given on the relationships between the gods of the grouping. This is best seen in the Gods of Nordheim, which are "imported" from Norse myths by travelers long ago.

After this each god is listed with a stat block of interests, allies, cults, foes, centers of faith and holy days. Lots of details really.

There is so much in this book that I think it is going to take some more readings to digest it all. Each section also contains neat little bits like various temples, the gods' personal symbols, other bits to round out the faiths and make them feel like they real. In some, like for example the Gods of Meryath, weather (and in particular rain) are so important that the seasons are also discussed in relationship to the gods.

The last sections also detail various Elemental Lords, demons and mythological beasts and other near-divine beings.

There is a lot going on in this book. If you are a fan at all of gods, myths and using them in your games then is a great addition. Even if you don't play in the Calidar world this is a well thought out collection of myths. I found this just as enjoyable as reading D and D's "Gods, Demigods and Heroes" the first time. If you need some good, new-to-you-and-your-players gods then this is a must buy.

The art throughout is fantastic (that's Soltan of the Narwan on the cover) and really sets this book above others of it's kind.
Categories: Game Theory & Design

Lullabot: Pull Content From a Remote Drupal 8 Site Using Migrate and JSON API

Planet Drupal - 29 November 2016 - 12:02pm

I wanted to find a way to pull data from one Drupal 8 site to another, using JSON API to expose data on one site, and Drupal’s Migrate with a JSON source on another site to consume it. Much of what I wanted to do was undocumented and confusing, but it worked well, once I figured it out. Nevertheless, it took me several days to get everything working, so I thought I’d write up an article to explain how I solved the problem. Hopefully, this will save someone a lot of time in the future.

I ended up using the JSON API module, along with the REST modules in Drupal Core on the source site. On the target site, I used Migrate from  Drupal Core 8.2.3 along with Migrate Plus and Migrate Tools.

Why JSON API?

Drupal 8 Core ships with two ways to export JSON data. You can access data from any entity by appending ?_format=json to its path, but that means you have to know the path ahead of time, and you’d be pulling in one entity at a time, which is not efficient.

You could also use Views to create a JSON endpoint, but it might be difficult to configure it to include all the required data, especially all the data from related content, like images, authors, and related nodes. And you’d have to create a View for every possible collection of data that you want to make available. To further complicate things, there's an outstanding bug using GET with Views REST endpoints.

JSON API provides another solution. It puts the power in the hands of the data consumer. You don’t need to know the path of every individual entity, just the general path for a entity type, and bundle. For example: /api/node/article. From that one path, the consumer can select exactly what they want to retrieve just by altering the URL. For example, you can sort and filter the articles, limit the fields that are returned to a subset, and bring along any or all related entities in the same query. Because of all that flexibility, that is the solution I decided to use for my example. (The Drupal community plans to add JSON API to Core in the future.)

There’s a series of short videos on YouTube that demonstrate many of the configuration options and parameters that are available in Drupal’s JSON API.

Prepare the Source Site

There is not much preparation needed for the source because of JSON API’s flexibility. My example is a simple Drupal 8 site with an article content type that has a body and field_image image field, the kind of thing core provides out of the box.

First, download and install the JSON API module. Then, create YAML configuration to “turn on” the JSON API. This could be done by creating a simple module that has YAML file(s) in /MODULE/config/optional. For instance, if you created a module called custom_jsonapi, a file that would expose node data might look like:

filename: /MODULE/config/optional/rest.resource.entity.node.yml: id: entity.node plugin_id: 'entity:node' granularity: method configuration: GET: supported_formats: - json supported_auth: - basic_auth - cookie dependency: enforced: module: - custom_jsonapi

To expose users or taxonomy terms or comments, copy the above file, and change the name and id as necessary, like this:

filename: /MODULE/config/optional/rest.resource.entity.taxonomy_term.yml: id: entity.taxonomy_term plugin_id: 'entity:taxonomy_term' granularity: method configuration: GET: supported_formats: - json supported_auth: - basic_auth - cookie dependency: enforced: module: - custom_jsonapi

That will support GET, or read-only access. If you wanted to update or post content you’d add POST or PATCH information. You could also switch out the authentication to something like OAuth, but for this article we’ll stick with the built-in basic and cookie authentication methods. If using basic authentication and the Basic Auth module isn’t already enabled, enable it.

Navigate to a URL like http://sourcesite.com/api/node/article?_format=api_json and confirm that JSON is being output at that URL.

That's it for the source.

Prepare the Target Site

The target site should be running Drupal 8.2.3 or higher. There are changes to the way file imports work that won't work in earlier versions. It should already have a matching article content type and field_image field ready to accept the articles from the other site.

Enable the core Migrate module. Download and enable the Migrate Plus and Migrate Tools modules. Make sure to get the versions that are appropriate for the current version of core. Migrate Plus had 8.0 and 8.1 branches that only work with outdated versions of core, so currently you need version 8.2 of Migrate Plus.

To make it easier, and so I don’t forget how I got this working, I created a migration example as the Import Drupal module on Github. Download this module into your module repository. Edit the YAML files in the /config/optional  directory of that module to alter the JSON source URL so it points to the domain for the source site created in the earlier step.

It is important to note that if you alter the YAML files after you first install the module, you'll have to uninstall and then reinstall the module to get Migrate to see the YAML changes.

Tweaking the Feed Using JSON API

The primary path used for our migration is (where sourcesite.com is a valid site):

http(s)://sourcesite.com/api/node/article?_format=api_json

This will display a JSON feed of all articles. The articles have related entities. The field_image field points to related images, and the uid/author field points to related users. To view the related images, we can alter the path as follows:

http(s)://sourcesite.com/api/node/article?_format=api_json&include=field_image

That will add an included array to the feed that contains all the details about each of the related images. This way we won’t have to query again to get that information, it will all be available in the original feed. I created a gist with an example of what the JSON API output at this path would look like.

To include authors as well, the path would look like the following. In JSON API you can follow the related information down through as many levels as necessary:

http(s)://sourcesite.com/api/node/article?_format=api_json&include=field_image,uid/author

Swapping out the domain in the example module may be the only change needed to the example module, and it's a good place to start. Read the JSON API module documentation to explore other changes you might want to make to that configuration to limit the fields that are returned, or sort or filter the list.

Manually test the path you end up with in your browser or with a tool like Postman to make sure you get valid JSON at that path.

Migrating From JSON

I had a lot of trouble finding any documentation about how to migrate into Drupal 8 from a JSON source. I finally found some in the Migrate Plus module. The rest I figured out from my earlier work on the original JSON Source module (now deprecated) and by trial and error. Here’s the source section of the YAML I ended up with, when migrating from another Drupal 8 site that was using JSON API.

source: plugin: url data_fetcher_plugin: http data_parser_plugin: json urls: http://sourcesite.com/api/node/article?_format=api_json ids: nid: type: integer item_selector: data/ fields: - name: nid label: 'Nid' selector: /attributes/nid - name: vid label: 'Vid' selector: /attributes/vid - name: uuid label: 'Uuid' selector: /attributes/uuid - name: title label: 'Title' selector: /attributes/title - name: created label: 'Created' selector: /attributes/created - name: changed label: 'Changed' selector: /attributes/changed - name: status label: 'Status' selector: /attributes/status - name: sticky label: 'Sticky' selector: /attributes/sticky - name: promote label: 'Promote' selector: /attributes/promote - name: default_langcode label: 'Default Langcode' selector: /attributes/default_langcode - name: path label: 'Path' selector: /attributes/path - name: body label: 'Body' selector: /attributes/body - name: uid label: 'Uid' selector: /relationships/uid - name: field_image label: 'Field image' selector: /relationships/field_image


One by one, I’ll clarify some of the critical elements in the source configuration.

File-based imports, like JSON and XML use the same pattern now. The main variation is the parser, and for JSON and XML, the parser is in the Migrate Plus module:

source: plugin: url data_fetcher_plugin: http data_parser_plugin: json

The url is the place where the JSON is being served. There could be more than one URL, but in this case there is only one. Reading through multiple URLs is still pretty much untested, but I didn’t need that:

urls: http://sourcesite.com/api/node/article?_format=api_json

We need to identify the unique id in the feed. When pulling nodes from Drupal, it’s the nid:

ids: nid: type: integer

We have to tell Migrate where in the feed to look to find the data we want to read. A tool like Postman (mentioned above) helps figure out how the data is configured. When the source is using JSON API, it’s an array with a key of data:

item_selector: data/

We also need to tell Migrate what the fields are. In the JSON API, they are nested below the main item selector, so they are prefixed using an xpath pattern to find them. The following configuration lets us refer to them later by a simple name instead of the full path to the field. I think the label would only come into play if you were using a UI:

fields: - name: nid label: 'Nid' selector: /attributes/nid Setting up the Image Migration Process

For the simple example in the Github module we’ll just try to import nodes with their images. We’ll set the author to an existing author and ignore taxonomy. We’ll do this by creating two migrations against the JSON API endpoint, first one to pick up the related images, and then a second one to pick up the nodes.

Most fields in the image migration just need the same values they’re pulling in from the remote file, since they already have valid Drupal 8 values, but the uri value has a local URL that needs to be adjusted to point to the full path to the file source so the file can be downloaded or copied into the new Drupal site.

Recommendations for how best to migrate images have changed over time as Drupal 8 has matured. As of Drupal 8.2.3 there are two basic ways to process images, one for local images and a different one for remote images.  The process steps are different than in earlier examples I found. There is not a lot of documentation about this. I finally found a Drupal.org thread where the file import changes were added to Drupal core and did some trial and error on my migration to get it working.  

For remote images:

source: ... constants: source_base_path: 'http://sourcesite.com/' process: filename: filename filemime: filemime status: status created: timestamp changed: timestamp uid: uid uuid: id source_full_path: plugin: concat delimiter: / source: - 'constants/source_base_path' - url uri: plugin: download source: - '@source_full_path' - uri guzzle_options: base_uri: 'constants/source_base_path'

For local images change it slightly:

source: ... constants: source_base_path: 'http://sourcesite.com/' process: filename: filename filemime: filemime status: status created: timestamp changed: timestamp uid: uid uuid: id source_full_path: plugin: concat delimiter: / source: - 'constants/source_base_path' - url uri: plugin: file_copy source: - '@source_full_path' - uri

The above configuration works because the Drupal 8 source uri value is already in the Drupal 8 format, http://public:image.jpg. If migrating from a pre-Drupal 7 or non-Drupal source, that uri won’t exist in the source. In that case you would need to adjust the process for the uri value to something more like this:

source: constants: is_public: true ... process: ... source_full_path: - plugin: concat delimiter: / source: - 'constants/source_base_path' - url - plugin: urlencode destination_full_path: plugin: file_uri source: - url - file_directory_path - temp_directory_path - 'constants/is_public' uri: plugin: file_copy source: - '@source_full_path' - '@destination_full_path' Run the Migration

Once you have the right information in the YAML files, enable the module. On the command line, type this:

drush migrate-status

You should see two migrations available to run.  The YAML files include migration dependencies and that will force them to run in the right order. To run them, type:

drush mi --all

The first migration is import_drupal_images. This has to be run before import_drupal_articles, because field_image on each article is a reference to an image file. This image migration uses the path that includes the related image details, and just ignores the primary feed information.

The second migration is import_drupal_articles. This pulls in the article information using the same url, this time without the included images. When each article is pulled in, it is matched to the image that was pulled in previously.

You can run one migration at a time, or even just one item at a time, while testing this out:

drush migrate-import import_drupal_images --limit=1

You can rollback and try again.

drush migrate-rollback import_drupal_images

If all goes as it should, you should be able to navigate to the content list on your new site and see the content that Migrate pulled in, complete with image fields. There is more information about the Migrate API on Drupal.org.

What Next?

There are lots of other things you could do to build on this. A Drupal 8 to Drupal 8 migration is easier than many other things, since the source data is generally already in the right format for the target. If you want to migrate in users or taxonomy terms along with the nodes, you would create separate migrations for each of them that would run before the node migration. In each of them, you’d adjust the include value in the JSON API path to pull the relevant information into the feed, then update the YAML file with the necessary steps to process the related entities.

You could also try pulling content from older versions of Drupal into a Drupal 8 site. If you want to pull everything from one Drupal 6 site into a new Drupal 8 site you would just use the built in Drupal to Drupal migration capabilities, but if you want to selectively pull some items from an earlier version of Drupal into a new Drupal 8 site this technique might be useful. The JSON API module won’t work on older Drupal versions, so the source data would have to be processed differently, depending on what you use to set up the older site to serve JSON. You might need to dig into the migration code built into Drupal core for Drupal to Drupal migrations to see how Drupal 6 or Drupal 7 data had to be massaged to get it into the right format for Drupal 8.

Finally, you can adapt the above techniques to pull any kind of non-Drupal JSON data into a Drupal 8 site. You’ll just have to adjust the selectors to match the format of the data source, and do more work in the process steps to massage the values into the format that Drupal 8 expects.

The Drupal 8 Migrate module and its contributed helpers are getting more and more polished, and figuring out how to pull in content from JSON sources could be a huge benefit for many sites. If you want to help move the Migrate effort forward, you can dig into the Migrate in core initiative and issues on Drupal.org.

Categories: Drupal

Shintiara RPG Up On Kickstarter

Tabletop Gaming News - 29 November 2016 - 12:00pm
Time keeps on slippin’ into the future. Shintiara is a planet on the edge. Both its host star as well as a nearby black hole push and pull on it with strange consequences. Time paradoxes are an everyday part of life, but that doesn’t always mean you’re used to that sort of thing. Suddenly, the […]
Categories: Game Theory & Design

Facebook launches in-app game library with Instant Games service

Social/Online Games - Gamasutra - 29 November 2016 - 11:52am

The social media giant has kicked off the closed beta for a gaming platform built directly into the company's mobile apps. ...

Categories: Game Theory & Design

Drupal Association News: Drupal Association Financial Statements for Q3 2016

Planet Drupal - 29 November 2016 - 11:43am

We normally share  our financial statements in posts about public board meetings, since that is the time when board members approve the statements. However, I wanted to give this quarter’s update its own blog post. We’ve made many changes to improve our sustainability over the last few months and I am fully embracing our value of communicating with transparency by giving insight into our progress.

First, a word of thanks

We are truly thankful for all the contributions that our community makes to help Drupal thrive. Your contribution comes in the form of time, talent, and treasure and all are equally important. Just as contributing code or running a camp is critical, so is financial contribution.

The Drupal Association is able to achieve its mission to unite the community to build and promote Drupal thanks to those who buy DrupalCon tickets and sponsor the event, our Supporters and Members, Drupal.org sponsors, and talent recruiters who post jobs on Drupal Jobs.

We use these funds to maintain Drupal.org and it’s tooling so the community can build and release the software and so technical evaluators can learn why Drupal is right for them through our new marketing content. It also funds DrupalCon production so we can bring the community together to level up skills, accelerate contribution, drive Drupal business, and build stronger bonds within our community. Plus, it funds Community Cultivation Grants and DrupalCon scholarships, removing financial blockers for those who want to do more for Drupal. And of course, these funds pay staff salaries so we have the right people on board to do all of this mission work.

I also want to thank our board members who serve on the Finance Committee, Tiffany Farris (Treasurer), Dries Buytaert, Jeff Walpole, and Donna Benjamin. They provide financial oversight for the organization, making sure we are the best stewards possible for the funds the community gives to us. I also want to thank Jamie Nau of Summit CPA, our new CFO firm. Summit prepares our financial statements and forecasts and is advising us on long term sustainability.

Q3 Financial Statements

A financial statement is a formal record of the financial activities of the Drupal Association. The financial statements present information in a structured way that should make it easy to understand what is happening with the organization's finances.

Once staff closes the books each month, Summit CPA prepares the financial statement, which the finance committee reviews and approves. Finally, the full Drupal Association Board approves the financial statements. This process takes time, which is why Q3 financials are released in Q4.

You can find the Q3 financial statements here. They explain how The Association used its money in July, August, and September of this year. It takes a little financial background to understand them, so Summit CPA provides an executive summary and they set KPIs so it is clear how we are doing against important financial goals.

The latest executive summary is at the beginning of the September financial statement. In short, it says we are sustainable and on the right path to continue improving our financial health.

“We are working on building an adequate cash reserve balance. As of September a cash balance of $723K is 14% of twelve-months of revenue. Summit recommends a cash reserve of 15%-30% of estimated twelve-month revenue. Since Drupal’s revenue and expenditures drastically fluctuate from month to month [due to DrupalCon] a cash reserve goal closer to 30% is recommended.

Through August we have achieved a Net Income Margin of 4% and a Gross Profit Margin 33%. Our goal is to increase the Net Income Margin to over 10% during the next year.”
- Summit CPA

Improving our sustainability will continue to be an imperative through 2017, so the Association can serve its mission for generations to come. Financial health improvements will be achieved by the savings we gain over time from the staff reductions we did this summer. Another area of focus is improving our programs’ gross margins.

You can expect to see the Q4 2016 financials in Q1 2017. You can also expect to see our 2017 budget and operational focus. We are certainly excited (and thankful) for your support and we look forward to finding additional ways to serve this amazing community in 2017.

Categories: Drupal

Agaric Collective: Redirect users after login to the page they were viewing in Drupal 8

Planet Drupal - 29 November 2016 - 11:13am

Have you ever been asked to log into a website while you are viewing a page? And after doing so you get redirected to some page other than the one you were reading? This is an obvious and rather common usability problem. When this happens people lose track of what they were doing and some might not even bother to go back. Let's find out how to solve this in Drupal 8.

In a recent project a client wisely requested exactly that: whenever a user logs into the site, redirect them to the page they were before clicking the login link. This seemed like a very common request so we looked for a contrib module that provided the functionality. Login Destination used to do it in Drupal 7. Sadly the Drupal 8 version of this module does not provide the functionality yet.

Other modules, and some combinations of them, were tested without success. Therefore, we built Login Return Page. It a very small module that just does one thing and it does it well: it appends destination=/current/page to all the links pointing to /user/login effectively redirecting users to the page they were viewing before login. The project is waiting to be approved before promoting it to full project.

Have you had a similar need? Are there other things you are requested to do after login? Please share them in the comments.

Categories: Drupal

Podcast Roundup

Tabletop Gaming News - 29 November 2016 - 11:00am
It’s time once again to get you some gaming podcasts to listen to. Helps to get through the day when you can’t actually do any gaming, but you still have gaming on the mind. This week we have: Singled Out Episode 19: Changes In Season 3 With Jamie Perkins, Guild Ball Tonight Episode 50: Just […]
Categories: Game Theory & Design

GDC 2017 launches low-income free Expo Pass program

Social/Online Games - Gamasutra - 29 November 2016 - 10:14am

These complimentary Expo Passes awarded via the Low Income Pass Lottery are intended for participants who would otherwise not be able to attend GDC without considerable financial assistance. ...

Categories: Game Theory & Design

November Releases For Pulp City Released

Tabletop Gaming News - 29 November 2016 - 10:00am
November’s almost over, but there’s still some time to get the month’s releases posted so you, the eagerly-awaiting public, can get a hold of them. Such is the case with the folks over at Pulp Monsters, as the latest batch of Pulp City Releases are now available. The folks at Pulp Monsters are also running […]
Categories: Game Theory & Design

Battlefront Announces Tiger I Tanks Marsch Edition

Tabletop Gaming News - 29 November 2016 - 9:00am
The German Tiger Tank was one of the most feared pieces of war on the battlefields of Europe during WWII. It was no small feat to actually defeat one in combat. Many allied tankers would just do their best to avoid conflicts with one. Well, Battlefront is letting you field groups of them in your […]
Categories: Game Theory & Design

Libraries in Profiles

New Drupal Modules - 29 November 2016 - 8:55am

This project pre-emptively checks for missing JavaScript/CSS Assets and looks in other locations - the active profile folder and a user configurable extra location.

REQUIREMENTS

Drupal 8 is required, Drupal 8.2.x or higher is suggested.

INSTALLATION

Install as you would normally install a contributed Drupal module. See the Drupal 8 instructions if required in the Drupal documentation for further information.

Categories: Drupal

Third & Grove: Theming form elements in Drupal 8

Planet Drupal - 29 November 2016 - 8:03am
Theming form elements in Drupal 8 ross Tue, 11/29/2016 - 11:03
Categories: Drupal

Abandon Planet Board Game Up On Kickstarter

Tabletop Gaming News - 29 November 2016 - 8:00am
“I don’t want to live on this planet anymore.” One of my favorite lines from Futurama, and one that’s been thrown around a lot lately. Well, whatever might be going on in the world, I’d say that an impending meteor strike would certainly cause someone to want to flee the planet. That’s just what’s happening […]
Categories: Game Theory & Design

Video game composers can make you smarter! (The music of Dragon Front) Part 1 - by Winifred Phillips

Gamasutra.com Blogs - 29 November 2016 - 7:52am
In the 1st of a 3-part series, video game music composer Winifred Phillips explores how music enhances focus & cognition in strategy gamers. In Part 1: music-message congruency, with examples of Phillips's music from the Dragon Front virtual reality game.
Categories: Game Theory & Design

Xeno Media: Top Thirteen Drupal Twig Helper Modules

Planet Drupal - 29 November 2016 - 7:29am

We have been loving learning Drupal 8’s theming system over the last year.  Drupal 8 core now uses the Twig template engine, which is a fast, flexible, and secure system that allows use to create the markup needed for the modern web.

What you can do with Drupal core’s Twig is pretty great, but the Drupal community always brings so much more to the table after real world use.  We don’t use them all, all of the time, but have used many as our design and development needed.  Here are our favorite modules to help build out your Drupal themes.

Twig tweak

The Twig Tweak Drupal module gives Drupal 8 themers additional commonly needed functions and filters to use in templating:

  • drupal_view: Pass arguments to views.
  • drupal_block: Include a Drupal block.
  • drupal_entity: Include a Drupal entity.
  • drupal_field: Renders a field from a specific entity.
  • drupal_token: Use token API to deliver data to your templates.
  • drupal_config: Access and print configuration.
  • token_replace: Place multiple tokens.
  • preg_replace: The easiest way to alter their output.
  • image_style: Provide either path or URI to original image.

It also allows for you to turn PHP filter back on, which isn't recommended, and is off by default.

Twig Field Value

The Twig Field Value Drupal module allows Drupal 8 themers to get partial data from field render arrays.  If you want to have control of the markup on your field’s label and/or value, you can.  If you want to choose the field’s text format, you can.  This great utility module gives us the following filters:

  • field_label: Returns the field label value.
  • field_value: Returns the render array of the field value(s) without the field wrappers.
  • field_raw: Returns raw field properties value(s).
  • field_target_entity: Returns the referenced entity object(s) of an entity reference field.
Twig Extensions

This handy Drupal 8 module adds support for the Twig Extensions library.  The library adds additional filters to Twig itself, and this module allows us to use them in Drupal.

  • Text: Provides useful filters for text manipulation.
  • I18n: Adds internationalization support via the gettext library.
  • Intl: Adds a filter for localization of DateTime objects.
  • Array: Provides useful filters for array manipulation.
  • Date: Adds a filter for rendering the difference between dates.
Twig Extender

The Twig Extender Drupal module adds a plugin system to add new twig extensions.  It includes one filter (truncate), and one function (user_is_logged_in), and promises more in the future.  Looks very promising.

Themable forms

This simple, and extremely helpful Drupal 8 module adds theme suggestions for form elements.

  • form-element--[form-id]--[element-type].html.twig
  • form-element--form-id--[form-id].html.twig
  • form-element--type--[element-type].html.twig
  • form-element.html.twig
Twig Renderable

The Twig Renderable Drupal module is another module that adds Twig functions and filters, this time that work specifically with render arrays.

Function

  • will_have_output('path', 'to', 'render', 'array')

Filters

  • add_class(string|array $class)
  • merge_attributes(array|\Drupal\Core\Template\Attribute $attributes)
Transliterate Twig Filter

This module adds a single Twig filter for transliterating diacritic strings. Transliteration is the conversion of a text from one script to another, and this module converts diacritic characters, those that have accents in them, to their normal counterparts.

The included example shows how it works:

{{ 'Hällo' | transliterate() }} becomes => Hallo

Responsive SVG

The Responsive SVG Drupal module that adds a Twig filter, with quite a few options for SVG Stacks.  SVG Stacks are like image sprites, where you have multiple images in one file, though these images are Scalable Vector Graphics.  Support for regular SVGs forthcoming.

Twig Xdebug

The Twig Xdebug Drupal module adds the ability to use Xdebug within Twig templates.  Add {{ breakpoint() }} into the template where you want to debug, and when the Xdebug processor reaches it, a separate file will open so you can inspect the variables up to that breakpoint. The key values you'll see at the breakpoint are:

  • $context: Variables available to use in the template.
  • $environment: Info about the Twig environment, including available functions.
  • $arguments: You can also add arguments like {{ breakpoint(fields) }}.
Twig Clean Debug

This simple and handy module adds a Twig filter that removes the Twig debugging output, those informative HTML comments that let you know which templates are available, but they can also get in the way of what you are working on!

Update your template to use {{ content.field_image|clean_debug|raw }} when you are developing.  Remember to remove it before pushing to production though, it will error our if twig debug is not on!

Twig Link Attributes

The Twig Link Attribute Drupal module adds a Twig filter that allows you to add attributes to links, which also merges them with existing attributes.  Works well with the Menu Link Attributes module, but safely keeps some attributes in code, while Site builders and administrators can manage attributes in the UI.

Themers Little Helper

Similar to Twig Tweak, the Themers Little Helper (TLH) Drupal module adds a bunch of Twig filters and functions, and promises more!  The current release includes:

  • base_url: the Base URl of the site.
  • Wrap filter: {{ content.title_field|wrap('h3') }} for wrapping markup around fields.
  • drupal_view: Embed a view direct in your template.
  • drupal_block: Embed a block direct in your template.
  • dump(variable): Support for the Vardumper module, which is faster than kint.
Component Libraries

Finally, the Components Libraries Drupal module allows you to register “component libraries” defined by your theme or module as Twig namespaces.  This means that you can specify a different directory, rather than a folder called “templates” for your Twig files.  This is lays the foundation for being able to use component based theming, where each aspect of the design is an individual piece, or component, and allowing integrating the external tools like Pattern Lab and KSS Node, which would also use this Twig templates for living style guides.

Happy theming!

Categories: Drupal

Acquia Developer Center Blog: Learn Drupal 8 for Free: Special Two-hour Version of FFW’s Drupal 8 Site Building Class

Planet Drupal - 29 November 2016 - 7:09am

FFW, the mega digital agency, is offering a free, two-hour course for business technology and marketing decision makers who want a compressed intro to Drupal with the added benefit of a live instructor.

The class focuses on Drupal’s core concepts so organizations can get the most out of the platform and avoid common mistakes. It’s designed to help smooth Drupal adoption by companies and organizations.

It's coming up on Thursday, December 08, 2016, from 1 PM to 3 PM EST.

Tags: acquia drupal planet
Categories: Drupal

Pages

Subscribe to As If Productions aggregator