Skull Devils Fantasy Football Team Up On Indiegogo

Tabletop Gaming News - 27 January 2017 - 7:00am
So, who’s ready for the Super Bowl? Being here in Atlanta, there’s certainly a lot of hype going around about it. And that’s making a lot of people want to get out their fantasy football teams (that is, high-fantasy) and play some games. Well, the folks over at GoblinGuild Miniatures have a new team that […]
Categories: Game Theory & Design

Lullabot: Matt Westgate and Seth Brown on Doing Good with Drupal

Planet Drupal - 27 January 2017 - 7:00am
In this episode of Hacking Culture, Matthew Tift talks with Matt Westgate and Seth Brown about Lullabot, the Drupal community, and how people who build free software improve the world. This episode is released under the Creative Commons attribution share alike 4.0 International license. The theme music used in this episode comes from the Open Goldberg Variations. Learn more at
Categories: Drupal

Agaric Collective: Adding Bootstrap button stylings to Drupal 8's action links and node links

Planet Drupal - 27 January 2017 - 6:50am

When all goes according to plan—which is surprisingly often—theming in Drupal 8 is a straightforward matter of editing templates and stylesheets. We found things did not go according to plan when styling page-level action links (such as "Add new Forum topic") and content-level action links (or node links as Drupal 8 still calls them, such as "read more" or "add comment"). We are going to show how to add Bootstrap-specific styles, but the same approaches would be useful to add special stylings, button-like or otherwise, to selected action links and node links.

First, let's revisit the steps to follow when trying to add classes to Drupal-produced markup:

  1. Enable Twig debugging.
  2. Using your browser's inspector, identify the template providing the code you need to modify.
  3. Copy the template from where Twig debug output says it lives in Drupal core (or contrib) to your theme. If needed, use template name suggestions with a --modifier to selectively override the template in specific cases.
  4. Add BEM-compliant classes to your template. This is usually accomplished by tacking the addClass("here are--my-classes") method onto an attributes variable.
  5. Use the classes you added in your CSS.

Now let's try applying that to styling action links and node links (but only the actual link parts, not the surrounding text) as buttons.

Page-level action links

Here is an action link provided by Drupal core in the Forum module. It's classes don't align with Bootstrap's, so it displays without style.

The process

If we open the template that is providing the HTML for each link, menu-local-action.html.twig, it is only one line of code (and 12 lines of comments). It couldn't be simpler!

{# /** * @file * Default theme implementation for a single local action link. * * Available variables: * - attributes: HTML attributes for the wrapper element. * - link: A rendered link element. * * @see template_preprocess_menu_local_action() * * @ingroup themeable */ #} <li{{ attributes }}>{{ link }}</li>

Except... the attributes variable we have available is on the list item (li tag), not the link itself. Using this template we can't add classes to the already-rendered link element. Putting the button class on the list item would result in a common UX problem: button-looking elements with parts that are not clickable.

Even though this template cannot be used directly, it points us in the right direction. On line 10, a comments suggest us to see template_preprocess_menu_local_action(). So we shall.

A symbol finder in an IDE or grep will quickly take us to line 65 of core/includes/

/** * Prepares variables for single local action link templates. * * Default template: menu-local-action.html.twig. * * @param array $variables * An associative array containing: * - element: A render element containing: * - #link: A menu link array with 'title', 'url', and (optionally) * 'localized_options' keys. */ function template_preprocess_menu_local_action(&$variables) { $link = $variables['element']['#link']; $link += array( 'localized_options' => array(), ); $link['localized_options']['attributes']['class'][] = 'button'; $link['localized_options']['attributes']['class'][] = 'button-action'; $link['localized_options']['set_active_class'] = TRUE; $variables['link'] = array( '#type' => 'link', '#title' => $link['title'], '#options' => $link['localized_options'], '#url' => $link['url'], ); }

Here we can see exactly how Drupal is adding classes ('button' and 'button-action') to the buttons. Let's add our own preprocess function assuming our theme is name exampletheme:

  1. Add a function to our .theme file. In this example, the file would be exampletheme.theme.
  2. Name the function exampletheme_preprocess_menu_local_action(). That is, replace the word 'template' with the name of our theme name.
  3. Modify the $variables array to add our classes.

We could even remove the existing classes from the link, but we'll leave them for now. Note that the link that gets processed is $variables['link'] rather than $variables['element']['#link'].

The solution /** * Extends template_preprocess_menu_local_action(). * * Add Bootstrap button classes to a single local action link. * * Default template: menu-local-action.html.twig. * * @param array $variables * An associative array containing: * - element: A render element containing: * - #link: A menu link array with 'title', 'url', and (optionally) * 'localized_options' keys. */ function exampletheme_preprocess_menu_local_action(&$variables) { $variables['link']['#options']['attributes']['class'][] = 'btn'; $variables['link']['#options']['attributes']['class'][] = 'btn-success'; }

Content-level action links

Next let's style node links as buttons. It's well-nigh impossible to get the btn and btn-success classes on the login and register links within the sentence "Log in or register to post comments". Therefore, we will use Bootstrap's handy mixins. The following is a SCSS code snippet which is turned into CSS by a SASS preprocessor.

.links--node a { @include button-variant($btn-success-color, $btn-success-bg, $btn-success-border); @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $btn-border-radius-base); }

