Archive for September 2007

Wordpress Howto - Add unique author comment styles to any theme

I love using Wordpress. One of my favorite time-wasters has become flipping through newly-submitted Wordpress themes at places like Weblog Tools Collection (here’s a sample theme post) looking for that perfect theme for my blog. Unfortunately, when I made a list of style elements I liked, not one theme has all the elements I want. So, I started going through my list and decided to add my favorite style elements to any theme. First up - styled author comments.

Styling author comments with a unique look is a great way to allow readers to immediately tell the difference between readers’ comments and an author’s responses. Some popular blogs that style authors’ comments include:

TechCrunch: see the article on Mig33 for a recent example.
techcrunch

ReadWriteWeb: see their ’social graph’ article for a recent example.
readwriteweb

Alex King’s blog: see his article on Google’s sharing service for a recent example.
alexking

I like the extra panache Alex King’s comments have with the gradient, so that’s what I’ll use.

First, while I’ll be showing how to edit your theme’s files to add custom author comment styles, you could do the same with a plugin like Jan Olsen’s Comment Highlighter plugin (which appears to have moved to Google Code). I personally have struggled with plugin compatibility problems (most of which, it seems, unfortunately stem from Google Sitemaps, one of my favorite plugins). To reduce the chance of conflicting plugins taking down the entire site, I started paring them down to just the necessities - in particular, I stopped using any plugin I could easily re-create with some code in the theme files. In my opinion, the five minutes it takes to copy my code between themes when changing is worth saving potentially hours’ worth of troubleshooting time. If you’d rather use a plugin, or don’t have access to edit your theme files, I’m sure Olsen’s plugin is a good one. Otherwise, make time for five minutes’ worth of easy editing and read on.

To begin, we’ll be editing two theme files: style.css and comments.php, which you’ll find in your /wp-content/themes/[theme name]/ directory. First, in comments.php, find the lines that read:

<?php foreach ($comments as $comment) : ?>
<li class=”<?php echo $oddcomment; ?>” id=”comment-<?php comment_ID() ?>”>

Modify the second line to add a unique style if both the comment author name and email address match a particular blog author’s information (make sure it matches what is listed in the user’s profile):

<li class=”<?php if ($comment->comment_author == ‘AUTHOR NAME GOES HERE‘ && $comment->comment_author_email == ‘AUTHOR EMAIL ADDRESS GOES HERE‘) echo ‘authcommenthighlight’; elseif ($comment->comment_author == ‘ANOTHER AUTHOR NAME GOES HERE‘ && $comment->comment_author_email == ‘ANOTHER AUTHOR EMAIL ADDRESS GOES HERE‘) echo ‘authcommenthighlight2′; else echo $oddcomment; ?>” id=”comment-<?php comment_ID() ?>”>

