Newsfeeds

Acro Media: Digital Downloads using the Drupal Media Module

Planet Drupal - 2 October 2018 - 9:15am

The Media module made its way into Drupal core for the Drupal 8.4 release a while back. It gives Drupal users a standardized way for managing local media resources, including image, audio, video, and document files. We wanted to add using this module into our Drupal Commerce demo site to give an example of how this module could potentially be used in a Commerce setting.

In this Tech Talk video, I’ll quickly show you how we updated our digital download Commerce product example to use the Media module, giving us the flexibility to add audio samples to the product page and access to the full download after purchase.

Background

The product I wanted to update is the Epic Mix Tape by Urban Hipster digital download example product. This is a fake album featuring all of your favourites by artists you’ve never heard before. The idea is to showcase that you can add digital products to a Drupal Commerce based online store, not just physical products.

Originally we were using just a standard file field that, when checkout was completed, gave the customer access to download the file. This was done before the Media module made its way into core. Now that the Media module is in core, we figured it’s time to update it.

Setting up an Album media type

When the Media module is installed you get some new admin menu items. The first is a section called Media Types (under Structure) where you can configure your media entities like any other Drupal content entity. Here I created an ‘Album’ media type with two unlimited file fields, one for sample audio tracks and one for the full audio tracks. This is the basis for creating my downloadable albums.

The second admin menu is under Content. Here you get a new Media tab which is where you can add, edit and remove any media items. Since I already created the Album media type I can now add the Epic Mix Tape album files here. This completes the media side of the updated digital download product. All I need to do now is update the product configuration to use it.

Completing the digital download product configuration

Now that the media type has been added and I’ve uploaded an album, I need to set up a way to use it. It’s pretty easy to do. First, for the digital download Product Type, I add an entity reference field to give a way for selecting the album media entity to use for the product samples.

I then do the same thing for the Product Variation Type. This one, however, will be used to give access to the full files after purchase.

Finally, some template updates. The Drupal Commerce demo site has some pretty custom template files for the products. In the template, I access the media entity directly and loop through the items, printing each audio sample and track title onto the product page. I do the same thing for the checkout complete page but print out the full tracks instead.

Depending on your templates and display settings, you can get similar results without manually accessing the files in the template file, however I wanted to print out the file description with the audio player right on the page. Showing the description unfortunately is something you don’t have the option of doing using the standard audio display widget.

And that’s it! Check out the Urban Hipster Drupal Commerce demo site below to see it in action.

Categories: Drupal

lakshminp.com: Using Drupal and Docker in production

Planet Drupal - 2 October 2018 - 7:09am
Using Drupal and Docker in production lakshminp Tue, 10/02/2018 - 10:09

In the previous post, we created a setup to run Drupal + Docker in local. With a skip and a jump, we can make the same setup run in production as well. We'll do a deep dive of the same in this post.

Categories: Drupal

Narrativizing Night in the Woods - by Justin Reeve

Gamasutra.com Blogs - 2 October 2018 - 7:09am
How do systems and story interact? This article examines how Night in the Woods puts the mechanics in support of the story - not the other way around.
Categories: Game Theory & Design

Acquia Developer Center Blog: Defending Against a Self-Propagating Drupal Botnet Attack

Planet Drupal - 2 October 2018 - 7:00am

On the 28th of March 2018 the Drupal Security Team announced SA-CORE-2018-002, a serious Remote Code Execution vulnerability, which came to be known by many as "Drupalgeddon 2". Here's what we learned defending against it.

Tags: acquia drupal planet
Categories: Drupal

Drupal Modules: The One Percent: Drupal Modules: The One Percent — Access by Reference (video tutorial)

Planet Drupal - 2 October 2018 - 6:58am
Drupal Modules: The One Percent — Access by Reference (video tutorial) NonProfit Tue, 10/02/2018 - 08:58 Episode 46

