Newsfeeds

Redirect 403 To Login Page

New Drupal Modules - 8 March 2018 - 12:40pm
Description

This module redirects users encounter 403 ( Access Denied ) pages to the login page and after successful login it returns them back.

Sponsored by DrupalSchool.ir

Categories: Drupal

Fresh out of Early Access, H1Z1 goes free-to-play

Social/Online Games - Gamasutra - 8 March 2018 - 12:34pm

Fresh out a three year long Early Access period, Daybreak's battle royale title H1Z1 is going free-to-play, just ahead of the game's inaugural H1Z1 Pro League Esports event. ...

Categories: Game Theory & Design

Dries Buytaert: Thank you, Tiffany

Planet Drupal - 8 March 2018 - 12:17pm

I recently had the opportunity to read Tiffany Farriss' Drupal Association Retrospective. In addition to being the CEO of Palantir.net, Tiffany also served on the Drupal Association Board of Directors for nine years. In her retrospective post, Tiffany shares what the Drupal Association looked like when she joined the board in 2009, and how the Drupal Association continues to grow today.

What I really appreciate about Tiffany's retrospective is that it captures the evolution of the Drupal Association. It's easy to forget how far we've come. What started as a scrappy advisory board, with little to no funding, has matured into a nonprofit that can support and promote the mission of the Drupal project. While there is always work to be done, Tiffany's retrospective is a great testament of our community's progress.

I feel very lucky that the Drupal Association was able to benefit from Tiffany's leadership for nine years; she truly helped shape every aspect of the Drupal Association. I'm proud to have worked with Tiffany; she has been one of the most influential, talented members of our Board, and has been very generous by contributing both time and resources to the project.

Categories: Drupal

Thank you, Tiffany

Dries Buytaert - 8 March 2018 - 12:17pm

I recently had the opportunity to read Tiffany Farriss' Drupal Association Retrospective. In addition to being the CEO of Palantir.net, Tiffany also served on the Drupal Association Board of Directors for nine years. In her retrospective post, Tiffany shares what the Drupal Association looked like when she joined the board in 2009, and how the Drupal Association continues to grow today.

What I really appreciate about Tiffany's retrospective is that it captures the evolution of the Drupal Association. It's easy to forget how far we've come. What started as a scrappy advisory board, with little to no funding, has matured into a nonprofit that can support and promote the mission of the Drupal project. While there is always work to be done, Tiffany's retrospective is a great testament of our community's progress.

I feel very lucky that the Drupal Association was able to benefit from Tiffany's leadership for nine years; she truly helped shape every aspect of the Drupal Association. I'm proud to have worked with Tiffany; she has been one of the most influential, talented members of our Board, and has been very generous by contributing both time and resources to the project.

Categories: Drupal

River Horse Previews Kaiju Card From Pacific Rim: Extinction

Tabletop Gaming News - 8 March 2018 - 12:00pm
We’re regularly getting new previews of the upcoming Pacific Rim: Extinction board game coming from River Horse. We got a look at some of the mins, and then there’s the Jaeger card. This time, we see what the Jaeger’s well be fighting. Check out a Kaiju card. From the post: Kaiju Signature detected! Here, detailed […]
Categories: Game Theory & Design

Acro Media: Urban Hipster: Updates & What's New

Planet Drupal - 8 March 2018 - 11:44am

The Urban Hipster (UH) Drupal 8 Commerce 2 demo site has been gaining a lot of traction lately due to some fanfare and sweet promo videos. An increasing number of people are trying it out and viewing the code (which is publicly available on GitHub). It was time for a bit of a content overhaul. Here's what's changed.

Public Domain Images

All of the imagery and icons used in the site are now created by Acro Media or taken from Unsplash.com. If you're not aware of Unsplash, they provide high quality images that are freely available to use in any way, shape or form. It's a pretty awesome service and supports the open source philosophy we in the Drupal community share.

Product Page Galleries

The biggest feature we added in this release has to do with the product pages. Products can now display a gallery of images on the product page instead of just showing the current variation. I won't get into the details here, but you can watch the video for more information. Here's an example.

More "Full" Product Examples

The UH demo was originally intended to be a sales tool for our staff. Because of this, we added a bunch of products, but only a handful were fully filled out with attributes, sample reviews, related products, etc. The rest were just placeholders to fill out the store. Now that more people are looking at it, we felt we needed more (if not all) of the products to be more robust so that it didn't matter which product you happen to look at. This was something we did in this content overhaul. Almost every product now includes multiple images, related products, variation options, etc. Here's an example.

