Newsfeeds

Custom Voice Search

New Drupal Modules - 22 November 2017 - 1:40am

Custom Voice Search

This module adds the ability to any form having search field to add voice support.

Configure:
Enable like any other module.
Go to: /admin/config/custom_voice_search/customvoicesearch
Add Form id on which voice search needs to be implemented like: "user_login_form" not "user-login-form"
Add Input id like: "edit-keys" not "edit_keys"
Add Input field name attribute like: keys or name etc.

Categories: Drupal

qed42.com: Override existing Configuration entity types - Drupal 8

Planet Drupal - 22 November 2017 - 12:16am
Override existing Configuration entity types - Drupal 8 Body

Why do we need to override Config Entity Types?

  1. By default, Vocabulary list displays all the vocabularies. In case we want to restrict certain roles from viewing certain vocabularies. Overriding that Class(VocabularyListBuilder) function would be the solution to display specific/no/all vocabularies.
  2. Let's assume we need to specify vocabulary-path for each vocabulary apart from name, title, description, vid etc. In this case we would need to override the default Vocabulary Form of taxonomy_vocabulary config entity type.
  3. Suppose we want to custom access check for views on the basis of role/user/views operation or whatever, we would need to override ViewsAccessControllerhandler of view configEntityType and write our own logic.
  4. Another use case can be, if we want to display all the image fields which use image style being deleted, on confirm text message, we again need to override ImageStyleFlushForm class and redefine getconfirmText function.

In short, to customise and meet our dynamic requirements which may not be supported by config entity type definition as a part of @ConfigEntityType annotations in core or contributed modules, we need to override existing config entity types and write some custom code :).

How can we override Config Entity Types?

Entity types use object based annotation unlike array based annotation which is commonly used. Also, Unlike Content Entity Types where every thing is a field, NOTHING is a field for Configuration Entity type.

Every Drupal config entity type is defined as a particular ConfigEntityType Annotation. Entity controller is completely different from the Controller of MVC pattern. To avoid this confusion in terminology Entity Controllers are termed as handlers, each form related to a particular entity type say taxonomy_vocabulary is declared inside handlers with form key. 

In this article, will take an example of adding custom form elements to config entity type forms to explain this.

In case we need to add a custom element to any of these forms, we need to follow these 2 steps:

I) Set a new handler class specific to that form.

  1. Implement hook_entity_type_alter(array &$entity_types).
  2. Set new handler class as :  $entity_types[{id}]->setHandlerClass('form', ['{form_type}' => 'Drupal\my_module\MyModuleForm', '....', '....' ]);

    where, id = configEntityType id,  form_type eg: default, reset, delete etc is whichever form we want to override and MyModuleForm is the Class name of new form we'll define in Step II.
    Here is the sample code of overriding default form of taxonomy vocabulary.

    $entity_types['taxonomy_vocabulary']->setHandlerClass('form', ['default' => 'Drupal\my_module\VocabularyForm', 'reset' => 'Drupal\taxonomy\Form\VocabularyResetForm', 'delete' => 'Drupal\taxonomy\Form\VocabularyDeleteForm' ]);

     

II) Define the class set in Step I.

  1. Extend the actual class of the form we want to add new form elements to.  use Drupal\taxonomy\VocabularyForm as VocabularyFormBuilderBase;

    {this is optional, we need to do this to keep the new class name same as base class i.e VocabularyForm}.

    class MyModuleForm extends VocabularyFormBuilderBase

    OR simply, 

    class MyModuleForm extends VocabularyForm

    This override is important because we need to inherit functions and form elements defined in the parent class i.e VocabularyForm and also add additional feature i.e form element without disturbing the core code. This is purely OOPs concept of inheritance.

  2. We need to override the form function by 
    1. Inheriting the parent elements by parent::form(....) and
    2. Defining the new custom elements as the basic example below: $form['third_party_settings']['qed42_textfield'] = array( '#type' => 'textfield', '#title' => t('QED42 Custom Form Element'), '#default_value' => $vocabulary->getThirdPartySetting('my_module', 'qed42_textfield', 'Qed42 textfield default value') );

      Config Entities have by default "getThirdPartySetting()" function { Config entities inherit this function if these extend ConfigEntityBase class which implements ConfigEntityInterface interface which in turn extends ThirdPartySettingsInterface interface}. This thirdParty function allows to set and retrieve a value particularly for a module.

    3. Similarly, we can inherit the save function to save the value of newly added form element with Third Party Settings  as : 

      If the form is set as Tree we need to set value as

      $vocabulary->setThirdPartySetting('my_module', 'qed42_textfield', $form_state->getValue('third_party_settings')['qed42_textfield']);

      else :

      $vocabulary->setThirdPartySetting('my_module', 'qed42_textfield', $form_state->getValue('qed42_textfield'));

      and of course inherit the parent save function. 

    4. We can implement the same logic for extending definition of any existing method  AND can also define new functions inside our new Form.

Any Configuration Entity Type (Date format etc) can be overridden similarly, this can be extended to list_builder, access etc.  Apart from overriding, we can also add new flavours of entity controller using the above steps.

 