Here is where we bring awareness to Drupal modules running on less than 1% of reporting sites. Today we'll consider Access by Reference, a module which lets content editors easily grant other users access to specific nodes.

Categories: Drupal

Web Wash: Search across Fields in Views using Combine Fields Filter in Drupal 8

Planet Drupal - 2 October 2018 - 6:30am

I was recently looking at all the default views that come with Drupal 8. For people who don't know, the Views module is part of Drupal 8 core. In Drupal 7 and below it's the most installed module so during Drupal 8's development it was decided to move Views into core.

During my exploration into all of the default Views, I noticed that in the People (User) view there was a filter called "Combine fields filter".

Want to learn about Views? Read Build a Blog in Drupal 8: Using Views or watch it as part of our FREE Drupal 8 Site Building course.

Now just a quick side note, if you're new to Drupal and Views I'd highly recommend you spend time walking through all of the default views and see how they were configured. You can learn a lot just by seeing how things are set up.

The "Combine fields filter" does a pretty cool thing. It allows you to search across multiple fields or put another way, it allows you to combine fields and then filter by their combined value.

Categories: Drupal

Wim Leers: API-First Drupal: what's new in 8.6?

Planet Drupal - 2 October 2018 - 6:28am

Drupal 8’s REST API reached a next level of maturity in 8.5. In 8.6, we matured it further, added features and closed some gaps.

Drupal 8.6 was released 1 with some significant API-First improvements!

The REST API made a big step forward with the 6th minor release of Drupal 8 — I hope you’ll like these improvements :)

Thanks to everyone who contributed!

  1. File uploads! #1927648

    No more crazy per-site custom REST resource plugins, complex work-arounds or base64-encoded hacks! Safe file uploads of any size are now natively supported!

    POST /file/upload/node/article/field_hero_image?_format=json HTTP/1.1 Content-Type: application/octet-stream Content-Disposition: file; filename="filename.jpg" [… binary file data …]

    then, after receiving a response to the above request:

    POST /node?_format=json HTTP/1.1 Content-Type: application/json { "type": [{"value": "article"}], "title": [{"value": "Dramallama"}], // Note that this is using the file ID we got back in the response to our previous request! "field_hero_image": [ { "target_id": 345345, "description": "The most fascinating image ever!" } ] }

    If you’d like a more complete example, see the change record, which explains it in detail. And if you want to read about the design rationale, see the dedicated blog post.

  2. parent field on Term now is a standard entity reference #2543726

    "parent": [] ⬇ "parent":[{ "target_id": 2, "target_type": "taxonomy_term", "target_uuid": "371d9486-1be8-4893-ab20-52cf5ae38e60", "url": "https://example.com/taxonomy/term/2" }] We fixed this at the root, which means it not only helps core’s REST API, but also the contributed JSON API and GraphQL modules, as well as removing the need for its previously custom Views support!

  3. alt property on image field lost in denormalization #2935738 "field_image":[{ "target_id": 2, "target_type": "file", "target_uuid": "be13c53e-7f95-4add-941a-fd3ef81de979", "alt": "Beautiful llama!" }]

    after denormalizing, saving and then normalizing, this would result in:

    "field_image":[{ "target_id": 2, "target_type": "file", "target_uuid": "be13c53e-7f95-4add-941a-fd3ef81de979", "alt": "" }]

    Same thing for the description property on file and image fields, as well as text, width and height on image fields. Denormalization was simply not taking any properties into account that specializations of the entity_reference field type were adding!

  4. PATCHing a field → 403 response without with reason #2938035

    {"message":"Access denied on updating field 'sticky'."} ⬇ {"message":"Access denied on updating field 'sticky'. The 'administer nodes' permission is required."}

    Just like we improved PATCH support in Drupal 8.5 (see point 4 in the 8.5 blog post), we again improved it! Previously when you’d try to modify a field you’re not allowed to modify, you’d just get a 403 response … but that wouldn’t tell you why you weren’t allowed to do so. This of course was rather frustrating, and required a certain level of Drupal knowledge to solve. Now Drupal is far more helpful!

  5. 406 responses now lists & links supported formats #2955383

    Imagine you’re doing a HTTP request like GET /entity/block/bartik_branding?_format=hal_json. The response is now more helpful.

    Content-Type: application/hal+json {"message": "No route found for the specified format hal_json."}

    Content-Type: application/hal+json Link: <http://example.com/entity/block/bartik_branding?_format=json>; rel="alternate"; type="application/json", >http://example.com/entity/block/bartik_branding?_format=xml>; rel="alternate"; type="text/xml" {"message": "No route found for the specified format hal_json. Supported formats: json, xml."}
  6. Modules providing entity types now responsible for REST tests

    Just like we achieved comprehensive test coverage in Drupal 8.5 (see point 7 in the 8.5 blog post), we again improved it! Previously, the rest.module component in Drupal core provided test coverage for all core entity types. But if Drupal wants to be API-First, then we need every component to make HTTP API support a priority.
    That is why in Drupal 8.6, the module providing an entity type contains said test coverage (A). We also still have test coverage test coverage (B). Put A and B together, and we’ve effectively made HTTP API support a new gate for entity types being added to Drupal core. Also see the dedicated blog post.

  7. rest.module is now maintainable!

    I’m happy to be able to proudly declare that Drupal 8 core’s rest.module in Drupal 8.6 can for the first time be considered to be in a “maintainable” state, or put differently: in a well-maintained state. I already wrote about this in a dedicated blog post 4.5 months ago. Back then, for the first time, the number of open issues fit on “a single page” (fewer than 50). Today, several months later, this is still the case. Which means that my assessment has proven true :) Whew!

