Drupal Feeds

Flickr: DriesNote

Feeds from Drupal.org - Tue, 2014-06-03 14:54

lemberg.co.uk posted a photo:

DriesNote

"We are at the early phase of the 4th generation of the web - The experience web" @Dries #DriesNote

Categories: Straight From Drupal

Flickr: DrupalCon patches

Feeds from Drupal.org - Tue, 2014-06-03 14:54

lemberg.co.uk posted a photo:

DrupalCon patches

On positive waves at @DrupalCon

Categories: Straight From Drupal

Flickr: #DrupalSDK

Feeds from Drupal.org - Tue, 2014-06-03 14:54

lemberg.co.uk posted a photo:

#DrupalSDK

Drupal 8 iOS & Android SDK drupalsdk.com/

Categories: Straight From Drupal

LightSky: 5 Tips for Keeping Your Drupal Site Organized

Planet Drupal - Tue, 2014-06-03 14:05

Drupal is perhaps the most powerful framework/CMS available today.  I kid you not, there is almost nothing that can’t be created with Drupal.  From the most basic brochure site, to a way to track things for your family or business, and even large corporate applications tracking inventory and integrating with other tools.  Regardless of which category you fit in to some important steps should be taken to ensure that you are keeping your Drupal project clean and clutter free.

Tip #1: Organizing your modules directory

According to Drupals best practices, you should put all of your modules into your sites/all/modules folder. Drupal will recursively search that directory for modules. Because of this, I like to encourage developers to take that one step further and create subdirectories to store modules in. For example, for the sites that we develop, we have the following directory structure in place:

sites/all/modules
   | - contrib
   | - custom
   | - features
   | - dev

The contrib folder contains all modules downloaded from drupal.org. The custom modules folder contains any custom modules that we have to write for the site. The features directory contains any features exported for the site. The dev folder contains any modules that are used for development. Typically, I add the dev folder to the sites .gitignore file so that modules contained within it don’t make it to production.

There really isn’t a right or wrong way to organize your modules folder, but one thing you should know is that if you do decide to go this route, you won’t be able to update via the core update module, however, you will still be able to update your modules via drush.

If you already have an existing site and are looking to organize your modules directory, be sure to rebuild the registry after moving your modules (and as always, make a backup). This will ensure that drupal will be made aware of your new module locations and will prevent any errors.


Tip #2: Creating Useful Content Types

One thing that can sometimes confuse sitebuilders is when to create a new content type, or when to simply modify an existing one. A good rule of thumb is to take all of your features that you wish for the site to have, and then pick out the nouns (i.e: news, events, podcasts, videos, etc).

I also like to encourage that the content types be singular, not plural. I realize this may seem a little nit-picky, however, when a user goes to add a piece of content, they usually add those one piece at a time, so the admin interface should reflect that.

Also, it’s a good idea to ensure that your content types, and any respective fields, are named in such a way that description text isn’t needed to describe what they do. For example, if you are creating a content type that will add images to a homepage slider, then your content type should be called “Homepage Slideshow Image”.

It’s also a good idea to ensure that when adding fields to a content type, that you do so in a way that the label accurately describes what this field does, and that in cases where it doesn’t, you add appropriate description text. Not only does this help with administrative usability, it also helps ensure you remember that fields purpose long after the site is pushed to production.

Tip #3: Primary Navigation Structure

When trying to determine the site organization for your visitors, a lot of things must be taken into consideration. Who is your target user? What information are they seeking when they come to your website? What is the best way to help them find what they are looking for? Often times, a visitor will come to your website for a reason, and so your navigation structure should help guide them to what they are looking for. Having a properly organized site structure makes for a better user experience.

I generally consider two different approaches when it comes to site navigation. The organization oriented approach, and the visitor oriented approach.

The organization oriented approach would have a navigation structure similar to what you see on our site (Home, About Us, Our Services, etc). This is typically useful when you have visitors coming to your site that fall into one or two categories. For example, most of our visitors are looking for our content, services, or want to contact us. Because they already have an idea as to what they are looking for, we guide them through what our organization has can offer.

If your website is more geared towards helping users find information, or if you have a limited target audience and are hoping to pull them deeper into your site, you may choose to go with a visitor oriented navigation structure. Let’s use one of our clients websites, The City of Goshen (link). Like many municipalities, the City of Goshen knew that they had people coming there seeking certain types of information.  You can see from there navigation structure that they had three types of visitors to their site. : Residents, Visitors and Businesses. So when generating their site structure, they choose to categorize the sites content in a way that they could drop it into one of those buckets.