Finally, we just need to add the links--node class. Assuming our theme is called exampletheme:

/** * Implements hook_preprocess_links() for node entities. */ function exampletheme_preprocess_links__node(&$variables) { $variables['attributes']['class'][] = 'list-unstyled'; $variables['attributes']['class'][] = 'links--node'; }

Bonus: Link field links as buttons

For styling the output of link fields as buttons, the aptly-named Button link formatter module can help you out without the need for custom code nor templating.

Are you styling action links, node links, and other links?

Have you faced similar needs for changing the look of links, to be buttons or otherwise? How have you met them? Let us know in the comments!

Categories: Drupal

Will Virtual Reality Kick the Bucket in 2017? - by John Duhring Blogs - 27 January 2017 - 6:21am
A showing at CES that disappointed some doesn't mean VR's doom - rather it's a sign of VR's continuing growth. Two VR development experts share their thoughts on where VR stands and where it's going in 2017.
Categories: Game Theory & Design

Renegade Game Studio Announces Two New Games

Tabletop Gaming News - 27 January 2017 - 6:00am
The folks over at Renegade Game Studio have been rather busy. They’ve got a pair of new board games that they’d like to announce, which will be available for your tabletops soon. They’re… sort of two ends of the spectrum, really. Sci-fi action… and cute fuzzy puppies. From the releases: FLATLINE is a cooperative dice […]
Categories: Game Theory & Design

General Data Protection Regulation

New Drupal Modules - 27 January 2017 - 5:52am

"After four years of preparation and debate the GDPR was finally approved by the EU Parliament on 14 April 2016. It will enter in force 20 days after its publication in the EU Official Journal and will be directly application in all members states two years after this date. Enforcement date: 25 May 2018 - at which time those organizations in non-compliance will face heavy fines." -

This module aims to make sure your Drupal site follows the guidelines and legislation set by the EU.

Categories: Drupal

Commerce Purchase on account

New Drupal Modules - 27 January 2017 - 4:39am
Simple payment gateway and method to order on account

This module provides a simple commerce payment- gateway and method, which will allow the customer to complete an order
with only leaving his billing Address and additional data from the billing profile.

Using the "Purchase on account" gateway will result in a purchase on account payment method only! Use this if you only
have this payment method on your site and want to have a clean checkout form.

Categories: Drupal

CiviCRM Blog: Email Authentication – SPF, DKIM, DMARC

Planet Drupal - 27 January 2017 - 4:30am

When email was first designed, security was not considered important and up until fairly recently it was still possible to send an email from any address and get away with it.

However, as spam, phishing and spoofing attacks by email have become increasingly common there have been various attempts to make email more secure.  In the last year or so the major providers (AOL, Google, Microsoft etc.) have all seriously tightened their security and authentication requirements for validating and receiving email.  The result of this is that a lot of legitimate email is now being classified as spam or rejected by those providers.  In order to ensure that your email continues to be marked as legitimate and received by these larger providers it is now almost essential that you implement SPF, DKIM and DMARC on your domains otherwise many of your recipients will never see the emails you are sending!

As an implementer of CiviCRM I've had to learn all this pretty quickly...  There's a lot of detailed information out on the web but hopefully this post covers what you actually need to know to make sure your clients emails are delivered and read!

Read the rest of my blog post here.


Categories: Drupal


New Drupal Modules - 27 January 2017 - 2:31am

A Drupal 8 module to set custom meta tags

This is the Drupal 8 Alternative of simplemeta module, you can add custom metatags to any page even view pages and custom pages.


1 - Just clone or download this module and copy it to your module folder.
2 - Enable it


Just go on your website and click on the "Meta" button on the left on the site

Categories: Drupal

More game developers laid off by GSN Games

Social/Online Games - Gamasutra - 26 January 2017 - 4:44pm

