Drupal News

Phase2 Technology: OpenPublic & Drupal: Join us for a Great Webinar!

Planet Drupal - Tue, 26/02/2013 - 6:07am
I am very excited to participate in the an OpenPublic webinar hosted by Acquia this Wednesday, with my Phase2 public sector parters in crime, Greg Wilson, and Karen Borchert. Our goal for OpenPublic this year is to celebrate and highlight what can be build with OpenPublic and Drupal and how we can nurture this growing community of users.
Categories: Drupal News

IXIS: A New look for New Teachers in 2013

Planet Drupal - Tue, 26/02/2013 - 4:12am

We have recently launched a revamped site for Times Education targetting newly qualified teachers with the NUT.

New Teachers is a core asset of Times Education, providing teaching tips, resources, online live advice chat and the latest job vacancies for new teachers.

Ixis have worked with Times Education for 4 years, providing development and consultancy support to a range of sites including assets for headteachers and the provision of careers guidance for schools. We also provide a hosting and support infrastructure that ensures the sites are secure and performing especially under heavy traffic loads at peak times.

read more

Categories: Drupal News

Bluespark Labs: New in Drupal Rooms

Planet Drupal - Tue, 26/02/2013 - 4:00am

We’ve been keeping busy since our last update on Rooms! We’ve just released Rooms RC2 and are readying for a V 1.0 release before we meet up for DrupalCon in Portland.

Please download and test, as we will not be adding any new features for 1.0, just cleaning up and fixing bugs. We’re very close!

New functionality recently added:
  • Flexible availability search with group size and children
  • Revamped room selection to allow the selection of add-ons on room booking
  • Added drag and select dates in calendar and assign status to them rather than using form
  • Cleaned up the inquiry forms
  • Made it easier to customize
  • Fixed some minor bugs

We’ve also refreshed the rooms branding, including a redesigned logo:

We'll be working to extend this rebranding to the drupalrooms.com site.

Also, we’ve been focusing on UX.  We’ll make small fixes to the existing module but also spend time thinking about the bigger picture. We’re currently working on wires that incorporate UX best practices. Contact us for ideas/opinions on UX!

Longer term goals:

As soon as we can, we plan to develop Rooms distributions within the accommodations market. Of course, all the tools will remain open source, and users will be able to download and install packaged hotel web sites.  Several themes will be available.

We want to continue to foster an ecosystem of people using Drupal Rooms and develop optional subscription services to them beyond what Drupal Rooms does. The first service we plan to offer is linking room availability with big online hotel reservation sites--with the added benefit that the hotel owner will retain his/her purchase data (and commission money), not the OTAs.

Later, we might expand this functionality into more widespread travel sites or other types of bookings (ticket purchase, tour packages, cooking classes, etc). We've even had some inquiries on how Rooms could be used within hospitals.

We believe that this first version of Rooms will offer the most complete, feature-rich, and flexible Drupal-based hotel booking solution available.

Let us help with your Rooms implementation from back end customization to front-end themeing. We’re happy to work directly with clients or in partnership with other devs. Contact us!

Get involved in Rooms!

