Skip to Content

Newsfeeds

CiviCRM Blog: Easier creation of email newsletters - Content Tokens!

Planet Drupal - 24 November 2014 - 4:15pm

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 and for each date range. Such as "Content of type 'blog' changed 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. 

Some examples of how this new extension may help your organization:

   - Your staff posts new content of type "story" each week.Your monthly newsletter editor can use the new token for "Content of type 'story' changed in the last 1 month" to save time preparing the newsletter.

  - A national organization you are affiliated with has a number of blogs that they host. Your local organization would like to include recent blog posts from the national organization in the local member newsletter.  Your local webmaster previously configured the aggregator module to pull in those external blogs into your CMS. Your monthly newsletter editor can use the new token for "Content of type 'feed item' changed in the last 1 month" to save time preparing the newsletter.

- Any other situation where there is existing content that you want to include in your email or PDF.

This new extension "Content Tokens" is published in the CiviCRM extensions area https://civicrm.org/extensions/content-tokens 

This new extension is designed in the same style as the "Fancy Token" extension that provides tokens for upcoming events, contribution pages, profiles, and WebForms. 

 

 

 

Categories: Drupal

Shomeya: Failure to Launch: The Myth of the Missing Map

Planet Drupal - 24 November 2014 - 4:00pm

It's all about perspective when it comes to launching. We always think we need something more, that missing set of instructions or special ingredient that will propel us to finish. That special person, few moments of sanity, or foolproof plan.

But at the end of the day, while those things may encourage us to make the choice to take action or bring balance and clarity, they never change the fact that we won't make it anywhere until we start the journey. We could be waiting at the bus stop thinking it's the only way we'll get there, when the whole time we could have been on the train.

Read more
Categories: Drupal

Get a job: MMORPG-focused Goblinworks is hiring a Programmer

Social/Online Games - Gamasutra - 24 November 2014 - 2:38pm

Tabletop RPG fans with MMO game dev experience, take note: Goblinworks is hiring a programmer to join the team working on a Pathfinder MMORPG in the studio's Redmond, WA office. ...

Categories: Game Theory & Design

How does the brain react to virtual reality? Completely different pattern of activity in brain

Virtual Reality - Science Daily - 24 November 2014 - 1:29pm
Neurophysicists studying a key brain region where Alzheimer's disease begins have discovered how the brain processes virtual reality. 'The pattern of activity in a brain region involved in spatial learning in the virtual world is completely different than in the real world,' said the professor of physics, neurology, and neurobiology.
Categories: Virtual Reality

Visitors Voice: Turn the negative trend regarding site search

Planet Drupal - 24 November 2014 - 1:10pm
Almost every second user (45%) are dissatisfied or very dissatisfied, having a hard time finding information they are looking for according to a survey (2014). The survey also shows that it is getting worse due to rapid information growth and users’ tendency to increase expectations. The better web search engines like Google gets, the higher […]
Categories: Drupal

Wizzlern: Drupal 8 Configuration Management with Drush

Planet Drupal - 24 November 2014 - 11:45am

Today I got my feed wet with Drupal 8 Configuration Management. For those who are new to this excellent feature in Drupal 8, you should read the documentation at drupal.org (Managing configuration in Drupal 8) or watch this DrupalCon Amsterdam video. This article assumes you are familiar with Drush and Drush aliases.

I worked with a very basic workflow using a development site and an acceptance site. Both sites are under revision control, where the complete webroot (core + modules, but not settings.php) is placed in git. For gitignore I used a copy of the example.gitignore which you'll find in Drupal's root directory.

I used Drush 7 to import and export the configuration. 'Export' is to transfer a site's configuration from Drupal to file and 'Import' is to transfer in reversed direction. Using drush @dev config-export you export the configuration from the development site to the sites/default/config_*/staging directory. The staging directory now holds many *.yml files that each contain the configuration of an individual section. I've chosen to use git to transfer these files to the acceptance site. At the acceptance site drush @acc config-import is used to transfer the configuration from the file system to the acceptance site.

Make sure that the acceptance site is a copy of the development site. For example using drush @dev archive-dump you can make a copy of both the files and database. With this you can create a copy of the site using drush archive-restore.

