Mark Royko + Associates

Chicago Web Site Design

Our design process considers the every aspect of your site, from easy navigation, to search engine optimization. Whether it's clean or ornamental, your site will look great and function perfectly.

Production

From online magazines to ecommerce, we can build you a site that is rock solid, easy to use and extremely affordable.

Web Site Maintenance and Service

At MR+A, we've got your back: After you're site is complete, we'll be there for service and support whenever you need us.

Blog

When Twitter Makes Sense

twitter64.pngLately I've been asked a lot about the value of adding Twitter feeds to small business websites. While the service offers amazing potential, keep in mind that as this is being written, the most followed Twitter feed in the world belongs to Ashton Kutcher. Does your business have anything in common with Ashton?

The answer to that question depends on the type of information you present, the demographics of your followers and your overall commitment to making it work. This extra effort—along with some signs suggesting that Twitter is nearing the end of its growth phase—is almost enough to recommend skipping the whole thing. But hold on: Like any other marketing program it's value is all in your hands...

Drupalcon Ticket Contest

Drupal Modules (www.drupalmodules.com) -- the truly useful module review site, is sponsoring a content to win tickets to the upcoming Drupalcon in San Francisco. Just visit http://drupalmodules.com/articles/drupalcon-2010-ticket-contest and enter now for your chance to win.

Theme Taxonomy Terms As Links

Taxonomy terms in Drupal are usually displayed by printing out the $terms variable in the node template. This is great in most cases, but once in awhile you'll need to isolate one or two of these terms and output them as separate individual links, rather than as part of the main list.

