Newsfeeds

Roblox boasts over 1 billion hours of engagement per month

Social/Online Games - Gamasutra - 1 March 2019 - 10:45am

The figure is 20 times the monthly engagement the online sandbox platform saw back in 2013. ...

Categories: Game Theory & Design

Commerce Product Variation CSV

New Drupal Modules - 1 March 2019 - 9:29am

Provides CSV export and import capabilities for managing a product's variations.

Categories: Drupal

Facets Custom Label

New Drupal Modules - 1 March 2019 - 8:09am

Facets Custom Label module is a facet processor which lets you rename / relabel facets items.

Categories: Drupal

Kliuless #25: The Post-Platform Metaverse - by Kenneth Liu

Gamasutra.com Blogs - 1 March 2019 - 7:05am
Each week I compile a gaming industry insights newsletter that I share with other Rioters, including Riot’s senior leadership. This edition is the public version that I publish broadly every week as well. Opinions are mine.
Categories: Game Theory & Design

Art and Storytelling: what are your sources of inspiration? - by Anastasiya Rashevskaya

Gamasutra.com Blogs - 1 March 2019 - 7:04am
Storytelling is a buzzword in the world of art. A gripping story is the foundation of any top-rated game. What if you can't find the right idea? KEVURU GAMES provides 5 top sources to find inspiration for your new game.
Categories: Game Theory & Design

5 incredible Indie Switch Games No-one is Talking About (and for good reason) - by Jonathan Harris

Gamasutra.com Blogs - 1 March 2019 - 6:57am
A look into 5 indie Switch games that just barely missed their time in the limelight
Categories: Game Theory & Design

Restconsumer

New Drupal Modules - 1 March 2019 - 6:35am
Restconsumer

This module provides a simple abstracted javascript API for jQuery.ajax and Drupal.ajax.
It offers a consistent interface, multilingual support and some helpers for forms and uploads.
The API must be used by other modules to do anything benefecial.

Categories: Drupal

OPTASY: What Are the Cannot-Live-Without Drupal Modules that Give Developers the Most Headaches? Top 4

Planet Drupal - 1 March 2019 - 5:27am
What Are the Cannot-Live-Without Drupal Modules that Give Developers the Most Headaches? Top 4 adriana.cacoveanu Fri, 03/01/2019 - 13:27

Which of those Drupal modules that are crucial for almost any project make you want to... pull your hair out? 

For, let's face it, with all the “improving the developer experience” initiatives in Drupal 8:
 

  • BigPipe enabled by default
  • the Layout Builder
  • Public Media API
  • and so on
     

… there still are modules of the “can't-live-without-type” that are well-known among Drupal 8 developers for the headaches that they cause.

And their drawbacks, with a negative impact on the developer experience, go from:
 

Categories: Drupal

Wodby

New Drupal Modules - 1 March 2019 - 5:14am
Categories: Drupal

PC Backgrounds, Part 1

Gnome Stew - 1 March 2019 - 5:00am

If you rewind the wayback machine to the 70s and 80s era of published RPG material, you’d be hard pressed to find any reference to character backgrounds, historical concepts related to specific characters, or much beyond a table to roll on for “secondary skills” the character picked up during developmental years. Fortunately, thinks have changed in this area, and a vast majority of modern RPGs have a section (if not a whole chapter or splatbook) dedicated to assisting players in creating backgrounds for their characters.

What is a Background?

 A character background is a brief summary of the character’s life. Share8Tweet1+11Reddit1Email

A character background is a brief summary of the character’s life before the first session of the campaign or adventure fires off. This should include key events that formed the character into who they are in the “present time” of the campaign. Vital NPCs that altered (or guided) the character in key ways should also be included. Friends, enemies, pitfalls, triumphs, and major accomplishments show up in the background. Socioeconomic status is also key in this because “it takes a village to raise a child” can also be translated into “the resulting adult depends on what kind of village the child is raised in.”

Purpose