Want more nuance and detail? See the REST: top priorities for Drupal 8.6.x issue on drupal.org.

Are you curious what we’re working on for Drupal 8.7? Want to follow along? Click the follow button at REST: top priorities for Drupal 8.7.x — whenever things on the list are completed (or when the list gets longer), a comment gets posted. It’s the best way to follow along closely!2

The other thing that we’re working on for 8.7 besides the REST API is getting the JSON API module polished to core-worthiness. All of the above improvements help JSON API either directly or indirectly! I also wrote about this in my State of JSON API blog post. Given that the REST API is now in a solid place, for most of 2018 the majority of our attention has actually gone to JSON API, not core’s REST API. I expect this to continue to be the case.

Was this helpful? Let me know in the comments!

For reference, historical data:

  1. This blog post is long overdue since 8.6 was released almost a month ago. Some personal life issues caused a delay. ↩︎

  2. ~50 comments per six months — so very little noise. ↩︎

Categories: Drupal

Critique on data driven development - by James Mearman

Gamasutra.com Blogs - 2 October 2018 - 6:15am
In a time where collected data increasingly shapes how we create games I would like to offer my thoughts on how this same data is invoking it's own reality on how games are to be created.
Categories: Game Theory & Design

Situations of Conflict - by James Allsopp

Gamasutra.com Blogs - 2 October 2018 - 6:09am
Most stress, anxiety and the increasing pressure we experience in game development is due to situations of conflict. Conflict with; other people, yourself, the design, the way the character just doesn’t quite feel right when jumping and of course…time
Categories: Game Theory & Design

CTI Digital: Marketing Drupal to Customers: a Drupal Europe Initiative. Call for Contributors!

Planet Drupal - 2 October 2018 - 5:03am

Whilst at Drupal Europe last month, I was privileged to be invited by Drupal’s founder, Dries Buytaert, to a round table discussion, aimed at further marketing the Drupal project.

Categories: Drupal

DARK PLACES and DEMOGORGONS - The Ghost Hunter's Handbook - and use w/other OSR games

New RPG Product Reviews - 2 October 2018 - 4:19am
Publisher: Bloat Games
Rating: 5
Nothing beats a good ghost story and the early 80s was full of them. From the old school hauntings of 1981's Ghost Story to 1982's Poltergeist to the old guard in House of the Long Shadows (1983) and even to 1984's Ghostbusters. And this is now where near all. If you loved ghost stories it was a great time.