I made these changes to the .gitignore file to allow the staging directory to be added to git:

Tags: drupal 8drushdeploymentconfiguration management
Categories: Drupal

Analysts: 2015 will be the year cloud gaming finally takes off

Social/Online Games - Gamasutra - 24 November 2014 - 11:14am

Analysts believe the recent launches of the PlayStation Now and Nvidia Grid game streaming services will be a one-two punch that catapults "cloud gaming" to mainstream relevance by the end of 2015. ...

Categories: Game Theory & Design

Loft Data Grids

New Drupal Modules - 24 November 2014 - 10:59am

A module wrapper integrating Loft Data Grids with Drupal.

You probably only need this module if another module requires it.

Categories: Drupal

Drupal Association News: Forum One to work on Content Strategy for Drupal.org

Planet Drupal - 24 November 2014 - 10:38am

Several weeks ago, we issued an RFP for Drupal.org Content Strategy project. We got a number of great submissions, and the next couple of weeks the Drupal Association staff and the Drupal.org Content Working Group members spent reviewing proposals and interviewing potential vendors.

Today we are happy to announce that we’ve selected a vendor for the content strategy project: Forum One, an open-source digital agency.

Their proposal met all our project requirements and outlined a solid plan for how we can make this project happen. During the interviews Forum One impressed us with their professionalism, passion for content strategy, their extensive experience working on large content strategy projects, and their deep knowledge of the Drupal community and Drupal.org, the website.

We believe that together our staff and Forum One team will make this project a success. Can’t wait to start working and improve Drupal.org content for all our varied audiences.

Categories: Drupal

Charting distinctive features in games

Social/Online Games - Gamasutra - 24 November 2014 - 10:23am

An academic look at how "distinctive features" open up games to study: "Games are as diverse as the humanity that created them. This means that trying to sort games in definite, discrete categories is fruitless." ...

Categories: Game Theory & Design

Phase2: Drushful Thinking

Planet Drupal - 24 November 2014 - 10:00am
What is Drush?

If you’re asking that question right now then congratulations! You are one of the lucky people who will have your life changed today! Cancel everything and read up on Drush, the command line bridge to Drupal.

Everybody knows about Drush, ya Dingus!

That’s more like it. Who doesn’t love Drush, right? Right!

But more and more, I find myself seeing people reinventing things that Drush already handles because they just don’t know all that Drush can do. It’s getting frustrating, and I want to fix that.

First, The Basics Stuff everybody knows

Here are a few Drush commands that most people know and love, just to get them out of the way:

  • drush updb: run pending database updates
  • drush cc all: clear all caches
  • drush dl <something>: download the <something> module
  • drush en <something>: enable the <something> module
Stuff everybody knows (Features Edition)

And if you’re using Features, you’re probably familiar with:

  • drush fra: revert all Features
  • drush fe: export a new or updated Feature with a new component
  • drush fu <featurename>: update the <featurename> Feature with updated site config
  • drush fr <featurename>: revert the site’s config to the current state of the <featurename> Feature
Aliases

For a lot of the fun stuff, you’ll have to understand Drush aliases. If you don’t, here’s the gist: Drush aliases give you an easy way to run Drush commands on remote Drupal sites, as opposed to only being able to use it on your local sites. If you’re constantly SSH’ing into different environments just to run a couple quick commands, you need to stop doing that.

There’s lots of documentation about Drush aliases and how to create your own, but most of the docs lack notes on some of the lesser known awesome things you can do with aliases. Keep reading, sailor.

Well, one more thing. This is probably a good time to mention a couple quick commands.

Firstly, let’s run an arbitrary shell command on our dev environment.

drush @foo-dev exec echo $SOMETHING

Or maybe we should just go ahead and SSH in to do something a little more complex.

drush @foo-dev ssh

Or maybe we need to do a bunch of aliased commands, but we want to do it without SSH’ing in (because the commands require local files or something). We can make a Drush alias persist until we tell it to stop using:

drush site-set @foo-dev

And then when we’re done doing what we do, we can just run it again without the “@foo-dev” argument to unset it.

Now, keep reading, sailor.

Syncing Ship

(Warning: these headlines are going to get worse and worse)

One of the most common things to do with Drush aliases is to sync stuff from one alias to another.