Backgrounds are neat (for some people) or painful (for others) to write. However, this shouldn’t be solely about the character. There’s a purpose to backgrounds. A well-written RPG character background will include hooks into the world for the GM to latch onto. It’ll also include ties to (or even creations of) important NPCs, thus deepening the character’s connection to the campaign material. If possible, I also encourage at least one connection (two would be better) between the “main character” in the background and the other characters in the party.

This sounds like a background should be all roses and puppies, but that’s not the case. Everyone’s life has some form of tragedy in it. These tragedies should also be highlighted in the character’s background in the form of enemies, losses, and events that grow into motivations for the character. If your barbarian is overly protective of children and will go through great lengths and incredible dangers to save them, that’s wonderful. However, the roots of this motivation should be incorporated into the backstory. This gives the GM some leverage over pulling at the PC’s strings, but the PC also has the freedom to cut those strings if necessary.

By introducing these elements into a good backstory, the GM can incorporate a more rich and compelling story throughout the campaign.

Audience

 There are actually three different audiences for a backstory. Share8Tweet1+11Reddit1Email

There are actually three different audiences for a backstory. I’ve already mentioned the information that goes to the GM. The player running the character is another target for knowing the backstory (and arguably the most important audience member). Lastly, the other players should be aware, to some extent, about the character’s background. It’s incredibly rare for a character to exist in a vacuum and then pop into being alongside other people and then fight in life or death situations at their side. Yeah, in some RPGs, we hand-wave the appearance of new PCs (You look like a trustworthy fellow), but deeper connections between each character will provide opportunity for role playing on a more grand scale.

Length

 Don’t go overboard with the length of the backstory. Share8Tweet1+11Reddit1Email

Don’t go overboard with the length of the backstory. We’ve advised GMs to keep their world/setting/campaign backstories to a page or less. This same advice applies to your character’s backstory. Anything longer will cause folks to skim it, or worse, not read it at all.

I recommend that you provide between half a page and a full page backstory for the GM. For the other players, I would drop no more than two paragraphs. This also allows you to keep secrets or shameful events between you and the GM by excluding those details from the other players, so you can explore those and role play them out down the road.

What about the backstory for yourself? Well, you know you better than anyone else. Write as long of a one as you like. I tend to land at about 5-6 pages for my characters, but I also type faster than the average bear and can get wordy in my creative efforts. I offer the longer one to my GM, but I also keep the shorter version handy in case they want lighter reading.

While I’m thinking about it, make sure to write up your backstory in a word processor and print it out. We’re old. Our eyes are tired from decades of reading RPG charts and tables and maps. We don’t have the energy to muddle through hastily scribble handwriting. Twelve point fonts are good, too. Don’t go smaller, please.

When to Create It?

Once session zero rolls to a close, and we have a one week (or more) break until the first “real” session of the campaign, I write my various backstory elements. In theory, some of these are already established during session zero, and I’ve made enough notes during this session to get me into writing a proper narrative. By taking my bullet lists and scribbled notes from session zero, I can flesh out a proper narrative in text form.

Style

There are three styles of backstory that I’ve seen.

One is like a third-person novel where the character’s name is used in the text. I like this approach because it drives the character’s name home in the GM’s mind. It also reads more like a piece of history and narrative, which is really what you want.

The second is first-person narrative, which gets directly in the character’s point of view and inner thoughts. This works well for telling a personal story, but it can also get jumbled up a bit because introductions of NPCs and other PCs and key events happen so far apart. The player writing in this style generally has to put in, “When I was 13, ….” in their backstory, which gets tiresome to read.

The third style is a simple bullet list of NPCs and events listed out in order that the character met the NPC or had the event happen. This is perfectly fine for those folks that are less inclined to express their creativity in the written form.

Future Parts

That’s enough on this topic for now. In the next few sections, I’ll give more specifics about how to generate a backstory and what to include. There are several great methods, and I can’t wait to touch upon them.

Categories: Game Theory & Design

OpenSense Labs: Protecting your Riches: SSO with SimpleSAMLphp