Update These cutbacks notably come less than six months after a round of layoffs that included veteran game dev Steve Meretzky, and are believed to encompass a variety of game dev positions. ...

Categories: Game Theory & Design

Kalamuna Blog: Keep Your Site Evercurrent: Security Updates Just Got Easier

Planet Drupal - 26 January 2017 - 3:56pm

At Kalamuna we not only build Drupal websites, but we also provide support services for a plethora of clients. One of these is providing security updates; we pride ourselves on keeping our clients’ sites safe and free from vulnerabilities. But, I have to admit that when I hear of new security releases I cringe. I think about the tedious process of going through each site or trying to recall who has what modules installed on their site. But I just discovered an app that finds all of the new security updates for me: Evercurrent. Read on to see how it works.

Categories: Drupal

Latest Releases Available From Privateer Press

Tabletop Gaming News - 26 January 2017 - 3:00pm
The releases that Privateer had this month was too much to contain in just one set of releases. So get ready for Privateer January Releases 2: Release Harder. You’ve got a new warcaster and warjack for the Protectorate. You’ve got the new Retribution colossal. You’ve got yourself the latest issue of No Quarter. From the […]
Categories: Game Theory & Design

Ganesha Games Releases Of Gods and Mortals: Celts

Tabletop Gaming News - 26 January 2017 - 2:00pm
Osprey Game’s Of Gods and Mortals lets you play out mythical battles between various deities and their human followers. The first supplement for it, Celts, is now available from Ganesha Games, giving you yet more gods, monsters, and mortals with which to wage your wars. From the release: The 54-page book includes new gods, heroes, […]
Categories: Game Theory & Design

Rather Dashing Games Announces This Belongs In A Museum Tile-Laying Game

Tabletop Gaming News - 26 January 2017 - 1:00pm
Those that do not learn history are bound to repeat it. That’s why museums are so important. They help us connect with the past through the artifacts that they house. And the archeologist that is able to secure great artifacts can have their names go down in history as well. That’s what you’ll be trying […]
Categories: Game Theory & Design

Aflame Adult Card Game Up On Kickstarter

Tabletop Gaming News - 26 January 2017 - 12:00pm
Well, it would seem we’ve got another adult-themed card game on our hands. And once again, I struggle for a way to describe it without going over the PG-13 rating we’ve imposed for the site. Suffice to say, this one’s a bit more free-form than the previous one, with 3 levels of “hotness” (their descriptor) […]
Categories: Game Theory & Design

Zhilevan Blog: How Deploy Drupal to Heroku

Planet Drupal - 26 January 2017 - 11:56am
what is Heroku? It’s a service for developers eager to get their applications online without having to worry about infrastructure details. Metered, pay-as-you-go Cloud Computing services come in all kinds of flavors. Infrastructure as a Service (IaaS) offerings like AWS allows enterprises to shift their entire operations away from traditional data centers. The downside is that you’ll have to manage networking and provisioning yourself.
Categories: Drupal

OSTraining: How to Build Drupal 8 Triple Display Slideshow Using Slick

Planet Drupal - 26 January 2017 - 11:37am

One of our OSTraining members asked how it was possible to make multiple displays for Drupal 8 slideshows.

In this tutorial, I will show you how to build a slideshow that uses your article content type to make a slideshow with a teaser.

Categories: Drupal

Thursday Terrain Corner

Tabletop Gaming News - 26 January 2017 - 11:00am
A rather busy week is working its way towards the end. We’ve made it over the hill in the middle that is Wednesday and are now sliding our way through Thursday, soon to be Friday. With any luck, you’re finalizing plans for some gaming. And if you’ll be gaming, you’ll want your gaming tables to […]
Categories: Game Theory & Design

Web Wash: Webinar: Customize Content Pages using Display Suite in Drupal 8

Planet Drupal - 26 January 2017 - 10:53am
If you ever need to modify content pages, Display Suite is a good choice. It offers a lot of flexibility without learning a brand new interface. You just use the standard "Manage display" page to select a layout and move fields into regions. Yesterday, I presented a webinar on how to use Display Suite in Drupal 8. The webinar went for around 50 minutes and I covered the following: 1. What's new in Drupal 8. 2. How to set up a Display Suite layout on a view mode. 3. How to change the wrapper elements. 4. How to add custom CSS classes. 5. How to use Display Suite fields. 6. How to use the "Display Suite Switch View Mode" sub-module. 7. And finally, how to override a layout.
Categories: Drupal


Subscribe to As If Productions aggregator