Newsfeeds

Onomasticon

New Drupal Modules - 9 November 2016 - 2:28pm

Onomasticon is a text filter to provide glossary functionality in Drupal 8.

Just activate the filter, choose a vocabulary which holds the glossary terms with descriptions and you are done.

Categories: Drupal

Taxonomy Delete Language Neutral

New Drupal Modules - 9 November 2016 - 2:20pm

When we are using i18n module for translation then we always want to associate every content with some language. If you notice while adding/editing any node or term by default Language Neutral option appears in Language dropdown. i18n_node module provides an admin interface to hide Language Neutral option from dropdown but similarly for taxonomy terms I did not find any module. Hence, I created this module to delete/unset Language Neutral option from Lanaguage dropdown for taxonomy only.

Categories: Drupal

Game Nite Magazine Issue 12 Now Available

Tabletop Gaming News - 9 November 2016 - 2:00pm
For those that can’t get enough gaming in their lives, there’s many avenues to add in a bit more. You’ve got going and playing games. You’ve got talking about games. You’ve got checking on news for games. And, of course, there’s gaming magazines. They’re a great way to get a gaming fix. And Game Nite […]
Categories: Game Theory & Design

Rules CLI condition

New Drupal Modules - 9 November 2016 - 1:43pm

Would you like to be disabled the Rules rules in commad-line?
Enable this module, edit rule and add condition from System group: Command-line environment.

Categories: Drupal

Star Ascension Sci-Fi RPG Up On Kickstarter

Tabletop Gaming News - 9 November 2016 - 1:00pm
In the far future, humanity has headed out among the stars. Worlds have been colonized. Aliens have been contacted. Science has dabbled with genetics in new (and sometimes horrifying) ways. Corporations have extended their reach out to the far ends of the galaxy. Wars are waged. Trade is made. Life goes on in the deadly […]
Categories: Game Theory & Design

Acquia Developer Center Blog: Contribution Stories: Amin Astaneh, using data to make better teams.

Planet Drupal - 9 November 2016 - 12:40pm

Drupal gets better when companies, organizations, and individuals build or fix something they need and then share it with the rest of us. Our community becomes better, stronger, and smarter when others take it upon themselves to make a positive difference contributing their knowledge, time, and energy to Drupal. Acquia is proud to play a part, alongside thousands of others, in some of the stories making tomorrow’s Drupal better than today’s. One of them is Amin Astaneh.

Tags: acquia drupal planetdevopspeopledata
Categories: Drupal

Ninja Bees Card Game Up On Kickstarter

Tabletop Gaming News - 9 November 2016 - 12:00pm
If you didn’t know, bee populations are dropping quickly. That’s bad, as it means things can’t get pollinated. But where regular bees fail, perhaps ninja bees can pick up the slack (though I’m sure I’m still allergic to their sting. I’d just never see it coming!). Ninja Bees is a new card game that’s up […]
Categories: Game Theory & Design

Photoshelter

New Drupal Modules - 9 November 2016 - 11:18am

Current placeholder for photoshelter project, more info soon.

Categories: Drupal

myDropWizard.com: Drupal 6 security update for Views Send

Planet Drupal - 9 November 2016 - 11:08am

As you may know, Drupal 6 has reached End-of-Life (EOL) which means the Drupal Security Team is no longer doing Security Advisories or working on security patches for Drupal 6 core or contrib modules - but the Drupal 6 LTS vendors are and we're one of them!

Today, there is a Moderately Critical security release for the Views Send module to fix a Cross Site Scripting (XSS) vulnerability.

Views Send enables you to send mail to multiple user from a View.

The module doesn't sufficiently filter potential user-supplied data when it's previewing the mail which can lead to a Cross Site Scripting (XSS) vulnerability.

This vulnerability is mitigated by the fact that an attacker must have a role with the permission "mass mailing with views_send".

You can download the patch.

If you have a Drupal 6 site using the Views Send module, we recommend you update immediately! We have already deployed the patch for all of our Drupal 6 Long-Term Support clients. :-)

If you'd like all your Drupal 6 modules to receive security updates and have the fixes deployed the same day they're released, please check out our D6LTS plans.

Note: if you use the myDropWizard module (totally free!), you'll be alerted to these and any future security updates, and will be able to use drush to install them (even though they won't necessarily have a release on Drupal.org).

Categories: Drupal

Midweek Snippets