Planet Drupal - 1 March 2019 - 3:31am
Protecting your Riches: SSO with SimpleSAMLphp Vasundhra Fri, 03/01/2019 - 17:01

Do you remember Scrooge McDuck? He was the uncle to the most famous and beloved character - Donald Duck. Most notable for his piles of shiny, golden coins stacked in his cartoon mansion. 
 
His favorite pastimes: Pinching pennies, counting gold and swimming around in his mountains of money. 
 
While we can’t all have Scrooge McDuck’s limitless riches, we’re still like him in a few important ways. Among which guarding his riches in every sort of manner is one.


New technologies and approaches are creating massive changes that have forever altered the way consumers and businesses interact. Adding to these technological changes, our e-mail accounts and other social media handlings play a similar role as Scrooge McDuck’s riches. And having to log in to these treasures one by one is something we dodge to do.

Right?

Thus, here is one of the most trustworthy applications for your software systems. 

Presenting Single Sign-On (SSO) 

Single sign-on (SSO) is a session and user authentication service that allows a user to use a single set of login credentials (like a name and password) to enter multiple applications. In the SSO system, a third party service offers the identification and authorization mechanism and is responsible for informing the user identity. 

This identification and authorization are handled with the help of Federated Identity. 

Federated Identity refers to the standards, tools, and use-cases that enable the users to access multiple applications using the same access credentials. 


So now the question is - how is the authorized data exchanged?

Well, Federated Identity comes with OASIS security assertion markup language (SAML) specification (It may involve open source technologies also). This specification helps in standard exchange of data between the security domain, having the main focus on providing support for:

SAML 2.0 as an Identity Provider: is the system or the domain that supports the user authentication and has associated attributes. In SAML, Identity Providers are also called SAML authorities and Asserting Parties

SAML 2.0 as a Service Provider: is the system or administrative domain that relies on information or the data supplied by the Identity Provider. 

Source: blog.imagineaSecurity and Privacy in SAML 2.0

This protocol brings no security by itself and highly relies on secure communications (SSL and TLS) or some pre-existed trust relationship which also typically relies on     PKI or asymmetric cryptography.   

It represents a wide variety of security mechanisms to identify and guard the data against attacks. The relying party and asserting party should have a pre-existing trust relationship which typically depends on a Public Key Infrastructure (PKI). 

When a party demands an assertion from another party, a bi-lateral authentication is needed. Among which SSL or TLS are the two that are recommended with the management of mutual authentication or authentication via digital signatures.
 
In terms of privacy, SAML 2.0 also promotes the establishment of pseudonyms between an identity provider and a service provider. The authentication context mechanisms enable  a  user to  be  authenticated  at  a sufficient and assured level ( appropriate to the resource that is attempting to access at the service provider)

Source: MediumSimpleSAMLphp for Implementing the standards of SAML 2.0

What is SimpleSAMLphp?

It is an application that is written in PHP which helps in implementing SAML 2.0. SimpleSAMLphp is a really easy way of integrating all the web-based PHP application into a federation. 

SimpleSAMLphp maintains all the non-PHP scenarios by using the Auth Memcookie approach (a special cookie is added in Memcache that the Apache module Auth MemCookie understands).

It offers support to the two scenarios:

  • SimpleSAMLphp as a Service Provider 
  • SimpleSAMLphp as an Identity Provider 

Service Provider Scenario 

It is important for the user to know that the Service Provider API presents with basic functionality.

  • Verifying if the user is genuine or not
  • Whether they need any authentication or not
  • Login and Logout
  • Preparing the user attributes
  • Preparing the URLs for login and log out. 

For authentication, SimpleSAMLphp connects to an identity provider (which is easily defined by configurated files). This is done so that the Service Provider easily configures to connect to other Identity Providers without having to modify anything in the web application.

In the web application, if the user wants to implement SimpleSAMLphp as a Service Provider, they need to add classes by using the API. Once the authentication is complete, they can easily access the user’s attributes.

Identity Provider  Scenario

