Planet Drupal

Subscribe to Planet Drupal feed
drupal.org - aggregated feeds in category Drupal Planet
Updated: 30 min 46 sec ago

Web Wash: How To Setup A Local Solr Server For Search API

Thu, 02/05/2013 - 07:45

Running Search API and Apache Solr just got easier thanks to the latest release of the Search API Solr search module. This module allows you to use Solr as a server backend for Search API indexes. In the latest release (7.x-1.0-rc4) the module no longer has a dependency on the SolrPhpClient library.

In this tutorial I'll show you how to setup a local development Solr server on Mac OS X 10.8.3.

Please note that this tutorial should only be used to setup a development server where you're not worried about locking down Solr. If you want to setup Solr for a production site, then make sure you lock down the server so users can not get access to Solr.

Categories: Elsewhere

Earl Miles: Be careful of what you get on Planet

Thu, 02/05/2013 - 07:01

While Drupal Planet can be a fantastic resource, it can also be a megaphone used when someone has an axe to grind. It's particularly unfortunate when one of those people don't open up comments. Theoretically useful code that comes with an axe to grind should always be suspect to begin with. When the first thing that the author says about the module the code is for is derogatory, it's a pretty good hint to distrust everything that follows.

BlogDrupal
Categories: Elsewhere

Josh Waihi: Drupal 7: Programatically updating Panel panes on node template variants.

Thu, 02/05/2013 - 02:59

Programatically working with Panels in Drupal is a bit of a nightmare. Trying to figure out how to obtain the right panel display and discover the right load and save tasks can be an utter disaster as you try trace code through ctools, page manager and panels itself while trying to understand what a ctools task or handler is or how to load them.

Tags: Drupal PlanetDrupal
Categories: Elsewhere

Drupal Association News: Welcome New DA Staff

Thu, 02/05/2013 - 00:28

I’m very excited to welcome two new members to the DA staff. These new staff members will have an immediate and direct impact on supporting and growing the Drupal community through DrupalCons, global training events and effective communication to the community and beyond. Please help me welcome them!

Personal blog tags: Drupal Associationcommunity
Categories: Elsewhere

Four Kitchens: Magic: Frontend Performance for all themes

Wed, 01/05/2013 - 22:25

Howdy perfers!

This week’s Webperf Wednesday is short and sweet, just like your page loads when you install this new module that enhances any Drupal theme. Magic is a set of frontend performance and development workflow tools for themers. Previously many themes had their own advanced settings — many of which did the same things as other themes, but they all did it a little differently — no more with Magic.

Built by Web Chef Ian Carrico and Sam Richard (of Aurora) with contributions from Sebastian Siemssen (of Omega), Magic was built by the desire to work together to make all themes better, instead of siloing improvements within specific themes.

What’s inside? Performance features:
  • Enhancements to CSS Aggregation
  • Exclude CSS files from being included
  • Option to move JavaScript to the footer
  • Backport of Drupal 8 JavaScript handling
  • Exclude JS files from being included
Development goodies
  • Rebuild Theme Registry on Page Reload
  • Display a Viewport Width indicator
  • Display an indicator with classes applied to the HTML. Useful when used in conjunction with Modernizr
  • Export theme settings

That last one is super important, as it makes Drupal themes a little more DRY. With Magic, you can take your settings from one theme to another — or to another site completely — because they’re fully exportable. Have two different projects, and want similar asset output despite one being Omega and one being Zen? No problem, just export!

Note: the full import process has yet to land, but it’s coming very soon.

If you have an awesome trick that you always rely on during theming, open an issue and propose it to Magic. They’d love to hear from you.

Give it a shot today! Go to drupal.org/project/magic

Categories: Elsewhere

Toronto Website Developer: <h4><a href="http://www.torontowebsitedeveloper.com/drupal-video-tutorials/continuing-ubercart-event-registrations-tutorial-9">Improving Drupal 7 Ubercart Event Registrations - Ubercart Series #2 Tutorial #9</a></h4>

Wed, 01/05/2013 - 21:05
Video of XMGpRr2Z4wU

In this Drupal video tutorial, we cover A LOT of ground as we continue building our event registration system which relies on the Pay Per Node module, making it more user friendly for our customers and administrators.

We cover the following:
1:10 - Using Views and the References module, we create a node reference on the customer's registration page which links to our existing events for the user to select.

3:30 - Using the Auto Node Titles module, we create an automatic node title for registrations so we can hide the field from our customers.

5:00 - We create a custom module to limit the events listed on a registration page to just those a customer has purchased (As an aside, you may want to update this code so that it only lists upcoming events -- you could do this in Views with the Date module).