Configuration Cleanup

Since we were adding all new content anyway, it was a good opportunity to clean up some of the attributes, product types and product variation types that weren't really needed or not well represented. A lot of people are looking to this demo for examples of configuration, so it's important that we try to keep it as clean as possible.

And that's about it! Enjoy the video and the site updates.

Related Links
Categories: Drupal

Twig Addons

New Drupal Modules - 8 March 2018 - 11:35am

Add Twig Extensions and Twig Namespaces with ease.

Categories: Drupal

Thursday Terrain Corner

Tabletop Gaming News - 8 March 2018 - 11:00am
The work week continues along. I hope yours is going well. Mine’s had bits here and there, but more good than “meh.” So that’s always nice. Busy as always, of course, and so it feels the week’s been going by quickly. Always that new project to work on, it seems. Speaking of projects, I’m sure […]
Categories: Game Theory & Design

Transaction Workflow

New Drupal Modules - 8 March 2018 - 10:19am

Light weight multipurpose workflow manager for any entity type. Based on standard fields, state is stored in generic string-list field. Transitions are fieldable content entities and no extra fields are required in the target entity.

Categories: Drupal

EA adds 6 Warner Bros. published games to Origin Access

Social/Online Games - Gamasutra - 8 March 2018 - 10:03am

EA has opened up its once-exclusive Origin Access program to at least one other major game publisher with the addition of six games published by Warner Bros. Interactive Entertainment to the program.  ...

Categories: Game Theory & Design

WizKids Announces Star Trek: Galactic Enterprises

Tabletop Gaming News - 8 March 2018 - 10:00am
Buying, selling, wheeling, dealing. Buy low. Sell high. When do you partner up and when do you go it alone? You gotta know when to hold ’em. You gotta know when to fold ’em. I went to the stock market and did a business. And business is the order of the day if you’re Ferengi. […]
Categories: Game Theory & Design

CMON Previews Worker Xenos From Zombicide: Invader

Tabletop Gaming News - 8 March 2018 - 9:00am
Zombicide: Invader takes players far from the Earth. A mining colony on a backwater planet is being infested by Xenos that have been altered by a foreign fungus, turning them into merciless killing machines. The main type of Xeno you’ll see are the Workers. They may be weak, but they have strength of numbers. And […]
Categories: Game Theory & Design

Ben Marshall: Load JS & CSS Conditionally in Drupal 7

Planet Drupal - 8 March 2018 - 9:00am

This post was originally published on May 22, 2013 and last updated March 8, 2018 thanks to some helpful input by Steve Elkins.

Drupal 7 is a haus at combining CSS & JS files. This can help boost page performance & optimization easily, but if not used right, can do the complete opposite. In this post, we’ll go over how to load JS & CSS files based on conditionals like URL, module, node, views and more.

Before we dive in, get somewhat familiar with the drupal_add_js and drupal_add_css functions. We’ll use these to load the actual JS and CSS files.