The identity provider in simpleSAMLphp is configured to validate the user against various origins - it may be static, LDAP, SQL, Radius, OpenID, Facebook, and Twitter. 

For setting up the Identity Provider, configuration files are required to be changed so that the authentication module can be used and specified ( with additional information and the list of Service Providers). When several Services Providers utilize the same Identity Provider to verify the user, the user needs to log in only once. This is done because the session information is stored by the Identity Provider. 

The Identity Provider also requires a certificate so that identification is proven to the Service Provider.

Source: JulianZhuHow are Sessions in SimpleSAMLphp?

SimpleSAMLphp consists of an abstraction layer for session management. That indicates it is possible to select between different kind of session stores, as well as write new session store plugins.
There are five ways in which the user can store their sessions in SAML. The five ways are:

PHP: If the user wants to use the PHP session handler, then they need to set the store.type configuration option in config.php. But they have to keep one thing in mind that the PHP does not allow two sessions to be open at the same time. 
This indicates that if they are using PHP sessions, both the application as well as the SimpleSAMLphp at the same time, then they need to have different names.

SQL: To store session to a SQL database, set the store.type option to SQL. SimpleSAMLphp uses PDO (PHP objects) when entering the database server, so the database source is configured with the help of  DSN (Data source name). The expected tables are generated automatically. If the user wants to store the data from multiple but a separate SimpleSAMLphp installation in the same database, then they can do the same by using the store.sql.prefix option to prevent conflicts.

Memcache: To store the Memcache session handler, the user needs to set the store.type parameter in config.php. memcache that enables them to store many redundant copies of sessions on various Memcache servers. Every server group is an array of the servers. The data or the information items are load-balanced between all types of servers in each and every server group.

Redis:  To save sessions in Redis, the user need to set the store.type option to redis. By default, SimpleSAMLphp will strive to combine Redis on the localhost at the port 6379. It is, then, configured with the help of store.redis.host and store.redis.port options.

Writing your own plugin: In SimpleSAMLphp there is an excellent open source community, and every type of users are welcome to join. The forums are open for everyone to ask questions and queries, provide answers, inquire improvements or offer with code or plugins of their own.

Drupal in the picture 

DrupalCamp 2018 talked about Drupal 8 module, simpleSAMLphp. The session was all about installing and configuring SimpleSAMLphp as IDP and SP. It also talked about integrating SimpleSAMLphp into Drupal 8 and create an SSO network.


Drupal SimpleSAMLphp module is one of the most robust and strong modules. It provides a comprehensive and complete implementation of SAML in PHP. 

This module not only made it possible for Drupal to communicate with SAML or identity providers (IdP) to authenticate users but it also resulted in the Drupal site to act effectively as a SAML or Shibboleth service provider (SP). Some of the features provided by it are:

  • The module provides with in-time provisioning to the accounts of the Drupal user which are based on SAML attributes.
  • It provides with automatic role assignment that is based on SAML attributes
  • The dual mode in the module guides the users with traditional Drupal accounts and SAML-authenticated accounts at the same time.
  • It supports multiple authentication protocols like OpenID (e.g., Google, Yahoo), Facebook, OAuth (e.g., Twitter), Radius etc
Conclusion 

SimpleSAMLphp is very valuable and important for executing an SSO mechanism in web applications. It is developed in a native PHP and maintains integration to any  SAML providers.

Yes, the library is very flexible and it comes with many authentication modules and furthermore, they can easily be adapted to third-party applications. 

The technology has become very popular especially with the rise of concepts like Web 2.0 and the continuous development of social networks websites like Facebook, MySpace, and others. 

At OpenSense Labs, we believe that security is the number one concern of any organization and we try to provide them with services that help them in a longer run. Ping us now at hello@opensenselabs.com, our professionals would provide you with suitable answers to all your queries and questions.  

blog banner blog image Drupal Drupal 8 CMS Single Sign-on SimpleSAMLphp SAML 2.0 Identity Provider Service Provider Blog Type Articles Is it a good read ? On
Categories: Drupal

Odata Client

