Skip to Content

Drupal

Deeson: Site configuration strategy (or how to manage your settings.php files)

Planet Drupal - 12 May 2015 - 12:10am

Managing site configuration across multiple hosting and staging environments can get complicated, and if each one of these requires a settings.php file making sure that you consistently apply configuration can be a nightmare.

This is especially true when you start requiring different files at different points – it's very easy to lose track of which setting is where.

A typical example here at Deeson might be a site that's usually hosted on Acquia's platform, but that we need to be able to work locally on (we use VDD for this).

That probably gives you 3 settings.php files: one for your local, one for the live domain name and one for Acquia's staging URLs. We'll also have different configuration for each of these. An example is where both reroute email and shield need to be disabled only on live, if our site has 3rd party integrations then we'll configure different API keys on staging and caching is always on on live.

So, how do we solve this?

In much the same way that we don't create a site-wide views feature, and instead we use a modular approach – for example one feature for news and another for events, we should do the same with our configuration and split it up. We don't do this by environment, but by module. So all the performance stuff together, all the security stuff together etc.

For example, you might have a reroute email file, that could read something like this:

$conf['reroute_email_address'] = "rerouted_mail@example.com"; $conf['reroute_email_enable_message'] = TRUE; $conf['reroute_email_enable'] = TRUE; if (SETTINGS_LIVE_DOMAIN) { $conf['reroute_email_enable'] = FALSE; }

This is clearer and less error prone than the situation that can occur where you can't instantly tell which setting will apply in a given situation. And by coding your conditions defensively you'll improve security.

So it's possible that you might still have those three settings.php files, but instead of adding config directly to them all they do is define the database settings and then do something like this:

// e.g. dev, stage or prod or read from $_ENV['AH_SITE_ENVIRONMENT'] on Acquia. // Master.inc could read this instead of the “scopes” concept? define('SETTINGS_ENVIRONMENT', 'prod') // e.g. local or acquia define('SETTINGS_HOSTING', 'acquia'); <?php // TRUE only on the actual live domain - so any testing domains, including the "live preview" should give this FALSE. define('SETTINGS_LIVE_DOMAIN', FALSE | TRUE); foreach (glob('sites/all/conf/*.settings.inc') as $file) { require_once $file; }

See that glob call? Create files in a new dir – sites/all/conf – like thing.settings.inc and place your config in there, using 'if' statements to react to the different envrionments.

Glob sorts by file name, so prefix each of these files with a number if you need them to be in a specific order, e.g 00-master.inc, 10-reroute-email.inc.

Here are some suggestions for files you might create (all to end in .settings.inc):

  • drupal-defaults (Maybe copy settings.default.php in here and update it keep it in sync with core updates?)
  • master
  • warden
  • shield
  • reroute_email
  • mandrill
  • performance (caching, aggregation etc. Only force these on live, if you must)
  • your-api-here

In this manner we can create sets of default settings php files which are likely to be common across projects. This makes initial setup to our standards and best practice simple. Any deviation from the standards can then be configured and described in the main settings file for the site.

Categories: Drupal

DrupalCon News: Session Submission Live!

Planet Drupal - 11 May 2015 - 9:21pm

With the call for papers officially open, we wanted to take a moment to give you all of the details you should know about sessions: what new and cool tracks we are offering, how to submit an awesome session submission, and how session selection works.

 

Categories: Drupal

Colourizer

New Drupal Modules - 11 May 2015 - 8:13pm

This is a training project for Komosion Drupal training.

Categories: Drupal

Shomeya: Running Your Agency/Tech Company like a Factory is Destroying Humanity: Part 2

Planet Drupal - 11 May 2015 - 12:45pm

In case you missed it Part 1

Very carefully I cut the letters out of the magazines that are strewn across my table. My fingers covered in glue, I lay them out one at a time on a piece of heavy duty paper, a message for the CEO of my friend's company. A message to save humanity:

"Your company is following the startup lemmings off the cliff, do you care?"

-- Anonymous

Every year your agency or startup is throwing away thousands of dollars, because you follow some very bad habits that reward mediocrity and egos. I know because as a CEO of even a tiny company, I've watched you bleed and wanted to hand you the bandage.