16:00 - We alter the menu for Pay Per Node to make our menu tabs a little nicer for users.

18:00 - We add a list of registrations on the actual event product for administrators to see who has registered for their event. We also use the Views Send module to allow administrators to email those customers.

25:25 Lastly, with the Calendar module, we create a Calendar to show all of our upcoming events.

Categories: Elsewhere

Toronto Website Developer: <h4><a href="http://www.torontowebsitedeveloper.com/drupal-video-tutorials/drupal-ubercart-event-registrations-tutorial-8">How to Create An Event Registration System with Ubercart - Ubercart Series #2 Tutorial #8</a></h4>

Wed, 01/05/2013 - 21:05
Video of rQbfVBSjB80

In this drupal video tutorial, I show you how to create an event registration system. To do so, we rely on a few modules, most importantly, the Pay Per Node module. Essentially, Pay Per Node allows us to set up a product feature so that when a user purchases a specific product, they are given permission to create a node once the order is complete.

In this tutorial, we set up a new product class, an Event, and using the Date module, associate the event with a specific date. Users can see the event as a product and add it to their cart like any other product. Once their purchase is complete, they are able to log in and fill out a registration form that we created as a separate content type.

This tutorial will walk you through how to set up Drupal and Ubercart to get the basic functionality going. In the next tutorial, I show you how to make the system a little more user friendly to customers and administrators.

Categories: Elsewhere

Toronto Website Developer: <h4><a href="http://www.torontowebsitedeveloper.com/drupal-video-tutorials/drupal-7-template-preprocess-functions-and-tpl-files-ubercart-series-2-tutori">Drupal 7 Template Preprocess Functions and TPL Files - Ubercart Series ...

Wed, 01/05/2013 - 21:05
Video of UOvxCChgSOU

In this sixth drupal video tutorial of this ten part series, we continue with Drupal 7 theming and I show you how to use the template.php and node--product.tpl.php file to create a custom layout for our product pages. This allows us to pass single variables into our Ubercart product pages and render them in a specific order. As a result, we end up with a 3 column layout of information.

Categories: Elsewhere

Toronto Website Developer: <h4><a href="http://www.torontowebsitedeveloper.com/drupal-video-tutorials/how-configure-omega-delta-and-context-ubercart-series-2-tutorial-5">How to Configure Omega, Delta and Context - Ubercart Series #2 Tutorial #5</a></h4>

Wed, 01/05/2013 - 21:05
Video of hEeWNi1YCKs

In this Drupal Video Tutorial, we continuing theming our site and I show you how to configure the Omega Theme, Delta Module and Context Module. In doing so, we walk through the settings for Omega and create a custom Delta configuration for our product page. We then use the Context module to invoke the Delta that we created.

Categories: Elsewhere

Toronto Website Developer: <h4><a href="http://www.torontowebsitedeveloper.com/drupal-video-tutorials/how-create-omega-submtheme-ubercart-series-2-tutorial-4">How to Create an Omega Submtheme - Ubercart Series #2 Tutorial #4</a></h4>

Wed, 01/05/2013 - 21:05
Video of wL4BakaXzsk

In the fourth Drupal video tutorial of this 10 part follow up series on Drupal 7 and Ubercart, we switch gears to start looking at theming. Specifically, we download the Omega theme to create a subtheme theme of our own.

In doing so, we download a few different modules to help out, specifically Omega Tools. The tutorial covers three different methods to create an Omega subtheme for your site; using using Omega Tools, manually creating a subtheme and uploading it and finally, using Omega Tools and Drush via the command line.

Categories: Elsewhere

Toronto Website Developer: <h4><a href="http://www.torontowebsitedeveloper.com/drupal-video-tutorials/how-create-ubercart-coupons-and-automatic-discounts-ubercart-series-2-tutoria">How to Create Ubercart Coupons and Automatic Discounts - Ubercart...

Wed, 01/05/2013 - 21:05
Video of qO7DGyQ7uwg

In this Drupal video tutorial, we install the Ubercart Discount Coupon Module and I show you how to configure it to create general coupons users can use at the checkout, create coupons that are automatically emailed to a user after they purchase a specific product and lastly, to create coupons that are automatically applied to an order based on the number of products in the cart.

Categories: Elsewhere

Toronto Website Developer: <h4><a href="http://www.torontowebsitedeveloper.com/drupal-video-tutorials/how-bulk-upload-products-uc-feeds-module-ubercart-series-2-tutorial-2">How to Bulk Upload Products with the UC Feeds Module- Ubercart Series #2...