Personally, I don’t feel as though one type of navigation structure is better than the other, but regardless of which one you choose, keep in mind that your menu structure should be organized. Be sure to use your primary navigation items as “buckets” to hold content, and try to go no further than a secondary or tertiary level of navigation.

Tip #4: Views

Views can be tricky, especially for someone new to the world of site building in Drupal. The biggest tip I can have is to try to limit the number of views that you have. Keep in mind that views have the ability to have multiple pages/blocks/feeds/etc in one view, so be sure to make the most out of each view that you build, and avoid doing work twice. As a rule of thumb, I would have one view for each content type (when it’s needed). So if I have a blog, I’d have my blog page (/blog) any blocks that the blog would need (such as a recent posts block) and if needed a RSS feed included all in that same view. As with content types, be sure to name your views in such a way that they are self explanatory and use the description field when appropriate.

Tip #5: URL Aliases

If you aren’t using pathauto in your site, you should be. It helps ensure that your URLs are clean and conform to standards.  You want to automate as many tasks that will help your SEO as you can, and pathauto automates the foundation of each pages SEO, the URL.

The big thing I like to stress with URL aliases is to have your individual content types have their own pattern. What I mean is that all your blog posts should have a path of blog/* your news items a path of news/*. This can be accomplished by using the [node:title] token.

With regard to primary navigation items, I like to have the URL aliases based off of the menu structure. Let’s say that you have a primary navigation page called “About Us” and a secondary page called “Our Staff” located underneath it, you’d likely want your URL alias to be “/about-us/our-staff”. The easiest way to accomplish this is to use the following pathauto token for basic pages (or whatever non-noun content types you have)

[node:menu-link:parent:title]/[node:title]

Hopefully you found the tips contained within this article helpful. If you have any other site organization tips, please add them in the comments below.

LightSky: 5 Tips for Keeping Your Drupal Site Organized

Feeds from Drupal.org - Tue, 2014-06-03 14:05

Drupal is perhaps the most powerful framework/CMS available today.  I kid you not, there is almost nothing that can’t be created with Drupal.  From the most basic brochure site, to a way to track things for your family or business, and even large corporate applications tracking inventory and integrating with other tools.  Regardless of which category you fit in to some important steps should be taken to ensure that you are keeping your Drupal project clean and clutter free.

Tip #1: Organizing your modules directory

According to Drupals best practices, you should put all of your modules into your sites/all/modules folder. Drupal will recursively search that directory for modules. Because of this, I like to encourage developers to take that one step further and create subdirectories to store modules in. For example, for the sites that we develop, we have the following directory structure in place:

sites/all/modules
   | - contrib
   | - custom
   | - features
   | - dev

The contrib folder contains all modules downloaded from drupal.org. The custom modules folder contains any custom modules that we have to write for the site. The features directory contains any features exported for the site. The dev folder contains any modules that are used for development. Typically, I add the dev folder to the sites .gitignore file so that modules contained within it don’t make it to production.

There really isn’t a right or wrong way to organize your modules folder, but one thing you should know is that if you do decide to go this route, you won’t be able to update via the core update module, however, you will still be able to update your modules via drush.

If you already have an existing site and are looking to organize your modules directory, be sure to rebuild the registry after moving your modules (and as always, make a backup). This will ensure that drupal will be made aware of your new module locations and will prevent any errors.


Tip #2: Creating Useful Content Types

One thing that can sometimes confuse sitebuilders is when to create a new content type, or when to simply modify an existing one. A good rule of thumb is to take all of your features that you wish for the site to have, and then pick out the nouns (i.e: news, events, podcasts, videos, etc).

I also like to encourage that the content types be singular, not plural. I realize this may seem a little nit-picky, however, when a user goes to add a piece of content, they usually add those one piece at a time, so the admin interface should reflect that.

Also, it’s a good idea to ensure that your content types, and any respective fields, are named in such a way that description text isn’t needed to describe what they do. For example, if you are creating a content type that will add images to a homepage slider, then your content type should be called “Homepage Slideshow Image”.

It’s also a good idea to ensure that when adding fields to a content type, that you do so in a way that the label accurately describes what this field does, and that in cases where it doesn’t, you add appropriate description text. Not only does this help with administrative usability, it also helps ensure you remember that fields purpose long after the site is pushed to production.

Tip #3: Primary Navigation Structure

When trying to determine the site organization for your visitors, a lot of things must be taken into consideration. Who is your target user? What information are they seeking when they come to your website? What is the best way to help them find what they are looking for? Often times, a visitor will come to your website for a reason, and so your navigation structure should help guide them to what they are looking for. Having a properly organized site structure makes for a better user experience.

I generally consider two different approaches when it comes to site navigation. The organization oriented approach, and the visitor oriented approach.

The organization oriented approach would have a navigation structure similar to what you see on our site (Home, About Us, Our Services, etc). This is typically useful when you have visitors coming to your site that fall into one or two categories. For example, most of our visitors are looking for our content, services, or want to contact us. Because they already have an idea as to what they are looking for, we guide them through what our organization has can offer.

If your website is more geared towards helping users find information, or if you have a limited target audience and are hoping to pull them deeper into your site, you may choose to go with a visitor oriented navigation structure. Let’s use one of our clients websites, The City of Goshen (link). Like many municipalities, the City of Goshen knew that they had people coming there seeking certain types of information.  You can see from there navigation structure that they had three types of visitors to their site. : Residents, Visitors and Businesses. So when generating their site structure, they choose to categorize the sites content in a way that they could drop it into one of those buckets.

Personally, I don’t feel as though one type of navigation structure is better than the other, but regardless of which one you choose, keep in mind that your menu structure should be organized. Be sure to use your primary navigation items as “buckets” to hold content, and try to go no further than a secondary or tertiary level of navigation.

Tip #4: Views

Views can be tricky, especially for someone new to the world of site building in Drupal. The biggest tip I can have is to try to limit the number of views that you have. Keep in mind that views have the ability to have multiple pages/blocks/feeds/etc in one view, so be sure to make the most out of each view that you build, and avoid doing work twice. As a rule of thumb, I would have one view for each content type (when it’s needed). So if I have a blog, I’d have my blog page (/blog) any blocks that the blog would need (such as a recent posts block) and if needed a RSS feed included all in that same view. As with content types, be sure to name your views in such a way that they are self explanatory and use the description field when appropriate.

Tip #5: URL Aliases

If you aren’t using pathauto in your site, you should be. It helps ensure that your URLs are clean and conform to standards.  You want to automate as many tasks that will help your SEO as you can, and pathauto automates the foundation of each pages SEO, the URL.

The big thing I like to stress with URL aliases is to have your individual content types have their own pattern. What I mean is that all your blog posts should have a path of blog/* your news items a path of news/*. This can be accomplished by using the [node:title] token.

With regard to primary navigation items, I like to have the URL aliases based off of the menu structure. Let’s say that you have a primary navigation page called “About Us” and a secondary page called “Our Staff” located underneath it, you’d likely want your URL alias to be “/about-us/our-staff”. The easiest way to accomplish this is to use the following pathauto token for basic pages (or whatever non-noun content types you have)

[node:menu-link:parent:title]/[node:title]

Hopefully you found the tips contained within this article helpful. If you have any other site organization tips, please add them in the comments below.

Categories: Straight From Drupal

Digett: Varnish, Memcache — Cache All the Things BUT Still Run Dynamic Code

Planet Drupal - Tue, 2014-06-03 13:23
Cache all the things but still run dynamic code

There are quite a few caching options out there, and we frequently combine several services to cache every little piece of a site. Think about it: standard Drupal cache, Varnish, Memcache, Redis, various files coming from CDNs, and more.

read more

Digett: Varnish, Memcache — Cache All the Things BUT Still Run Dynamic Code

Feeds from Drupal.org - Tue, 2014-06-03 13:23
Cache all the things but still run dynamic code

There are quite a few caching options out there, and we frequently combine several services to cache every little piece of a site. Think about it: standard Drupal cache, Varnish, Memcache, Redis, various files coming from CDNs, and more.

read more

Categories: Straight From Drupal

Flickr: In thought

Feeds from Drupal.org - Tue, 2014-06-03 12:52

myles.davidson posted a photo:

In thought

Dries before the opening session at DrupalCon Austin, 2014

Categories: Straight From Drupal

Flickr: The drones are here

Feeds from Drupal.org - Tue, 2014-06-03 12:52

myles.davidson posted a photo:

The drones are here

Look out for the flying drones!

Categories: Straight From Drupal

Welker

Drupal showcase com - Tue, 2014-06-03 11:06
Site Description: 

Welker's mission is to help clients address their most important debt challenges and to create opportunities for them to rebuild their financial health. This Drupal platform allows customers to quickly find what they were looking for and get the help they need.

Site Designer: 

DRI - Discovery/Reinvention/Integration/

Site Developer: 

DRI - Discovery/Reinvention/Integration/

Site URL: http://www.welker.caVersion of Drupal: Drupal 7Site Type: 4Industry: Financial ServicesCountry: CanadaCategories: Finance & BankingScreenshot Thumbnail: Welker Homepage Select ratingGive it 1/5Give it 2/5Give it 3/5Give it 4/5Give it 5/5Cancel rating No votes yet
Categories: Showcase

Dries Buytaert: Acquia acquired TruCentric

Planet Drupal - Tue, 2014-06-03 10:17
Topic: DrupalAcquiaBusiness

We’re excited to announce that Acquia acquired TruCentric, a software-as-a-service company that is focused on providing personalization for websites. Earlier this year we launched Acquia Lift, which brings testing and personalization capabilities to Drupal sites. With TruCentric, we acquired not only a great complementary product that we will integrate with Acquia Lift, we also gained a great team with a long history and strong leadership in marketing automation technologies.

TruCentric uses real-time and historical data to build a deep understanding of both anonymous and authenticated visitors. Every action that a visitor takes and every piece content that they look at continuously updates this profile. TruCentric can infer a visitor's persona, interests, preferred content, and level of engagement as well as site-specific characteristics such as favorite team (for example on a sports destination), favorite products (such as on an e-commerce site), or favorite activities (for example on a travel site). This data can be married with existing customer and audience data, and tied together across multiple online destinations. Profiles can also be connected together across the different devices that a visitor uses.

Paired together with Acquia Lift, the joint solution will provide a powerful level of understanding about a website's visitors resulting in much more effective testing and targeting. Additionally, the solution will incorporate TruCentric's content recommendation and marketing offer capabilities. Content recommendations suggest and promote links to content that are most likely to interest a user, increasing engagement and time on site. Marketing offers enable the most relevant promotions, sign-ups and other types of calls-to-action to be selectively shown to site visitors, increasing conversions. Both offers and recommendations can be easily configured by site builders or marketers by selecting from a variety of rules, algorithms and filtering criteria.

Longer term, I'm particularly excited about the impact of Acquia Lift (with TruCentric) on e-commerce. Many brands and corporations today offer fragmented and poorly integrated shopping experiences that confuse the customer, are difficult to manage, and ultimately, leave money on the table. Top e-commerce brands have proven that content-rich product stories with the deep personalization and seamless e-commerce integration increase conversion rates significantly. We believe that building a software platform that uses the world’s best personalization practices in combination with the best possible content management capabilities presents us with a really big opportunity.

Dries Buytaert: Acquia acquired TruCentric

Feeds from Drupal.org - Tue, 2014-06-03 10:17
Topic: DrupalAcquiaBusiness

We’re excited to announce that Acquia acquired TruCentric, a software-as-a-service company that is focused on providing personalization for websites. Earlier this year we launched Acquia Lift, which brings testing and personalization capabilities to Drupal sites. With TruCentric, we acquired not only a great complementary product that we will integrate with Acquia Lift, we also gained a great team with a long history and strong leadership in marketing automation technologies.

TruCentric uses real-time and historical data to build a deep understanding of both anonymous and authenticated visitors. Every action that a visitor takes and every piece content that they look at continuously updates this profile. TruCentric can infer a visitor's persona, interests, preferred content, and level of engagement as well as site-specific characteristics such as favorite team (for example on a sports destination), favorite products (such as on an e-commerce site), or favorite activities (for example on a travel site). This data can be married with existing customer and audience data, and tied together across multiple online destinations. Profiles can also be connected together across the different devices that a visitor uses.

Paired together with Acquia Lift, the joint solution will provide a powerful level of understanding about a website's visitors resulting in much more effective testing and targeting. Additionally, the solution will incorporate TruCentric's content recommendation and marketing offer capabilities. Content recommendations suggest and promote links to content that are most likely to interest a user, increasing engagement and time on site. Marketing offers enable the most relevant promotions, sign-ups and other types of calls-to-action to be selectively shown to site visitors, increasing conversions. Both offers and recommendations can be easily configured by site builders or marketers by selecting from a variety of rules, algorithms and filtering criteria.

Longer term, I'm particularly excited about the impact of Acquia Lift (with TruCentric) on e-commerce. Many brands and corporations today offer fragmented and poorly integrated shopping experiences that confuse the customer, are difficult to manage, and ultimately, leave money on the table. Top e-commerce brands have proven that content-rich product stories with the deep personalization and seamless e-commerce integration increase conversion rates significantly. We believe that building a software platform that uses the world’s best personalization practices in combination with the best possible content management capabilities presents us with a really big opportunity.

Categories: Straight From Drupal

Acquia acquired TruCentric

Dries Buytaert (via DrupalFire)

Topic: DrupalAcquiaBusiness

We’re excited to announce that Acquia acquired TruCentric, a software-as-a-service company that is focused on providing personalization for websites. Earlier this year we launched Acquia Lift, which brings testing and personalization capabilities to Drupal sites. With TruCentric, we acquired not only a great complementary product that we will integrate with Acquia Lift, we also gained a great team with a long history and strong leadership in marketing automation technologies.

TruCentric uses real-time and historical data to build a deep understanding of both anonymous and authenticated visitors. Every action that a visitor takes and every piece content that they look at continuously updates this profile. TruCentric can infer a visitor's persona, interests, preferred content, and level of engagement as well as site-specific characteristics such as favorite team (for example on a sports destination), favorite products (such as on an e-commerce site), or favorite activities (for example on a travel site). This data can be married with existing customer and audience data, and tied together across multiple online destinations. Profiles can also be connected together across the different devices that a visitor uses.

Paired together with Acquia Lift, the joint solution will provide a powerful level of understanding about a website's visitors resulting in much more effective testing and targeting. Additionally, the solution will incorporate TruCentric's content recommendation and marketing offer capabilities. Content recommendations suggest and promote links to content that are most likely to interest a user, increasing engagement and time on site. Marketing offers enable the most relevant promotions, sign-ups and other types of calls-to-action to be selectively shown to site visitors, increasing conversions. Both offers and recommendations can be easily configured by site builders or marketers by selecting from a variety of rules, algorithms and filtering criteria.

Longer term, I'm particularly excited about the impact of Acquia Lift (with TruCentric) on e-commerce. Many brands and corporations today offer fragmented and poorly integrated shopping experiences that confuse the customer, are difficult to manage, and ultimately, leave money on the table. Top e-commerce brands have proven that content-rich product stories with the deep personalization and seamless e-commerce integration increase conversion rates significantly. We believe that building a software platform that uses the world’s best personalization practices in combination with the best possible content management capabilities presents us with a really big opportunity.

Categories: Drupal Universe

Daniel Pocock: Click to dial for mobile users of your web sites

Planet Drupal - Tue, 2014-06-03 09:47

If there was a trivial way to let mobile phone users call you from your web site, just by adding a single HTML element to the page, would you do it?

In fact, there is. It doesn't even require a mobile WebRTC browser. It works for virtually any smartphone and a growing number of desktops too.

Introducing the tel: URI

The tel: URI is defined in RFC 3966.

For most mobile phone users, if they click a link to a tel: URI, their browser will copy the link into their dialer for convenience.

To protect users against calls to 0900 premium rate numbers, the user still has to make one more click to confirm they want to dial.

Examples

Here is a tel: URI:

tel:+44-20-7135-7070

Here is how to create a link with it:

<a href="tel:+44-20-7135-7070">020 7135 7070 (from abroad: +44 20 7135 7070)</a>

and here is how it looks on the page:

Call me on 020 7135 7070 (from abroad: +44 20 7135 7070)

and here is what appears on the mobile device after a user clicks the tel: URI link:

For desktop users too

Many desktop users can also benefit from tel: URIs. If they have a modern telephone system in their office, the system administrator may have already added a tel: URI handler to their desktop.

Anyone with a software PBX or a SIP account can also potentially use the TBDialOut extension for Firefox to help convert tel: URIs into sip: URIs or URLs for some bespoke dialer.

For those who want extra convenience, the Telify extension for Firefox will look for phone numbers in any HTML page and display them as tel: URIs so you can click them even if the web developer overlooked this.

Daniel Pocock: Click to dial for mobile users of your web sites

Feeds from Drupal.org - Tue, 2014-06-03 09:47

If there was a trivial way to let mobile phone users call you from your web site, just by adding a single HTML element to the page, would you do it?

In fact, there is. It doesn't even require a mobile WebRTC browser. It works for virtually any smartphone and a growing number of desktops too.

Introducing the tel: URI

The tel: URI is defined in RFC 3966.

For most mobile phone users, if they click a link to a tel: URI, their browser will copy the link into their dialer for convenience.

To protect users against calls to 0900 premium rate numbers, the user still has to make one more click to confirm they want to dial.

Examples

Here is a tel: URI:

tel:+44-20-7135-7070

Here is how to create a link with it:

<a href="tel:+44-20-7135-7070">020 7135 7070 (from abroad: +44 20 7135 7070)</a>

and here is how it looks on the page:

Call me on 020 7135 7070 (from abroad: +44 20 7135 7070)

and here is what appears on the mobile device after a user clicks the tel: URI link:

For desktop users too

Many desktop users can also benefit from tel: URIs. If they have a modern telephone system in their office, the system administrator may have already added a tel: URI handler to their desktop.

Anyone with a software PBX or a SIP account can also potentially use the TBDialOut extension for Firefox to help convert tel: URIs into sip: URIs or URLs for some bespoke dialer.

For those who want extra convenience, the Telify extension for Firefox will look for phone numbers in any HTML page and display them as tel: URIs so you can click them even if the web developer overlooked this.

Categories: Straight From Drupal

Banckle.CRM

Latest Drupal Modules - Tue, 2014-06-03 08:49

Banckle.CRM Drupal module allows you to quickly collect leads using Contact Capture Form right from your website.

Banckle.CRM Features

All Your CRM Tools in One Place Easy online customer relationship management (CRM) tools for busy and dispersed teams. Stay in touch with colleagues and customers, manage tasks and view the pipeline, all in one place.

Categories: Straight From Drupal

Web Omelette: How to use Drush Make in your daily routine

Planet Drupal - Tue, 2014-06-03 07:15

This is a guest post from Kate Marshalkina, a Russian Drupal developer who works for Licel LLC. Enjoy the read and check out some of her other work.

Drush Make is well-known as an advanced tool for Drupal distribution building. But it also can be very useful for those who have never dealt with distributions. One great example is applying patches like a boss.

In this article I’ll show you how I use Drush Make to automate some of my routine tasks and help me to discover great Drupal stuff.

Drush Make commands

Drush Make includes 2 commands which are already built in Drush itself:

  1. make — Turns a .makefile into a Drupal codebase.
  2. make-generate — Generates a .makefile from the current Drupal site.

Both commands are related to a .makefile — flat text file with Drush Make instructions. You can read more about .makefile syntax here.

But for now, let's go deeper and see Drush Make in action.

Rebuild your development environment

How often do you install a new and clean Drupal site for development, testing or demonstration purposes? Additionally to Drupal core, developers usually have a predefined list of favorite modules like Administration Menu, Views or something more special. With Drush Make you can automate this process greatly by combining all the projects you need into one file and lettting Drush Make build it for you.

Here is an example .makefile for a multilingual testing site:

; Drush Make API version. api = 2 ; Drupal core. core = 7.x ;Common modules. projects[admin_menu][subdir] = "contrib" projects[ctools][subdir] = "contrib" projects[token][subdir] = "contrib" projects[views][subdir] = "contrib" ; Development modules. projects[devel][subdir] = "development" ; Multilingual modules. projects[fallback_language_negotation][subdir] = "contrib" projects[variable][subdir] = "contrib" projects[i18n][subdir] = "contrib" projects[i18nviews][subdir] = "contrib" ; Load some translations. translations[] = de translations[] = ru

This file can be saved locally (in ~/.drush/make-files/d7_i18n.make for example) or hosted on a remote server like GitHub.

To use it, let’s run the make command to prepare our custom build on our server (in /var/www/drupal_test.local for example):

$ drush make d7_i18n.make /var/www/drupal_test.local

The first run can be quite long, but the next time Drush will take most of projects from its cache.

As a result, the latest Drupal core, contrib modules and translations from the .makefile will be downloaded and placed in appropriate folders. Now you can go to your site's URL and run the install.php or run the installation process directly with Drush:

$ drush si --db-url="mysql://user:password@localhost/databasename" --site-name="Drupal Multilingual"

Additionally, you can also generate a tarball from the .makefile with --tar option:

$ drush make d7_i18n.make drupal_multilingual --tar

Add to that a couple of features (based on Features module) and you’ll end up with your own distro.

Download dependencies

Have you ever noticed that some contrib modules provide .make or .make.example file? These usually contain a list of specific external libraries (like the jQuery Colorbox plugin for the Colorbox module). These file can be built inside existing Drupal codebases using the --no-core flag. As an example, let’s say you want to download the Chosen module:

$ drush dl chosen Project chosen (7.x-2.0-beta4) downloaded to sites/all/modules/contrib/chosen. $ drush make sites/all/modules/contrib/chosen/chosen.make.example --no-core chosen downloaded from https://github.com/harvesthq/chosen/releases/download/v1.1.0/chosen_v1.1.0.zip

In this case, the proper jQuery plugin was downloaded and unzipped into the proper directory inside the libraries/ folder. Isn’t that handy?

Module developers, please, add a .make.example file into your Drupal.org projects if you are using any external libraries. Instead of building custom Drush commands like chosen-plugin, we can use Drush Make. Just compare 117 lines to 7.

Generate makefile from existing site

You can easily share a custom Drupal build with Drush Make. First run generate-makefile command from Drupal root to generate a skeleton:

$ drush generate-makefile drupal_custom_build.make

The generated file drupal_custom_build.make will contain instructions for all enabled projects with specific versions. If a project has .git folder, Drush Make will automatically set appropriate properties:

projects[redirect][type] = "module" projects[redirect][download][type] = "git" projects[redirect][download][url] = "http://git.drupal.org/project/redirect.git" projects[redirect][download][branch] = "7.x-1.x" projects[redirect][download][revision] = "0b7b8dc2d58cb277874d87c91c45f0a361e148f7"

This file still needs a quick manual review. For example, you can add patch references. In my project, 2 patches are applied to the Redirect module:

projects[redirect][patch][] = "https://drupal.org/files/issues/redirect-global-905914-145.patch" projects[redirect][patch][] = "https://drupal.org/files/issues/redirect.circular-loops.1796596-146.patch"

The resulting .makefile may be very useful if you want to share your working environment with a colleague or to provide definitive info for troubleshooting.

Bonus! Explore Drupal world!

Finally, the Drush Make file itself is a good read for discovering new cool contrib projects. Check out well-tested Commerce Kickstart or OpenScholar .makefiles with plenty of interesting projects inside.

I hope this article will help you use Drush more widely, to automate some of your tasks or to even build your first distribution!

About the Author

Kate is a passionate web developer from Russia who fell in love with Drupal in 2011.

She cares about multilingual stuff, usability and performance.

 

Connect with Kate:
Twitter | drupal.org | Google +

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

Web Omelette: How to use Drush Make in your daily routine

Feeds from Drupal.org - Tue, 2014-06-03 07:15

This is a guest post from Kate Marshalkina, a Russian Drupal developer who works for Licel LLC. Enjoy the read and check out some of her other work.

Drush Make is well-known as an advanced tool for Drupal distribution building. But it also can be very useful for those who have never dealt with distributions. One great example is applying patches like a boss.

In this article I’ll show you how I use Drush Make to automate some of my routine tasks and help me to discover great Drupal stuff.

Drush Make commands

Drush Make includes 2 commands which are already built in Drush itself:

  1. make — Turns a .makefile into a Drupal codebase.
  2. make-generate — Generates a .makefile from the current Drupal site.

Both commands are related to a .makefile — flat text file with Drush Make instructions. You can read more about .makefile syntax here.

But for now, let's go deeper and see Drush Make in action.

Rebuild your development environment

How often do you install a new and clean Drupal site for development, testing or demonstration purposes? Additionally to Drupal core, developers usually have a predefined list of favorite modules like Administration Menu, Views or something more special. With Drush Make you can automate this process greatly by combining all the projects you need into one file and lettting Drush Make build it for you.

Here is an example .makefile for a multilingual testing site:

; Drush Make API version. api = 2 ; Drupal core. core = 7.x ;Common modules. projects[admin_menu][subdir] = "contrib" projects[ctools][subdir] = "contrib" projects[token][subdir] = "contrib" projects[views][subdir] = "contrib" ; Development modules. projects[devel][subdir] = "development" ; Multilingual modules. projects[fallback_language_negotation][subdir] = "contrib" projects[variable][subdir] = "contrib" projects[i18n][subdir] = "contrib" projects[i18nviews][subdir] = "contrib" ; Load some translations. translations[] = de translations[] = ru

This file can be saved locally (in ~/.drush/make-files/d7_i18n.make for example) or hosted on a remote server like GitHub.

To use it, let’s run the make command to prepare our custom build on our server (in /var/www/drupal_test.local for example):

$ drush make d7_i18n.make /var/www/drupal_test.local

The first run can be quite long, but the next time Drush will take most of projects from its cache.

As a result, the latest Drupal core, contrib modules and translations from the .makefile will be downloaded and placed in appropriate folders. Now you can go to your site's URL and run the install.php or run the installation process directly with Drush:

$ drush si --db-url="mysql://user:password@localhost/databasename" --site-name="Drupal Multilingual"

Additionally, you can also generate a tarball from the .makefile with --tar option:

$ drush make d7_i18n.make drupal_multilingual --tar

Add to that a couple of features (based on Features module) and you’ll end up with your own distro.

Download dependencies

Have you ever noticed that some contrib modules provide .make or .make.example file? These usually contain a list of specific external libraries (like the jQuery Colorbox plugin for the Colorbox module). These file can be built inside existing Drupal codebases using the --no-core flag. As an example, let’s say you want to download the Chosen module:

$ drush dl chosen Project chosen (7.x-2.0-beta4) downloaded to sites/all/modules/contrib/chosen. $ drush make sites/all/modules/contrib/chosen/chosen.make.example --no-core chosen downloaded from https://github.com/harvesthq/chosen/releases/download/v1.1.0/chosen_v1.1.0.zip

In this case, the proper jQuery plugin was downloaded and unzipped into the proper directory inside the libraries/ folder. Isn’t that handy?

Module developers, please, add a .make.example file into your Drupal.org projects if you are using any external libraries. Instead of building custom Drush commands like chosen-plugin, we can use Drush Make. Just compare 117 lines to 7.

Generate makefile from existing site

You can easily share a custom Drupal build with Drush Make. First run generate-makefile command from Drupal root to generate a skeleton:

$ drush generate-makefile drupal_custom_build.make

The generated file drupal_custom_build.make will contain instructions for all enabled projects with specific versions. If a project has .git folder, Drush Make will automatically set appropriate properties:

projects[redirect][type] = "module" projects[redirect][download][type] = "git" projects[redirect][download][url] = "http://git.drupal.org/project/redirect.git" projects[redirect][download][branch] = "7.x-1.x" projects[redirect][download][revision] = "0b7b8dc2d58cb277874d87c91c45f0a361e148f7"

This file still needs a quick manual review. For example, you can add patch references. In my project, 2 patches are applied to the Redirect module:

projects[redirect][patch][] = "https://drupal.org/files/issues/redirect-global-905914-145.patch" projects[redirect][patch][] = "https://drupal.org/files/issues/redirect.circular-loops.1796596-146.patch"

The resulting .makefile may be very useful if you want to share your working environment with a colleague or to provide definitive info for troubleshooting.

Bonus! Explore Drupal world!

Finally, the Drush Make file itself is a good read for discovering new cool contrib projects. Check out well-tested Commerce Kickstart or OpenScholar .makefiles with plenty of interesting projects inside.

I hope this article will help you use Drush more widely, to automate some of your tasks or to even build your first distribution!

About the Author

Kate is a passionate web developer from Russia who fell in love with Drupal in 2011.

She cares about multilingual stuff, usability and performance.

 

Connect with Kate:
Twitter | drupal.org | Google +

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

CivicActions: Connect with CivicActions at DrupalCon Austin

Planet Drupal - Tue, 2014-06-03 06:13

All week, members of the CivicActions team will be in Austin, Texas for DrupalCon 2014. If you plan on attending, you can find us at booth 608 in the Exhibit Hall.

In addition to our sponsorship and participation, we've put together a great resource called the Civic Lounge, in partnership with our friends at Drupal Squad, NuCivic and Albatross Digital.

The Civic Lounge offers all kinds of ways to co connect with fellow civic-minded Drupalistas, including:

Civic Lounge

So, come find us at the booth, join the party and connect with your Civic-Drupal community. We can't wait to see you there!

Topics

Pages

Subscribe to My Drupal aggregator