With over 25,000 downloads and over 300 sites reporting using Rooms, we know people are excited about Rooms - a powerful Drupal module to handle hotel bookings but the basics of a Drupal Hotel CMS that is both flexible and user-friendly - meeting the real needs of hotel owners. So let’s talk Rooms!

  • Come see us at Drupalcon Portland at our stand or in our BoF.
  • Help us make Rooms better and better as we work toward V1 release. [Comments/feature requests: http://drupal.org/node/1897010]
  • If you are a hotel owner or hotel website builder get in touch - we want to talk with you! We need your market experience to make sure Rooms has everything you need to make your business stronger.
  • Learn more about Rooms here.
Tags: AnnouncementsDrupal RoomsDrupal Planet
Categories: Drupal News

Matt Grasmick: Introducing Devit

Planet Drupal - Tue, 26/02/2013 - 2:04am


You have a live website and you need to copy a fresh version of the (live) database onto your local machine for development. Next, you need to run through one or more of these rote tasks:

  • Disable Drupal core caches (page cache, block cache, CSS & JS optimization, etc.)
  • Sanitize user data
  • Update Drupal's file system paths (public, private, tmp directories)
  • Enable email rerouting
  • Update logging and error level settings
  • Re-configure a contrib module. E.g., Secure Site (enable, set permissions, guest accounts).

Does this sound familiar? If so, I have good news! I've created a module that will help you automate that process.

Devit allows you to select or create tasks that should be run when your database needs to be deved. You can initiate these tasks via an administrative page, or via Drush.

Devit comes with a submodule that will provide you with the basic tasks, but it also provides an API that allows you to create your own tasks! Ideally, various contrib modules will be packaged with their own Devit tasks. For example:

  • Secure Site could have a Devit task that enables secure_site and sets default permissions, passwords, etc.
  • Advagg could have a task that disables all of its fancy features.
  • Features could have a task that performs a features revert and enables the Features UI module.
Choosing & executing Devit tasks

There are a few ways to choose and execute the selection devit tasks that you'd like to run.

  1. The devit_ui sub-module provides a user interface that allows administrators to choose and execute Devit tasks (image above).
  2. Your own, custom devit tasks can be defined with a default status of TRUE—these will run when your site is deved via Drush.
  3. A selection of Devit tasks can be defined in a devit.settings.php file. This option allows you to easily define a set of Devit tasks that are unique to your development environment. These settings will supersede the default status of your tasks, and the Devit configuration stored in your database. Must be executed via Drush.

This file must be placed in your site directory, e.g., /sites/default. It contains a simple, flat array keyed by task names:

// Set whether a task should be executed when Devit is run. $tasks = array( // Key rows by task name. 'clear-caches' => TRUE, 'update-file-paths' => FALSE, );

Here's a quick example of deving your site via Drush!

$ drush devit Please enter the new password for all users [password]: new_pass Set files directory path [sites/files]: new_files_dir Files directory path changed to new_files_dir. [success] Site ready for development! Defining your own tasks

Devit provides an API that works much like the Menu API. The hook_devit_tasks() function allows you to define your own Devit tasks, and gives you the familiar framework to specify details like title, description, task callback, user access callback, file includes, etc.
Here's a quick example:

/** * Implements hook_devit_tasks(). */ function yourmodule_devit_tasks() { $tasks = array();   $tasks['disable-caching'] = array( 'title' => t('Disable core caching features'), 'description' => t('Disables page cache, page compression, block cache, and CSS & JS optimization.'), 'task callback' => 'yourmodule_disable_caching', 'access arguments' => 'administer site configuration', );   return $tasks; }   /** * Disables core caching. */ function yourmodule_disable_caching() { variable_set('cache', "0"); variable_set('block_cache', "0"); variable_set('preprocess_js', "0"); variable_set('preprocess_css', "0"); variable_set('page_compression', "0"); } Wrap Up

This module is still very much in development, but I'd like to gauge the level of interest in this tool. Would you use it? Do you have any ideas to contribute?

You could say things like:

  • "I want to help you!"
  • "Great idea, but you should consider..."
  • "Matt, this is a terrible idea because...".
  • "This module is like a beautiful snowflake."

Thanks!

7.x, devify, drupal, development, drush
Categories: Drupal News

Palantir: Share Your Dreams

Planet Drupal - Tue, 26/02/2013 - 1:37am

At their essence, dreams are an abstraction. But dreams—and hope—are also at the origin of all social and political movements. These movements foster change and progress, which are tangible and concrete. The transformation of dreams into realities is reliant upon action, yes, but also upon having the bravery, and the platforms, to share one’s dreams.

There are few dreams as revelatory as those of Dr. Martin Luther King, whose resonant speeches continue to teach citizen activists about the tenets of nonviolent means for advancing global social and political movements. The year 2013 marks a significant milestone in Dr. King’s legacy: the 50th anniversary of the March on Washington and King's “I Have a Dream” speech. The King Center is commemorating this watershed moment in history with year-long events and new initiatives meant to actively engage and inspire future generations.

One such initiative is the addition of the “Share Your Dreams” feature on The King Center website, on which Palantir.net led the technical development as a continuation of our work on the site launch just over one year ago. The feature enables people from all over the world to not only contribute to an archive of aspirational messages but also to create connections between and be inspired by people on the other side of the world. Before even its public launch which is to occur in the coming weeks, “Share Your Dreams” has inspired more than 3,800 submissions which came in both via the website and via handwritten messages shared at event pop-up booths and populated by site administrators.

Working with a talented team of players including C&G Partners, Microstrategies, and most importantly The King Center and their generous sponsor JPMorgan Chase, Palantir helped create a multidimensional site feature which includes a submission and approval system, visualization of content through cloud and map displays, rotation of featured content, and a search system. The feature, in and of itself, was the result of a dream to aggregate dreams.

The milestones around Dr. King’s legacy coincide with other important historical milestones including the 150th anniversary of the Emancipation Proclamation and African American History Month. Pay tribute to these by sharing your dreams, sharing with your children to give voice to theirs, and sharing with your friends and loved ones to radiate hope to our global community and raise awareness about nonviolent ways to promote social change.

Categories: Drupal News

Evolving Web: Ottawa's First Ever DrupalCamp a Success!

Planet Drupal - Tue, 26/02/2013 - 1:10am

Ottawa held its first DrupalCamp on February 22-23rd. The camp included a summit about Drupal for government, a codesprint, and sessions. Being in Ottawa, the themes for the camp included the Drupal Web Experience Toolkit (WET) distro and adoption of Drupal by the Government of Canada. The WET distro has been adopted by many government departments, and the camp provided a venue for people to discuss progress of and the direction of the distro.

read more
Categories: Drupal News

TimOnWeb.com: Dropbucket.org - Drupal Snippets Repository is Launched!

Planet Drupal - Tue, 26/02/2013 - 12:45am

I've been doing Drupal for last six or seven years and tried lots of ways of storing snippets. I used internal capabilities of IDE's (like snippets in Eclipse or code templates in Netbeans), I stored them in notepad, evernote, used lots of different downloadable snippet managers and stuff.

But there always were two needs which I couldn't satisfy with these approaches: I wanted snippets to be stored online (so I didn't lost them when I format my HDD or uninstall IDE) and I wanted to share my drupal snippets in a dedicated place, where drupalers gather.

