Skip to Content

Newsfeeds

Web Omelette: Debugging Drupal redirects

Planet Drupal - 25 May 2015 - 12:00am

I was working on a big website with many contrib and custom modules. And I had to debug a very annoying redirect that started happening sometime in the recent past, not sure when. Some pages simply just redirected to other URLs.

I figured out that the problem was one of a 301 redirect. My browser told me that at least. But good luck figuring out where in the code I can find the culprit. Xdebug breakpoints everywhere but to no avail. A search for drupal_goto in the custom modules directory didn't help either, and God be with anyone trying to search through a contrib folder of that size.

Then it hit me. Isn't there a hook invoked inside drupal_goto? At this point I was assuming (and hoping really) that the redirect was happening somehow with a drupal_goto. And it turns out there is one: hook_drupal_goto_alter.

Armed with a new dose of hope, I implemented the hook and cleared the cache. Inside, I added the obligatory $test = ''; statement and put a breakpoint on it. Let's see what happens. After loading one of the offending pages, the breakpoint halted the execution and the Xdebug call stack in my PHPStorm immediately pointed out the problem: Global Redirect. There was some URL rewriting happening on the site so GR got a bit confused and was redirecting back to the original path. The details of the issue are however not important.

My point is that using this hook, I could see exactly who and why was calling drupal_goto. I didn't use it for anything else, apart from learning why the redirect is happening which in turn allowed me to write some code that prevented that.

Awesome. I learned about a new hook. And maybe now you as well.

In Hooks | Drupal var switchTo5x = true;stLight.options({"publisher":"dr-8de6c3c4-3462-9715-caaf-ce2c161a50c"});
Categories: Drupal

Fuzzy Thinking: Another Week, Another Skill Check

RPGNet - 25 May 2015 - 12:00am
Fuzzy skills.
Categories: Game Theory & Design

CiviCRM Blog: Easier creation of email newsletters - New version

Planet Drupal - 24 May 2015 - 7:24am

