Drupal 7 Bootstrap + Display Suite


Looking for instructions on how to combine the ease of Bootstrap theming with the non-codey goodness of Display Suite?  Try this: it’s a slideshow presentation, geared toward beginners: http://tinyurl.com/bootstrapdisplaysuite


Why kittens are professional….


As a disclaimer, you might want to bounce this piece of advice off a more experienced colleague before letting it out into the wild.

Yes, this is another FITYMI post.  If you are getting into Drupal, you’ve probably needed to create test accounts, test images, test posts, etc.  Usually, of course, the Devel module will be your best friend for these testing purposes.  Devel can create (and delete, thank goodness) tons of test info and provide the information that lets you know what’s doing what in your database.*

But what if you just need one or two ongoing users, posts, pictures, etc, and don’t want to go through the hassle of using Devel?  Or, what if you’re on a staging site, and opening the Devel can of whoopass is just. too. much. ?  That’s where placekitten comes in!

Yes, kittens are now professional.  Well, professionalish.   Basically, you shouldn’t usually use your own name and likeness in a test site, and no one is going to mistake a kitten picture for actual site content (unless the site is about pets, and then I can’t help you).  No one (almost) will mistake the name Cat Kittenstein for an actual user.  Instead, I’ve found that clients were pretty pleased to see that testing was happening, and tickled that cute kittens suddenly became part of their not-so-voluntary website committee work.

So have at it!  PlaceKitten has pictures of kittens in all sizes, shapes, and even b/w.  One thing PlaceKitten can’t help you with, though, is fake names.  So I’ve created a starter list here:

  • Cat Katze
  • Mia Meow
  • Gatito McKitten
  • Felina Mao
  • Kitty Chaton


In all seriousness, though, do run the use of any fake names, accounts, posts, etc, by the responsible party.  And then proceed with caution (and fun!).

*I realize that description is kinda vague.  But there are other great posts (y incluso un video en español, yay!) on the subject, not to mention the actual Devel project page.

A couple of modules that will make you look like a badass


Working with seasoned developers means I learn a lot, and it means I feel like a complete noob pretty often.  Buuut, there are those times when I’m able to whip something out that makes even a seasoned pro a little impressed.  While I definitely advocate trying to use core as much as possible, here are two modules that have recently helped me FITYMI (fake it till you make it):

  1. Double Field – Yes, this module is really simple.  It does just what it says.  It literally just combines two fields into one.  The choices about which fields you can combine are pretty limited, but they are pretty powerful.  I have used it for phone number extensions (though there’s probably a better way to do this), and Q&A type use cases.  In some ways, it’s a module I’m never sure when I’ll need or how often I’ll need, but I when it’s there, it’s bound to come to the rescue at least once.
  2. Conditional Fields – This module is also pretty obvious. Still, it’s an excellent thing to have in your toolkit.  It’s perfect for use cases like “Other” options, etc.  I can’t count the number of times I’ve used this one now.  No matter what project you’re working on, there’s always a “But what if I don’t wanna…?” waiting to happen.

I won’t go into just how knowing about these fields made me look like a badass.  Suffice to say, I’m lucky I work with people who are willing to go, “Oh, right! Duh!”  And I think that’s pretty common in the Drupal community. 🙂

Did you already know about these two modules?  If so, tell me about your top two FITYMI modules!

D7: Map blog feeds to Organic Groups (OG)


In a previous post, I proposed the idea that asking questions on stackexchange and stackoverflow is a good idea for Faking It Till You Make It (FITYMI).  The flip side of that is, of course, answering questions.  Since I recently answered a Drupal 7 question on  Stack Overflow, I thought I’d share it here.

FITYMI tip: Answer questions on stackoverflow and stackexchange



(I’m paraphrasing here) How do you map Feeds to Organic Groups? Say you have Organic Groups (OG) on your Drupal 7 site, and you want to give each of them their own blog(s).  Feeds is great, but it doesn’t allow you to map a reference group (patch time!).


What you do, essentially, is assign all incoming feeds a default value, and then match that value to the one you put in your content type.  Having the same field and field value shared among the feed, the content type, and the OG links them together, and makes it possible for you to relate them in Views, etc.  I’ll admit this method is a little bit scrappy (as in, not exactly a hack, but not super elegant), but it definitely works!**