We Drupal people, we love to share, this is in our blood and this is an underlying power which drives Drupal community, do something and share with others! So why not to share with our snippets? I believe every of us has loads of different chunks of code which we use on a daily basis, we need to store them, we need to share them. That's why I created dropbucket.org - Drupal snippets repository, a place where you can put your little drops of drupal code and fill the snippet bucket.

Read on about Dropbucket.org - Drupal Snippets Repository is Launched!
Categories: Drupal News

Dries Buytaert: Code freeze and thresholds

Planet Drupal - Tue, 26/02/2013 - 12:42am

As of Monday, February 18, Drupal 8 feature completion phase has officially ended. Since December 1, the original code freeze date, we've managed to add numerous awesome features that were previously in-progress, such as:

  • WYSIWYG with CKEditor
  • In-Place Editing
  • Entity Reference Field
  • Date and Time Field
  • Revised content creation form
  • Tour module to offer step-by-step help
  • API support for Multilingual configuration
  • Revamped and far more usable UI for configuring translatable entities and fields
  • A RESTful API for entity CRUD in Drupal core
  • Support for Views to be output in JSON, XML, or other formats made available by contributed modules
  • Important under-the-hood improvements to allow for native ESI/CSI/SSI caching support in Drupal.

There are also a handful of features that were RTBC by Feb 18, but not quite ready for commit. They are still undergoing consideration. All things considered, I'm glad we extended the code freeze.

What happens now?

We now enter the "clean-up" phase of Drupal 8, where focus turns to refactoring of existing subsystems, better integrating features, and improving the consistency and coherence of the existing functionality. While APIs can and will still change as this coherence shapes up, contributed module authors are nevertheless encouraged to start porting their modules now, as there is still time to influence and fix APIs and the overall developer experience in Drupal 8. This will become much harder as we get closer to code freeze.

So ... REALLY, what happens now?

In the course of adding all of the great features we've added so far to Drupal 8, we've accumulated some technical debt and are currently well over the issue queue thresholds for Drupal core. We roll a release candidate of Drupal 8 when there are 0 critical bugs and tasks remaining. Our over-arching goal should therefore be to reduce the number of threshold issues over time.