Now we need to add the styles “authcommenthighlight” and “authcommenthighlight2″ (or whatever you name them) to our theme. Since I’m currently the only author on this blog, I’ll just be adding “authcommenthighlight.” First, create your gradient image. I had the best luck making mine 12×48 pixels, and selected two colors from my theme. I used Photoshop to make the gradient, but you can use just about any photo editing software - for that matter, even Microsoft Word can create gradients. If you’re not sure how to create a gradient, here’s some sample tutorials: Photoshop, Paint Shop Pro, Paint.net and GIMP. Here’s what I ended up with, using the top header (#237AB2) and sidebar (#EEEEEE) colors:

Gradient example

Now, add the “authcommenthighlight” style to your style.css, setting the gradient image to repeat along the top of the comment and the background to match the bottom color of the gradient:

.authcommenthighlight {
background:#EEEEEE url(/images/grad.jpg) repeat-x;
}

To kick it up a notch, try modifying padding, margin, borders, font colors and other style elements. Get an overview of additional CSS elements you can modify at DevGuru and W3Schools.

Now you and your authors will each have your own unique comment style that separates your comments from visitors’ comments. Of course, there’s a downside to styling comments by matching author names and email addresses - if someone knows your username and email address, they can leave a comment that receives the unique style. I haven’t dug into the Wordpress hooks enough to know whether there’s a way to code around this problem - anyone know?

Anyone have different methods of adding unique styles to author comments? I’d love to hear them in the comments below.

Thank you for visiting NoShrinkwrap. If you enjoyed this article, check out the related posts below and subscribe to our feed.

4 Tips - Make your PowerPoint slides visually appealing

If you watched the video I put together, you’ll know I’m a little inherently cynical when it comes to PowerPoint presentations. Too often, I find myself subjected to a “I used PowerPoint because I had to” presentation - regurgitated themes, bullet-point summaries and outlines, and forcing too much information onto each slide. Sound familiar?

I recognize, however, there are times when PowerPoint presentations are useful, and there is such a thing as a “good” PowerPoint. I’m in the process of putting together a list of guidelines and suggestions for creating successful PowerPoint presentations for our faculty, which may find their way here as well. As a teaser, here’s 4 tips and examples on how to make your slides visually appealing without too much effort.

1. Mix it up with contrast.
Visual elements in PowerPoint presentations are useful, primarily by giving visual learners an anchor for your ideas. Sometimes, however, visual elements drag audience members’ focus away from ideas you intended to emphasize. Using short phrases and simple high-contrast layouts can help emphasize your idea without disrupting your audience’s focus. For example, the first slide here uses a short phrase for punch, but lacks visual impact. By using a simple high-contrast layout, you can keep the short phrase and short attention lapse as viewers look at the slide, while adding visual impact.

slide1oldarrowslide1new

2. Combine your image and text elements.
Used effectively, white space can be a powerful design element. The first slide below demonstrates a common misuse of white space frequently appearing in PowerPoint slides - placing a photo on a slide leaving large amounts of background border, then placing a text element outside the image. The second slide, without skewing the photograph much, combines the photograph and text elements to present a more pleasing, less jarring slide. The more “pleasing” your slide, the less inclined viewers are to focus on the slide instead of your content.

slide2oldarrowslide2new

3. Use a visually appealing layout.
Take a page from web site layout design. Studies like this one reveal a trend - people tend to read web site content in a F-shaped pattern. According to the study, accompanied by a heatmap illustration I modified:

In our new eyetracking study, we recorded how 232 users looked at thousands of Web pages. We found that users’ main reading behavior was fairly consistent across many different sites and tasks. This dominant reading pattern looks somewhat like an F and has the following three components:

  • Users first read in a horizontal movement, usually across the upper part of the content area. This initial element forms the F’s top bar.
  • Next, users move down the page a bit and then read across in a second horizontal movement that typically covers a shorter area than the previous movement. This additional element forms the F’s lower bar.
  • Finally, users scan the content’s left side in a vertical movement… This last element forms the F’s stem.

F-Shaped Pattern For Reading Web Content, http://www.useit.com/alertbox/reading_pattern.html

Although this study dealt specifically with how viewers read web pages, at least these two broader principles apply to almost any text-based digital medium:

a. Viewers don’t tend to read your page or slide in entirety.
Make your text elements as concise as possible for maximum punch and impact.

b. Viewers tend to scan digital text in a particular pattern.
By placing your text elements somewhere on the F-shaped path, readers may subconsciously find your slides to be more readable, and thus be less inclined to split their focus between reading your slides and listening to your lecture.

As an example, the first slide below uses short points, but follows a common PowerPoint readability mistake: placing an image on the left and text elements on the right. The second slide allows readers to scan text left-to-right uninterrupted by other elements, and places the text elements on the top-bar and bottom-bar primary paths of the F-shape scan pattern.

slide3oldarrowslide3new

4. Make creative use of your backgrounds.
Backgrounds and image elements should enhance a slide. Often, however, presenters select generic themes with generic backgrounds and insert clipart or images that, while perhaps related to the slide content, don’t complement the slide content. As an example, the slides below use a photograph of a classroom to promote professional development and customized seminars related to classroom instruction. The first slide follows a common layout placing the photograph on top of bullet-point text elements, creating a generic, non-memorable slide. By moving one of the bullet points to appear as written on the white board in the photograph, the second slide combines the text and photo elements in a creative way, presenting a unique, more memorable slide.

slide4oldarrowslide4new

Have any tips for creating memorable, visually appealing slides? Share them in the comments below.

Create custom backgrounds for brochures and presentations

Recently I designed a custom brochure for a construction company. The client wanted mostly images with very little text and a professional layout. Clearly, a template-based tri-fold brochure cranked out in Microsoft Publisher was not going to get the job done.

As a side note: I plan on using this and similar techniques to create custom PowerPoint slide backgrounds and theme elements. A PowerPoint presentation’s design should use little text and combine with lecture material to provide visual cues that help students remember key points. The overall look of a PowerPoint presentation can affect a lecture’s success - the more professional and targeted a presentation’s theme and graphical elements are, the more likely students will be engaged and pay attention to the visual cues.

For the client’s brochure, I decided to start with a custom, watermarked background - by choosing the right construction-looking picture and creating a background from it, I could bring the images on each page together for a cohesive presentation. Once I designed a custom background for the images, the rest of the brochure practically created itself.

Before I begin: while I used Photoshop to create these brochure pages, I’m sure other programs like Gimp can be used to reach the same results. Since I work with faculty and students, I’m always on the lookout for open-source (or at least freeware) that can replicate what I do in pay programs; if I find a way to replicate these results in Gimp, I’ll write an addendum.

First, here are the images I used to create one of the brochure pages:

waterford entrance 2waterford entrance 1watermark

And the final result:

residential 3 copy

Since the client is a construction company specializing in building natural rock walls, I wanted a background that depicted boulders but lacked a lot of detail - too much detail would draw focus away from the project photos. I liked the look of the pile of boulders above - it’s very rough and chaotic and has a lot of character and edges, but I couldn’t use the photo itself. I started by cropping the image down to just the pile of boulders and copied the result into a new image in its own layer.

For the watermark, I envisioned somehow dropping the detail in the photo, making it black-and-white, then finding a suitable background color. I found the Graphic Pen filter accomplished much of what I wanted - I made sure my active foreground color was black, then applied the filter with the following result (before and after comparison):

step1

Next, I used the eyedropper tool to select a neutral rock color from the original boulder photo - in this case, I selected #d0b08a. I used the Paint Bucket tool to fill the background with the selected color, then used the Layers palette to drop the opacity of the watermark layer to 30% so the background color shows through (you can also modify layer transparency by using the menus - Layer > Layer Style > Blending Options):

step2

The resulting watermark is a great backdrop to the client’s construction photos - relevant to the brochure material and stark enough to show necessary detail while soft enough to not draw too much attention:

final

Have any favorite watermark and PowerPoint tips? I’d love to hear them - leave me a comment below.