Tabletop Gaming News - 9 November 2016 - 11:00am
Well, we’ve made it halfway through the week. Just another half to go and we’ll be getting back to the weekend. I know I could use to fuel up for that last push with a bunch of bite-sized gaming stories. Today on the platter we have: Beneath Nexus Available for pre-order November 15th, Mage Company […]
Categories: Game Theory & Design

Privateer Press Posts New Releases

Tabletop Gaming News - 9 November 2016 - 10:00am
A new crop of new releases has popped up on the Privateer Press homepage for Warmachine and Hordes. It’s a decent spread of old, new, units, attachments, solos, and a gigantic warjack for you to check out. There’s a good chance there’s something you’ll be able to use being released soon. We’ll start out with […]
Categories: Game Theory & Design

valechatech: Hack Proof your drupal site

Planet Drupal - 9 November 2016 - 9:25am
Hack Proof your drupal site naveenvalecha Wed, 11/09/2016 - 22:55
Categories: Drupal

New Season 3 Stat Cards for Guild Ball Posted

Tabletop Gaming News - 9 November 2016 - 9:00am
With Season 3 rapidly approaching, every Guild Ball player is on pins and needles, wondering how their favorite players (as well as their opponent’s players) will change. Some are being changed a lot. Some are being changed a little. Steamforged is trickling out previews as SteamCon gets closer, with the online release of all the […]
Categories: Game Theory & Design

Pantheon Blog: Writing Composer Scripts

Planet Drupal - 9 November 2016 - 8:47am
The composer.json file schema contains a script section that allows projects to define actions that are executed under certain circumstances.
Categories: Drupal

Warlord Games Taking Pre-orders For Antares Dice Game

Tabletop Gaming News - 9 November 2016 - 8:00am
The Gates of Antares aren’t just some cool name given to a certain part of space. No, they are actual gates that allow travel between distant star systems. The different factions of humans look to control those gates in order to connect their various worlds, as well as discover new places where the gates lead […]
Categories: Game Theory & Design

Unusual Suspects Releases This Friday

Tabletop Gaming News - 9 November 2016 - 7:00am
I love a good party game. One that’s easy to set up and explain to others, that’s quick to play, and can create a lot of good laughs along the way. Many of these games fall into the, “throw in cards and someone judges the results”-style, those have never really been my favorite. So when […]
Categories: Game Theory & Design

Fantasy Flight Games Previews Invaders For Doom Board Game

Tabletop Gaming News - 9 November 2016 - 6:00am
On Mars, a portal to Hell has been opened. Through it pour horrible monstrosities looking to conquer this new dimension. Stalwart Space Marines are doing their best to hold back the tide, but it’s not going to be easy. All manner of terrible beasts are pouring out. And you get to be in control of […]
Categories: Game Theory & Design

ThinkShout: Demystifying Content Rendering in Drupal 8 Twig Files

Planet Drupal - 9 November 2016 - 6:00am

Have you ever stared at your computer screen with a deer-in-headlights expression on your face thinking “I have no idea where to even start with this…”? That was me about a month ago when I was asked to help theme a Drupal 8 project for the very first time. Getting started theming in Drupal 8, still being in a fairly new iteration with a programming style differing from Drupal 7, was both an exciting and daunting task. It was exciting in the sense that I heard good things from those who’ve already started theming in D8, and daunting because there’d been a lot of changes between D7 and D8.

One of the differences between Drupal 7 and 8 is template files; PHPTemplate (.tpl.php) files were replaced with Twig (.html.twig) files. Twig is a robust and elegant template engine for PHP. Once I started working with Twig, I instantly loved it. I found it to be lightweight, fairly quick to pick up, and very readable. Not only that, but I had what felt like ultimate control to the markup, including wrapping elements and rendering exactly the ouput I needed. Often with Drupal 7, wrapping elements in a <div> requires assistance from a back-end developer.

With this newfound enthusiasm, I set out to write the best twig code ever! In order to find the output I needed, I used the Twig function dump(). This function “dumps” a variable’s information right on the screen. This proved highly useful until I realized I needed to dig deeper into the arrays and objects contained within the variable. There was only so much guess work I could do here before getting epically frustrated, seemingly wasting valuable time looking for an image file’s path.

Though there are a handful of debugging methods to choose from, I had the best luck getting what I needed by using PHPStorm to debug Twig files. That’s right, front-end friends, PHPStorm isn’t just for back-end PHP-coding devs. It can be a great tool for front-end programmers as well!

After following the steps listed in Lubomir Culen’s post about debugging Twig templates, I began to look for templates in the following path sites/default/files/php. From my understanding, opening a template folder gains access to the current template version the project is using, hence the long hash.

