Recent posts about Code and Coding
What we’re thinking about here at Raised Eyebrow these days. You can subscribe to our blog by RSS, or sign up for email updates.
-
Date handling differences between PHP versions
December, 7 2012 CommentsAs part of an assignment in a Drupal course that I'm giving a UBC this fall, I asked the students to develop a small module that would create a block and output how many days there were until Christmas. This is a relatively simple task as it involves two Drupal hooks and a little bit of date manipulation.
As the students worked on the module it became clear to me that there were two ways in which to handle the date calculation part, that is it could be written in PHP version > 5.2 or in PHP version < 5.2.
DateTime class in PHP 5.2
PHP 5.2 introduced the DateTime class and with it an number of Date manipulation methods.
-
More automation with Drush shebang shell scripting
October, 24 2012 CommentsLast weekend our dev team attended the Pacific Northwest Drupal Summit. We had a blast, we nerded out about Foundation and we learned a lot (especially about SCSS and Compass). We were taking furious notes and we can expect some big changes to come to our Cogito Foundation theme in the coming weeks.
We also did a presentation where we took a website from design to build to theming to launch in front of a live audience in 45 minutes. People said we were crazy (and the jury is still out on that one) but it worked like a charm and the demo gods were with us.
-
Design Patterns Updated for Foundation 3
September, 5 2012 CommentsIt's no secret that we love Zurb's Foundation here at Raised Eyebrow and version 3 has brought with it all kinds of amazing goodies that make theming and prototyping a breeze.
In a previous post I described some responsive design patterns that can help you think about layouts on various device sizes. These patterns have now been updated to use Foundation3 as well as some neat little updates to make things pretty and show you how it all works.
You can see the updated design patterns here.
-
Displaying Drupal Context regions in Node templates
July, 25 2012 CommentsTheme regions in Drupal are normally output in the Page template (page.tpl.php) in a format similar to this:
-
Nice taxonomy term separators in Drupal 7
June, 20 2012 CommentsHave you ever wanted to add a separator like a comma ',' between the output of taxonomy terms?
When you output a list of terms in a view on Drupal you get something like this:
Topics: Drupal WordPress Development Design Process
So what do you think the topics are? "WordPress Development" "Design Process", or is it "WordPress", "Development", "Design Process"? You can see where I'm going with this. Wouldn't it be nice to add a separator of any kind to make this easier to read? I created a module that adds a Display handler to the Term reference field that allows the output of a separator. It also allows the addition of a separator at the end in the event that you want to separate multiple vocabularies.
-
Tab-tastic!
June, 13 2012 CommentsWe use the infinitely awesome Foundation framework here at Raised Eyebrow for everything from Interactive Wireframing to creating mobile responsive sites.
We've also been using the amazing Quick Tabs Drupal module by Katherine Bailey for a few recent Drupal builds. This module comes with 3 options for rendering tabs, all of which are completely satisfactory and can be styled in whatever way you see fit. However, because we're using Foundation and want to make the most of what it does for tabs, I wrote a quick module that implements the Foundation tab framework into the Quick Tabs module.
-
LocalTunnel
April, 25 2012 CommentsThis is a post in a series about some new tools we've been folding into our workflow here at Raised Eyebrow.
I'll give you a scenario: You've got a client who needs a change NOW but wants to vet the change before it goes live.
You could fumble around with a middle-man external sandbox server or send them a screenshot but chances are you've probably got their site running on MAMP or XAMPP or just plain Apache on your machine. It would be totally simple to make the change on your own box and then you wouldn't need to trip around FTP and SSH trying to get it somewhere they can see it.
Enter LocalTunnel, a ruby script and service that can expose a single port on your machine to the outside world temporarily.
I wrote a blog post on my site about the experience and the particulars of setting it up but the way it works is simple:
-
Responsive Design Patterns
April, 25 2012 CommentsA while back Colin sent me a link to a blog post by Joshua Johnson about responsive design patterns. What’s a responsive design pattern you ask? It’s a mockup that helps us plan out how our sites are going to react on various display types and resolutions. Since we’ve started using Foundation all of our sites behave in basically the same on smaller devices: that is, columns become rows and we hide some elements.
Our newly deployed site Internet Hall of Fame is a good example of a complex-looking theme with a very basic, very out-of-the-box responsive behaviour. Notice the menus and the logo in particular:
-
Building the DataPublic DataSet Feature
March, 20 2012 CommentsWe recently launched a Drupal distro called DataPublic. I mentioned in the announcement blog post that it was probably the largest codebase we had worked on at Raised Eyebrow, and that's accurate. The number of custom modules, contrib modules and themes used was definitely up there with some of the largest sites we've built for clients.
-
Using oEmbed to deliver video thumbnails in Drupal
February, 14 2012 CommentsWe've gone to great lengths over the past few years to create a smooth workflow for allowing clients to insert video on their Drupal sites. We're currently working on a Drupal distribution which needs a really straightforward way for embedding video, one that can be achieved by any type of user.
When we first meet with clients we give them two options for video:
- Upload a video file, and an image to use for a thumbnail in listings
- Use a third party service such as YouTube and upload a thumbnail image for listings
1. Upload a video file and a thumbnail image
There are many modules available to allow this to happen.