Newsfeeds

Third-party services

New Drupal Modules - 5 June 2017 - 5:42am

Respect people privacy and let every particular user to decide which external services to be rendered on your pages.

The implementation is frontend-based, so you can safely use this project alongside with caching services, like Varnish or Nginx.

How to use

The main idea of implementation - to process fields and blocks and check their contents for external widgets. How this achieved?

Fields

Third-party services filtering might be enabled for every field.

Categories: Drupal

Expandable content (Ckeditor Plugin)

New Drupal Modules - 5 June 2017 - 4:12am

Expandable content (Ckeditor Plugin)

This module provide a ckeditor plugin to add expandable content, by enabling this module you will be able to add expandable content which have multiple section with a heading followed by content, by default content is collapsed and on click of heading it will expand.

You can use this module along with ckeditor or wysiwyg module, but for wysiwyg module editor should be ckeditor.

Note: To use this feature you must have allowed div and classes, otherwise it will not work.

Categories: Drupal

heykarthikwithu: Drupal 7 - Apache Solr Search, How to setup and how to index?

Planet Drupal - 5 June 2017 - 12:55am
Drupal 7 - Apache Solr Search, How to setup and how to index?

Install Solr on the machine, Setup the Core, Install and Configure the Apache Solr Search module and do the Indexing..

heykarthikwithu Mon, 06/05/2017 - 13:25
Categories: Drupal

Metatag by user role

New Drupal Modules - 5 June 2017 - 12:49am

This module allows you to configure meta tags for user pages by user roles. In the case of meta tags for multiple roles, the user's priority role is used (role with less weight on the page admin/people/roles). So far, this module is only available for Drupal 8.

Dependencies Credits

Developed and maintained by WalkingDexter.

Categories: Drupal

Attack of abstract forms - THOTH - by Sonja Angesleva

Gamasutra.com Blogs - 5 June 2017 - 12:06am
Jeppe Carlsen's games 140 and THOTH have original visual style and inventive level design in pervasive audiovisual settings. I chatted with Jeppe about THOTH, his game design philosophy as well as his plans for the upcoming indie game project.
Categories: Game Theory & Design

Fuzzy Thinking: Singing Telegram of Cthulhu

RPGNet - 5 June 2017 - 12:00am
EEE--Aaaaaaaaaaaaaah!
Categories: Game Theory & Design

Custom Table Migrate

New Drupal Modules - 4 June 2017 - 11:06pm

The Custom Table Migrate(custom_table_migrate) module provides a feature to Migrate Custom table with Content from MYSQL to Mongodb.

Categories: Drupal

Video Game Deep Cuts: Chuck E Cheese's Fallen London

Social/Online Games - Gamasutra - 4 June 2017 - 7:33pm

This week's top longform article/video highlights include the history of Nolan Bushnell's Chuck E Cheese arcade restaurants, the backstory of Fallen London, and lots more. ...

Categories: Game Theory & Design

Erik Erskine: Nicer date ranges in Drupal – part 3

Planet Drupal - 4 June 2017 - 4:00pm

This is the last part of a series on improving the way date ranges are presented in Drupal, by creating a field formatter that can omit the day, month or year where appropriate, displaying the date ranges in a nicer, more compact form:

  • 24–25 January 2017
  • 29 January–3 February 2017
  • 9:00am–4:30pm, 1 April 2017

In this post we look at adding an administrative interface, so site builders can add and edit formats from Drupal's UI.

Read more

Categories: Drupal

OSTraining: Creating Printer-friendly Versions of Drupal Articles

Planet Drupal - 4 June 2017 - 4:00pm

In this tutorial, we'll show you how to add a "Printer-friendly version" button to your Drupal articles. The main reason you'd want to do this is a courtesy for your readers. Many still print things they read online and you don't want them to waste that expensive printer ink just to print your logo and theme as well as the article.

This is a themed tutorial because our sister post "Creating Printer-friendly Versions of Wordpress Posts" with Wordpress tutorial covers the same topic.

Without this solution, you'd likely need to create a separate CSS file with styles specifically for the printed page.  Fortunately, the "Printer, email and PDF versions" Drupal community module makes this much easier. It will automatically create a printer-friendly version of each article.

Categories: Drupal

Matt Glaman: Swapping Drupal 8 services to customize Drupal Commerce

