Drupal: Restoring core comment title permalinks in a Zen Subtheme

I was scratching my head after trying to troubleshoot a template problem for a few hours today; I was building a Zen subtheme for a site that had, until now, been using Garland for it's styling. In this subtheme, I wanted to have comments display with a similar look to Garland, and I especially wanted automatic permalinks to comments, referenced by a comment number:

Comment template - zen removes linked comment number titles.

I looked through comment.tpl.php, and my template.php file, as well as zen's template.php file, but couldn't find anything related to the $id variable, which is used to build the numbered permalink. After opening up Devel themer, I found that there was a call to _zen_preprocess_comment(), and that was the likely culprit...

To restore these comment numbers/permalinks, you will need to grab core's TEMPLATE_preprocess_comment function and place it in your subtheme's template.php file. (This is an easy fix... if you'd like to get more advanced, you can hack the code to do other more Zen-like things, like print 'first' and 'last' classes for comments).

Be sure to change TEMPLATE to the name of your theme!

From the Catholic Media Conference (in LA)

It looks like @iJimCoyle is tweeting from the Catholic Media Conference in Louisiana this week. Found today on his Twitter stream:

New Media & New Evangelization: 5 Ways to Make a Difference (from Sr Rose Pacatte FSP)

  1. Become mindful media consumers by watching (doing) media together and talking about what you experience.
  2. Use (mainstream) media in your teaching.
  3. Become a media producer & encourage students & people w/ whom you share faith to "make media."
  4. Make media the subject of evangelization, preaching, and catechesis.
  5. Become proactive advocate for media productions that reflect Catholic social teaching because these are human, humane, & Gospel themes.

Sounds great... but where is the significance for 'new media?' At a time when our news media is bleeding like never before, hurting for money and looking to find a solid path for working online in the midst of the traditional web, Twitter, FourSquare, Facebook, etc., we need to be more specific in our goals for new media use in the Church, especially by Catholic publications.

Stupid Flash – Making Menus Appear Over Flash Video/Content

If you are using mega menus, like we use on, then you need to be careful when posting Flash content to your website; if the content is anywhere around one of the mega menu flyouts, then the flash content will cover the menu in certain browsers (notably, IE and older FireFox versions).

To fix this, add the following code to your flash object embed:

Inside the <object> tags, with your other <param> tags: <param name="wmode" value="transparent">

Inside the <embed> tag, with the other value:key pairs: wmode="transparent"

Set a View's Context Inside an Organic Group

A very simple way to allow a view to display as if it were a page in an organic group on your Drupal site: Simply paste the code below in your view's Header or Footer, using the PHP Code input format.


Note: the node ID inside node_load() must be set to the group into which you'd like the view to display. To get this to function perfectly (as of OG 2.1), you might need to apply the patch in this issue on Group theme doesn't display on Views that take group as an argument. (Otherwise the group's custom theme might not get set).

There are some alternative methods to getting views to display inside groups, but this is a quick and easy solution.

Don't Neglect Your print.css file!

I just spent a few hours working on making a better print.css file for the Archdiocese of St. Louis' website, and, imho, it was time very well spent.

In a meeting just last week with the St. Louis Review staff, I noticed that three different people on staff had printed out pages from, and those printed pages looked like junk. I had neglected spending much time with the Archdiocese's print styling (in a print.css file) when I originally designed the site, and I decided it was time to work on it a bit.

I first hid all non-essential elements (graphics, search, navigation, sidebars), then worked on styling the main body of the page a lot nicer. Now, it prints relatively well across Safari, Chrome, FireFox, and Internet Explorer. However, there's a weird bug in FireFox that causes some pages to print with a blank leading page, then with cut-off content on the second page.

Online vs Printed Layout

At least it looks pretty :)

I think you'd be surprised how many people print out articles and pages from your website—especially if your site is heavy on written content. It's a good idea to cater to them just as you would to mobile readers and those using less-than-ideal browsers (<cough>IE</cough>).

Google's New Open Font Library

Reposted from Life is a

Today Google announced they'd help advance web typography by hosting open-sourced fonts on their CDN, and by giving the code to easily embed fonts on websites on a new website, the Google Font Directory.

It was amazingly simple: just copy the <link> code and paste it in your template's header, then set any element on your page to use the Google-provided font(s). I started using OFL Sorts Mill Goudy TT, and I like the look (except for the lower-case y, which seems to be cut off).

(The code simply adds an @font-face declaration via a Google-hosted CSS file... I wonder if it's legit to self-host the CSS and font file; I haven't read through the terms and conditions yet).

I'm thinking of using this library for a few other projects on which I'm working. Much easier than Typekit, and it doesn't require any javascript or flash overhead, like alternatives such as Cufon and sIFR do. (Source).

Post Photos to Your Drupal Site from the iPad

Over on my personal blog, I write about how to post photos from the iPad to ImageFields on a Drupal site. I intend to do so quite a bit this weekend on my visit to New York City (this will be my first trip without a laptop—yikes!).

I basically use Dropbox as a middleman to get a URL for the photo, which I can pass to FileField Sources so my Drupal site can use the photo. Unfortunately, for the time being, Mobile Safari doesn't support file select fields :-(

Vatican Announces Upgrade of Network Infrastructure

It looks like the Vatican is going optical! Here are the details, from CathNews Asia:

The Vatican City State has announced a major upgrade to its communications infrastructure including fibre optics links to other Vatican sites including the pontifical villa at Castelgandolfo.

The Governorate of the Vatican City State and Telecom Italia announced the signing of a contract for the installation of the first nucleus of the “Integrated Communication Infrastructure for Vatican City State”, VIS reports.

This consists in a broadband IP network capable of voice, data and video transmission within the territory of the Holy See and Vatican City State, a communique says.

The plan includes, among other things, fibre optic cable links between the ten main extraterritorial sites including the Pontifical Villas at Castelgandolfo and the radio stations in Santa Maria de Galeria.

Creating a More Friendly 404 Page

I finally had a little time today to update the Archdiocese of Saint Louis' 404 Not Found page. Drupal has built-in 404 handling, so I simply created a new node, added in the content of the 404 page in the node body, and went to the 'site information' page to set 404 errors to that node.

Archdiocese of Saint Louis - 404 Page

In redesigning the page, I wanted to fulfill two goals:

Our Designs Have to Reflect Christ

Interesting Quote from the blog 'Vitamin C':

How we do this through design is the big question. Our designs have to reflect Christ. We do this through demanding people’s interest, respect, and most importantly their time through our designs. Christ deserves the best designs possible. I don’t know if I speak for all people, but for me to take Church retreats, events, or other ministries serious I want to see that reflected in their designs. If the design is lacking then (in my mind) the retreat must be lacking as well. Just like you wouldn’t go to a bank that was tattered and looked unprofessional, I don’t want to invest my time in something God related if it comes across as “not current” or lacks effort.

If we don't design our websites and software to be as user-friendly, beautiful, and stunning as possible, then we do a disservice to those who use them.

Of course, as I've said on my own blog before, modern Church architecture, design, music, etc. seems to be just as sad as modern Church web design. It stinks. Let's help make that change.


Subscribe to RSS - blogs