hook_init – runs on every page /** * Implements hook_init() * * @link https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_init/7.x */ function HOOK_init() { // Using the equivalent of Apache's $_SERVER['REQUEST_URI'] variable to load based on URL // @link https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/request_uri/7 if (request_url() === 'your-url-path') { drupal_add_js( /* parameters */ ); drupal_add_css( /* parameters */ ); } }

Using hook_init is one of the simplest methods to load specific JS and CSS files (don’t forget to replace HOOK with the theme or module machine name).

Be careful, this method get’s ran on every page, so it’s best to use this method only when you actually need to check every page for your conditional. A good example, loading module CSS and JS files. A bad example, loading node-specific CSS and JS files. We’ll go over that next.

There’s also a similar preprocess function, template_preprocess_page you could use, but it too get’s ran on every page and is essentially the same as hook_init.

template_preprocess_node – runs on node pages /** * Implements template_preprocess_node() * * @link https://api.drupal.org/api/drupal/modules%21node%21node.module/function/template_preprocess_node/7.x */ function TEMPLATE_preprocess_node(&$vars) { // Add JS & CSS by node type if( $vars['type'] == 'your-node-type') { drupal_add_js( /* parameters */ ); drupal_add_css( /* parameters */ ); } // Add JS & CSS to the front page if ($vars['is_front']) { drupal_add_js( /* parameters */ ); drupal_add_css( /* parameters */ ); } // Given an internal Drupal path, load based on node alias. if (drupal_get_path_alias("node/{$vars['#node']->nid}") == 'your-node-id') { drupal_add_js( /* parameters */ ); drupal_add_css( /* parameters */ ); } }

Using template_preprocess_node is perfect when loading JS and CSS files based on nodes (don’t forget to replace TEMPLATE with the theme machine name). Since it only get’s run on nodes, it’s great to use when you want to load CSS and JS files on specific node types, front pages, node URLs, etc.

template_preprocess_views_view – runs every view load /** * Implements template_preprocess_views_view() * * @link https://api.drupal.org/api/views/theme%21theme.inc/function/template_preprocess_views_view/7.x-3.x */ function TEMPLATE_preprocess_views_view(&$vars) { // Get the current view info $view = $vars['view']; // Add JS/CSS based on view name if ($view->name == 'view_name') { drupal_add_js( /* parameters */ ); drupal_add_css( /* parameters */ ); } // Add JS/CSS based on current view display if ($view->current_display == 'current_display_name') { drupal_add_js( /* parameters */ ); drupal_add_css( /* parameters */ ); } }

Using template_preprocess_node is useful when loading JS and CSS files when a particular view is being used (don’t forget to replace TEMPLATE with the theme machine name).

Helpful Methods for Conditionals

Here’s a few helpful Drupal methods you can use for your conditionals. Have one you use often? Let me know in the comments below.

  • request_uri – Returns the equivalent of Apache’s $_SERVER[‘REQUEST_URI’] variable.
  • drupal_get_path_alias – Given an internal Drupal path, return the alias set by the administrator.
Looking like a foreign language to you?

Not a developer or just lost looking at the code snipplets above? Shoot me a question in the comments below, or give these ‘plug-and-play’ modules a try for a GUI alternative:

The post Load JS & CSS Conditionally in Drupal 7 appeared first on Ben Marshall.

Categories: Drupal

RSS embed field

New Drupal Modules - 8 March 2018 - 8:28am
Overview & Features

RSS-Field is a lightweight module that allow you to integrate and setup a field (link) within a Contenttype, that offers you the possibility to display the latest Posts from a specific RSS-Feed within a node. You can handle this field like all other Drupal-Fields f.e. with Views etc.

You can define how many entries from the Feed should be displayed and and whether the title of the feed should be displayed or not.

Categories: Drupal

Fantasy Flight Games Talks Army-Building in Star Wars: Legion

Tabletop Gaming News - 8 March 2018 - 8:00am
So, you’ve got your Vader and you’ve got your AT-ST and you’ve got your Speeder Bikes and you’ve got your Stormtroopers… but how do you turn that into an actual army in Star Wars: Legion? That’s what we get a look at today from Fantasy Flight. They’ve posted up an article about how army building […]
Categories: Game Theory & Design

Steamforged Announces Gameplan Deck For Guild Ball

Tabletop Gaming News - 8 March 2018 - 7:00am
Guild Ball is getting a bit of a shake-up this morning. Steamforged had mentioned the Gameplan deck, but the details were thin on the ground. Now they’ve been fully revealed. The deck replaces the Guild Plots from the game, but also change how Initiative works at the start of a turn. They can even change […]
Categories: Game Theory & Design

Webform Storage Toggle

New Drupal Modules - 8 March 2018 - 6:57am
Description
Categories: Drupal

Bridging PC & PS4 - The Guns of Icarus Alliance Cross-platform Journey - by Howard Tsao

Gamasutra.com Blogs - 8 March 2018 - 6:19am
The process and challenges of taking Guns of Icarus from PC and Steam to PS4 and making seamless cross-platform play with voice chat a reality.
Categories: Game Theory & Design

Monetizing fan-made content: let's make it fair - by Thibault LOUIS LUCAS

Gamasutra.com Blogs - 8 March 2018 - 6:19am
We’re now entering an era of user-generated content. However, it doesn't seem fair creators in the game just stay players. We propose the Fair Game concept, which rewards players' talent with the money by making ourselves the editor of the game!
Categories: Game Theory & Design

Play(test)ing Paper Prototype - by Oleksandr Tkachenko

Gamasutra.com Blogs - 8 March 2018 - 6:18am
How we tested early prototypes of our digital card game and what we have learned.
Categories: Game Theory & Design

Pages

Subscribe to As If Productions aggregator