At the same time, there are a lot of small, non-destabilizing features that would make Drupal 8 better. Especially for the kinds of iterative improvements that we would allow into 8.1 or 8.2, it doesn't make sense to hold those up until then, if we're able to get them into 8.0 without it delaying the 8.0 release date.

To help with this goal, catch and I have discussed a plan for allowing some features to continue to be committed to core up until RC1, providing we are under thresholds. To help guide us towards release, we plan to reduce the critical task/bug thresholds by one per week, starting the week of code freeze:

  • July 1: 14
  • July 8: 13
  • July 15: 12
  • September 2: 5
  • September 9: 4
  • September 16: 3
  • September 23: 2

September 23 is the week of DrupalCon Prague, and our goal would be to come out of the conference with a first Drupal 8 RC by fixing the last two critical bugs and two critical tasks (or however many there actually are) at the sprint. :-)

However, there are some caveats:

  • Features can't require any new major/critical follow-ups, as that would impact the timing of release. In general, this means no new "big" features, as those tend not to be possible to accomplish without some fairly large follow-ups needed (e.g. Responsive Layout Builder, Project Browser, a new core theme, Symfony Form API). These kinds of issues will likely be moved to Drupal 9.
  • Primarily, this means small, self-contained, iterative improvements that we'd be willing to backport to Drupal 8 (see http://groups.drupal.org/node/210973).
  • Committer attention will generally be prioritized on tasks/bugs first, rather than features.

For now, we've decided to leave the major bugs/tasks threshold at 100 throughout release, and not tie them to the release date trigger for Drupal 8. I will re-evaluate this as we get closer to release.

What isn't bound by thresholds?

We obviously want Drupal 8 to ship as a coherent product, so a major focus will be around better integration of existing features. For example, work required to get the Symfony pieces of Drupal working well with blocks and enabling ESI/CSI/SSI caching. Turning administrative pages into Views so that they can be better tuned for the task at hand. Completing conversions of major APIs such as Twig, new Entity API, CMI, and so on, to fix rough edges such as the inability to translate/in-place-edit node titles.

General guidance on what constitutes a task or a feature is available at http://drupal.org/node/1181250. As we work through the list of these integration items, some features may be recategorized into tasks. At the same time, some issues currently categorized as tasks go beyond strictly integration and polish and will be descoped or recategorized as features.

Kudos!

While we still have a lot of work to do, I want to pause and give a sincere thanks to each and every one of the 1,077+ contributors to Drupal 8 so far. You've all done absolutely amazing work and helped establish Drupal 8 as a far more usable, flexible, designer-friendly, future-proof framework for all of us to use for the years to come. Now let's band together and get our baby polished up and out in the world for everyone to enjoy! :-)

Categories: Drupal News

LevelTen Interactive: Don't Lose Your Assets In a Redesign (part 2)

Planet Drupal - Tue, 26/02/2013 - 12:36am

In part one of this series, I talked about the importance of properly transferring the value you have built in your existing website. The first step of this process is to conduct a content and SEO audit of your existing site. In this post, I will talk about what to do with that data.... Read more

Categories: Drupal News

Web Omelette: 15 Beautiful Responsive Themes for Drupal 7

Planet Drupal - Mon, 25/02/2013 - 10:30pm

I’ve been looking around lately for some nice looking premium responsive Drupal themes and I have to say there are some beautiful ones out there. So I decided to share 15 I found look particularly nice.

Categories: Drupal News

Acquia: Drupal How-To: Keep on top of news and developments

Planet Drupal - Mon, 25/02/2013 - 9:36pm

If you’re new to Drupal you maybe haven’t noticed yet. Things more fast in Drupal. One of the mottos is: “The Drop is always moving”. It can be hard to find out what new tools and methods are becoming popular and where the action is. Good thing is, there’s lots of great sources with a high signal-to-noise ratio.

Categories: Drupal News

flink: Lightness of Leaflet displays the brilliance of Google Maps in high-res

Planet Drupal - Mon, 25/02/2013 - 9:10pm