At Shomeya I am the CEO and the Project manager, when I fuck up and put my programmer in a bad position I see how it effects his work AND his home life. I feel every late night, and regret every poor choice when I said yes to the client, because I deal with the results.

So I learned to adjust Shomeya to make better choices. And the good news is these choices can scale because they are based on something we all deal with no matter what the size of our payroll; human brains.

Read more
Categories: Drupal

Red Crackle: Adding A Contextual Filter To A View In Drupal 8

Planet Drupal - 11 May 2015 - 11:00am
In this article, we will focus on contextual filters. Initially, we will explore the difference between contextual and regular filters. After that, we will create a view displaying content created by the logged-in user. We will also explore the “WHEN THE FILTER VALUE IS NOT IN THE URL” dialog box and the different options associated with it.
Categories: Drupal

Open Atrium Drive

New Drupal Modules - 11 May 2015 - 10:48am

Google drive integration forOpen Atrium 2.

Submit an Issue or See issue queue

Categories: Drupal

J-P Stacey: When iterating on features can break a Drupal site in development

Planet Drupal - 11 May 2015 - 10:19am

It's generally safe to use Features to maintain and deploy the configuration of Drupal sites, but I'd heard rumours from other developers that, especially during a rapid development process, some phase of featurization could lead to database errors. I'd not seen that for ages until a few days ago, when re-enabling features led to PDO exceptions. Here's what I did, what I didn't do, and how to mitigate this problem in future.

The process I followed: getting a new live database mid-featurizing

I had been working on a feature locally, part of which included adding new fields to a content type. All the additions had been exported into the feature and checked into version control. The features dashboard was showing green "Default" lights all the way.

Read more of "When iterating on features can break a Drupal site in development"

Categories: Drupal

Wim Leers: Making Drupal fly - The fastest Drupal ever is near!

Planet Drupal - 11 May 2015 - 9:45am

Come and join us for a wild ride into the depths of Render Caching and how it enables Drupal to be faster than ever.

The Masterplan of Drupal Performance

Here we will reveal the TRUE MASTERPLAN of Drupal Performance. The plan we have secretly (not really!) been implementing for years and are now “sharing” finally with all of you! (Well you could look at the issue queue too or this public google doc, but this session will be more fun!)

Learn what we have in store for the future and what has changed since we last talked about this topic in Amsterdam and why Drupal 8 will even be more awesome and why you don’t have to wait and can do it all in Drupal 7 right now with the help of the render_cache module (with some extra work).

Get the edge advantage of knowing more

Learn how to utilize cache contexts to vary the content of your site, cache tags to know perfectly when items are expired and cache keys to identify the objects - and what is the difference between them.

Learn how powerful ‘placeholders’ will allow the perfect ESI caching you always wanted and how it will all be very transparent and how you can make your modules ready for the placeholder future.

See with your own eyes how you can utilize all of that functionality now on your Drupal 7 and 8 sites.

Get ready for a new area of performance

We will show you:

  • The biggest Do’s and Don’ts when creating render-cache enabled modules and sites
  • Frontend performance pitfalls and why front-end performance is tied to backend performance more than you thought
  • Why libraries[] are so great and why single CSS/JS files make trouble.
  • Common scenarios and how to solve them (mobile sites variation, cookie variation, etc.)
  • Drupal using an intelligent BigPipe approach

Get to know the presenters

This session will be presented by Wim Leers and Fabian Franz. Wim implemented a lot of what we show here in Drupal 8 and made the APIs easy and simple to use and made cache tags and #post_render_cache a very powerful concept. Fabian has prototyped a lot of this concepts in his render_cache module, introduced powerful Drupal 8 concepts into Drupal 7 and is always one step ahead in making the next big thing. Together they have set out on a crusade to rule the Drupal Performance world to bring you the faster Drupal ever!

Slides: http://wimleers.com/talk-making-drupal-fly-fastest-drupal-ever-nearConference: DrupalCon Los AngelesLocation: Los AngelesDate: May 13 2015 - 02:00Duration: 60 minutes
Categories: Drupal

