Planet Drupal

Subscribe to Planet Drupal feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 56 min 8 sec ago

Drupal for Government: Tree cross pollination maps using Drupal! aka debugging drupalgap geofield with genymotion and gapdebug

Mon, 13/04/2015 - 01:27

DrupalGap continues to rock.  Today I wanted to test the geofield module and get some maps in my apps... duh... it came about as a result of meeting with Tom Cormons from Appalachian Voices. He mentioned a problem - you often need two trees to pollinate eachother, and only have space for one... an app might help neighborhoods coordinate healthy tree communities.  

Anyhow - my dev skills were amok.  I followed the instructions on Tyler Frankenstein's site however I wasn't getting the maps to show up on my phone.  They showed up fine on the web-app side of things (eg https://www.cvillecouncil.us/mobile-application/index.html#node_23 ) however after building and piping to my android phone I couldn't get the maps to show up on my kyocera hydro (c5170...) ... I needed a debug environment... enter gapdebug!  oh yeah... gapdebug only works with android 4.4... my ghetto phone is running android ice cream 4.04... enter genymotion!

Categories: Elsewhere

Dave Hall Consulting: Managing Variables in Drupal 7

Mon, 13/04/2015 - 01:02

A couple of times recently the issue of managing variables in Drupal 7 has come up in conversation with other developers. This post outlines the various ways of managing variables in Drupal sites. The three things this guide ensures:

  • Sensitive data is kept secure
  • Variables are correct in each environment
  • You are able to track your variables (and when they changed)
The Variables Table

The most common place you'll find configuration variables is in Drupal's variable table (aka {variable}). The values in this table are often managed via admin forms that use system_settings_form(). Users enter the values click "Save configuration" and the data is stored in the database.

If you prefer to manage your configuration via the command line and know the variable you wish to set you can use drush vset. This does exactly the same thing as admin form, without needing to click on a mouse.

$conf Array

While the variables table is great at storing our variables, there are times when you want to enforce a setting. This might be because you want to prevent users from changing it (accidentally or otherwise) or because you need it to be different in each environment. The $conf array in settings.php always overrides any values in the variable table.

Acquia, Pantheon and platform.sh all provide environment variables so you can use different values in your $conf array depending on the environment.

Exporting Variables

In Drupal 7, the common way to export your variables is by using Strongarm with Features. I'm not going to cover how to do this as there is loads of documentation already available on this topic.

If your variable changes on a per environment basis or if it calculated on the fly, then you won't want to use strongarm+features as the exported values are static. You will need to put them in settings.php.

Note to self: I should debug and reroll my patch for adding support in alter hooks strongarm.

My settings.php is Out of Control!

This is a common problem, especially on more complex sites. To avoid this I recommend creating sites/default/settings/settings.[env].php files. Your settings.php file should check for the environment in an environment variable and then include the appropriate settings.[env].php file.

What About Sensitive Data?

You can encrypt variables on a case by case basis using the encrypt module and some custom code similar to what I recently implemented in the Acquia SDK module (see on store and on read examples). Warning: This doesn't encrypt the data if you're using drush vset.

If you are storing sensitive data in your variables table I would recommend you implement hook_sql_sync_sanitize() which will delete the sensitive data from your db when drush sql-sanitize or drush sql-sync --sanitize are run.

How to Decide?

This little code snippet should help you decide.

<?php // Don't try using this code in your Drupal site. if (!using_version_control()) { // Seriously there is no point in doing this without version control. abandon_all_hope(); drupal_exit(); } if (is_data_sensitive($var)) { $var = encrypt_var($var); if (!we_use_drush_based_workflows()) { learn_and_implement_drush_based_workflows(); // I'm serious! } } implement_hook_sql_sync_sanitize($var); } if (is_unique_per_environment($var)) { store_conf_array($var); } else { store_in_db($var); if (!we_use_features_based_workflow()) { learn_and_implement_features_based_worflows(); // I'm serious! } export_using_strongarm($var); }
Categories: Elsewhere

DrupalOnWindows: Decent PDF generation in Drupal

Sun, 12/04/2015 - 02:29
Language English

Wether you like it or not PDF is a mainstream adopted format to exchange documents. Your customers will ask, sooner or later, to have some sort of content generated in PDF (be it an invoice, a report, etc...).

Doing a quick search these are the modules that offer some sort of PDF integration in Drupal:

More articles...
Categories: Elsewhere

Drupal @ Penn State: Dynamic Memory Allocation in Vagrant Virtual Machines on Windows Hosts

Sun, 12/04/2015 - 01:36

Whenever there is a constraint on the number of developers in a pool, it can make it more difficult to solve issues. As we have been developing Nittany-Vagrant, I have found that there is definitely a smaller pool of developers running on a Microsoft Windows host for their vagrant based virtual machines.

The extra credit problem of the day for me was how to allow vagrant to automatically size a virtual machine's memory pool when utilizing VirtualBox as the VM provider on Windows. This is a well known solution on OSX:

Categories: Elsewhere

DrupalOnWindows: Calling .Net Framework and .Net Assemblies from PHP

Sat, 11/04/2015 - 23:48
Language English

You know that the PHP ecosystem is not yet (but heading to) professional or truly business ready. Something as simple as doing good and solid PDF manipulation, interacting with Word and Excel and others are simply a nightmare. You will of course find libraries to handle all that, the problem is that they are all half broken, slow and not even close the the professional offering you can find the in the .Net environment.

More articles...
Categories: Elsewhere

tanay.co.in: Some quick statistics from scraping the Acquia Certification Registry

Sat, 11/04/2015 - 19:38

As Acquia Drupal Certification turned 1 recently, I was trying to make sense of how many people have taken the certification exam, especially from India.

The certification team had recently launched the Acquia Certification Registry portal @ http://training.acquia.com/registry where you can search through and browse the list of candidates that have cleared the certification exam(s).

I built a small script that scraped the results, crawling through all 20 pages currently available on the registry portal, into a spreadsheet as well as a MySQL database, that I could run queries later to mine for the data I was looking for.

Finally, after a few minutes, I had a local consolidated database of the data publicly available from the certification registry, which I could run queries against, to find the answers I was looking for.

FInally, I have the numbers that I was interested in...

Total Number of Certifications = 777

(As on the registry on Sat April 11 9am IST)

Number of People Certified = 685

Unites States tops the chart with

307 certifications of

259 certified candidates, followed by

India with 86 candidates!

Number of Certifications - Top 6 Countries

United States

307

India

86

Canada

58

Australia

48

United Kingdom

44

Belgium

35

Number of Certified Developers - Top 6 Countries

United States

259

India

76

Canada

53

Australia

45

United Kingdom

34

Belgium

32

Acquia Certified Developers are spread over 40+ Countries!

On this context, I had a quick chat with Peter Minijak from the Acquia Certification team for a more deeper insight into the numbers. Was surprised to know that this list is going to explode soon to at least 150% as the total number of registered profiles including those who are yet to give their exam currently stands at 60+!

66 Developers have

more than 1 certification!

Acquia also gives a ”Grand Master”title to candidates who have cleared the first 3 examinations. There are

11 such candidates currently.

The same are listed @ http://training.acquia.com/registry/grand-masters  

14 countries have developers holding

more than 1 certification

Feels good to see India at #2, by absolute numbers. But if seen relatively, considering the large number of Drupal shops and Service Integrators in India, I think the number is still small and definitely bound to make a huge leap in the coming months.

NOTE: These numbers were scraped from the Certification Registry portal. They are no where close to being reliable. There could be some bugs from my script or the bad queries I write ;-)  