Thankfully Bloat Games hears you and has what you need.

DARK PLACES and DEMOGORGONS - The Ghost Hunter's Handbook is 60 pages (digest sized) with color covers and black and white interior. It has the same feel as the other books in this series. The art is good and I recognize a lot of the names inside.

With this book, like the others, we start out with new classes.
The Clairvoyant can see things the others can't (we have a couple "I see dead people" classes already, but this is a good one).
The Parapsychologist is great, but I think it is stretching what it means for a "Kid" class like the core book is filled with. Though, I guess reading the starting equipment this is also the class that best fit me in High School! Yes, I did write a program to emulate a PKE meter on my TRS-80 Color Computer.
The Mystical Ghost Hunter covers your basic exorcists/cleanser type.
But the class I was happiest to see was the Nullifier! This is the guy who walks in the room and all paranormal activity stops. The class might have limited growth, save that they are the ones that will survive any magical attack, but I like them all the same. In college one of my "hippie" friends claimed I was a "Null" because his Ouija board never worked when I was around!

Pages 14-24 cover different kinds of ghosts, spectres, and haunts and their reasons for haunting. This is one of the parts that make this book "and use w/other OSR games". You can drop these spookies into any OSR game (some will require tweaks) and you are good to go. They can all be run as-is really; especially if you are playing Swords and Wizardry. In fact, there is a lot here in the DP and D that the S and W game master can use.