The Details:

1. Install both Feeds and Feeds Tamper.
2. Create a content type to receive the feed entries.
*I’ll call this new content type “Blog post”
3. Add a text field to BOTH the new content type AND to your OG form.
*I’ll call this field “Feed nickname”
4. Fill in the field with the appropriate feed nickname on your OG form.
*I suggest making this a one-word nickname
5. Under Structure>Feeds Importers>Edit>Node processor settings, select “Blog post” as the chosen bundle to receive the feed. Click save.
6. Under Structure>Feeds Importers>Edit>Node processor mapping, add a new mapping with “Blank source” as the source and “Feed nickname” as the target. Click save.
7. Under Structure>Feeds Importers>Tamper, scroll to the section “Blank source-> Feed nickname” and click “add plugin.”
8. Choose the plugin called “Set default value” and set the default value to your chosen feed nickname. Click save and make sure the plugin is enabled. Click save at the bottom of the tamper form.
9. Add the feed importer as usual, under yoursite.org/import

Whew, that was long-winded.  Buuut, I hope it helps someone!  It took me hours (multiple of them! and many cups of coffee!).  Hopefully it will only take you 1 (or less! yay!).

**Notes: I’m assuming you’re working with a Drupal 7 site.  I’m assuming you do know how to use Feeds, but that the OG component is what’s confusing you.  (For basic instructions on installing and using Feeds, try LevelUpTuts. They have a good series of videos on Feeds of all kinds.) I’m assuming that you don’t want to do any coding.  I’m assuming that you’re importing an RSS feed (though it should play well with other types of feeds, too).  Also, I haven’t tried it, but I’m assuming this process would work for assigning blogs to individual users, too.  You’d just put the Feed nickname field on the user form.  Let me know if you try it!

New category: Fake it till you make it!


Sooo I’m creating a new category – “fake it till you make it”.  Let’s call it FITYMI (I think I’ll pronounce it fitoomie).  These are things which can help you get more into the Drupal/open source community.

First few (maybe I’ll expand on their merits and challenges later):

  • Create an account at drupal.org
  • Join some groups at drupalgroups.org (and if you want to sound cooler, call it DGO)
    • Hint: I wouldn’t recommend posting to any of the DGO groups until you get the feel for the group, or until you really, really have something to ask/say.  People are nice on DGO, but (at least in my experience) the groups tend to be pretty businesslike.
  • Join drupal.stackexchange.com  –  This is an excellent site for finding answers to your Drupal questions, or any other coding questions.
    • Warning: If you ask a question on StackExchange and that question (or one like it) has already been asked, there’s a significant chance that someone will point you to the other question and shut down your question.  It’s not a bad thing, but it feels a little crappy.


More to come (hopefully)!

No, I will not date you! Add only the time to a calendar view in Drupal.


Note: This is for a Drupal 7 install.

This is a wholly random post, and will (probably) not be followed up by anything useful. Basically, I’m posting this both so I don’t forget how I did it, and so it might help someone else.

Context:  I was making an event calendar in views, to be used as a block elsewhere on my site.  I chose two fields to show on the event calendar – Title and Date.  The Title field was all good.  The Date field, however contains two parts – the event’s date, and the event’s time.  The time I obviously needed.  The date, however, was already implied, since, ya know, this is a calendar.

Question:  How do I force my date field to show just the time?

Answer:  Create a new date format!

It’s a pretty easy, totally point n’ click, and no coding needed!

1)  Make a new date format.

2)  Make a new date type.

  • Navigate back to the Date  and time page (www.yoursitename.com/admin/config/regional/date-time) and click Add date type.
  • Give it a name – preferably a self-explanatory name.
  • Then, under the Date Format dropdown menu, choose the date format you just created above.
  • Click the Add date type button beneath.  This will take you back (yet again!) to the Date and time page.
  • Click Save configuration.

3)  Give that views thing another shot.

  • Head back over to your view, refresh (save first if you need to!).
  • Try modifying the date field again.  This time, the dropdown menu, Formatter, will have your new format.

4)  Click save.

5) Rejoice.  And maybe get some sleep.

Why I don’t hate Facebook