Categories: Elsewhere

Théodore 'nod_' Biadala: Visualization of jQuery use in Drupal 8

Fri, 10/04/2015 - 20:00

Since FrontendUnited 2012 Amsterdam, I've been saying Drupal core should significantly cut it's jQuery use. Until now it was without much data to back it up. What follows is a visualization of jQuery modules use in Drupal 8 code, it's fancy so feel free to click everywhere. There is additional information in titles, be sure to check those out. Took long enough to make, sorry mobile users.

traversingattributeseventmanipulationcsssizzledataajaxoffset

2488 occurrences of jQuery-related code.

traversing attributes event manipulation css sizzle data ajax offset dimensions effects serialize wrap core deprecated deferred exports

View data from folders:

core/misc core/modules core/themes core/vendor

@media (max-width: 767px) { label {display:block;} } label {cursor:pointer;display:inline-block;cursor:pointer;margin:0;padding:0.5em 0.75em;overflow:hidden;text-align:center;} label input {position:absolute;overflow:hidden;width:1px;height:1px;} label.focus {text-decoration:underline;} #rss-friend {display:none;} #rss-fiend {display:block!important;margin:3em 0;} #bubblewrap {position:relative;height:600px;width:100%} #modules, #folders {display:flex;flex-wrap:wrap;} #modules label {flex: 1 1 auto;} #folders .selected {background-color:lightgrey;} .major {font-weight:bold;} .node, #modules label.selected {color:white;} .node { border: solid 1px white; overflow: hidden; position: absolute; display:flex; text-align:center; } .node span {flex: 1 1 auto;align-self: center;} .depth-1 {font-weight: bold;} .hidden {visibility: hidden;} .node {text-decoration: none;} .node:focus, .node:active {text-decoration: underline;}

