Software

Bluespark Labs: BADCamp Drupal Higher Education Summit - Stories of rapid adaption and the challenges of standardization at scale

Drupal Planet - Sat, 2014-11-08 19:08

Attending the Higher Education Summit at the 2014 Bay Area Drupal Camp was a great experience. We work with several higher education institutions and are acutely aware of the very specific challenges these organizations face. The summit improved our understanding of the issues and helped them coalesce around a few key overarching concerns: standardization, adaption and scalability.

The summit got off to a great start before even starting because of the theme selected: “Storytellers and Geeks United for Higher Ed”. A clear indication of the importance of not solving just technological issues but solving communication issues with the help of technology. Everyone was in agreement that web people and communication people need to get together to figure out how to best tell their university’s story.

The opening panel session was the perfect illustration of the theme as it brought together technologists and communications partners (with the roles often blending into each other) from the universities of Arizona State, University of California, Davis and University of California, San Francisco. The big news for all was Arizona State’s bold move to enforce (albeit with a light touch) standardization from the top down. Arizona State has embarked on a very ambitious project aiming to provide a complete set of tools for departments to build their websites that spans not just the actual web page but hosting, analytics, sophisticated email and CRM systems (institution-wide Salesforce instance). All this will ultimately enable them to realize their vision of personalizing the experience for every user of the University. While it is still early days everyone seemed very excited about what AS is attempting to do and we are eagerly awaiting news about lessons learned.

A session by John Bickar of Stanford Web Services was inspiring and provided a great roadmap for any university about how to drive adoption of Drupal within the institution and support the needs of the community by providing both infrastructure and Drupal development tools in the form of pre-baked solutions and templates. As John indicated the forthcoming challenges for them will be those of success. They are seeing great adoption of their hosting solution and web development tools and need to ensure that they will be able to scale.

Finally, I found the discussions around development processes, estimation and the use of agile particularly interesting. It is clear that where such processes have been put in place it has yielded positive results. At a break-out session on the subject everyone agreed that while agile provides a great set of principles it is equally important that to adapt the practices to the specific needs of an organization. In other words don’t be afraid to try a few different things and see what works for you, but start getting a process in place!

Overall, it looks like the future of Drupal in Higher Education is brighter than ever. The problems are those of improving communication and dealing with the success that widespread adoption brings. Helping to standardize around common practices in how Drupal is deployed and how individual departments adapt so that they can meet both wider University needs as well as their specific requirements will be key. This will allow the University as a whole and groups within it to each tell the best version of their story.

Many thanks to everyone that worked hard to make this summit possible and we look forward to attending next year!

Tags: Higher EducationDrupalDrupal Planet
Categories: Software

Paul Booker: Sending Push Notifications to users with a given role using Private Messages