For example, want to sync the dev site database down into your local?

drush sql-sync @foo-dev @foo-local

How about files? Sync ‘em!

drush rsync @nexderm-dev:%files @nexderm:%files

Or maybe some unwashed sent you a DB dump and you have to import it the old fashioned way?

cat ~/path/to/file.sql | drush sql-cli

Sometimes you want to drop your entire database before importing, to make sure you don’t get any tables left behind from your old install that aren’t supposed to be there. That’s as easy as:

drush sql-drop

Sometimes, it’s useful to be able to automate running arbitrary SQL commands on multiple environments, and that’s pretty easy too. Say for example that you quickly want to get the username for uid 1 on the prod environment (the “drush user-information” command would be much better for this, but shut up).

drush @foo-prod sqlq 'select name from users where uid = 1'

That one is also good for automation, like if you want to write a quick script that changes the username for uid 1 on all environments.

Drupal Without Drupal

It’s often useful to run one-off arbitrary code within the context of Drupal, without having to actually put it in the codebase somewhere. This is typically done one of two ways:

If it’s just a short one-liner, then there’s the ever-useful “php-eval” (aka “ev”) command. For example, let’s inspect a node object.

drush @foo-dev php-eval 'print_r(node_load(123));'

Or if it’s a longer one, then we can just throw our code into a PHP file, and run it using:

drush php-script filename.php

Reports Cohorts

Drush is really good at getting us information from Drupal without waiting for a full page load.

How many times have you navigated to the Watchdog page and sat through page load after page load while you went through the pagination and added filtering and blah blah blah to find an error message? Stop doing that! Do this instead:

drush watchdog-show

There are a lot of useful options for watchdog-show, such as:

  • –tail (continuously show new messages)
  • –full (show the full output, with all of the fields, instead of the summarized version)
  • –severity (such as “–severity=error”)
  • –count (show more than the default 10, such as “–count=100″)

And I’d bet you’re familiar with “drush vget” to get variables, but did you know you can pass “–format=whatever” to get the results formatted as JSON or CSV or YAML or a bunch of other things, for easy scripting?

Another one of my favorites is this charm, which basically prints out the stuff you see on the Status Report page in Drupal. It’s nice for sanity checking before pushing releases live.

drush status-report

And then there’s this guy, which prints out a bunch of useful info about the current installation, such as DB info, path to PHP executable and .ini file, Drupal version, Drupal root, etc. It’s a nice first step when debugging a broken install.

drush status

And for those times when you need to edit a config file (php.ini, or settings.php, or an alias file, or .htaccess, etc.), you can run this to let you choose which of those files to edit and it’ll open it up in an editor for you:

drush config

Using Users

Drush is nothing short of a miracle when it comes to user management.

First of all, there’s the ever-annoying task of logging in as this user or that user. You usually don’t know the password, or maybe you’re just too lazy to type it. Run this to open up your browser with a one-time login link so you can skip all of that malarky:

drush user-login name-or-uid

Or, if you’re slightly less lazy, and just want to change the password to something so that you can log in the old fashioned way:

drush user-password name-or-uid --password=test1234

Then there’s the “fun” process of adding a user and filling out the form. Skip that:

drush user-create person123 --mail="what@isthis.com" --password="letmein"

Once that’s done, you probably want to give that new user some roles. For role stuff, you have this:

drush user-add-role "user editor" person123 drush user-remove-role "user editor" person123

But watch out! The role you need to add doesn’t exist yet! Let’s add it, and give it some permissions.

drush role-create 'user editor' drush role-add-perm 'user editor' 'administer users'

If you just need to show information about a user, such as email address, roles, UID, etc., try this. I’m embarrassed to say that I’ve been using raw SQL for this for years.

drush user-information name-or-uid

Fields of Dreams

One of the most under-used things that Drush gives you is field management tools. I’m going to be lame here and just copy and paste the docs, since they’re pretty self explanatory.

Field commands: (field) field-clone Clone a field and all its instances. field-create Create fields and instances. Returns urls for field editing. field-delete Delete a field and its instances. field-info View information about fields, field_types, and widgets. field-update Return URL for field editing web page.

Other Schtuff

Here are some great commands that don’t really fit into any clear-cut categories.