A few pages on what you can find on The Other Side! (uh...Thanks! but I didn't get you anything. OH! THAT Other Side.)

There are a couple pages on equipment including Ghost Hunter kits to fit your price range.
Next, we have some new ghost-related magic items.
A couple pages of minor and major spells.

And what book on ghosts would be complete without a haunted house? Well, this one taped into that 80s feeling well and gives us a haunted asylum! It's like you guys read my Christmas lists or something!

Information of the J'town Paranormal Society (which feels like it is somewhere between Supernatural's "Ghost Chasers" and Doctor Who's LINDA).

We end with a great, but incomplete, list books, movies, and television shows.

Author Josh Palmer did a hell of a job here and this is a worthy addition to the DP and D line. The book is worth every penny. In truth at just $5 and 60 pages you are getting a hell of a deal.

Print on demand is coming soon.

It's Halloween. Get out there and bust some ghosts!
Categories: Game Theory & Design

How EVE Online has evolved in the era of F2P

Social/Online Games - Gamasutra - 2 October 2018 - 1:01am

We chat with some recently-promoted leads of EVE Online to learn how the long-running space spreadsheet MMORPG is faring as it transitions to F2P -- and experiments with new "Abyssal Deadspace" zones. ...

Categories: Game Theory & Design

Advanced Designers & Dragons: Designers & Dragons Next — Evil Hat: 2010-Present

RPGNet - 2 October 2018 - 12:00am
Evil Hat in the Kickstarter and Patreon age.
Categories: Game Theory & Design

Seattle police try new opt-in registry system to combat SWATting

Social/Online Games - Gamasutra - 1 October 2018 - 3:30pm

This week Seattle's police department is launching a new opt-in registry system aimed at making it harder for people to harass and endanger others by filing hoax emergency reports (aka "SWATting"). ...

Categories: Game Theory & Design

An object at rest

Adventures in Interactive FIction - 17 May 2008 - 2:03pm

So obviously, the pendulum of progress stopped swinging on my game.  As much as I tried to prevent it, pressing obligations just wouldn’t take a back seat (nor would the burglars who, a few weeks ago, stole 90% of my wardrobe and who last week stole my monitor).  So after a string of hectic weekends and even crazier weeks, this weekend has been pretty wide open for doing whatever I want to do.  And not a moment too soon!

So after doing all the other things I try to do with my weekends, I finally loaded up the ol’ Inform 7 IDE and started working on my game.  To get me back in the swing of things, so to speak, I started reading through what I’d already written.  It was an interesting experience.

Strangely, what impressed me most was stuff I had done that I have since forgotten I learned how to do.  Silly little things, like actions I defined that actually worked, that had I tried to write them today, probably would have had me stumped for a while.  Go me!  Except, erm, I seem to have forgotten more than I’ve retained.

I also realized the importance of commenting my own code.  For instance, there’s this snippet:

A thing can be attached or unattached. A thing is usually unattached. A thing that is a part of something is attached.

The problem is, I have no idea why I put it in there – it doesn’t seem relevant to anything already in the game, so I can only imagine that I had some stroke of genius that told me I was going to need it “shortly” (I probably figured I’d be writing the code the next night).  So now, there’s that lonely little line, just waiting for its purpose.  I’m sure I’ll come across it some day; for now, I’ve stuck in a comment to remind myself to stick in a comment when I do remember.

It reminds me of all the writing I did when I was younger.  I was just bursting with creativity when I was a kid, constantly writing the first few pages of what I was sure was going to be a killer story.  And then I’d misplace the notebook or get sidetracked by something else, or do any of the million other things that my easily distracted self tends to do.  Some time later, I’d come across the notebook, read the stuff I’d written and think, “Wow, this is great stuff!  Now… where was I going with it?”  And I’d never remember, or I’d remember and re-forget.  Either way, in my mother’s attic there are piles and piles of notebooks with half-formed thoughts that teem with potential never to be fulfilled.

This situation – that of wanting to resume progress but fumbling to pick up the threads of where I left off –  has me scouring my memory for a term I read in Jack London’s Call of the Wild.  There was a part in the book where Buck’s owner (it’s late, his name has escaped me) has been challenged to some sort of competition to see if Buck can get the sled moving from a dead stop.  I seem to remember that the runners were frozen to the ground.  I thought the term was “fast break” or “break fast” or something to that effect, but diligent (does 45 seconds count as diligent?) searching has not confirmed this or provided me with the right term.  Anyway, that’s how it feels tonight – I feel as if I’m trying to heave a frozen sled free from its moorings.

The upside is, I am still pleased with what I have so far.  That’s good because it means I’m very likely to continue, rather than scrap it altogether and pretend that I’ll come up with a new idea tomorrow.  In the meantime, I’ll be looking for some SnoMelt and a trusty St. Bernard to get things moving again.

Categories:

Time enough (to write) at last…

Adventures in Interactive FIction - 14 April 2008 - 3:24pm

So I didn’t get as much coding done over the weekend as I had hoped, mainly because the telephone company *finally* installed my DSL line, which meant I was up til 5:30 Saturday am catching up on the new episodes of Lost.  That, in turn, meant that most of the weekend was spent wishing I hadn’t stayed up until such an ungodly hour, and concentration just wasn’t in the cards.

However, I did get some stuff done, which is good.  Even the tiniest bit of progress counts as momentum, which is crucial for me.  If the pendulum stops swinging, it will be very hard for me to get it moving again.

So the other day, as I was going over the blog (which really is as much a tool for me as it is a way for me to share my thoughts with others), I realized I had overlooked a very basic thing when coding the whole “automatically return the frog to the fuschia” bit…

As the code stood, if the player managed to carry the frog to another room before searching it, the frog would get magically returned to the fuschia.  This was fairly simple to resolve, in the end – I just coded it so that the game moves (and reports) the frog back to fuschia before leaving the room.  I also decided to add in a different way of getting the key out of the frog – in essence, rewarding different approaches to the same problem with success.

Which brings me to the main thrust of today’s post.  I have such exacting standards for the games I play.  I love thorough implementation.  My favorite games are those that build me a cool gameworld and let me tinker and explore, poking at the shadows and pulling on the edges to see how well it holds up.  A sign of a good game is one that I will reopen not to actually play through again, but to just wander around the world, taking in my surroundings.  I’ve long lamented the fact that relatively few games make this a rewarding experience – even in the best games, even slight digging tends to turn up empty, unimplemented spots.

What I am coming to appreciate is just how much work is involved in the kind of implementation I look for.  Every time I pass through a room’s description, or add in scenery objects, I realize just how easy it is to find things to drill down into.  Where there’s a hanging plant, there’s a pot, dirt, leaves, stems, wires to hang from, hooks to hang on, etc.  Obviously, unless I had all the time in the world, I couldn’t implement each of these separately, so I take what I believe to be the accepted approach and have all of the refer to the same thing.  Which, in my opinion, is fine.  I don’t mind if a game has the same responses for the stems as it does for the plant as a whole, as long as it has some sort of relevant response.  Even so, this takes a lot of work.  It might be the obsessive part of me, but I can’t help but think “What else would a person think of when looking at a hanging plant?”

Or, as I’ve come to think of it:  WWBTD?

What Would Beta Testers Do?

I’ve taken to looking at a “fully” implemented room and wondering what a player might reasonably (and in some cases unreasonably) be expected to do.  This is a bit of a challenging process for me – I already know how my mind works, so trying to step outside of my viewpoint and see it from a blind eye is hard.   I should stop for a second to note that I fully intend to have my game beta tested once it reaches that point, but the fewer obvious things there are for testers to trip over, the more time and energy they’ll have for really digging in and trying to expose the weaknesses I can’t think of.

I’ve found one resource that is both entertaining and highly informative to me:  ClubFloyd transcripts.  ClubFloyd, for the uninitiated (a group among which I count myself, of course) is a sort of cooperative gaming experience — if anyone who knows better reads this and cares to correct what may well be a horrible description, by all means!– where people get together on the IFMud and play through an IF title.  The transcripts are both amusing and revealing.  I recently read the Lost Pig transcript and it was quite interesting.  The things people will attempt to do are both astonishing and eye-opening.  In the case of Lost Pig (which, fortunately, I had already played before reading the transcript), what was even more amazing was the depth of the game itself.  I mean, people were doing some crazy ass stuff – eating the pole, lighting pants on fire, and so on.  And it *worked*.  Not only did it work, it was reversible.  You obviously need the pole, so there’s a way to get it back if, in a fit of orc-like passion, you decide to shove it in down Grunk’s throat.

Anyway, my point is, the transcripts gave me a unique perspective on the things people will try, whether in an effort to actually play the game, to amuse themselves, or to amuse others.  Definitely good stuff to keep in mind when trying to decide, say, the different ways people will try to interact with my little porcelain frog.

Other Stuff I Accomplished

So I coded in an alternate way to deal with the frog that didn’t conflict with the “standard” approach.  I also implemented a few more scenery objects.  Over the course of the next few days, I’m going to try to at least finish the descriptions of the remaining rooms so that I can wander around a bit and start really getting to the meat of it all.  I also want to work on revising the intro text a bit.  In an effort to avoid the infodumps that I so passionately hate, I think I went a little too far and came away with something a bit too terse and uninformative.  But that’s the really fun part of all of this – writing and re-writing, polishing the prose and making it all come together.

Whattaya know.  Midnight again.  I think I’m picking up on a trend here.

Categories:

Day Nothing – *shakes fist at real life*

Adventures in Interactive FIction - 8 April 2008 - 12:13pm

Grrr… I’ve been so bogged down in work and client emergencies that progress on the game is at a temporary (no, really!  Only temporary) standstill.  I’ve managed to flesh out a few more room and scenery descriptions, but have not accomplished anything noteworthy in a few days.  Hopefully after this week most of the fires on the work front will be extinguished, and I’ll have time to dive into the game this weekend.

(She says to no one, since there’s been one hit on this blog since… it started.)

Categories:

Pages

Subscribe to As If Productions aggregator