Drupal Watchdog: VIDEO: DrupalCon Amsterdam Interview: Kieran Lal

Planet Drupal - 11 May 2015 - 9:36am

KIERAN LAL (Technical Director, Corporate Development, Acquia), nabbed outside the Acquia room, talks about the Drupal Organization, movie sound-tracks, and learning Italian – then indulges in a “Hi, Mom!” moment.

Tags:  DrupalCon Amsterdam DrupalCon Video Video: 
Categories: Drupal

Drupal Watchdog: VIDEO: DrupalCon Amsterdam Interview: Robert Vandenburg

Planet Drupal - 11 May 2015 - 9:32am

Lingotek does translation management (whatever that is). As President and CEO, ROBERT VANDENBURG gets to travel to exotic locations like Austin and Amsterdam, and hobnob with the locals.

How many languages does Bob speak? We’ll ask him at DrupalCon LA. Stay tuned.

Tags:  DrupalCon Amsterdam DrupalCon Video Video: 
Categories: Drupal

Tin Can API integration

New Drupal Modules - 11 May 2015 - 8:07am

The Tin Can API project is a suite of modules that provide various points of integration with the Tin Can API/Experience API. The module(s) can be used to track many different types of user interaction such as viewing nodes, clicking links and watching YouTube or Vimeo videos via the Media module. The Tin Can API module can also act as a framework to track custom statements.

The Tin Can API module has been tested and works with the SCORM Cloud LRS and the Learning Locker.

Categories: Drupal

nielsdefeyter.nl: Create a View with Organic Group content

Planet Drupal - 11 May 2015 - 7:08am
If you want to list Organic Group content in a View you must do a little more that just add one reference. The default example is available if you enable Organic Groups. The name of that View is "OG content" (machine-name: og_nodes ). I put it here on the blog because our usecase didn't use Organic...
Categories: Drupal

iterate.: Drupal Open Days 2015

Planet Drupal - 11 May 2015 - 7:03am

Drupal Open Days is the annual Irish Drupal conference. This year we are presenting three talks at the event covering business strategy, UX and development.

Categories: Drupal

Amazee Labs: Kickstart your Career with Amazee Talents

Planet Drupal - 11 May 2015 - 5:04am
Kickstart your Career with Amazee Talents

Today our Group is launching Amazee Talents, a program to win bright minds like you for a 3 month internship at Amazee Labs or Amazee Metrics.

If you have completed, or are about to complete your apprenticeship, higher education or university degree and happen to live in Switzerland, the European Union, the United States or South Africa, then read on.

We are looking for above-average talents in web development, web analytics or online marketing who love to tackle tech problems and want to join our hard working team.

Depending on the available positions and your domicile you will be assigned to an internship in Zurich (Switzerland) or Austin (Texas, USA). The Amazee Group covers all travel and accommodation cost to and at your place of work. 

So, if you want to learn from the best in the field of Drupal development or web analytics & online marketing and be part of an open and creative corporate culture, visit the Amazee Talent program on our Group website.

We are looking forward to your application (scroll down for the talent program)!

Categories: Drupal

Microserve: The importance of being Open

Planet Drupal - 11 May 2015 - 1:11am

Many years ago I started my working life as a trainee tech journalist. Every month the magazine that I worked on was accompanied by a CD-ROM containing dozens of (mostly useless) applications for readers to install on their PCs. As the new boy on the team I remember asking what it meant that some of the products were listed as ‘open source’. “It just means that we can put them on the disc without paying anyone” came the explanation.

I didn’t think about it much at the time, but years later I’ve come to realise that for many people ‘open source’ still just means ‘free’. No doubt that’s one of the most attractive things about open source software, but it’s only half the story. As well as the software being ‘free of charge’ the source code is freely available too, allowing anyone with the right skills to use it, customise it and improve it. Any useful developments can then be donated back to the source code for everyone to benefit from, making it a virtuous circle for those involved.