Drupal Planet - Sat, 2014-11-08 18:27
/** * Implements hook_privatemsg_message_insert. */ function push_notifications_privatemsg_message_insert( $message ) { if ( variable_get( 'push_notifications_privatemsg_integration', 0 ) ) { // Compose the payload. If the body is empty, just use the subject line. // Otherwise, combine subject and body. $payload = (empty($message->body)) ? $message->subject : $message->subject . ' ' . $message->body; $payload = 'From ' . $message->author->name . ': ' . $payload; // Compose an array of recipients. $recipients = array(); foreach ( $message->recipients as $recipient ) { if ( $recipient->type == "role" && $recipient->name != 'authenticated user' ) { $results = db_select('users_roles', 'ur') ->fields('ur', array('uid')) ->condition('ur.rid', $recipient->rid, '=') ->execute() ->fetchCol(); } elseif ( $recipient->type == "role" && $recipient->name == 'authenticated user' ) { $results = db_select('users', 'u') ->fields( 'u' ) ->execute() ->fetchCol(); } if ($recipient->type == "role") { foreach ($results as $result) { $recipients[] = $result; } } else{ $recipients[] = $recipient->uid; } } push_notifications_send_message( $recipients, $payload ); } } Tags: URL: Push Notification does not send Push when Private Message goes to Roles
Categories: Software

Entity Pilot: The Entity Pilot exists plugin - dealing with conflicts

Drupal Planet - Sat, 2014-11-08 05:06

Any content-staging workflow is going to have conflicts. In the simplest form a conflict exists when trying to import content that already exists. In more complex cases conflict might occur between revisions.

Having a solid API to detect and handle conflicts is key to any content-staging workflow. Read on to find out how Entity Pilot handles conflicts via an extendable plugin system.

Categories: Software

Entity Pilot: Working with normalizers in Drupal 8

Drupal Planet - Sat, 2014-11-08 05:06

Entity Pilot makes extensive use of normalizers for handling dereferencing incoming content.

Normalizers are a key part of Drupal 8's serialization strategies and represent a flexible extension point for your module to interact with core APIs.

Read on to learn how your code can interact with Drupal's normalizing and denormalizing operations and influence what is output by the REST and Hal modules.

Categories: Software

Entity Pilot: Introducing Entity Pilot - Painless content staging for Drupal

Drupal Planet - Sat, 2014-11-08 05:06

After nine months of development, we're proud to announce Entity Pilot, a painless content-staging solution for Drupal.

Offering a flexible content deployment model that adapts your preferred workflow, Entity Pilot aims to solve deploying content once and for all.

Read on for details on how it works and our plans for future development.

Categories: Software

Paul Booker: Updating push notification page to send out messages to devices belonging to users with a given role

Drupal Planet - Sat, 2014-11-08 01:49
/** * Additional handler for push_notifications_mass_push_form_validate form validate. */ function mymodule_push_notifications_mass_push_form_validate($form, &$form_state) { } /** * Additional handler for push_notifications_mass_push_form_submit form submit. */ function mymodule_push_notifications_mass_push_form_submit($form, &$form_state) { $recipients = $form_state['values']['recipients']; $payload = $form_state['values']['payload']; $role = $form_state['values']['role']; $language = (isset($form_state['values']['language'])) ? $form_state['values']['language'] : false; // Send message to all iOS recipients. if (!empty($recipients['ios'])) { // Get all iOS recipients. $tokens_ios = push_notifications_get_tokens_by_role(PUSH_NOTIFICATIONS_TYPE_ID_IOS, $role, $language); if (!empty($tokens_ios)) { // Convert the payload into the correct format for APNS. $payload_apns = array('aps' => $payload); $result = push_notifications_apns_send_message($tokens_ios, $payload_apns); $dsm_type = ($result['success']) ? 'status' : 'error'; drupal_set_message($result['message'], $dsm_type); } else { drupal_set_message(t('No iOS recipients found, potentially for this language.')); } } // Send message to all Android recipients. if (!empty($recipients['android'])) { // Get all Android recipients. $tokens_android = push_notifications_get_tokens_by_role(PUSH_NOTIFICATIONS_TYPE_ID_ANDROID, $role, $language); if (!empty($tokens_android)) { // Determine which method to use for Google push notifications. switch (PUSH_NOTIFICATIONS_GOOGLE_TYPE) { case PUSH_NOTIFICATIONS_GOOGLE_TYPE_C2DM: $result = push_notifications_c2dm_send_message($tokens_android, $payload); break; case PUSH_NOTIFICATIONS_GOOGLE_TYPE_GCM: $result = push_notifications_gcm_send_message($tokens_android, $payload); break; } $dsm_type = ($result['success']) ? 'status' : 'error'; drupal_set_message($result['message'], $dsm_type); } else { drupal_set_message(t('No Android recipients found, potentially for this language.')); } } } /** * Determine all recipients of a given role from a specific device type. * * @param $type_id * Device Type ID. * @param $role * User Role. * @param $language * Language code, optional. * @param $raw * Boolean, set true to retrieve the raw query results. * * @return * Array of results, null if no entries. */ function push_notifications_get_tokens_by_role($type_id = '', $role = FALSE, $language = FALSE, $raw = FALSE) { // Make sure this type_id is supported. $valid_type_ids = array(PUSH_NOTIFICATIONS_TYPE_ID_IOS, PUSH_NOTIFICATIONS_TYPE_ID_ANDROID); if (!in_array($type_id, $valid_type_ids)) { return FALSE; } // Select all tokens for this type id and users of given user role. $query = db_select('push_notifications_tokens', 'pnt'); $query->join('users', 'u', 'pnt.uid = u.uid'); $query->join('users_roles', 'ur', 'u.uid = ur.uid'); $query->fields('pnt', array('token')); $query->condition('pnt.type', $type_id); $query->condition('ur.rid', $role); // If language code is passed, limit the results by language. if ($language) { $query->condition('pnt.language', $language); } $result = $query->execute(); // Return raw result, if needed. if ($raw) { return $result; } // Otherwise, create an array of tokens. else { $tokens = array(); foreach ($result as $record) { $tokens[] = $record->token; } return $tokens; } } /** * Implements hook_form_alter(). */ function mymodule_form_alter(&$form, &$form_state, $form_id) { if ($form_id == 'push_notifications_mass_push_form') { $result = db_select('role', 'r') ->fields('r',array('rid','name')) ->condition('name',array('administrator','anonymous user'),'NOT IN') ->execute() ->fetchAll(); $role = array(); foreach($result as $role){ $roles[$role->rid] = $role->name; } $form['role']['#title'] = "Roles"; $form['role']['#type'] = "select"; $form['role']['#options'] = $roles; $form['role']['#required'] = 1; $form['#validate'][] = 'mymodule_push_notifications_mass_push_form_validate'; unset($form['#submit']); $form['#submit'][] = 'mymodule_push_notifications_mass_push_form_submit'; } } Tags:
Categories: Software

Code Karate: How to setup a Drupal website with Bluehost

Drupal Planet - Fri, 2014-11-07 23:57

So let me guess: You either have a Drupal website or are going to create one and need a place to

Categories: Software

ImageX Media: Speeding up your MySQL dump/restores with Mydumper

Drupal Planet - Fri, 2014-11-07 23:39
Why Mydumper?

How many times in your last web development project have you had to load a mysql/mariadb database? If your answer was "too many", and you've been frustrated by how slow the process can be, this article may be for you.

Categories: Software

Appnovation Technologies: How to Use Drupal REST Services with AngularJs

Drupal Planet - Fri, 2014-11-07 23:20

In a previous post I showed how to use Drupal 8 RESTful services.

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

Mediacurrent: Why Drupal is the Right Fit for Higher Ed

Drupal Planet - Fri, 2014-11-07 21:35
Why Drupal is the Right Fit for Higher Ed

After speaking to dozens of higher ed institutions over the last several years, I’m convinced now more than ever that open source technology, particularly Drupal, is the best fit for these organizations. I know I’m echoing what many in the Drupal community have observed for a while, but I’d like to describe why Drupal makes so much sense for higher ed.

Categories: Software

CMS Quick Start: Publishing Drupal 7 Content to Social Media: Part 1

Drupal Planet - Fri, 2014-11-07 20:55

 Streamlined workflows are important for sites of any size. Today it is very common to update your readers via multiple social sites, namely Twitter and Facebook. However, it can be tedious sometimes to update your site, then update Facebook and Twitter separately with the correct links (especially if you publish a lot of content). In this series we are going to explore different ways of pushing content to your social media platforms automatically.

read more

Categories: Software

Deeson: Using PhpStorm's Live Templates for t functions

Drupal Planet - Fri, 2014-11-07 18:00

At Deeson's PhpStorm is our IDE of choice. Working with PhpStorm's Live Templates can save you some valueable time. In this post I'll show you how to use Live Templates to surround strings in simple t functions in template files.

Live templates

PhpStorm’s Live Templates are chunks of code which can be quickly inserted into a file. Surround Live Templates allow you to select a piece of text and surround it with template.

Drupal's t function

It's Drupal best practice to wrap all strings in a t function - this allow the sting to be translated. In a template file this looks like:

<span><?php print t('This is good Practice'); ?></span>

On most sites there will be hundreds of these strings, so anything that can shave off time will be worthwhile.

Take a look

Here’s an example of Surround Live Templates in action. It’s quick and easy to surround a string with a simple t function.

PhpStorm Live Templates and T function

Shortcuts

To show the Surround Live Template list on Macs use Cmd+Alt+J and if you are on a Windows machine use Ctrl+Alt+J.

Setting up Live Templates

To set up a Surround Live Template, go to Preferences > Live Templates and click the plus symbol in the top right of the window.

A Surround Live Template needs to have ‘$SELECTION$’ in it, which is replaced with the selected text. The template also need to be available in the correct contexts.

Here's one I prepared earlier... PHPStorm templates

Have a go

To set up this T string Surround Live Template, the template text needs to be:

<?php print t('$SELECTION$'); ?>

It needs to be applicable in the ‘HTML’ context.

That’s it! You should now be able to use the template. Let us know if you've got any PhpStorm tips too.

Categories: Software

Drupal.org frontpage posts for the Drupal planet: Drupal 7.33 released

Drupal Planet - Fri, 2014-11-07 16:37

Drupal 7.33, a maintenance release with numerous bug fixes (no security fixes) is now available for download. See the Drupal 7.33 release notes for a full listing.

Download Drupal 7.33

Upgrading your existing Drupal 7 sites is recommended. There are no major new features in this release. For more information about the Drupal 7.x release series, consult the Drupal 7.0 release announcement.

Security information

We have a security announcement mailing list and a history of all security advisories, as well as an RSS feed with the most recent security advisories. We strongly advise Drupal administrators to sign up for the list.

Drupal 7 includes the built-in Update Manager module, which informs you about important updates to your modules and themes.

There are no security fixes in this release of Drupal core.

Bug reports

Drupal 7.x is being maintained, so given enough bug fixes (not just bug reports), more maintenance releases will be made available, according to our monthly release cycle.

Changelog

Drupal 7.33 contains bug fixes and small API/feature improvements only. The full list of changes between the 7.32 and 7.33 releases can be found by reading the 7.33 release notes. A complete list of all bug fixes in the stable 7.x branch can be found in the git commit log.

Update notes

See the 7.33 release notes for details on important changes in this release.

Known issues

None.

Front page news: Planet DrupalDrupal version: Drupal 7.x
Categories: Software

Code Karate: Drupal 7 Exclude Node Title Module

Drupal Planet - Fri, 2014-11-07 13:37
Episode Number: 177Drupal 7 Exclude Node Title Module - Daily Dose of Drupal Episode 177

Have you ever had to try to hide a title on a page in Drupal? Maybe you created a page to be your front page and don't want the Node title to show up. The Exclude Node Title module makes this situation or any other situation in which you need to hide a node title, as simple as a few clicks of the mouse.

Tags: DrupalDrupal 7Drupal Planet
Categories: Software

tanay.co.in: Cracking Acquia Certified Developer - Front end Specialist Certification

Drupal Planet - Fri, 2014-11-07 02:46

I had a chance to try the upcoming (Drupal) Acquia Certified Developer - Front end Specialist Certification Exam. Thanks to Acquia Certification Team for allowing me to try it out.

 

I have been able to clear it with an 83% score. That was way beyond what I was expecting. I expected the exam to focus heavily on advanced CSS and JS and hence was not expecting a good score. But it turned out the exam gives good weightage to Drupal theming and templating and various other concepts in Drupal that gave me a fair chance to score.

 

The exam evaluates you on the following areas:

  • Fundamental Web Development Concepts

  • Theming Concepts

  • Sub-Theming Concepts

  • Templates

  • Template Functions

  • Layout Configuration

  • Performance

  • Security

 

The official exam blue print and curriculum is not released by Acquia yet. So I do not have the links here for you. They should be out soon. The exam is scheduled to be released for public on December 1st.

 

But for any of you taking the exam pre-release, or if you are planning to take the exam immediately after the release, here is some information for you that could help you in your preparation before the official study guide comes out.

 

Fundamental Web Development Concepts

There were questions about CSS, JS, Jquery. Some of the resources that could help:

 

CSS Selectors:

 

Positioning:

 

Javascript and Jquery: (The below ones are too generic. But I would recommend a full refresher of jquery and javascript if you are a backend developer attempting the certification)

 

Drupal + Javascript:

 

Drupal + CSS

 

Responsive Web Design:

 

Grid Systems:

  • A fair idea of any one of those CSS grid systems would help

 

HTML 5:

 

Theming Concepts

You should make yourself thoroughly familiar with all the Theming and Advanced Theming chapters in The Definitive Guide to Drupal 7.

 

 

Sub- Theming Concepts

 

Layout Configuration Templates Template Functions:

 

Performance:

 

Security:

 

This notes is very specific to the Front End Specialist Certification. If you are looking for Acquia Certified Developer examination, check out my previous post on Cracking Acquia Drupal Certification.

 

Drop in your comments below if you have any additional resources that would help in the exam preparation that I have missed above.

 

Categories: Software

Wim Leers: Drupal 8's render pipeline

Drupal Planet - Fri, 2014-11-07 00:59

In Drupal 8, we’ve significantly improved the way pages are rendered. I will explain the entire render pipeline, which will also cover:

  • render caching — blocks and entities are now render cached automatically!
  • cache tags — finally we have the cache invalidation system we’ve always needed!
  • assets — only the necessary assets are loaded anymore, thanks to asset dependencies!
  • bubbling — rather than relying on global statics that broke caching, we now correctly bubble up all attached metadata — no more frustrations!

But I will also explain what is going to be possible in Drupal 8:

  • anonymous page loads: invalidating Varnish/CDNs with perfect precision
  • authenticated page loads: not completely regenerated on every page load, but assembled from render cached parts
  • alternative render strategies, like Big Pipe

Where relevant, I’ll compare with Drupal 7, how you can write Drupal 7 code today that will be easy to upgrade to Drupal 8, and which Drupal 7 backports exist (hint: Big Pipe does exist!).

Slides: Drupal 8's render pipelineConference: DrupalCamp GhentLocation: Ghent, BelgiumDate: Nov 7 2014 - 09:30Duration: 45 minutesExtra information: 

See http://ghent2014.drupalcamp.be/sessions/drupal-8s-render-pipeline.

Categories: Software

Mediacurrent: Drupal 8 Theming Update

Drupal Planet - Thu, 2014-11-06 22:46

This webinar is an update to Dante Taylor’s TWIG: Getting Started in Drupal 8 presentation from October 2013. The most significant change to Drupal 8 theming is the introduction of the Classy Theme, which was part of the 8.0.0-beta2 release last month. In a nutshell, Classy is a base theme for those who want to have templates with the core classes. Setting Classy as a base is simple—add the following line to the theme.info.yml file inside the theme directory:

Categories: Software

Midwestern Mac, LLC: Preventing yourself from accidentally breaking production with Drush

Drupal Planet - Thu, 2014-11-06 19:51

For all the sites I maintain, I have at least a local and production environment. Some projects warrant a dev, qa, etc. as well, but for the purposes of this post, let's just assume you often run drush commands on local or development environments during development, and eventually run a similar command on production during a deployment.

What happens if, at some point, you are churning through some Drush commands, using aliases (e.g. drush @site.local break-all-the-things to break things for testing), and you accidentally enter @site.prod instead of @site.local? Or what if you were doing something potentially disastrous, like deleting a database table locally so you can test a module install file, using drush sqlq to run a query?

Categories: Software

Metal Toad: ToadCast 028

Drupal Planet - Thu, 2014-11-06 19:05

Bloom

For ToadCast 28 we have special guest Chris Bloom!

Categories: Software

Blink Reaction: Programmatically Creating a Block in Drupal 8

Drupal Planet - Thu, 2014-11-06 16:20

hook_block_info and hook_block_view are gone in Drupal 8. What's more: the whole paradigm of creating blocks through the hook system is replaced with the Plugin API.

Categories: Software

Pages