(Take, for example, a case where you create a vocabulary based on story authors, making each author a term. This is a really useful way to organize archival content, but you probably don't want the author's name output on the same line as the story's other tags.)

There are several solutions to this puzzle. Spend some time looking at the suggestions found here —http://drupal.org/node/133223 — to see a few of them. If you don't have time to sift through all that try the following solution, which is adapted from code on the page just referenced.

One note: You'll need to know the vocabulary ID of the term you are referencing, so use Devel to find the taxonomy vocabulary id. Then add this function to your template.php file:

function your-theme-name_taxonomy_links($node, $vid) {
  if (count($node->taxonomy)){
     foreach ($node->taxonomy as $term) {
       if ($term->vid == $vid){
          $thelink = l($term->name, taxonomy_term_path($term));
          return $thelink;
          }
        }
    }
}

Now, just create a new node template file (of course, this should be specific to your content type, ie node-story.tpl.php), and add the following:

<?php print your-theme-name_taxonomy_links($node, $VID); ?> //$VID is the id of the vocabulary you want....

Of course, you'll need to remove the 'terms' variable, and probably output whatever remaining terms are left in a similar fashion, but that's a quick way to do it.

Using the Mollom PHP class on ordinary forms

Mollom is a highly effective spam filtering service that can protect almost any web form from spam with a sophisticated image and audio captcha. It's quite useful, in large because it's a centralized service that constantly monitors and learns from spam attacks, making it responsive even when spam bots change their tactics. It also provides an interesting set of results so that you can monitor the spam attacks (and defenses) employed on your website.

While the service is generally found on Drupal-based web sites–one of the principals of Mollom is Drupal's founder Dries Buytaert– it can be used on almost any other system, including Wordpress, Joomla and several others. It can even be used with generic PHP forms.

But while activating Mollom on other CMS systems is generally just a matter of installing a module or plug-in, getting it to work on a in straight PHP form is a little (but not much) more complicated. Here's how to make it work with regular PHP/HTML forms.

Formatting the Date Popup

Once in awhile, you'll work on a Drupal problem that takes forever to figure out, then find the answer hidden in plain sight. (Sitting right there. Laughing at you.) Oh look: Here's one now. I was using the date popup widget in a module form field and wanted the fancy calendar pop up, but just needed the month, day and year, not the time, etc.

Of course, I was too sophisticated and lazy to look it up, so I struggled with it for way too long. To save anyone else some time, here's how it's done: Explicitly set the date format in PHP syntax, then assign that within the element array. Couldn't. Be. Simpler. (Take a look at http://drupal.org/node/292667 It's right there in the comments in the sample code.):

  // Provide a format using regular PHP format parts (see documentation on php.net).
  // If you're using a date_select, the format will control the order of the date parts in the selector,
  // rearrange them any way you like. Parts left out of the format will not be displayed to the user.
  $format = 'Y-m-d H:i';
 
  $form['date2'] = array(
     '#type' => 'date_select',
     '#title' => 'select a date',
     '#default_value' => $date,
    '#date_format' => $format
 
 ... (etc)

Read that again: Parts left out of the format will not be displayed to the user.

So, basically, all you have to do is remember to set the format. In my case, the format would just read, 'm-d-Y'. That drops the time format field.

Drupal 6 WSOD with CSS Optimization On

The patch link I entered into this article was wrong or is no longer active--I've replaced it below, so if you're having trouble, try the new link instead. BTW: The error I'm describing here seems to only affect Zen themes--at least those are the only sites where I've seen this happen. I think that Zen is prone to this error because it uses so many style sheets -- not totally sure about that but, Zen is a real hassle to develop for in any case, especially when it comes to developing for IE. Now I know that a lot of people use Zen without incident, but come on--isn't it time to at least consider switching to Blueprint? I'm telling you, it's soooooo much easier.

After a recent server upgrade at Pair Networks, several Drupal sites we host there began to experience unexpected behavior – specifically the dreaded White Screen of Death.

There's a well document series of steps to follow during WSOD troubleshooting–Drupal's reference page (http://drupal.org/node/158043) tends to provide the answer in most cases. But this time, it was something entirely different. The usual suspects weren't even in the same neighborhood. (Memory: fine; htaccess: fine; Cache Tables: clear; DB: great. Modules: nothing to report.)

We were running the latest round of Drupal 6 (at the time of this writing, D6.14), but hadn't changed anything or added any new modules. One interesting clue: When CSS optimization was turned off, the sites functioned fine.

Enter the D6 common patch found at http://drupal.org/node/444228 . As it turns out some code needed for ie mac 5 was causing the problem. This code causes an error on FreeBSD 7.1-RELEASE-p4. Good God.

Anyway, this patch http://d6.drupal.org/files/issues/common.inc-56-d6.patch solved the issue on every site I've found it on. (Try this instead http://drupal.org/files/issues/common.inc-56-d6.patch ) Basically, it replaces a regex pattern that chokes Drupal during css compression. I think that this particular patch isn't perfect, because there has been some modifications in the discussion group, but it works for me. And considering that I haven't seen an IE mac 5 visit on any site I've run in the last two years, I'm just fine with it.

Drupal Modules for Newspapers

One of the things I like best about Drupal is that it offers a tremendous variety of modules that can take it from a relatively basic CMS to a heavyweight news publishing platform with just a few simple clicks of the mouse. I also like that there's a rather active communtity discussing and evaluating these modules, even keeping an archive of the best extensions to use in different news publishing situations.

Today provided a great example of these two traits working together. At the moment, I'm working on a fairly large magazine migration to Drupal, and was just thinking about how to achieve one of the publisher's requirements, when an email showed up saying that the Drupal Newspapers Group updated their list of recommended modules for newspapers. (The new list adds a few additional modules to the mix and removes a couple of others.)

While on its surface the list is just a set of modules, if you followed it closely, it would be an instruction manual for creating a newspaper web site. Download the modules found here and you have almost everything you need to put together your own CNN.com.

I do have a few gripes with the list: It's a little thin when it comes to multimedia and embedded content. I'm also a little bit skeptical of a few other modules. (For example, I don't recommend Search 404 for performance reasons, when you can install CustomError instead. Nik from Kineta Systems has a great post about this very topic. I think that IMCE is kind of a mess from a user interface perspective, too.)

Overall, however, it's a pretty clean list--definitely worth a look if you need to extend the functionality of core Drupal to a new publication site.

Ubercart is Ubercool

Having reviewed dozens of different shopping carts, installing at least three different systems, and even having written a complete shopping cart from scratch, I can tell you that hands down, shopping carts are the most challenging options for site engineers, managers and owners. Sure, in the grand scope of things, there are much harder things to install on a website. But just in terms of day-to-day complexity, ecommerce is the winner. From inventory control to SEO, to payment gateways and customer management, nothing else online offers as many details to manage day after day after day.

That's why the shopping cart you choose to install is so important. There are dozens of them out there, and it's amazing how functionally limited some of them are.  Many have terrible user interfaces, others have gigantic learning curves. Some are easy to use, but forget about some critical detail--say, inventory control or payment gateway integration.

That's why I'm so excited that Drupal has Ubercart, a system that's awfully close to being perfect, and in my mind, the single best open-source option for anyone looking for ecommerce on their web site.

Canned Themes: Why Bother?

Drupal Garland - High Five!Drupal Garland: High Five!

One of the common knocks on Drupal–in my opinion a valid one–is that out-of-box it's ugly.  That's because a basic installation defaults to "Garland,"  a theme that somehow manages to deftly combine a boxy layout, baffling lack of visual hierarchy, and bland 1996 blue color palette into a single theme that almost works, but never really quite makes it.

While there's work happening right now to replace Garland as Drupal's default theme, if you were really in a bind you could always install one of the other pre-made themes available on Drupal.org. 

But still. Unless you're really in a time crunch, or just don't care, the question I always have when I browse the theme project pages is, why bother?

Three MR+A Sites Rated Most Valuable

Three websites created by Mark Royko + Associates were ranked among the top 20 sites providing public interest news in Chicago. The sites, Catalyst Chicago (8); District 299 (15); and the Chicago Reporter(16) received the ratings from the Community Media Workshop.  

Syndicate content