I've been working on a tool that inspect javascript files and show all jQuery methods and Sizzle selectors used in that file. I will be releasing it soon, once the npm namespace issue has been sorted out and I polished it a little bit more. Meanwhile, I ran it on Drupal code and got this: View raw data.

dataQuery.display();
Categories: Elsewhere

DrupalCon News: Announcing DrupalCon Los Angeles Keynote Speaker Whitney Hess

Fri, 10/04/2015 - 18:16

We are so excited to announce our final keynote speaker for the upcoming DrupalCon Los Angeles, Whitney Hess.

Whitney is a coach, writer and speaker helping people bring their whole selves to their work. For the last decade, she has coached hundreds of companies on how to make their products easier and more pleasurable to use, boost the bottom line, and do work they love. Whitney is the co-host the podcast Designing Yourself, writes on her blog Pleasure & Pain, and speaks at conferences and corporations worldwide. 

Categories: Elsewhere

Drupal Association News: New Try Drupal Program

Fri, 10/04/2015 - 18:05

One of the Drupal Association's primary missions is to grow the adoption of Drupal.  We are about to launch a new program on April 15th called Try Drupal.  The program will make it easy and fast for evaluators to try Drupal and have a simple, great experience while on Drupal.org.

We’ve created Try Drupal with our Premium Hosting Supporters to make it easier for CMS evaluators and Drupal.org newcomers to test and work with a Drupal demo site.  The Program will showcase a selection of Hosting Companies where a new user can quickly (in less than 20 minutes) sign up and have a Drupal demo site up and running for them to use for free. 

This is part of the Drupal Association’s initiative to develop a new revenue stream through advertising programs on Drupal.org.  This revenue will help fund various site initiatives by the Association to improve Drupal.org performance, and make it easier to use and more secure.  After interviewing many members of the community, we determined that new advertising products should be useful to Drupal.org visitors, support our mission to grow the adoption of Drupal, and should not interfere with visitors contributing to the project.

To ensure a positive Drupal experience, partners need to adhere to the following guidelines:

  • Users are directed to a self-serve sign up platform
  • Users can create a free account for the demo site that accommodates a trial installation of Drupal 7 or 8
  • Users can create a website in 20 minutes or less
  • The demo site should be available to the user for a minimum of one day upon sign up
  • The partner cannot include a paywall or require a credit card upon sign up

The Try Drupal program will be featured on the homepage of Drupal.org.  It will launch with a larger iterative change to the homepage, with an emphasis on helping users move from newcomer, to learner, to skilled Drupal community members.

It’s important that we fund Drupal.org improvements, and that we do so in a responsible way that respects the community. We anticipate rolling out more key advertising programs throughout 2015, stay tuned for more updates.  Thanks for taking the time to read about our initiatives, and please tell us your thoughts!

Categories: Elsewhere

SitePoint PHP Drupal: Integrate Elasticsearch with Silex

Fri, 10/04/2015 - 18:00

In the previous article I started exploring the integration between Drupal 7 and the Elasticsearch engine (henceforth referred to as Elastic). The goal was to see how we can combine these open source technologies to achieve a high performance application that uses the best of both worlds. If you’re just now joining us, you should check out this repository which contains relevant code for these articles.