New Drupal Modules - 1 March 2019 - 3:27am
Introduction

OData client implements configuration entity for OData servers, IO functions to OData collections and Drupal format OdataQuery object.

Requirements

The module requires the following libraries:
saintsystems/odata-client: ^0.2.4
league/oauth2-client: ^2.4
thenetworg/oauth2-azure: ^1.4

Categories: Drupal

Price Difference Formatter

New Drupal Modules - 1 March 2019 - 2:47am

This module adds a new field formatter to show at the same time:

  • The original price of the variation.
  • The price with the promotions applied.
  • The difference in price in percentage.

The initial idea arose in a project in which it was necessary to show the percentage of discount both in the lists of products and in the pages of detail.

REQUIREMENTS

This module requires the following modules:

Categories: Drupal

SynCart

New Drupal Modules - 1 March 2019 - 12:15am
Categories: Drupal

Smart Content View Mode

New Drupal Modules - 28 February 2019 - 7:58pm

Switch view modes based on Smart Content conditions.

Categories: Drupal

orkjerns blogg: Migrating Panel nodes into Layout Builder nodes. Is that even possible?

Planet Drupal - 28 February 2019 - 12:24pm
Migrating Panel nodes into Layout Builder nodes. Is that even possible? admin Thu, 02/28/2019 - 22:33

Oh snap”, said the project manager. “The client has this whole range of rich articles they probably are expecting to still work after the migration!

The project was a relaunch of a Drupal / Commerce 1 site, redone for Drupal 8 and Commerce 2. A couple of weeks before the relaunch, and literally days before the client was allowed in to see the staging site, we found out we had forgotten a whole range of rich articles where the client had carefully crafted landing pages, campaign pages and “inspiration” pages (this is a interior type of store). The pages were panel nodes, and it had a handful of different panel panes (all custom).

In the new site we had made Layout builder available to make such pages.

We had 2 options:

  • Redo all of them manually with copy paste.
  • Migrate panel nodes into layout builder enabled nodes.

Is that even possible?”, said the project manager.

Well, we just have to try, won’t we?

Creating the destination node type

First off, I went ahead and created a new node type called “inspiration page”. And then I enabled layout builder for individual entities for this node type.

Now I was able to create “inspiration page” landing pages. Great!

Creating the migration

Next, I went ahead and wrote a migration plugin for the panel nodes. It ended up looking like this:

id: mymodule_inspiration label: mymodule inspiration migration_group: mymodule_migrate migration_tags: - mymodule source: # This is the source plugin, that we will create. plugin: mymodule_inspiration track_changes: TRUE # This is the key in the database array. key: d7 # This means something to the d7_node plugin, that we inherit from. node_type: panel # This is used to create a path (not covered in this article). constants: slash: '/' process: type: plugin: default_value # This is the destination node type default_value: inspiration_page # Copy over some values title: title changed: changed created: created # This is the important part! layout_builder__layout: layout path: plugin: concat source: - constants/slash - path destination: plugin: entity:node # This is the destination node type default_bundle: inspiration_page dependencies: enforced: module: - mymodule_migrate

As mentioned in the annotated configuration, we need a custom source plugin for this. So, let’s take a look at how we make that:

Creating the migration plugin

If you have a module called “mymodule”, you create a folder structure like so, inside it (just like other plugins):

src/Plugin/migrate/source

And let’s go ahead and create the “Inspiration” plugin, a file called Inspiration.php:

<?php namespace Drupal\mymodule_migrate\Plugin\migrate\source; use Drupal\Component\Uuid\UuidInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\State\StateInterface; use Drupal\layout_builder\Section; use Drupal\layout_builder\SectionComponent; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Row; use Drupal\node\Plugin\migrate\source\d7\Node; use Symfony\Component\DependencyInjection\ContainerInterface; /** * Panel node source, based on panes inside a panel page. * * @MigrateSource( * id = "mymodule_inspiration" * ) */ class Inspiration extends Node { /** * Uuid generator. * * @var \Drupal\Component\Uuid\UuidInterface */ protected $uuid; /** * Inspiration constructor. */ public function __construct( array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, StateInterface $state, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, UuidInterface $uuid ) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $state, $entity_manager, $module_handler); $this->uuid = $uuid; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration = NULL) { return new static( $configuration, $plugin_id, $plugin_definition, $migration, $container->get('state'), $container->get('entity.manager'), $container->get('module_handler'), $container->get('uuid') ); } }