If a change is made to the template, an additional hash file is created and a new breakpoint will need to be set. If at any point the hash template files get overwhelming, clearing the cache (running drush cr all) will reset the PHP folder and the template files, reducing the hash files to one per template folder.

First off, I needed to acclimate myself to translating PHPStorm syntax into Twig. For example, copying a variable name in PHPStorm produces a syntax like this: $context[‘page’][‘#title’]->arguments[‘@name’]. That gets translated into the twig file like so: page[‘#title’].arguments[‘@name’]. Here’s what my PHPStorm screen looked like while working on this solution:

Some patterns and tricks I found helpful:

  • Ignoring $context and starting with the main content variable.
  • Strip array syntax, i.e. [‘page’] = page.
  • If arrays exist next to each other, separate them with periods. Ex. [‘page’][‘content’] = page.content.
  • If an array has a #, @, or other symbol associated, keep its integrity. No period is needed here. Ex. [‘page’][‘#title’] = page[‘#title’], and arguments[‘@name’] stays the same.
  • If an arrow exists, treat the method (what comes after the ->) in the same manner as arrays. Ex. [‘#title’]->arguments = [‘#title’].arguments
  • If you’re having trouble rendering the desired output, try adding .value to the end of the render code and see if that does the trick.
  • Use dump() simultaneously with PHPStorm’s suggested variable path.
  • Refer to the Twig documentation for other handy built-in features.

Up until the moment I got PHPStorm doing the heavy lifting, my team and I were relying soley on the dump() Twig function. We were halfway through the project when I discovered a value was no longer present. The disappearance was due to a template’s reliance on a value being rendered via an array placement, i.e. content.tile.3['#markup'], the ‘3’ referring to the 4th placement in the ‘tile’ array. To alleviate potential confusion, ‘tile’ happened to be the custom field group where the field_to_render existed, and the field_to_render was the 4th field in the list of fields. When a field was moved within the ‘tile’ field group, the code broke. Once I had access to the phpstorm debugger, I was able to see a better way to render this element, i.e. content.field_to_render. It suddenly dawned on me that our project needed some tidying, so I rolled up my sleeves and got to work.

These are the strategies I established during my clean-up process:

  • Create the shortest render code possible with the closest placement to the main content variable. This will be the most stable. My array placement example mentioned previously is a good example of this. The same value can be present and rendered in numerous ways.
  • If rendering a field, use this pattern: content.field_to_render. This will render the field object, inheriting any backend logic that’s been applied to that field existing in the view_mode you are theming.
  • If you prefer having just the markup or integer value, try adding a .value to the end. Examples: content[‘#node’].nid.value will provide just the node id, and content.node_title will render the title object whereas content[‘#node’].title.value will render the title as a string.
  • The first element in an array might be the most stable. For example, we often use the media module which can add complexity to a media item’s data structure. In order use a node’s image as a background for a <div>, this is the best approach we found: <div class=”banner-image” style="background-image: url()"> .

Any change can be tough to navigate, but it’s often well worth the effort. My experience theming in Drupal 8 thus far has been lovely, and fairly intuitive. I find it offers front-end developers more authority over the markup than its predecessor, and makes me excited for the future of theming in Drupal 8. If you were at all daunted by the thought of theming in Drupal 8, I hope this post helps you in your future twig debugging endeavors!

Note: Devel and Kint are a couple additional tools available for debugging Twig variables, and I mention those in case others find them useful. More information on how to set those tools up for debugging Twig files (and more!) can be found in this Drupal 8 Theming Guide and on Amber Matz’s Let’s Debug in Drupal 8! post.

If you’re new to Drupal 8 theming, I would start with the resources Amber specifies in her “Editor’s notes”, and sqndr’s D8 theming docs. Debugging twig files is an intermediate topic.

If you have any personal experience with Drupal 8 theming, or insight you’d like to share, I’d love to hear about it in the comments section!

Categories: Drupal

Unimity Solutions Drupal Blog: Why choose Drupal over AEM and Sitecore

Planet Drupal - 9 November 2016 - 4:50am

Choosing CMS platform is very crucial for organizations.

Categories: Drupal

The profitability of web-based games - by Connor Gibson

Gamasutra.com Blogs - 9 November 2016 - 3:28am
Although the platform is entirely free to play and publish too, it is often overlooked when developers are deciding what platforms to publish on.
Categories: Game Theory & Design

Pages

Subscribe to As If Productions aggregator