We can be a little cheeky at flink. Last year we wrote on these pages an article titled "27 reasons not to use Google Maps". Drawing from a variety of tile providers, it show-cased 27 alternatives to the by now rather stale look & feel of the Google-anno-2006 map.

The article and the maps are still there. Still generated using the lightweight, mobile-optimised map rendering library Leaflet JS and its Drupal companion modules Leaflet and Leaflet More Maps.

But we've added something: Google Maps.

Yep, you read that correctly. We now call the article "27 reasons not to use Google Maps… and 2 to do so".

What are these 2 ? First, we realised that it was very easy to extend Leaflet More Maps, so that the lightness of the Leaflet API can now be applied to Google map tiles, without having to use or download anything from the slightly heavier Google Map API. All these maps are rendered via the smaller Leaflet JS API.
Second, while we were at it, for those lucky enough to read this on a high resolution screen, we implemented Google's high-dpi tile set.

Want to know how it works? Let us explain that another time. For now, if you have a Retina® or similar display, just compare and contrast for a second the standard and high-dpi versions of the Google roadmaps shown side-by-side on this demo page. See how much tighter and easier the fonts are to read? And how at certain zoom levels the almost furry-looking webs of streets appear sharp and fine like highly strung hairs?
Brilliant!

Thanks Google Maps. You're back in the good books ;-)

If you know of any providers serving up high-dpi versions of their map tiles, let us know and we'll add them to Leaflet More Maps for all of us to enjoy.

File under:  Planet Drupal
Categories: Drupal News

2bits: Abuse Drupal Best Practices at your own peril: Poor Performance

Planet Drupal - Mon, 25/02/2013 - 3:13pm
In the Drupal community, we always recommend using the Drupal API, and best practices for development, management and deployment. This is for many reasons, including modularity, security and maintainability. But it is also for performance that you need to stick to these guidelines, refined for many years by so many in the community.

read more

Categories: Drupal News

Mark Shropshire: Setting up Memcached on a Mac for Local Drupal Development

Planet Drupal - Mon, 25/02/2013 - 3:00pm

When developing Drupal applications on my Mac, I like having access to the same tools I use on servers. This allows me to test for possible conflicts and issues, while evaluating performance impact. I recently decided to look at getting Memcached going on my Mac since we use it on servers at Classic Graphics. Memcached is a memory-based caching system for speeding up web applications by storing chunks of data. Drupal and PHP can leverage Memcached to assist with performance.

Below is a bit about what I learned through the process of getting this going in my local development environment.

I am using homebrew and homebrew-php as the base for my local development setup. If you want to checkout the details of my setup, see my brewStack docs.

Setup the memcached service
  • Installation
    $ brew install memcached

    • The following command will show all memcached options.
      $ memcached -h
  • There are several options to run memcached after the initial installation.

    1. Run memcached from a terminal session.
      $ memcached
    2. Run memcached as a daemon.
      $ memcached -d
    3. Use launchctl to start memcached at login and keep it running.
      • Copy the provided launchctl plist file to ~/Library/LaunchAgents. I like keeping all of my launchctl plist files together.
        $ cp /usr/local/Cellar/memcached/1.4.15/homebrew.mxcl.memcached.plist ~/Library/LaunchAgents/
      • Load the memcached plist file.
        $ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist
      • You can stop the memcached service with the following command.
        $ launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.memcached.plist
      • If you drop the “-w” from the previous two commands, memcache will not load automatically when you restart your Mac. This may be the way you want to run memcached so it doesn’t take up system resources when you don’t need it.
      • The following command will show you if the memcached service is loaded in the launchd system. If you get a line returned, it is running.
        $ launchctl list | grep memcached
Setup the php-memcache extension
  • Install php-memcache so PHP can communicate with your memcached service.
    • The installation command below requires homebrew-php.
      $ brew install php53-memcache
      Note: If you are running PHP 5.4, you can change “php53-memcache” to “php54-memcache” in the command line above.
Setup Drupal to use memcached for caching
  • Install the Memcache API and Integration module. Your Drupal instances will need this module to save its cache data to memcached.
    • Install and enable the module.
    • Details on usage and installation can be found here and here.
    • I have been using the following settings in my setings.php file with success.
      $conf['cache_backends'][] = ’sites/all/modules/memcache/memcache.inc';
      $conf['cache_default_class'] = 'MemCacheDrupal';
      $conf['memcache_key_prefix'] = 'something_unique';
    • You can optionally enable the memcache_admin module to view memcache statistics at /admin/reports/memcache.