jyoti.bohra Wed, 11/22/2017 - 13:46
Categories: Drupal

Behind the Counter: Good customers make for good retailers. Simple as that.

RPGNet - 22 November 2017 - 12:00am
How customers make all the difference
Categories: Game Theory & Design

User Edit

New Drupal Modules - 21 November 2017 - 5:20pm

This module provides alias "user/edit" to have better user experience.
By using this, current logged in user can edit own profile and don't mind of his UID.
Sometimes, using "user/%/edit" is pretty uncomfortable.

The development is in progress.

Categories: Drupal

Battle Systems Running Core Battle Sci-Fi Skirmish Game Kickstarter

Tabletop Gaming News - 21 November 2017 - 3:00pm
You might know Battle Systems for all that awesome terrain that they make. Well, if you’ve been wanting a specific game to go with said terrain, your wish has been granted. They are running a Kickstarter campaign for Core Space, a new sci-fi miniatures campaign game. Grab your crew and head out into the black. […]
Categories: Game Theory & Design

Alternative Armies Posts New Releases and Black Friday Sale Announced

Tabletop Gaming News - 21 November 2017 - 2:00pm
Gavin over at Alternative Armies has been a busy bee. He’s got six new releases for you to check out. Along with that, there’s a bunch of sales stuff he’s set up that go live at the end of the week. Save some of your holiday dollars for them! From the announcement: Six brand new […]
Categories: Game Theory & Design

PreviousNext: Introducing the Display Suite Chained Fields module for Drupal 8

Planet Drupal - 21 November 2017 - 1:41pm
Share:

Need a way to mix fields from referenced entities with regular fields from managed display?

Then the Display Suite Chained Fields module might be for you.

by Lee Rowlands / 22 November 2017

So how do you go about using the module?

Step 1: Enable a display suite layout for the view mode

To use the chained fields functionality, you must enable a display suite layout for the view mode. Select a layout other than none and hit Save.

Enabling a layoutStep 2: Enable the entity reference fields you wish to chain

To keep the manage display list from being cluttered, you must manually enable the entity reference fields you wish to show chained fields from. For example, to show the author's picture, you might enable the 'Authored by' entity reference field, which points to the author. After you've enabled the required fields, press Save.

Enabling fields for chainingStep 3: Configure the chained fields as required

Finally, just configure the chained fields as normal.

Configuring chained fields

That's it - let me know your thoughts in the comments or the the issue queue.

Tagged Drupal 8, Display Suite

Posted by Lee Rowlands
Senior Drupal Developer

Dated 22 November 2017

Add new comment
Categories: Drupal

Core Rulebook for Awaken RPG Now Available

Tabletop Gaming News - 21 November 2017 - 1:00pm
We all know how much I love posting stories about Kickstarters that succeed and then are able to be put up for sale to the general public. So, it could be said, that I love making this post, because that’s exactly what we’ve got. The Games Collective is pleased to announce that their Awaken RPG […]
Categories: Game Theory & Design

Wyrd Games Posts Black Friday Sale Announcement

Tabletop Gaming News - 21 November 2017 - 12:00pm
We’re just a couple days away from the start of all the Black Friday Sales (well, except for those couple that’ve already started). In the case of Wyrd, they tend to go all-out, and this year is certainly no different. They’ve posted up what they’ll be selling. It’s quite a lot, so check it out. […]
Categories: Game Theory & Design

Podcast Roundup

Tabletop Gaming News - 21 November 2017 - 11:00am
In a way, it’s Wednesday, because it’s the middle of the work week for me. In a way, it’s Thursday, because it’s the penultimate day of the work week for me. But in several ways, it’s Tuesday, because it’s the 2nd day of the work week for me, and I’m also in my Tuesday shirt […]
Categories: Game Theory & Design

Two New Mindjammer Releases Available From Modiphius

