Pages

Friday, February 28, 2014

Understanding The New Drupal Release Cycle

At the end of 2013, big changes were made to the Drupal release cycle.
You can read full details of the changes at https://drupal.org/node/2135189.
The changes will start with Drupal 8, but are going to impact almost all current and future versions.
In this blog post, I'll give you a short, plain-English overview of the changes.
I'll show how the changes will impact users of Drupal 6, 7, 8 and 9.

What is changing for Drupal 8?

  • Drupal 8 will have several releases with new features.
  • New Drupal 8 releases will come out every 6 months. They may have new features and will be called 8.1, 8.2, 8.3 etc.
  • The latest release will be the only one that's supported.
  • The end of the process will be a Long Term Support version or LTS. When that LTS arrives, no new features will be added, only security fixes.
Here's a graphical overview of how the releases will work:
media_1393365446214.png
Here's the big change: new features can now be added after the 8.0 release.
One of the downsides to Drupal's old release cycle is that new features couldn't be added.
Drupal 7 was essentially finished in 2010 (although it was released the next year). So no new features have been added to Drupal since 2010.
That feature freeze is great for enterprise customers, but very clunky for today's software developers who are used to working iteratively, making fast and regular updates.
In the proposal, Dries said that the new release cycle allows them to use "a more agile development approach of getting smaller changes out faster, seeing how they do, and making further changes based on real-world data. "
In the comments, Jesse Beach (who is responsible for much of the work on Drupal's UI) said, "Building a usable UI requires numerous iterations and we really don't get those over large major release cycles."

What does this mean for Drupal 9?

  • Drupal 9 will only start development when the the core team have completed a new feature big enough to justify a new version.
  • Drupal 9 should arrive on a normal schedule, which is 2 or 3 years after Drupal 8.

What does this mean for Drupal 6 and 7?

Wait, why are we bringing 6 and 7 into this?
Because this new release cycle may be good news for owners of Drupal 6 and 7 sites:
  • Drupal 6 would be security supported until 8's LTS rather than only until 8.0.
  • Drupal 7 would be security supported until 9's LTS rather than only until 9.0.
So this change could mean an extra 18 months of fixes. It's possible that this could mean Drupal 7 support until 2018 or 2019.

What does this mean for you building sites in the future?

Be very careful with the selection and quantity of modules you use in Drupal 8. This is good practice anyway, but will become a more formal recommendation with Drupal 8.
Here's the advice from the release cycle proposal:
"Don't use custom modules; stick to only contrib modules that are adequately maintained. Or, if your site requires custom code, make sure the developers you hire know to limit their code to only accessing APIs marked as stable."
In other words, changes may happen between Drupal 8.0 and the Drupal 8 LTS. If you build you own modules or use poorly supported custom modules, watch carefully in case updates cause problems.

Wait, doesn't this all sounds very familiar?

Yes, this release cycle is very similar to those adopted by Joomla and Typo3 amongst others.
This release cycle is one form of Semantic Versioning which is adopted by many products: http://semver.org.

Saturday, February 22, 2014

Show Drupal Users Their Own Content

If you have multiple content creators on your site, you may want to make their life easier.
One way that you can help is by providing a list of the content they have created.
There are advanced ways to do this, such as using the Workbench module, but in this tutorial we'll show you an easy way to provide a list of each user's content.
The only module that you need to do this is Views:http://drupal.org/project/views.
  • Get started by going to Structure > Views.
  • Click Add new view.
  • Enter a View name.
  • Choose to create a block.
media_1386106465094.png
  • Click Continue & edit.
  • Find the Relationships area on the right-hand side and click Add.
media_1386106565625.png
  • Search for and choose Content: Author
media_1386106599828.png
  • Click Apply (all displays) twice.
  • Find the Filter Criteria area on the left-hand side and click Add.
media_1386106701331.png
  • Choose User: Current.
[Note] In Views 2, this option was available without adding the relationship first. Now, you must make sure the relationship is added.
media_1386106784320.png
  • Click Apply (all displays).
  • Set Is the logged in user to Yes:
media_1386106839544.png
  • Click Apply (all displays).
  • Click Save in the top-right corner.
If you want to test that you've set up your block correct, try this test:
  • Click Add next to Fields.
  • Search for and choose User: Name.
  • Click Apply (all displays).
You'll now be able to see the preview below. You can make sure that each content comes from the same author.
media_1386106993040.png
If this is correct, you can click Cancel to discard your changes.
You can now go and publish your block via Structure > Blocks.

Display Suite and Views Together in Drupal

Display Suite is one of our very favorite Drupal modules.
We love how easy it is for even new Drupal users to control their content layouts with Display Suite.
In this tutorial, we'll show you how you can use Display Suite together with Views. This allows you to create complex pages, controlling both the output and layout, without knowing any code.
  • Go to Structure > Content types and click Manage Display next to a content type.
  • Unless you change it, you're going to be redesigning the "Default" view mode for this content type.
media_1386614981920.png
  • You'll see the Display Suite options at the bottom of this screen.
media_1386614119733.png
  • Choose the Select a layout option. In this example, I choose Two column.
media_1386614143932.png
  • Click Save.
  • The fields can now be placed into Left and Right regions to reflect the two column layout:
media_1386614450017.png
  • Click Save to complete the Display Suite changes.
  • Go to Structure > Views and edit the view that you want to use with Display Suite.
  • In the Format area, click the Show area, as shown below (note that Display Suite doesn't work with all Views formats)
media_1386614212718.png
  • Choose Display Suite as an option
  • Click Apply (all displays)
media_1386614259728.png
  • Choose the options you want for Display Suite. The most important setting is the view mode - make sure you select the same one as did at the start of the tutorial.
media_1386614295059.png
  • Click Apply (all displays)
  • You should now see that your two column layout has been applied to your view:
media_1386614486586.png

4 Social Sharing Modules for Drupal

If you don't give your site visitors an opportunity to share your webpages, you're missing out on an opportunity for others to hear about your great content.
Drupal has several modules that allow you to add Facebook, Twitter, Linkedin and other social buttons.
In this blog, we're going to introduce you to four different options for adding social sharing to your Drupal site:
  • Service Links
  • Social Share
  • AddThis
  • AddToAny

ServiceLinks Module

media_1386198659455_1814f30195a25737958403ee9188e8ac.png
There are so many options available in this module, we could do a full blog on just this one. But this is about comparing so let's cover the basics.
  1. Download and install https://drupal.org/project/service_links.
  2. Enable the Service links module and at least one of the Service links services modules that shipped with this module. I enabled Widget services.
  3. Configure at admin/config/services/service-links. This is where you decide the type of node that can be shared and if you want the links at the bottom of the node).
  4. Select the widgets (Facebook, LinkedIn, etc) here admin/config/services/service-links/services.
  5. Configure widgets here admin/config/services/service-links/widgets.
  6. If you want the buttons in a block, visit the blocks admin page and configure either/or the node block or the block designed to allow non-node pages to be shared.

AddThis Module

media_1386199961392_cacca17d067e0c66ec70066905411881.png
This module taps into the Addthis.com service. You don't need an account to make this work.
  1. Download and install https://drupal.org/project/addthis.
  2. Enable AddThis and AddThis Displays.
  3. Configure at admin/config/user-interface/addthis. This is where you select the social network services you want to make available.
  4. Add an AddThis field to the content types if you want the link to appear in the content type.
  5. Manage the display to make the icons to show and hide the label.
  6. If you want the buttons in a block, visit the blocks admin page and configure the AddThis block. This will share the non-node pages.

AddToAny Module

media_1386200595480.png
This module has the fewest options but it's easy to set up.
  1. Download and install https://drupal.org/project/addtoany.
  2. Enable AddToAny.
  3. Configure for all content types at admin/config/system/addtoany. The screenshot shows the button in the Link variable but you can include where "Bookmark/Search ..." is located. This module does not appear to give you the option to choose which networks you want users to be able to access.
  4. If you want the buttons in a block, visit the blocks admin page and configure the AddToAny block. This will share the applicable nodes and the homepage. It will not share non-node pages.

Social Share Module

media_1386201073294.png
I like the default buttons that come with this one.
  1. Download and install https://drupal.org/project/social-share.
  2. Enable Social Share.
  3. Configure at admin/config/content/social-share.
  4. Configure networks and label (if you want one) on each content type in the Social Share vertical tab.
  5. If you check the box to make a block, it will be automatically placed in a region ... at least that's what happened in Bartik. It showed up in the Header region. Configure the block to set the networks. FYI, the block recognizes non-node pages.