This post is intended as a bit of a comeback to the anti-social networking rants I keep seeing on Facebook.*  I’m writing in particular about the personal use of Facebook.  While I’ll readily admit that there are downsides to any new technology, for me, the positives of social networking sites for personal use far outweigh the negatives. So here they are:

~Personalities:  My relatives are people?!  This is probably self-evident. Yet, I (and I think a lot of us) never really thought about my elders as being actual people, with flaws, skills, opinions, triumphs, failures, and stories. Granted, I may have been better off knowing about some of the wacky political leanings of some of my loved ones, but I’m willing to know a little too much in order to know them as people.

~Distance: I can’t have dinner with my sisters, or ride the carousel with my godsons. But I can read about it later, and despite the time difference, I have conversations about what went down via comments and instant messages.

~Shyness:  I was already really shy.  Contrary to many of the anti-networking rants, the Internet didn’t make me a social recluse. I was already the chick who brings a book to weddings and ditches parties thirty minutes into the shindig. Forcing face to face contact tends to make me clam up or put on a show. By removing myself somewhat, I can relax, and ease into social interactions via written comments, messaging, etc.

~Think–>Speak (write). We all say things we don’t mean, but, at least for me, I have much more luck explaining myself, being kind, and expressing myself clearly, when I write things out. I edit them. I think about the sources of my opinions, and the context in which they’re being received by those around me. I’m sure some people really don’t think before they hit “Enter,” but I do. And I think a lot of other people do, too.

~Information changes really quickly these days. How many phone numbers do you remember now, as opposed to ten years ago? The number is probably far smaller. People get new phone numbers, addresses, email address, etc pretty often. Social networking sites let you keep in touch, advertise your new info, and make sure that you don’t accidentally leave people out.

~Photos: I have friends and loved ones who hail from countries where internet access and use isn’t as common as it is in North America. One friend, whose parents are elderly, has lived in North America for almost ten years, now. His parents don’t use the internet, and although he calls them every week, he is still in for a major shock every time he visits. Recently, he started mailing them photos of himself every once in a while, but they can’t send photos back. It makes me appreciate the photographic connection I have with my family and friends via Facebook. I see the little moments in their lives, as well as the big ones. In addition, since posting photos to Facebook has become so prevalent, my family members actually take a lot more photos! Their kids will have a better record of their childhoods, too.

~Planning: It’s not easy to sync up schedules with my big family. When I come to visit, it’s rarely for more than a week or so. Thinking of things to do, letting everyone know the whens and wheres — we use social networking sites to facilitate a LOT of this planning. Consequently, when I am in town, I actually get more face time with them than I would if this were not the case!

~Potential new friends.  It’s a pretty common story.  You meet someone new, and you think you might want to be friends.  But either: a) the contact is never made.  Maybe you didn’t get their email/phone, or you forgot for a while and then feel like it’s too late. Or, b) you succeed in making the effort (or responding to their efforts), and then realize that this person is probably not someone you want to spend a whole lotta time with.   As for me, A happens more often than B, but they’re still both pretty common.  Facebook lets me to keep up with a potential friend, to feel out whether or not we might have a connection (or a real disconnect!).  Then I can proceed at a more natural pace.  I can include them in general invites, ask them out for an activity in which we seem to share an interest, etc.

~Branch out with old friends:  I’ve been a denizen of the ‘Net for years.  Some of my closest friendships started online (some people, I’ve never even met face to face!).  However, when I started making friends online, it was because we were in the same Yahoo! Group.  Thus, our friendship was pretty much predicated on our common interest in a given topic.  Facebook has really allowed me to flesh out my friendships, and find a connection beyond our specific shared interest.

~Birthdays: Last but not least, BIRTHDAYS! I have trouble remembering my partner’s birthday, let alone those of my friends, cousins, aunts, etc. Posting a birthday wish on someone’s account is free, it’s easy, and –yep — it’s still genuine. When it’s my birthday, and my wall is filled with well wishes, I really appreciate the warm fuzzies I get. Sure, even without the help of Facebook, I know that these people care about me. That little ping on my wall sure feels great, though.

* (Is using Facebook to hate one Facebook ironic?  Or is it just self-defeating, like using Freud to discredit Freud?).