Note: If you have any issues with the memcached cache clearing, you can restart the memcached service.

Additional Resources Blog Category: DrupalMac var switchTo5x=false;stLight.options({publisher:'dr-4334ed90-d702-124d-3358-aea68cdffdd9'});
Categories: Drupal News

IXIS: Drupal Sprint Weekend Getting Closer

Planet Drupal - Mon, 25/02/2013 - 9:40am

Drupal 8 needs as much prodding along as it can get to make the anticipated late summer launch in 2013.

With the launch in mind the next worldwide sprint weekend is coming up just after the London DrupalCamp weekend - on the 9th & 10th of March. Yes Mothering Sunday is also on the 10th in the UK so make sure you don't forget those ladies in your life inbetween git pushing code.

The global Drupal event calendar Drupical is doing a nice job of keeping a record of the sprint events coming up over the next few months.

read more

Categories: Drupal News

Code Karate: Drupal 7 Smart Crop module

Planet Drupal - Mon, 25/02/2013 - 7:42am
Episode Number:  115 Post Topics:  Drupal Contrib Drupal 7 Image Handling Drupal Planet

The Drupal 7 Smart Crop module is a Drupal module that provides an Image Style action that provides more intelligent image cropping.

In this episode you will learn:

  • How to create a new Drupal image style that uses the SmartCrop action
  • How to create a new Drupal image style that uses the Scale and SmartCrop action

Episode sponsored by Drupalize.me

DDoD Video: 
Categories: Drupal News

Mike Kadin: The Module Off Challenge #4 Complete!

Planet Drupal - Mon, 25/02/2013 - 2:16am

Cross-Posted from The Module Off Blog

We've finished up another challenge here at The Module Off! This challenge asked you to solve a problem with producing change notifications in rules:

The Challenge

Ever want to have rules send you change notifications via email? What if you only want the email to show the differences between the old and the new? Rules doesn't have a simple or structured way to get the difference between two entities. Your mission is to fix that. For instance, let's say you've implemented a help desk ticketing system in Drupal where a support ticket is a content type. When someone updates a ticket in Drupal, (i.e. set priority from low to high), you want to send an email to the ticket's assigned user showing them the change. You don't want to send the entire ticket over again, and you don't want to have to make a million different rules with individual conditions for the individual fields.

Winner: e0ipso!

e0ipso put together some great integration between the rules and diff modules. He added a new rules action to compute the difference between two entities, and then you loop over the differences and do whatever you'd like with them. You could stick them in an email, create a heartbeat news-feed-style entity out of the tokens, whatever you'd like! Definitely check out the solution and download the module. Here's his screencast showing the module in action and a bit about how its coded.

Next Up: Node.JS

The next challenge at The Module Off has a simple title: Do Something Cool with Node.JS. We're excited to see what real-time integrations you can create with the amazingness of Node.JS. So give this challenge a whirl! There's some free WebEnabled hosting at stake!

Categories: Drupal News

The Module Off: The Module Off Challenge #4 Complete!

Planet Drupal - Mon, 25/02/2013 - 2:13am

We've finished up another challenge here at The Module Off! This challenge asked you to solve a problem with producing change notifications in rules:

The Challenge

Ever want to have rules send you change notifications via email? What if you only want the email to show the differences between the old and the new? Rules doesn't have a simple or structured way to get the difference between two entities. Your mission is to fix that. For instance, let's say you've implemented a help desk ticketing system in Drupal where a support ticket is a content type. When someone updates a ticket in Drupal, (i.e. set priority from low to high), you want to send an email to the ticket's assigned user showing them the change. You don't want to send the entire ticket over again, and you don't want to have to make a million different rules with individual conditions for the individual fields.

Winner: e0ipso!

e0ipso put together some great integration between the rules and diff modules. He added a new rules action to compute the difference between two entities, and then you loop over the differences and do whatever you'd like with them. You could stick them in an email, create a heartbeat news-feed-style entity out of the tokens, whatever you'd like! Definitely check out the solution and download the module. Here's his screencast showing the module in action and a bit about how its coded.