It has some neat archiving tools:

drush archive-dump #backup code, files, an DB to a single package drush archive-restore #expand one of those archives into a full Drupal site

Somewhat similar to those is this one, which will download and install Drupal, serve it using a little built-in server, and log you in, all in one command. Note that this one includes about a bazillion options and is super duper powerful.

drush core-quick-drupal

Drush also lets you play with the cache, which can save a lot of time when debugging a caching issue:

drush cache-get your-cid your-bin drush cache-set your-cid your-data your-bin your-expire

There are a couple unknown commands for working with contrib:

drush pm-info modulename #display included files, permissions, configure link, version, dependencies, etc. drush pm-releasenotes modulename #show the release notes for the version of module that you're using

Run cron! Not exciting, but super useful.

drush cron

Have you ever been in the middle of debugging and you know that something is happening in a form_alter (or some other hook) but you’re not sure in which module? Try this command, which will tell you all of the implementations of a given hook, and let you choose one to view the source code of it.

drush fn-hook form_alter

And finally, this bad boy is basically “Drush docs in a box” and has a TON of useful info. Seriously, try it now.

drush topic

Drushful Thinking

There’s a giant heap of useful Drush commands, some of which you hopefully hadn’t seen before. So what, right?

The “so what” is that it’s useful to start thinking in terms of “how can Drush do this for me?” and you’ll often find that the answer is “pretty easily.”

Play a game with yourself. Next time you’re working on site building or anything that involves a lot of clicky clicky in the Drupal UI, give yourself a jellybean or a chip or something every time you do something in Drush instead of in the UI.

But why? Well for one, before you know it, you’ll be spending  much less time waiting on page loads. But secondly, Drush lends itself to automation, and thinking in terms of Drush naturally leads you to think in terms of automating and scripting things, which is a great place to be.

Practice some Drushful Thinking! And let me know any of your favorite Drush tips and tricks in the comments. Check out drushcommands.com for some more inspiration.

Categories: Drupal

Appnovation Technologies: Easing Time Inc.'s Transition to Drupal

Planet Drupal - 24 November 2014 - 7:25am

Introduction

var switchTo5x = false;stLight.options({"publisher":"dr-75626d0b-d9b4-2fdb-6d29-1a20f61d683"});
Categories: Drupal

3C Web Services: Essential Drupal 7 Modules

Planet Drupal - 24 November 2014 - 7:01am

INTRODUCTION

Drupal is a great CMS but really isn't very powerful out of the box. To harness its power you'll need to use contrib (contributed) modules. Contributed modules are created by the community and are not part of the core Drupal download. But they can be downloaded and installed from the drupal.org website.

Categories: Drupal

Midwestern Mac, LLC: NFS, rsync, and shared folder performance in Vagrant VMs

Planet Drupal - 24 November 2014 - 6:28am

It's been a well-known fact that using native VirtualBox or VMWare shared folders is a terrible idea if you're developing a Drupal site (or some other site that uses thousands of files in hundreds of folders). The most common recommendation is to switch to NFS for shared folders.

NFS shared folders are a decent solution, and using NFS does indeed speed up performance quite a bit (usually on the order of 20-50x for a file-heavy framework like Drupal!). However, it has it's downsides: it requires extra effort to get running on Windows, requires NFS support inside the VM (not all Vagrant base boxes provide support by default), and is not actually all that fast—in comparison to native filesystem performance.

Categories: Drupal

Open Source Training: A Beginners Guide to the Drupal Services Module

Planet Drupal - 24 November 2014 - 6:21am

The Services module allows to provide web services from your Drupal site.

Services is really popular and works with formats such as REST, XMLRPC, JSON and SOAP.

However, when asked about Services during a training in class last week, I was realized that the students were asking me because there was little-to-no clear documentation available.

So, I sat down with and decided to write a Beginners guide to the Services module.

Here's a 5-step guide to using Services creating a REST API for your Drupal site.

Categories: Drupal

World of Warcraft: Ten years of change

Social/Online Games - Gamasutra - 24 November 2014 - 5:59am

MMO designer Laralyn Williams reflects: "I immediately knew what I wanted to talk about: the flexibility and responsiveness of the development team." ...