Wed, 01/05/2013 - 21:05
Video of HMmzWefTAkk

In this Drupal video tutorial, I show you how to bulk import products into Ubercart using the Drupal 7 Feeds Module and UC_Feeds Module.

To do so, we first need to download and install the modules along with Job Scheduler. Then we walk through how to create an Importer and set up an excel spreadsheet, saving it as a CSV file. There are a couple sticking points in the tutorial that I make sure to point out - specifically, how to make sure you images are uploaded properly and how to configure weights in your spreadsheet.

Categories: Elsewhere

Toronto Website Developer: <h4><a href="http://www.torontowebsitedeveloper.com/drupal-video-tutorials/continuing-your-e-commerce-site-drupal-7-ubercart-1-how-update-drupal">Continuing Your E-Commerce Site with Drupal 7 &amp; Ubercart: 1 - How to Update...

Wed, 01/05/2013 - 21:05
Video of RMcYIDdjdVA

To begin this Drupal video tutorial series on continuing to build your e-commerce site using Drupal and Ubercart, I show you how to update your Drupal site - something I should have covered off before we went live in the first series.

In this tutorial, we begin by putting the site in maintenance mode and then I walk you through three different update methods: updating your site via the website itself using the Update Manager module, manually updating the site by uploading a new version of Drupal core and finally we take a look at Drush and how it can be used to update your Drupal site. Although I mention it a few times in the tutorial, I can't stress enough that you should back up your database and all site files before beginning an update.

Categories: Elsewhere

The Module Off: New Docs Challenge and Our Last Winner

Wed, 01/05/2013 - 18:55
New Challenge!

I was inspired by discussions of Drupal's online documentation on this week's Drupal Easy podcast. The importance of our docs cannot be understated! Thus, our brand new Module Off challenge is centered on Drupal's code docs. Here's the challenge:

Fixing up or adjusting parts of Drupal's code docs is a great way to dip your toe into the wonderfully warm pool of core development. In fact, my first ever core patch was a docs update! It's a great way to learn how to create/submit patches without a deep understanding of the complexities of Drupal's innards. This Module Off challenge asks you to submit a recent commit that you made to help Drupal's core code docs. If you want to make a screencast talking about the process, or showing the code before and after, more power too you! At a bare minimum, to take home this challenge, we'll need a link to the issue, and a brief description of what you did.

Make doc commits all the time? Now's your time to show off! Never worked on core before? Here's your chance to get started. Go to it!

We hope to see some really great submissions! There's an awesomely-free 6-month BuildAModule subscription for the winner!

Previous Challenge

Our last challenge asked you to demonstrate the use of the batch API. Alexander Ross submitted an awesome example of the API's use. If you've never used the Batch API before, the example is amazingly clear, so check it out!

Tags: Drupal Planet
Categories: Elsewhere

Urban Insight: Los Angeles County Museum of Art Offers 20,000 High Resolution Images

Wed, 01/05/2013 - 17:52

This image, called "Shiva as the Lord of Dance", is one of the more popular images on the Los Angeles County Museum of Art's new Collections website. This image of Shiva is one of 20,000 high-quality images of artwork that the museum has made freely available to download and use as you see fit.

Categories: Elsewhere

Aten Design Group: Project Review Wednesday: Comment Sources

Wed, 01/05/2013 - 16:51

There are currently 93 new Drupal contributors awaiting review of their first project. This is a great place to contribute to the community and learn about interesting upcoming projects, for example...

Module: Comment Sources What does it do?

Comments on blog posts and similar stories was one of the things that really drove the "blog revolution" in the late nineties. Websites that you frequented were no longer simply something you read. You might actually get to interact with the author and other people that share similar interests with you. As social networks became more of the norm, though, conversations often moved off site and into these new networks. Other times, third parties like Disqus have added comment frameworks, allowing sites to have a number of advanced features.

Drupal ships with a comments module that allows for a pretty basic representation of social comments, but your site visitors may want something more. And the Comment Sources module takes aim at making it possible to change the comment source from Drupal's built in comments to Disqus or even Facebook. The module currently allows changing comment sources for content types, but may also allow node-based source changes in the future.

Look Useful? Review it!

If you would like to see this module readily available on Drupal.org, you should review it and help make that happen.

Review It

Pro Tip: If you've never reviewed a project application before, you can find instructions for reviewers on Drupal.org and the Code Review group is happy to help more people get involved.

Categories: Elsewhere

Phase2: Implementing an Estimated “Read Time” on Articles

Wed, 01/05/2013 - 15:31