Next Up: Node.JS

The next challenge at The Module Off has a simple title: Do Something Cool with Node.JS. We're excited to see what real-time integrations you can create with the amazingness of Node.JS. So give this challenge a whirl! There's some free WebEnabled hosting at stake!

Tags: Drupal Planet
Categories: Drupal News

Myplanet Digital: Launching With Zero Update Hooks

Planet Drupal - Sun, 24/02/2013 - 11:59am

The SmartCentres project was built using an "installation profile" development strategy.

For those who are not familiar with it, the brief summary mentions a cleaner, leaner codebase resulting in a more stable development process that is reproducible from team member to team member. Many Drupal teams are using this process and this is fantastic step forward.

The Custom Config module can be found on github and aims to build on top of the "installation profile" development strategy.

1) A faster way to update.
hook_update_N is a great place for database alters, data migration, or other larger tasks. In our workflow, however, we've been using hook_update_N to execute single lines such as module_enable('some_module') or variable_set('some_var', 123). This leads to install files being way larger and uglier than they should be. "Run Install Hooks", and "Run Post Install" are introduced to replace the need for hook_update_N. Hitting the "Run Install Hooks" or "Run Post Install" callback pages will use the module's own custom_config_module_implements function to find hooks and install files only from our custom or features modules. In order for this to happen, custom and features modules must use the folder structure convention of modules/custom or modules/features. But, all other contrib install hooks are ignored, so we're free to safely hit the "Run Post Install" page without worry of contrib modules.

2) Helper functions.
If you're creating or updating blocks, running queries, or adding terms, Custom Config is there to help. We've got a small handful of hooks you can implement to do most of these setup tasks. Checkout custom_config.api.php to find out how to implement these.

3) The ever exciting post-install phase.
Block modifications, queries, and terms are all executed after the entire site is built. Using hook_init and a custom variable, the module is able to tell if this is the first time a page is being hit after installing. This is important if you need to ensure that features modules are installed and have properly setup their respective blocks, vocabularies, or some other requirement is met. Also, using hook_postinstall you can run any commands after ensuring that the entire site is installed and configured.

4) A place for custom configuration.
From time to time, a project requires a custom configuration form. The question eventually pops up, where does this page live? There's never a single good answer to this, custom_config tries to help by creating a menu item where custom configuration forms should live. Also, that page has two tabs by default "Run Install Hooks", and "Run Post Install" which simply serve as callbacks.

5) Drush integration.
If you're into drush, and I don't know why you wouldn't be, then you'll be happy to hear that both callbacks to run the install and post-install hooks are available as drush commands: drush cc-ri and drush cc-rpi

So, the next time you're starting a project as an installation profile, give custom_config a look over, and think about how it might help you!

 

Categories: Drupal News

Matt Grasmick: Introducing Writer: A Drupal blogging theme for developers

Planet Drupal - Sun, 24/02/2013 - 8:45am


My friend and co-acquian, Bryan Braun, recently released a new, beautiful, minimalist blogging theme on Drupal.org called Writer. I'll let Bryan make the official introduction:

"The story is quite simple. I am a front-end developer who blogs. I searched the Drupal theme repository, but I was unable to find a blogging theme designed specifically for developers. So I made one.

This theme was designed using three driving principles:

  • Brutally simple design
  • Fantastic typography
  • Support for code snippets

These principles guided me through the tradeoffs and helped me make various design decisions. Let's get into the details..."

For more information, take a look at Bryan's post on his blog, or visit Bryan's live demo of the theme.

If the pictures aren't enough to convince you to click that link, reflect on Bryan's closing words:

"There are many great Drupal developers who continue to use Garland or Bartik (the default Drupal themes) as the theme for their blog. These themes are fine, but they were never designed to be used for a blog (not to mention that some would say their overuse has made them tacky). I don't blame them too much... the alternative options are often bleak. Sometimes when I browse themes at Drupal.org, I feel like I'm browsing the web in 1994.

We developers deserve better."

Looks like my site might need an upgrade soon! Does yours?

7.x, drupal, theme, theming, blog
Categories: Drupal News
Syndicate content