Tabletop Gaming News - 21 November 2017 - 10:00am
Modiphius takes you out into the stars in Mindjammer, their sci-fi RPG of space-faring action and excitement. But when you’re out there, it’s good to know where you are and what you’re doing. These two releases help you do just that. There’s the Enhanced Commonality Space Schematic (so you can know exactly how to find […]
Categories: Game Theory & Design

Chromatic: Common Drupal Problems - Solutions Included

Planet Drupal - 21 November 2017 - 9:27am

Whether you are a Drupal newcomer or a seasoned Drupal developer, you're bound to run into one, some, or all of the issues outlined below. Some are obvious, some not so obvious, but we'll show you how to troubleshoot them all regardless.

Categories: Drupal

Virtual reality allows you to look inside your body and could help improve drug delivery

Virtual Reality - Science Daily - 21 November 2017 - 9:14am
Renderings of 3-D cells in the body are traditionally displayed using 2-D media, such as on a computer screen or paper; however, the advent of Virtual Reality (VR) headsets means it is now possible to visualize and interact with scientific data in a 3-D virtual world.
Categories: Virtual Reality

Pitch your offbeat prototypes to the GDC 2018 Experimental Gameplay Workshop!

Social/Online Games - Gamasutra - 21 November 2017 - 9:06am

The mad geniuses behind the Experimental Gameplay Workshop have issued their call for submissions of intriguing new (and playable!) video game prototypes for the GDC 2018 showcase! ...

Categories: Game Theory & Design

Knuckleduster Miniatures Launches Gunfighter’s Ball Miniatures Game Kickstarter

Tabletop Gaming News - 21 November 2017 - 9:00am
Yeehaw, pardner! Mount up, men! We’ll head ’em off at the pass! Come on out with your six-guns a-shootin’ and a-blazin’! Unhand that rancher’s daughter! Tear up that mortgage! Cattle… lariats? … Anyone for tennis? Anyway, Wild West cliche sayings aside, Knuckleduster Miniatures has launched their Kickstarter campaign for their new miniatures skirmish game, Gunfighter’s […]
Categories: Game Theory & Design

Steamforged Previews More Black Friday Alternate Miniatures

Tabletop Gaming News - 21 November 2017 - 8:30am
I’ve mentioned before that I love alternate sculpts for figures, and it’s true. I think they’re a great way to have holiday and event special figures that doesn’t have people that couldn’t attend/whatever miss out on chunks of the game. Well, Steamforged has shown off some of the alternate-sculpt minis they’re going to have this […]
Categories: Game Theory & Design

Elevated Third: WEBINAR: How NFPA Is Bringing Paper Processes Online With Drupal 8

Planet Drupal - 21 November 2017 - 8:16am
WEBINAR: How NFPA Is Bringing Paper Processes Online With Drupal 8 WEBINAR: How NFPA Is Bringing Paper Processes Online With Drupal 8 Nick Switzer Tue, 11/21/2017 - 09:16

Firewise USA™'s paper application process existed for 15 years but, in 2016, the Firewise team decided to bring the process online. They chose to build this process on top of Drupal 8.

Since moving to Drupal, the Wildfire Division of the National Fire Protection Association has streamlined their processes - enabling them to more efficiently deliver on their program’s goal: teaching individuals how to adapt to living with wildfires and take community action to prevent loss of property.

Join us, Acquia, and our client Aron to discuss the challenges and rewards of bringing a paper process online as a Drupal 8 web app. Topics we’ll discuss:

  • Leveraging an agile philosophy to respond quickly to change, collaborate across disciplines and stakeholder groups and get to a working product in as little time as possible.
  • Balancing effective deliverables with shared understanding to produce working software that meets the organization’s needs.
  • Organizational hurdles to overcome when adding structure and bringing an established paper application process online.

 

Categories: Drupal

Acro Media: Video: Point of Sale (POS) for Drupal Commerce 2

Planet Drupal - 21 November 2017 - 8:14am

 

 

A point of sales system is already in production in Drupal 7; people are using it and seem to like it. And now, we've ported it to Commerce 2 for Drupal 8. Check out this week's High5 to learn more!

What does this mean?

In Drupal 8, the POS is much more built in, and you can easily do things like change out widgets. So if you update your orders and you add a new field, the field will show up there. If you add a specific widget that controls how that field displays, you can pick from a list of available options and it will work in the POS.

How is this different?

In Drupal 7, the POS was very stand alone—it was all custom-built forms and custom-built options. You actually configured it outside of Commerce itself. It used some of the underlying parts of Commerce, but from a user perspective it was almost as if it was a separate module.

For Drupal 8, that's not the case. It has the same level of functionality, but it's integrated much more so you can use a lot of the Commerce infrastructure. For instance: Drupal 7 had the concept of locations (as in store locations), but Drupal 8 has the concept of stores built right in, so we just use that. There's lots of stuff that goes along with stores: you can attach addresses and extra billing information and so on, and the POS can take full advantage of that in Drupal 8.

Are there any new features?

We have quite a bit more reporting (such as KPI reports for tacking metrics for sales people, for instance.) We also have a new "quick add" section that lets you easily add common products without having to look them up by SKU—it's quite robust and fits nicely into the user interface.

When will all this be ready?

We're only at Alpha 1 right now. Alpha 2 should be coming soon. The module should be fully ready to go in the near future. You can download it's current state and follow progress here.

The bottom line

POS is finally ready for Drupal 8. You can start using it, and we're going to continue releasing new features at least once a month for the foreseeable future.

Categories: Drupal

Activity Calendar

New Drupal Modules - 21 November 2017 - 8:08am

This module show activity calendar in user profile. The activity based on created posts and comments. Coefficient (weight) of posts and comments can be configured.

Categories: Drupal

Corvus Belli Announces Black Friday Sale

Tabletop Gaming News - 21 November 2017 - 8:00am
Three days hence, we will have our most-darkest of days. That which is called, “Black Friday.” I don’t know why I’m talking like Thor from Texts from Superheroes, considering we’re here to talk about Corvus Belli, but there we are, then. They have posted up a graphic showing what special deals you’ll be able to […]
Categories: Game Theory & Design

Pages

Subscribe to As If Productions aggregator