When preparing an email newsletter, one part of it that is time consuming is gathering together all the content that is needed. In my experience, virtually all the content already exists elsewhere, such as in the local CMS, in CiviCRM, or on a blog, or some other online source.    So I was thinking how can I make this process easier.  What I did: I created mail merge tokens for CiviCRM that autofill a list of recent blog posts, stories, or any other type of CMS content.  So the end-user sees a list of tokens, one for each content type, each term/category, each aggregator feed,  and for each date range. Such as "Content of type 'blog' created in the last 7 days" .  What is particulary powerful about this approach, is that if you are also using a CMS aggregator (such as the aggregator module in Drupal core) then virually any external RSS feed is turned into CMS content, which is now available as a CiviCRM token. (The original blog post about this extension is at: https://civicrm.org/blogs/pogstonesarahgladstone/easier-creation-email-newsletters-content-tokens )

Thanks to community involvement (specifically thanks to https://github.com/jorich-2000), there is a new version of the Content Token extension.  This version now supports Joomla, in addition to Drupal7, Drupal6, and WordPress.

The lastest version is 2.9 and can be downloaded from: https://civicrm.org/extensions/content-tokens

I am looking forward to getting feedback on this.

 

 

 

Categories: Drupal

Beatport Formatter

New Drupal Modules - 23 May 2015 - 1:12pm

Provides a field formatter for the Link module which transforms Beatport URLs into a player.

You can create issues and pull requests on Github.

Categories: Drupal

Jim Birch: Drupal 7 Panels: Page Manager Existing Pages

Planet Drupal - 23 May 2015 - 8:47am

I plan on doing a more in depth article on how I've been using Panels instead of templates or contexts for laying out this Drupal 7 site, but I feel like I still have more to learn.  Until then, I wanted to share what I found to be a missing piece of the puzzle, Page Manager Existing Pages.

PMEP allows you to override any page that is in the admin menu for use in Page Manager.  That way, you can create variants, and add whatever layout, content, selection rules, that you want.  Without this plugin, you get an error message in Page Manager when trying to overwrite an existing URL.

So, where would I use this?  Page Manager comes with defaults for Node, Taxonomy, and some User pages, most of what you need to present your site to the world.  But there are certain administration pages, when viewed in a front end theme that slipped through the cracks.  For example, node/add, which lists all the content types you can add, or the Style Guide Module generated /admin/appearance/styleguide

Install and configure Page Manager Existing Pages

Read more

Categories: Drupal

jQuery oEmbed All

New Drupal Modules - 22 May 2015 - 4:11pm

Integrates jQuery oEmbed All, which allows you to automatically embed Tweets, Facebook posts, and other oEmbed content anywhere on a site simply by posting a link.

Configuration consists of one step- setting the selector to which to apply jQuery oEmbed All. This allows you to whitelist or blacklist certain types of content (for instance, only applying jQuery oEmbed All to links in articles that do not have a 'no-embed' class).

Categories: Drupal

Gizra.com: Forking Todo Restful with Backbone.Marionette

Planet Drupal - 22 May 2015 - 2:00pm

In this guest post, Luke Herrington shares his experience with integrating an existing Drupal backend with a Backbone.Marionette Todo app.

If you're reading this, you probably already know about all of the great work that Gizra has done in the Drupal/REST space. If you haven't, I highly recommend you check out their github repo. Also see the RESTful module.

One of the projects that Amitai has contributed is Todo Restful. It shows an Angular implementation of the canonical TodoMVC Javascript app connecting to a headless Drupal backend. It's a great demonstration of how easy exposing Drupal content with the RESTful module is. It also shows that when a RESTful API adheres to best practices, connecting it with clients that follow the same best practices is like a nice handshake.

I saw the Todo Restful project and it got me thinking, "If Amitai did this right (hint: he did), then I should be able to get this working with Backbone pretty easily". I was pleasantly surprised!

View demo Get the source code Todo app with a Drupal backend

Here's a simplified list of everything I had to do to get it working:

Continue reading…

Categories: Drupal

Don't Miss: What does a game designer do, exactly?

Social/Online Games - Gamasutra - 22 May 2015 - 1:22pm

In this timeless blog, designer Liz England takes a run at breaking down the many roles and responsibilities a designer can have in an effort to answer a seemingly ever-present question. ...

Categories: Game Theory & Design

LevelTen Interactive: How to use Drupal Bootstrap with Webforms

Planet Drupal - 22 May 2015 - 1:16pm

If you are sub-theming Drupal Bootstrap, you are probably spoiled by all of the awesome functionality that comes with the Bootstrap framework and the Drupal Bootstrap theme. One place where you can’t easily throw a row and col class around your divs through the admin UI is if you are creating a Webform.

I came up with a quick solution to this that, with a little setup, allows the user to leverage Bootstrap through the Webform UI.... Read more

Categories: Drupal

Mediacurrent: Highlights From DrupalCon Los Angeles

Planet Drupal - 22 May 2015 - 1:16pm

Last week, was in sunny Los Angeles for DrupalCon 2015. Though many were seasoned veterans, it was my first time at a Con. It was a whirlwind of team building, a magical Prenote, great one-on-one coversations and plenty of Drupal talk. Needless to say, I'm still recovering! But if one thing is certain, our team had a wonderful time. Here are some of their takeaways:

Categories: Drupal

Commercial Progression: DrupalCon LA 2015 Highlights with Steve Burge from OSTraining (E9)

Planet Drupal - 22 May 2015 - 11:22am
Download

Commercial Progression presents Hooked on Drupal, “Episode 9: DrupalCon LA 2015 Highlights with Steve Burge from OSTraining".  In this special DrupalCon edition of Hooked on Drupal we conferenced in Steve Burge of OSTraining for an on the ground report from Los Angeles.  Held on May 11-15, 2015 DrupalCon LA was the premiere event for the Drupal community.  Steve brings us the inside scoop of highlights and takeaways as the conference wraps up.  Additionally, Alex Fisher (also a DrupalCon veteran) shares his memories and insights from past DrupalCons.  Commercial Progression has recently sponsored OSTraining with a $5000 kickstarter backing to bring Drupal 8 upgrade training to the masses.  This new collection of video resources will be released in September 2015.  With Dries call to support Drupal as public utility from DrupalCon, this announcement seems especially timely.

Hooked on Drupal is available for RSS syndication here at the Commercial Progression site. Additionally, each episode is available to watch online via our YouTube channel, within the iTunes store, on SoundCloud, and now via Stitcher.

If you would like to participate as a guest or contributor, please email us at

social@commercialprogression.com

 

Content Links and Related Information

 

 Hooked on Drupal Content Team

ALEX FISHER - Founder of Commercial Progression

STEVE BURGE - Founder of OSTraining

 

Left, Alex Fisher, founder and owner of Commercial Progression in Northville, Mich.
Right, Steve Burge of Sarasota, Fla., founder and CEO of OSTraining

Podcast Subscription

Tags:  Hooked on Drupal, podcast, Drupal 8, DrupalCon, Planet Drupal, training, sponsorship
Categories: Drupal

Opinion: Why Guild Wars 2's 'execution'-style ban was a bad idea

Social/Online Games - Gamasutra - 22 May 2015 - 10:23am

ArenaNet recently banned an infamous hacker from its MMO Guild Wars 2 -- by way of virtual execution. But public humiliation is not really the way to go about it, argues Katherine Cross. ...

Categories: Game Theory & Design

New computational technique advances color 3D printing process

Virtual Reality - Science Daily - 22 May 2015 - 8:22am
A technique has been developed that enables hydrographic printing, a widely used industrial method for transferring color inks on a thin film to the surface of 3D objects, to color these surfaces with the most precise alignment ever attained. This new computational method, which simulates the printing process and predicts color film distortion during hydrographic immersion, generates a colored film that guarantees exact alignment of the surface textures to the object.
Categories: Virtual Reality

Disable strict warnings

New Drupal Modules - 22 May 2015 - 7:15am

Suppresses the output of strict warnings in PHP version 5+

It does this by passing to the original handler if the error is of any other type than E_STRICT. Seeing as we aren't replacing any default functionality, this module should be future proof.

Notes

The module MUST be loaded before any modules raising these errors. Hence the underscores in the module name and a default weight of -100000 set on install.

Categories: Drupal

Paul Booker: Creating an action to update the prices of your commerce products

Planet Drupal - 22 May 2015 - 6:07am
/** * Implements hook_action_info(). */ function mymodule_action_info() { return array( 'mymodule_update_products' => array( 'type' => 'entity', 'label' => t('Update products by 2%'), 'configurable' => FALSE, 'triggers' => array('any'), 'pass rows' => TRUE, ), ); } function mymodule_update_products(&$entity, $context) { $product_id = $entity->product_id; //dsm($product_id); $price = $entity->commerce_price[LANGUAGE_NONE][0]['amount']; //dsm($price); $updated_price = 1.02 * $price; $affected_rows = db_update('field_data_commerce_price') ->fields(array('commerce_price_amount' => $updated_price)) ->condition('entity_id', $product_id) ->execute(); //dsm($affected_rows); } function mymodule_round_up_line_item_price($line_item_id) { $line_item = commerce_line_item_load($line_item_id); return round($line_item->commerce_unit_price[LANGUAGE_NONE][0]['amount'],-2); } Tags:
Categories: Drupal

Gábor Hojtsy: New easy ways to explore Drupal 8's multilingual capabilities

Planet Drupal - 22 May 2015 - 5:57am

The Drupal 8 multilingual team is really great in spreading know-how on the new things in the upcoming version, so we had our session (1h) and workshop (2h) recordings published and widely available. While we of course love our baby and can talk all day about it, who has hours when they just want to explore what is coming up? We just addressed that this week with the following.

1. New 2m22s introduction video with the key benefits 2. A quick summary of key benefits and an easy to skim features list

http://www.drupal8multilingual.org/#topbenefits lists the top 12 benefits and http://www.drupal8multilingual.org/features provides the more detailed information in an easy to skim text form. And yeah, that 1h session video if you have the time.

3. Easy to launch demo to try features out

Thanks to our work on the multilingual workshops for DrupalCons, BADCamp and DrupalCamps, we have a demo with sample content in 4 languages that you can try out in your browser for 30 minutes without any registration or local software install required thanks to simplytest.me.

4. Check out who voted with their feet already

Drupal 8 is not yet released, yet there are numerous live multilingual Drupal 8 sites helping with nature preservation, finding health professionals or concert tickets among other good uses. Now there is a handy list to review at http://www.drupal8multilingual.org/showcase.

If you like what you see, we still have guided workshops (those that last 2h). The next one is coming up right this Sunday at DrupalCamp Spain. We also believe that the multilingual team is one of the best to get involved with if you want to know Drupal 8 better and give back some to improve the new version as well. We have weekly meetings and a huge sprint coming up at DrupalCon Barcelona. Maybe we'll have some opportunity to celebrate as well. See you there!

Categories: Drupal

Julian Granger-Bevan: A Git Workflow for Drupal Modules

Planet Drupal - 22 May 2015 - 5:54am

Years ago now, the Drupal community adopted Git as a version control system to replace CVS. That move has helped development since the distributed nature of Git allows better tracking of work privately before uploading a patch to drupal.org.

Sandbox repositories allow contributors to clone an existing project to work on independently (therefore not needing permissions for the canonical repository), but there is currently no way that I know of to request that those changes are pulled back, facilitate a review of changes and then merge the changes in (a pull request).

Hopefully that functionality is on the way!

But as a community the challenge is not just the development on drupal.org, collaboration with GitHub, or whatever form the technical change takes. Alongside those changes, we need the workflows that will help us better manage multiple versions, allow fast bug fixes whilst features are being tested, and provide for reviews without alienating developers. And the technical element goes hand in hand with the workflow.

As an example, for the Drupal PM module, we recently debated how to set up Git branches to allow more flexibility than the traditional "single line of code" inheritted from CVS.

There were a few criteria that the new solution had to have:

  • Flexibility that allowed bug fixes to be more quickly applied to a release: Under the "single line of code" approach, Releasing bug fixes only would require adhoc branches and tags.
  • Fit with drupal.org infrasturcture: In particular, we'd like users to be able to test a development version without cloning from Git. So the development release on drupal.org needed to correspond to an appropriate codeset for people to test.
  • Alignment to industry standard approaches where possible: Looking into what is used elsewhere in the software world, the Gitflow model has been received well.

Putting all of this together and discussing on Skype and a drupal.org issue, we came up with a branching model that seems to fit these criteria.

For each major version of the module (i.e., 7.x-1.x, 7.x-2.x, 8.x-1.x), we will have the following branches:

  • Release branches: There will be one release branch for each major version, named after the version (for example: "7.x-1.x"). The codebase in here will always be the release candidate for the next point release, and those point releases will always be tagged from this release branch.
  • Development branches: There will be one development branch for each major version, named "develop-[version]" (for example: "7.x-1.x"). This will effectively be a staging branch for the next release but one. Features will be merged into here, and then this development branch will be merged into the release branch when the next release candidate is required.
  • Feature branches: There will be one feature branch for each feature (drupal.org issue), named "feature-[issue]-[title]" (for example, "feature-12345-add-feature"). These will be worked on until the given feature is finished. Once completed, the feature branch is merged into the development branch.
  • Hotfix branches: There will be one hotfix branch for each bug fix (drupal.org issue), named "hotfix-[issue]-[title]" (for example, "hotfix-12345-fix-bug"). These will be worked on until the bug is confirmed fixed. Once completed, the hotfix branch is merged into both the development and release branches.

We're just beginning to use this system in entirety, and I hope that it works out.

One caveat is that the system only works for developers with permissions on the project repository. I would love for any contributor to be able to fit into this model and to have the pull request system available for the final merge... perhaps soon...

Category: WebsitesTags: GitDrupalDrupal Planetworkflowsbranching
Categories: Drupal

3D geological tour of the Guadalquivir basin using Google Earth

Virtual Reality - Science Daily - 22 May 2015 - 5:34am
A research team has developed a tool that allows a 3D journey in ten sites of geological and palaeontological interest in the Guadalquivir basin (Huelva, Spain). In the virtual tour, developed with Google Earth, you can visit and explore treasures of this area, such as records of the opening of the Atlantic Ocean, using tablets and smartphones.
Categories: Virtual Reality

GMing Dead Games

Gnome Stew - 22 May 2015 - 3:00am

I recently had the opportunity to obtain a copy of the Ghostbusters II RPG, by West End Games. This game has been out of print for over 25 years (cough, cough), and I had not seen a copy of the game, nor run it, in the same amount of time. Being someone who does not run games a second time, and is of the “cult of the new”, I had reservations about bringing a classic like this to the table. I also had concerns about how my contemporary GMing style would mesh with a game this old. Today, I thought I would share what I learned bringing this classic to the table, things that could help you next time you bring a game back from the dead.

Dead Games…No The Other Kind

Let’s start, as I like to do, by defining some terms. In this case lets define Dead Game. I am going to say that a Dead Game is any game that is no longer being actively printed or developed by a publisher. This makes them a bit different from OSR games, where publishers are developing new material for older games (or their clones). We are also not talking about campaigns you ran and killed, and are running again. Dead refers to the Game and not the Campaign.

When I think back to the many games I have played, there are a number of favorite Dead Games that come to mind:

  • Gangbusters
  • Top Secret (Original and SI)
  • Ghostbusters
  • Toon
  • The Price of Freedom
  • Star Trek (Decipher, LUG, FASA)
  • Underground

What are the steps to getting a Dead Game back to the table?

Acquiring

If you don’t already have the game in your collection, then the first challenge you will encounter with Dead Games is finding a copy. Many online and brick & mortar game stores have a selection of used games, and if you are lucky you may run across some gems. If you strike out there, you may find what you are looking for on Ebay or Craig’s List.

Depending on how popular the game is, will determine the market price. Prices can vary wildly between different dead games. Copies of Ghostbusters go for about $90.00 on Ebay, where a used copy of the Top Secret rules go for $25.00.

If you are not concerned about physical copies, you may be able to find a PDF version of the game. Depending on the age of the game, the publisher may not have created a PDF, and you may need to look in the darker corners of the Internet. If you are able to find a fan-made one, the quality of the PDF may vary.

In the case of Ghostbusters, I was fortunate to receive a copy of Ghostbusters II as a gift from a fellow gamer, who thought it would be nice to see the game go to a table where it would get some play. The game was intact, but was missing the Ghost Die. There are also PDF copies of the rules out on the Internet (just Google).

The original Ghostbusters game came with a set of equipment cards, which I wanted to use in my game. Also I was missing the specialized Ghost Die. All was not lost though, because the Nerdy Show re-created and updated the Equipment Cards and Ghost Die, and sell them to people looking to re-create the game.

Reading/Re-Learning  Depending on your exposure to other games of that era, these older rules may feel dated or absurd compared to modern game design. 

Once you have a copy of the game, now its time to re-learn the game. When learning the game, keep in mind the time period when the game was created. RPG’s, much like other entertainment media such as books and movies, are products of their time and can feel dated in rules, setting, or both.

In the case of rules, games of the same time periods have similar kinds of rules. There has always been a certain amount of design bleed within a cohort. For example: many 80’s games can be chart heavy, with either a central chart for task resolution or hundreds of charts for every kind of action. Depending on your exposure to other games of that era, these older rules may feel dated or absurd compared to modern game design.

I was in luck. The Ghostbusters mechanics were surprisingly fresh. The mechanic is a simple dice pool, roll vs. target number. The core mechanic was quite flexible,which was going to work with my current preference of how I like to run games. The only thing that I found a bit dated was some of the examples in the rules, which called for skill checks to be made to get out of bed, and other things that I would normally just hand-wave.

Settings are products of their creators, who in turn are products of their times. So a far future sci-fi game may describe computers that are the size of rooms, or have building maps complete with pay phones, and will not take into account contemporary advances in science and technology. Setting elements which are anachronistic can create barriers for us from becoming immersed.

Here is where things start to feel dated. This game was made in 1989, and has references to payphones, and very expensive cellular phones which you could get installed into your car. Forget any ideas like keeping the Tobin’s Spirit guide as an app on your phone.

Adapting

After reading through the rules and learning the mechanics and the setting, you can then decide if you want to make any changes to the game before bringing it to the table. Much like above, you can adapt either the rules, the setting or both. When it comes to the rules, my suggestion is to keep as much of the game as intact as possible. This way the game you are running is the authentic experience of the game as it was intended. (Again, I am one of those ‘rules inform play’ people, so take that into consideration.)

Ghostbusters II has a set of rules for Encumbrance, which I found a bit tedious, so I opted to use the original Ghostbusters equipment cards instead. Everything else I kept as written.

When it comes to the setting there are a few different ways to go. If there are dated elements in the setting, you could just edit offending elements out, such as removing pay phones in a sci-fi setting. You could change the whole setting, like changing the default time period of Top Secret SI to be today. Finally, you could just embrace the setting with its flaws and all, such as playing up the 80’s stereotypes in The Price of Freedom.

For Ghostbusters, I decided to play in modern times. I made up a quick backstory about how Paranormal Extermination fell off around the turn of the century, and then picked up in 2014 when the original Ghostbusters were involved in a 7-fold tear incident in Los Angeles.

So How Did It Go?

For my first session of bringing Ghostbusters back, I read the rules and picked one of the introductory adventures in the rules; a simple haunted house. I pimped my game with the Nerdy Show’s equipment cards and Ghost Die. I adapted the game, by dropping the Encumbrance rules and moved the setting to modern times.

Our session consisted of character creation, which was quick, and then heading into the haunted house. The rules were easy to teach, and flexible enough for me to adapt the adventure as we played. In all it was a successful session, and felt like the movies.

For me, Ghostbusters stood the test of time, and is a game I would be happy to run again in the future. The next time I run it, it will be an adventure that I will write myself. (I have some ideas of something to adapt from the Ghostbusters comic book…)

Bring Out Your Dead…Games

Just because a game is Dead does not mean that it can’t be fun to play. Dead Games are a product of the times in which they were created, and may feel a bit out of place. By studying the rules and setting and adapting it where it needs some modernization, a Dead Game can come back to life.

What are some of your favorite Dead Games? Which ones have you played recently? What changes have you made to make them more playable? How was your experience running a Dead Game?



Categories: Game Theory & Design

Not that seventies style - by Michael Samyn

Gamasutra.com Blogs - 22 May 2015 - 1:14am
Some details about the 1972 that inspired Sunset, from modernism and eclecticism to blaxploitation and objectification.
Categories: Game Theory & Design
Syndicate content


Google+
about seo