Site Update : What Does What

Recently I've incorporated several new features into the Straight to the Bar site, some of which are listed below. Also noted are a couple of older features that seem to generate a few questions.

Icon beside header line in Workout entries

This little guy performing a deadlift only appears when the post is a workout (as does the kg/lbs line in the individual archives). Both of these features are achieved using the Compare plugin, and the template code :

<MTIfEqual a="[MTEntryCategory]" b="Workouts">
<div class="icon" /><$MTEntryTitle$></div>
<MTIfNotEqual a="[MTEntryCategory]" b="Workouts">


<MTIfEqual a="[MTEntryCategory]" b="Workouts">
| weights in kg/lbs

Add to digg, etc

The code for this is actually quite simple (although it took a while to track down) :

add to : <a href="<$MTEntryPermalink$>&title= <$MTEntryTitle$>"></a> |
<a href=""<$MTEntryPermalink$>" >digg</a> |
<a href=" <$MTEntryPermalink$>" >technorati</a> |
<a href=" &Description=<$MTEntryTitle$>&URL=<$MTEntryPermalink$>"> blinklist</a> |
<a href="<$MTEntryTitle$> &u=<$MTEntryPermalink$>" >furl</a> |
<a href="<$MTEntryPermalink$>&title= <$MTEntryTitle$> ">reddit</a>


Having recently re-discovered the brilliance that is Pandora, I decided to add a few stations to the sidebar (for those of you curious as to the type of music I train to). It really just depends on mood.

The code for adding a station list to a site, as well as a few other novel uses for Pandora, can be found here.

Fitness and Strongman links

These are now dynamically created, based on the information in the flinks and slinks categories. A separate template has been created for each.

Last Comment

These are now noted on the Individual Archive pages as :

n comments (last by name)

for example, 7 comments (last by Bud Gibson)

Also changed in the comments handling is the way my own responses are displayed. These are now clearly differentiated from the rest of the discussion. For more info on this (including how to do it in Movable Type) see this article on Learning Movable Type.

Restriction of entries on the front page

Previously, entries from any category would appear on the front page. In some cases it meant that items I'd prefer to remain hidden (at least from that page) would appear - such as the feedback and thank-you pages.

To get around this, I've altered the code in my Main Index template :

<MTEntries lastn="5" category="workouts OR Diet and Nutrition OR News OR General OR reviews OR exercises OR routines OR Articles">

This will display entries from any of the categories workouts, Diet and Nutrition,News, General, reviews, exercises, routines or Articles.

Latest Entries

Near the bottom of the sidebar is a Latest section, which displays the most recent posts (in the abovelisted categories) to appear on this site. The code is :

<MTEntries lastn="7" category="workouts OR Diet and Nutrition OR News OR General OR reviews OR exercises OR routines OR Articles">
<li><a rel="bookmark" title="<$MTEntryTitle remove_html="1"$>" href="<$MTEntryLink$>"><$MTEntryTitle smarty_pants="1"$></a>  |  <$MTEntryDate format="%d %b %y"$><br /> <MTEntryBody words="5"> <a rel="bookmark" title="<$MTEntryTitle remove_html="1"$>" href="<$MTEntryLink$>"><img src="" align="absbottom"/></a></li>

Archives in sidebar

Two major changes here. The first is a - when applicable - look at what was happening exactly one year ago. If there were no posts on that day, nothing appears. This information is extracted using the OnThisDay plugin.

This is integrated as follows :

   <MTEntries lastn="1" category="workouts OR Diet and Nutrition OR News OR General OR reviews OR exercises OR routines OR Articles">
        <li><a rel="bookmark" title="<$MTEntryTitle remove_html="1"$>" href="<$MTEntryLink$>">
          <$MTEntryDate format="%b %e, %Y"$>: <$MTEntryTitle$>
      <div><MTEntryExcerpt words="15"> <a rel="bookmark" title="<$MTEntryTitle remove_html="1"$>" href="<$MTEntryLink$>"><img src="" align="absbottom"/></div>

The second is the appearance of two dropdowns, which offer quick access to both the complete category listing and monthly archive listing for this site. These are generated using a combination of MT, PHP and Javascript; with code courtesy Brad Choate - see his site for more information.

Header Images

These change with each page reload, using Hivelogic's Image Rotator script. The full sized images can be seen here. I first became aware of this script via this article on A List Apart (just after having written my own - tried and tested ultimately won out).

NB : code used in the above samples was automatically cleaned up (for display) using Dan Cederholm's SimpleCode.

You Might Also Like...

NB : For a complete list of everything we use and recommend, swing by the reviews area. And of course the Straight to the Bar Store. It's all in there.

To learn how to put it to work, swing by the Guides area.

Scott Andrew Bird

Scott Andrew Bird is a writer, photographer and a guy who just loves this stuff. He's been at home in front of a computer for more years than he cares to remember (OK, 35) and is now making amends for years of many mistakes noted in the De-constructing Computer Guy articles (part 2) on T-Nation.

Find out what he's up to via Twitter, Google+, Facebook; and of course his online home. Enjoy.

Like this? Check out :

70 of the Best : 7 Years of Straight to the Bar.

This site - Straight to the Bar - has been around for an incredible 7 years (the first post was on Jan 17th, 2004), and to say I'm grateful is a gross understatement.

Thank you.

10 Questions with Strongman Mike Gill.

Time to dive a little deeper.

Grrls Mother's Day Fitness Wishlist.Mother of four and 2007 OCB Yorton Cup Nationals champion Cheryl Szarmach. Photo by Matt Shepley.On Mother's Day, it's time to return the favour. She helped out by bringing you up; now help her become strong enough to deal with, well, you.
From Losing to Lifting.

An incredible journey.

Of course, if you enjoyed these, I'd highly recommend grabbing the Strength & Fitness Newsletter. Delivered weekly, and absolutely free.

(there's also a Daily Update, if you're looking for an even larger dose of training-related goodness.)

NB : If you'd like to write a guest post for Straight to the Bar, or if you'd like to join the team of Moderators here (I love hearing about everyone's training approaches) - get in touch. And if you've got a fitness competition or seminar coming up, add it to the calendar.

Look forward to hearing from you.

Over to you. Leave a comment below, or send us a tweet :

blog comments powered by Disqus
Straight to the Bar Strength Kit

Are You as Strong as You Could Be?

Grab the Straight to the Bar Strength Kit.

Training Guides, eBooks and of course the Strength & Fitness Newsletter. Absolutely free.