One of the best ways to illustrate the importance of open source software development is to consider the history of the internet itself. From the TCP/IP protocols, to the concept of hypertext, to the LAMP stack and (some) modern browsers, the internet as we know it relies on royalty-free technologies that have been made openly available over the years for everyone’s benefit. My guess is that the early pioneers of the web weren’t aiming to become millionaires (although some consequently did), rather they wanted to use their new discoveries to make people’s lives better. In the era of internet billionaires and an obsession with intellectual property, it’s important for everyone involved in web-related industries to occasionally remind ourselves that we’re all standing on the shoulders of these altruistic giants.

So yes, open source always means ‘free’, but it means so much more besides. It means thinking about the bigger picture rather than the quick buck. It means having the courage to let other people make your ideas better. It means developing re-usable solutions and not reinventing the wheel. All of this can only lead to better software for everyone.

But why should the principles of open source only apply to software development? If the principles work, then why couldn’t they be applied to other disciplines? When I look at the briefs that land on my desk, I see clients asking for solutions to the same types of problems again and again, which makes me think: “wouldn’t it be great if ‘open UX design’ was a thing, or ‘open business analysis’?” Organisations always think they are unique, but their requirements are often almost identical to others in the same sector.

I recently pitched to rebuild the website of a major county council, which had already done a superb job on the UX and design phase of the project, producing some very focused wireframes and prototypes. Since this great work was funded by public money, it feels right that the documentation could be made publicly available, and potentially save other local councils from spending tens of thousands of pounds to reach similar (probably worse) solutions.

I’m not suggesting one-size-fits-all solutions, rather solutions that can be adapted for each instance and which evolve as we collectively learn more about what works and what doesn’t. By sharing and collaborating more openly the evolution of ‘best practice’ will accelerate, which will benefit everyone as ever-more smart and effective solutions emerge.

And after open UX design, why not open hardware design? Or open pharmaceutical development? Or open product design? I’m pretty sure that ‘open’ movements are happening in all these industries to some extent, but it would great to see them reaching a critical mass and getting a higher profile. Maybe there will come a time when the the Dragons on 'Dragons’ Den' don’t ask “do you own the patent?” but “will you open-source it?”. The benefits for society would be huge.

At Microserve we use Drupal CMS and are very proud to be heavily involved in the Drupal community. Our developers make frequent contributions to the open source project, and we also contribute financially, attend events and are co-organising DrupalCamp Bristol 2015 (buy your tickets now). It’s our way of giving something back to the open-source movement, which has gifted us and millions of others a great way of earning a living. We hope, in our own small way, that we’re making the web, and the world, a better place.

Dan McNamara
Categories: Drupal

Microserve: The importance of being Open

Planet Drupal - 11 May 2015 - 1:11am
The importance of being OpenMonday, May 11, 2015 - 09:11

Many years ago I started my working life as a trainee tech journalist. Every month the magazine that I worked on was accompanied by a CD-ROM containing dozens of (mostly useless) applications for readers to install on their PCs. As the new boy on the team I remember asking what it meant that some of the products were listed as ‘open source’. “It just means that we can put them on the disc without paying anyone” came the explanation.

I didn’t think about it much at the time, but years later I’ve come to realise that for many people ‘open source’ still just means ‘free’. No doubt that’s one of the most attractive things about open source software, but it’s only half the story. As well as the software being ‘free of charge’ the source code is freely available too, allowing anyone with the right skills to use it, customise it and improve it. Any useful developments can then be donated back to the source code for everyone to benefit from, making it a virtuous circle for those involved.

One of the best ways to illustrate the importance of open source software development is to consider the history of the internet itself. From the TCP/IP protocols, to the concept of hypertext, to the LAMP stack and (some) modern browsers, the internet as we know it relies on royalty-free technologies that have been made openly available over the years for everyone’s benefit. My guess is that the early pioneers of the web weren’t aiming to become millionaires (although some consequently did), rather they wanted to use their new discoveries to make people’s lives better. In the era of internet billionaires and an obsession with intellectual property, it’s important for everyone involved in web-related industries to occasionally remind ourselves that we’re all standing on the shoulders of these altruistic giants.

So yes, open source always means ‘free’, but it means so much more besides. It means thinking about the bigger picture rather than the quick buck. It means having the courage to let other people make your ideas better. It means developing re-usable solutions and not reinventing the wheel. All of this can only lead to better software for everyone.