Planet Drupal - 4 June 2017 - 9:11am

One of the reasons that I love Drupal 8 is the fact it is object orientated and uses the Dependency Injection pattern with a centralized service container. If you’re new to the concept, here’s some links for some fun reading.

But for now the basics are: Things define their dependencies, and a centralized thing is able to give you an object instance with all of those dependencies provided. You don’t need to manually construct a class and provide its dependencies (constructor arguments.)

This also means we do not have to use concrete classes! That means you can modify the class used for a service without ripping apart other code. Yay for being decoupled(ish)!

Why is this cool?

So that’s great, and all. But let’s actually use a real example to show how AWESOME this is. In Drupal Commerce we have the commerce_cart.cart_session service. This is how we know if an anonymous user has a cart or not. We assume this service will implement the \Drupal\commerce_cart\CartSessionInterface interface, which means we don’t care how you tell us, just tell us via our agreed methods.

The default class uses the native session handling. But we’re going to swap that out and use cookies instead. Why? Because skipping the session will preserve page cache while browsing the site catalogs and product pages.

Let’s do it

Let’s kick it off by creating a module called commerce_cart_cookies. This will swap out the existing commerce_cart.cart_session service to use our own implementation which relies on cookies instead of the PHP session.

The obvious: we need a commerce_cart_cookies.info.yml

    name: Commerce Cart Cookies
    description: Uses cookies for cart session instead of PHP sessions
    core: 8.x
    type: module
    dependencies:
    - commerce_cart

Now we need to create our class which will replace the default session handling. I’m not going to go into what the entire code would look like to satisfy the class, but the generic class would resemble the following. You can find a repo for this project at the end of the article.

    <?php

namespace Drupal\commerce_cart_cookies;

use Drupal\commerce_cart\CartSessionInterface;
use Symfony\Component\HttpFoundation\RequestStack;

/**
* Uses cookies to track active carts.
*
* We inject the request stack to handle cookies within the Request object,
* and not directly.
*/
class CookieCartSession implements CartSessionInterface {

  /**
   * The current request.
   *
   * \Symfony\Component\HttpFoundation\Request
   */
  protected $request;

  /**
   * Creates a new CookieCartSession object.
   *
   * \Symfony\Component\HttpFoundation\RequestStack $request_stack
   *   The request stack.
   */
  public function __construct(RequestStack $request_stack) {
    $this->request = $request_stack->getCurrentRequest();
    }

    /**
    * {}
    */
    public function getCartIds($type = self::ACTIVE) {
    // TODO: Implement getCartIds() method.
    }

    /**
    * {}
    */
    public function addCartId($cart_id, $type = self::ACTIVE) {
    }

    /**
    * {}
    */
    public function hasCartId($cart_id, $type = self::ACTIVE) {
    // TODO: Implement hasCartId() method.
    }

    /**
    * {}
    */
    public function deleteCartId($cart_id, $type = self::ACTIVE) {
    // TODO: Implement hasCartId() method.
    }

    }

Next we’re going to make our service provider class. This is a bit magical, as we do not actually register it anywhere. It just needs to exist. Drupal will look for classes that end in ServiceProvider within all enabled modules. Based on the implementation you can add or alter services registered in the service container when it is being compiled (which is why the process is called rebuild! not just cache clear in Drupal 8.) The class must also start with a camel cased version of your module name. So our class will be CommerceCartCookiesServiceProvider.

Create a src directory in your module and a CommerceCartCookiesServiceProvider.php file within it. Let’s scaffold out the bare minimum for our class.

    <?php

namespace Drupal\commerce_cart_cookies;

use Drupal\Core\DependencyInjection\ServiceProviderBase;

class CommerceCartCookiesServiceProvider extends ServiceProviderBase { }

Luckily for us all, core provides \Drupal\Core\DependencyInjection\ServiceProviderBase for us. This base class implements ServiceProviderInterface and ServiceModifierInterface to make it easier for us to modify the container. Let’s override the alter method so we can prepare to modify the commerce_cart.cart_session service.

        <?php

namespace Drupal\commerce_cart_cookies;

use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceProviderBase;

class CommerceCartCookiesServiceProvider extends ServiceProviderBase {