We’ll now create a small Silex application that reads data straight from Elastic and returns it to the user.

Silex app

Silex is a great PHP micro framework developed by the same people that are behind the Symfony project. It is in fact using mainly Symfony components but at a more simplified level. Let’s see how we can get started really quickly with a Silex app.

There is more than one way. You can add it as a dependency to an existent composer based project:

"silex/silex": "~1.2",

Or you can even create a new project using a nice little skeleton provided by the creator:

composer.phar create-project fabpot/silex-skeleton

Continue reading %Integrate Elasticsearch with Silex%

Categories: Elsewhere

Midwestern Mac, LLC: Thoughts on the Acquia Certified Developer - Back End Specialist Exam

Fri, 10/04/2015 - 17:31

A little under a year ago, I took the Acquia Certified Developer exam at DrupalCon Austin, and posted Thoughts on the Acquia Drupal Developer Certification Exam. My overall thoughts on the idea of certifications for OSS like Drupal remain unchanged, so go read that previous post to hear them.

I wanted to post a little more about the additional certifications Acquia is now offering; in addition to the initial, more generalist-oriented Acquia Certified Developer Exam, Acquia now offers:

Earlier today, I took the Back End Specialist Exam, which focuses more specifically on things like Drupal's core API, general PHP syntax and style, secure code, content caching, debugging, and interacting with the Drupal community.

Like the other certification exams, you get 90 minutes to complete the exam (60 questions total), and you have to take the exam either online or in a testing center with an active proctor. This time, I elected to take the exam on my own computer, which was a little more annoying than taking the exam in-person at a test center (as I did at DrupalCon last year).

Categories: Elsewhere

Promet Source: Composing a Drupal 7 Site

Fri, 10/04/2015 - 17:07

With Drupal 8 on it's way in, PHP's standard practice of using Composer is working its way into a Drupal developer's normal life. Jump ahead of the curve with Promet Source and start using this tool for your Drupal 7 projects with this complete demonstration of a composer workflow using the following packages:

Categories: Elsewhere

InternetDevels: Big Manual for creating CTools popups in Drupal 7

Fri, 10/04/2015 - 15:55

Creating CTools popups (modal windows) is not a complicated thing, but it has many important nuances. Therefore, this article is devoted to the various nuances of popup creation.

The simplest CTools popup

Read more
Categories: Elsewhere

Lullabot: Mental Health and Open Source

Fri, 10/04/2015 - 11:01

This week we have a special episode to talk about mental health. This is a hard topic for many people to speak about publicly, so we're lucky to have Addison Berry joined by Mike Bell, Greg Dunlap, and Blake Hall to dive into this subject. Mike recently gave a presentation on this topic at Drupalcamp London. The four of us discuss some of the pressures we feel, ways we try to handle them, ideas for how the community can support help support all of us in good mental health, and some resources to check out.

Categories: Elsewhere

Chuva Inc.: Drupal Developer Days 2015 is next week!

Fri, 10/04/2015 - 05:00

Next week, Drupal Developer Days 2015 will be held in Montpellier, France. For those of you who haven't heard of the event before, Drupal Developer Days is the second most important Drupal event in Europe, held every spring in a different city from the old continent.

The event is highly technical (expect several advanced talks about Drupal 8 and beyond) and still has the cozy atmosphere we used to have in the old DrupalCons (DrupalCon Barcelona 2007, anyone?), lately it has been my favorite Drupal event.

Every year, we from Chuva ship around 5 of our Drupal Developers to attend the event, it's a 10.000 km trip from our home in São Paulo State, Brazil to Montpellier, France; but it's well worth the effort as it allows us an unique opportunity to meet our friends from the Drupal Community, Contribute code on the several sprints and share knowledge with our fellow Drupalistas.

If you haven't booked your flight and bought your ticket yet, there is still time, the late bird ticket is only 150.00 € (which is a bargain when you compare that with $ 550 USD for DrupalCon LA, huh?), it's your best opportunity to connect, meet, share with other drupalistas, buy your ticket here!

DrupalDeveloperDayMontpellierdrupal planet
Categories: Elsewhere

Pages