Categories: Game Theory & Design

Web Omelette: Drupal update hooks with multiple passes

Planet Drupal - 24 November 2014 - 5:05am

If you do a lot of Drupal development and need to deploy configuration I am sure that you are using update hooks to some extent at least. If you don't use Features and want to create a taxonomy vocabulary or something in code, the hook_update_N() hook is the way to go.

But have you ever needed to perform an update the size of which would exceed PHP's maximum execution time? If you need to create 1000 entities (let's just say as an example), it's not a good idea to trust that the production server will not max out and leave you hanging in the middle of a deploy. So what's the solution?

You can use the batch capability of the update hook. If you were wondering what the &$sandbox argument is for, it's just for that. You use it for two things mainly:

  • store data required for your operations across multiple passes (since it is passed by reference the values remain)
  • tell Drupal when it should stop the process by setting the $sandbox['#finished'] value to 1.

Let me show you how this works. Let's say we want to create a vocabulary and a bunch of taxonomy terms with names from a big array. We want to break this array into chunks and create the terms one chunk at the time so as to avoid the load on the server.

So here is how you do it:

/** * Create all the terms */ function my_module_update_7001(&$sandbox) { $names = array( 'Fiona', 'Jesse', 'Michael', ... 'Sam', 'Nate', ); if (!isset($sandbox['progress'])) { $sandbox['progress'] = 0; $sandbox['limit'] = 5; $sandbox['max'] = count($names); // Create the vocabulary $vocab = (object) array( 'name' => 'Names', 'description' => 'My name vocabulary.', 'machine_name' => 'names_vocabulary', ); taxonomy_vocabulary_save($vocab); $sandbox['vocab'] = taxonomy_vocabulary_machine_name_load('names_vocabulary'); } // Create the terms $chunk = array_slice($names, $sandbox['progress'], $sandbox['limit']); if (!empty($chunk)) { foreach ($chunk as $key => $name) { $term = (object) array( 'name' => $name, 'description' => 'The name is: ' . $name, 'vid' => $sandbox['vocab']->vid, ); taxonomy_term_save($term); $sandbox['progress']++; } } $sandbox['#finished'] = ($sandbox['progress'] / $sandbox['max']); }

So what happens here? First, we are dealing with an array of names (can anybody recognise them by the way?) Then we basically see if we are at the first pass by checking if we had set already the progress key in $sandbox. If we are at the first pass, we set some defaults: a limit of 5 terms per pass out of a total of count($names). Additionally, we create the vocabulary and store it as a loaded object in the sandbox as well (because we need its id for creating the terms).

Then, regardless of the pass we are on, we take a chunk out of the names always offset by the progress of the operation. And with each term created, we increment this progress by one (so with each chunk, the progress increases by 5) and of course create the terms. At the very end, we keep setting the value of $sandbox['#finished'] to the ratio of progress per total. Meaning that with each pass, this value increases from an original of 0 to a maximum of 1 (at which point Drupal knows it needs to stop calling the hook).

And like this, we save a bunch of terms without worrying that PHP will time out or the server will be overloaded. Drupal will keep calling the hook as many times as needed. And depending on the operation, you can set your own sensible chunk sizes.

Hope this helps.

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

Why you want cross-functional team members

Social/Online Games - Gamasutra - 24 November 2014 - 5:05am

"You are hurting the agility of your company or project if you have an over-reliance on the concept specialization and aren't encouraging teams to work collaboratively to spread knowledge and skills." ...

Categories: Game Theory & Design

Another Drop in the Drupal Sea: R.O.O.S.T.S. && Women in Tech

Planet Drupal - 24 November 2014 - 3:57am

There was a session at BADCamp this year asking how Men can be better allies for Women in tech. The panelists had experiences with males that ranged from helpful, to innocently bungled, to outright demeaning. There was a small amount of suggestions about what men can do to be better allies.

read more

Categories: Drupal

Quality of Life in Subterfuge - by ron carmel

Gamasutra.com Blogs - 24 November 2014 - 12:52am
One of our design pillars in the development of Subterfuge is respecting players' time. In this post, I will discuss why this is important to us, and some of the design choices we've made to support this goal.
Categories: Game Theory & Design
Syndicate content


Google+
about seo