  /**
   * {}
   */
  public function alter(ContainerBuilder $container) {
    if ($container->hasDefinition('commerce_cart.cart_session')) {
        $container->getDefinition('commerce_cart.cart_session')
        ->setClass(CookieCartSession::class)
        ->setArguments([new Reference('request_stack')]);
        }
        }

        }
   

We update the definition for commerce_cart.cart_session to use our class name, and also change it’s arguments to reflect our dependency on the request stack. The default service injects the session handler, whereas we need the request stack so we can retrieve cookies off of the current request.

The cart session service will now use our provided when the container is rebuilt!

The project code can be found at https://github.com/mglaman/commerce_cart_cookies

Categories: Drupal

Video Game Deep Cuts: Chuck E Cheese&#039;s Fallen London - by Simon Carless

Gamasutra.com Blogs - 4 June 2017 - 7:29am
This week's top longform article/video highlights include the history of Nolan Bushnell's Chuck E Cheese arcade restaurants, the backstory of Fallen London, and lots more.
Categories: Game Theory & Design

Commerce Quick Edit

New Drupal Modules - 3 June 2017 - 4:56pm

This module provides a modal form for editing commerce products. You can use it to quickly edit you products without having to go to the edit form and waste your valuable time. Just click on the quick edit link and make the necessary changes.

How to use it?

Categories: Drupal

Review Roundup

Tabletop Gaming News - 3 June 2017 - 11:00am
Well, now that you’ve gone and gotten your name on the list to get your copy of the new edition of 40k, let’s get down to business with the regular affairs for Saturdays. That is, the Review Roundup. Today we have: Carcosa, Pandemic, 12 Realms, 12 Realms: Ghost Town, Legendary: Big Trouble in Little China, […]
Categories: Game Theory & Design

Nice Menus On-Click Support

New Drupal Modules - 3 June 2017 - 10:14am

Description
--------------
Module to change the default behavior of Nice menus module from Hover to OnClick.

Features
----------

Categories: Drupal

New Edition of Warhammer 40k Available For Pre-Order

Tabletop Gaming News - 3 June 2017 - 10:08am
By now, I’m sure you’ve probably heard about it. I mean, we mentioned it last week. But there’s a new edition of Warhammer 40k available to pre-order from Games Workshop. 8th Edition brings familiar mechanics that you’ve seen before with some new twists and ways to put forces together, along with some new minis, to […]
Categories: Game Theory & Design

Custom 4XX Pages

New Drupal Modules - 3 June 2017 - 8:55am

Enable this module and you can configure 4XX pages for certain paths to point at nodes, rather than the default 4XX pages.

Categories: Drupal

Drupal core announcements: Drupal 8 and 7 core release window on Wednesday, June 07, 2017

Planet Drupal - 3 June 2017 - 7:10am
Start:  2017-06-06 12:00 - 2017-06-08 12:00 UTC Organizers:  catch cilefen David_Rothstein Fabianx stefan.r xjm Event type:  Online meeting (eg. IRC meeting)

The monthly core patch (bug fix) release window is this Wednesday, June 07. Drupal 8.3.3 and 7.55 will be released with fixes for Drupal 8 and 7.

To ensure a reliable release window for the patch release, there will be a Drupal 8.3.x commit freeze from 12:00 UTC Tuesday to 12:00 UTC Thursday. Now is a good time to update your development/staging servers to the latest 8.3.x-dev or 7.x-dev code and help us catch any regressions in advance. If you do find any regressions, please report them in the issue queue. Thanks!

To see all of the latest changes that will be included in the releases, see the 8.3.x commit log and 7.x commit log.

Other upcoming core release windows after this week include:

  • Wednesday, June 21 (security release window)
  • Wednesday, July 05 (patch release window)
  • Wednesday, October 5 (scheduled minor release)

For more information on Drupal core release windows, see the documentation on release timing and security releases, as well as the Drupal core release cycle overview.

Categories: Drupal

UIkit Layouts

New Drupal Modules - 2 June 2017 - 5:22pm
Categories: Drupal

UIkit Paragraphs

New Drupal Modules - 2 June 2017 - 5:21pm

The UIkit Paragraphs module provides a suite of content and layout Paragraph bundles made with the UIkit front-end framework.

Categories: Drupal

Pages

Subscribe to As If Productions aggregator