Ok, so this is the setup for the plugin. For this specific migration, there were some weird conditions for which of the panel nodes were actually inspiration pages. If I copy-pasted it here, you would think I was insane, but for now I can just mention that we were overriding the public function query. You may or may not need to do the same.

So, after getting the query right, we are going to do some work inside of the prepareRow function:

/** * {@inheritdoc} */ public function prepareRow(Row $row) { $result = parent::prepareRow($row); if (!$result) { return $result; } // Get all the panes for this nid. $did = $this->select('panels_node', 'pn') ->fields('pn', ['did']) ->condition('pn.nid', $row->getSourceProperty('nid')) ->execute() ->fetchField(); // Find all the panel panes. $panes = $this->getPanelPanes($did); $sections = []; $section = new Section('layout_onecol'); $sections[] = $section; foreach ($panes as $delta => $pane) { if (!$components = $this->getComponents($pane)) { // You must decide what you want to do when a panel pane can not be // converted. continue; } // Here we used to have some code dealing with changing section if this // and that. You may or may not need this. foreach ($components as $component) { $section->appendComponent($component); } } $row->setSourceProperty('layout', $sections); // Don't forget to migrate the "path" part. This is left out for this // article. return $result; }

Now you may notice there are some helper methods there. They look something like this:

/** * Helper. */ protected function getPanelPanes($did) { $q = $this->select('panels_pane', 'pp'); $q->fields('pp'); $q->condition('pp.did', $did); $q->orderBy('pp.position'); return $q->execute(); } /** * Helper to get components back, based on pane configuration. */ protected function getComponents($pane) { $configuration = @unserialize($pane["configuration"]); if (empty($configuration)) { return FALSE; } $region = 'content'; // Here would be the different conversions between panel panes and blocks. // This would be very varying based on the panes, but here is one simple // example: switch ($pane['type']) { case 'custom': // This is the block plugin id. $plugin_id = 'my_custom_content_block'; $component = new SectionComponent($this->uuid->generate(), $region, [ 'id' => $plugin_id, // This is the title of the block. 'title' => $configuration['title'], // The following are configuration options for this block. 'image' => '', 'text' => [ // These values come from the configuration of the panel pane. 'value' => $configuration["body"], 'format' => 'full_html', ], 'url' => $configuration["url"], ]); return [$component]; default: return FALSE; } }

So there you have it! Since we now have amazing tools in Drupal 8 (namely Layout builder and Migrate) there is not task that deserves the question “Is that even possible?”.

To finish off, let's have an animated gif called "inspiration". And I hope this will give some inspiration to other people migrating landing pages into layout builder.

Categories: Drupal

Open Weather Map

New Drupal Modules - 28 February 2019 - 12:00pm
Categories: Drupal

Views Node Access Filter

New Drupal Modules - 28 February 2019 - 10:02am

This module provides a Views filter to only show the nodes that the current user is allowed to edit. This is typically useful as an UX improvement for editors on the /admin/content page.

Note: because of the way core deals with node access (for performance reasons), this module may not take into account some node access modules which change the update access without updating the node access registry.

Categories: Drupal

Acquia Developer Center Blog: Building Usable Conversations: The Story of Ask GeorgiaGov

Planet Drupal - 28 February 2019 - 9:13am

In this final installment of our series on conversational usability, we dig into a case study that brings together all of the ideas and best practices we have discussed so far: the Ask GeorgiaGov skill built by the Acquia Labs team for Digital Services Georgia.

Tags: acquia drupal planet
Categories: Drupal

Pages

Subscribe to As If Productions aggregator