But why should the principles of open source only apply to software development? If the principles work, then why couldn’t they be applied to other disciplines? When I look at the briefs that land on my desk, I see clients asking for solutions to the same types of problems again and again, which makes me think: “wouldn’t it be great if ‘open UX design’ was a thing, or ‘open business analysis’?” Organisations always think they are unique, but their requirements are often almost identical to others in the same sector.

I recently pitched to rebuild the website of a major county council, which had already done a superb job on the UX and design phase of the project, producing some very focused wireframes and prototypes. Since this great work was funded by public money, it feels right that the documentation could be made publicly available, and potentially save other local councils from spending tens of thousands of pounds to reach similar (probably worse) solutions.

I’m not suggesting one-size-fits-all solutions, rather solutions that can be adapted for each instance and which evolve as we collectively learn more about what works and what doesn’t. By sharing and collaborating more openly the evolution of ‘best practice’ will accelerate, which will benefit everyone as ever-more smart and effective solutions emerge.

And after open UX design, why not open hardware design? Or open pharmaceutical development? Or open product design? I’m pretty sure that ‘open’ movements are happening in all these industries to some extent, but it would great to see them reaching a critical mass and getting a higher profile. Maybe there will come a time when the the Dragons on 'Dragons’ Den' don’t ask “do you own the patent?” but “will you open-source it?”. The benefits for society would be huge.

At Microserve we use Drupal CMS and are very proud to be heavily involved in the Drupal community. Our developers make frequent contributions to the open source project, and we also contribute financially, attend events and are co-organising DrupalCamp Bristol 2015 (buy your tickets now). It’s our way of giving something back to the open-source movement, which has gifted us and millions of others a great way of earning a living. We hope, in our own small way, that we’re making the web, and the world, a better place.

Dan McNamara Main Image: 
Categories: Drupal

Propeople Blog: FFW: Our New Digital Agency

Planet Drupal - 10 May 2015 - 11:18pm

Today, I am excited to introduce you to our new digital agency: FFW. Over the past several months, we have been working at Blink Reaction and Propeople to bring the two agencies together under a single unified brand. Through the process, we have reflected on the great successes achieved by the individual agencies throughout our histories. But more importantly, we have come together to define the core vision that will drive our new joint agency into the future.

FFW is a global digital agency built on technology, driven by data, and focused on user experience. We bring together 420 people working across 19 offices in 11 countries, to form a new agency that is a part of the Intellecta Group (listed on the NASDAQ OMX).

We find ourselves in a unique position in the digital agency marketplace as recognized technology experts that also excel in data-driven digital strategy and creative work.

No other agency understands the intersection of technology, strategy and creativity as well as we do.

We are excited to begin a whole new chapter together as FFW. It is a bittersweet moment, as the individual stories of Blink Reaction and Propeople come to an end, but I absolutely can’t wait to see what the future holds for our new agency.

Tags: FFWdigital agencyCheck this option to include this post in Planet Drupal aggregator: planetTopics: Business & Strategy
Categories: Drupal

DrupalCon News: Registration is Open! Come on By!

Planet Drupal - 10 May 2015 - 3:13pm

Registration is officially open!  We will be at the Los Angeles Convention Center until 6:00pm today and will open tomorrow 7:00am!

When you walk down South Figueroa street, you will turn right on 12th Avenue to the entrance of the West Hall Lobby.  It should look like this:

As you get closer you will see the blue carpet, your official cue that you have arrived at DrupalCon Los Angeles!  Welcome!  Enter the doors and we will see you at registration.

Categories: Drupal

Require aliased paths

New Drupal Modules - 10 May 2015 - 12:41pm

Have you ever set-up Pathauto and then thought to yourself, is there any way to block users from accessing content by it's unaliased path?

To put it another way, say that you have a node (node #10) and it has an aliased path of "content/my-super-awesome-page". How do you prevent users from accessing it via "node/10"?

This is a simple module that does just that. Basically, if it detects that the current page has an alias but the page was accessed using it's internal path, it denies access.

Categories: Drupal
Syndicate content


Google+
about seo