Recently, a client asked that we display an “estimated reading time” (which we’re just going to call “read time” from now on) for their articles. This is a usability feature that is ideally designed to keep the user on the page longer by letting them know about how long it will take them to read the article.

For implementation in Drupal, we decided to use a custom field. The calculation for the read time itself comes from Brian Cray’s blog post on the matter, where you may also find more background information on the subject overall.

The code below shows the field, widget and formatter definitions for the custom field using their respective hooks.

 

// Implements hook_field_info(). function read_time_field_field_info() { return array( 'read_time_field' => array( 'label' => t('Read Time'), 'description' => t('Time it takes to read article'), 'default_widget' => 'read_time_field_widget', 'default_formatter' => 'read_time_field_formatter', ), ); } // Implements hook_field_formatter_info(). function read_time_field_field_formatter_info() { return array( 'read_time_field_formatter' => array( 'label' => t('Read Time Text'), 'field types' => array('read_time_field'), 'settings' => array('read_time_fields' => array('body' => 'body'), 'format_text' => '@m m @s sec', 'word_per_minute' => '200' ), ), ); } // Implements hook_field_widget_info(). function read_time_field_field_widget_info() { return array( 'read_time_field_widget' => array( 'label' => t('Read Time'), 'field types' => array('read_time_field'), ), ); }

The formatter settings provide flexibility for the field display and the read time calculation:

 

/** * Implements hook_field_formatter_settings_form(). * * Allows for customization of the read time calculation. */ function read_time_field_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) { $display = $instance['display'][$view_mode]; $settings = $display['settings']; $fields = field_info_instances($instance['entity_type'], $instance['bundle']); $options = array('title' => t('title')); foreach($fields as $key => $field) { if(in_array($field['widget']['type'], array('text_textarea_with_summary', 'text_textarea', 'text_long', 'text_with_summary'))) { $options[$key] = $field['label']; } } $element['read_time_fields'] = array( '#type' => 'checkboxes', '#options' => $options, '#default_value' => $settings['read_time_fields'], '#title' => t('Fields used to calculate read time'), ); $element['format_text'] = array( '#title' => t('Choose how users view dates and times:'), '#type' => 'textfield', '#size' => 10, '#default_value' => $settings['format_text'], '#description' => t('Enter a string with @m and @s as replacement values. For example: @m minutes @s seconds'), '#weight' => 0, ); $element['word_per_minute'] = array( '#title' => t('Words Per Minute'), '#type' => 'textfield', '#size' => 10, '#default_value' => $settings['word_per_minute'], '#weight' => 1, ); return $element; }

 

Looking at the above code, the first setting allows for selecting which text fields are to be used in the calculation of the read time. This could be useful if your article involves more than just the body field. The ‘format_text’ setting allows for specification of the display format. For instance, enter “@m mins @s sec” and the display will be produce “11 mins 20 secs.”

The final setting allows you to tweak the words per minute reading rate. Maybe the site audience is very bright and their rate is higher.

The custom read time field is currently available as a sandbox module that can be downloaded here:http://drupal.org/sandbox/brenk28/1865774.

Categories: Elsewhere

Dominique De Cooman: Use varnish, xmlsitemap, cron and bash to warm the cache for fast pages

Wed, 01/05/2013 - 10:13
Read more

Warming the cache gives your users extremely fast pages all the time. Using varnish, xmlsitemap, cron and bash you can give your clients very fast pages.

Use varnish, xmlsitemap, cron and bash to warm the cache for fast pagesperformancecachebashvarnishWednesday, May 1, 2013 - 10:13
Categories: Elsewhere

CrossFunctional: An indefinitive guide to Composer in Drupal 8

Wed, 01/05/2013 - 10:03
An indefinitive guide to Composer in Drupal 8Geoffrey

In the past couple of posts, we’ve put several different facets of Drupal 8 under the microscope and discussed how each one is going to change the way you develop for Drupal in the very near future. Now, we’d like to ask a question about Drupal 8 development, one that we believe is going to be quite important in particular for developers who’ve worked within the wider PHP ecosystem.

Read more
Categories: Elsewhere

DrupalCon Portland 2013: Ready, set, go! Jump-start your Drupal with beginner training

Wed, 01/05/2013 - 05:13

Coming to DrupalCon Portland is already a great start to your Drupal journey. You can get started on accelerating your career as a Drupal developer by enrolling in one of our beginner training courses.

It’s never too late to start or to dig deeper on a topic you’ve always wanted to know more about. Whether you want to learn more about theming, site building, or modules, our beginner training will help get you on your way to the Drupal champion’s circle.

Categories: Elsewhere

Pages