Truths for Mature Adults from my Sister

The following list was forwarded to me from my sister which she thought was pretty funny and well, so do I. ๐Ÿ™‚

Truths for Mature Adults:

  1. I think part of a best friend’s job should be to immediately clear your computer history if you die.

  2. Nothing sucks more than that moment during an argument when you realize you’re wrong.

  3. I totally take back all those times I didn’t want to nap when I was younger.

  4. There is great need for a sarcasm font.

  5. How the hell are you supposed to fold a fitted sheet?

  6. Was learning cursive really necessary?

  7. Map Quest really needs to start their directions on # 5. I’m pretty sure I know how to get out of my neighborhood.

  8. Obituaries would be a lot more interesting if they told you how the person died.

  9. I can’t remember the last time I wasn’t at least kind of tired.

  10. Bad decisions make good stories.

  11. You never know when it will strike, but there comes a moment at work when you know that you just aren’t going to do anything productive for the rest of the day.

  12. Can we all just agree to ignore whatever comes after Blue Ray? I don’t want to have to restart my collection…again.

  13. I’m always slightly terrified when I exit out of Word and it asks me if I want to save any changes to my ten-page technical report that I swear I did not make any changes to.

  14. I keep some people’s phone numbers in my phone just so I know not to answer when they call.

  15. I disagree with Kay Jewelers. I would bet on any given Friday or Saturday night more kisses begin with Miller Lite than Kay.

  16. I wish Google Maps had an “Avoid Ghetto” routing option.

  17. I have a hard time deciphering the fine line between boredom and hunger.

  18. How many times is it appropriate to say “What?” before you just nod and smile because you still didn’t hear or understand a word they said?

  19. I love the sense of camaraderie when an entire line of cars team up to prevent a jerk from cutting in at the front. Stay strong, brothers and sisters!

  20. Shirts get dirty. Underwear gets dirty. Pants? Pants never get dirty, and you can wear them forever.

  21. Sometimes I’ll look down at my watch 3 consecutive times and still not know what time it is.

  22. Even under ideal conditions people have trouble locating their car keys in a pocket, finding their cell phone, and Pinning the Tail on the Donkey – but I’d bet everyone can find and push the snooze button from 3 feet away, in about 1.7 seconds, eyes closed, first time, every time!

  23. The first testicular guard, the “Cup,” was used in Hockey in 1874 and the first helmet was used in 1974. That means it only took 100 years for men to realize that their brain is also important.

    Ladies… Quit Laughing.

I laughed on that last one too LOL. Hope you enjoyed it! ๐Ÿ™‚

How to not count views made by the Gallery 3 Admin

If you’re like me, you like to know how many times your photos are viewed; however, you don’t want to count the views made by yourself because who cares how many times you look at one of your own images?

Here’s how I got Gallery 3.0 to stop counting my views as the gallery administrator. (Update 1-27-2011: For those that have upgraded to Gallery 3.0.1, please see this post.) I should mention that my target audience for this post are those that are familiar with editing PHP files and have a means to access their Gallery database (to reset the view_counts back to zero).

First, in /themes/(your theme)/views/page.html.php add the following code near the top (below the first line, making sure you keep the code within PHP opening and closing tags.):

2
3
4
5
6
7
8
<?
if ($user->admin == '1') {
   $_SESSION['admin'] = true;
} else {
   $_SESSION['admin'] = false;
}
?>

Then, in /modules/gallery/controllers/photos.php modify the code around line 50: (make sure you do not leave the existing view_count++ statement outside the IF statements; otherwise, you’ll get duplicate view counts)

50
51
52
53
54
55
56
    $template->content = new View("photo.html");

    // mrh added the session admin check
    if(!$_SESSION['admin']) {
      $photo->view_count++;
    }
    $photo->save();

Then, in /modules/gallery/controllers/movies.php around line 50:

50
51
52
53
54
55
56
57
58
    $template->content = new View("movie.html");

    // mrh added the session admin check
    if (!$_SESSION['admin']) {
      $movie->view_count++;
    }
    $movie->save();

    print $template;

Finally, in /modules/gallery/controllers/albums.php around line 77:

77
78
79
80
81
82
83
    // mrh added the session admin check
    if (!$_SESSION['admin']) {
      db::query("UPDATE {items} SET `view_count` = `view_count` + 1 WHERE `id` = $album->id")
      ->execute();
    }

    print $template;

The Gallery will now not count any views made by the administrator which in my case, is me. ๐Ÿ™‚ To reset the view counts back to zero, the following SQL statement will work:

UPDATE items SET view_count = 0 WHERE view_count > 0;

Since you’re modifying the core Gallery code, be sure to make backups before applying any future upgrades as your changes will be lost.

Hopefully this helps! ๐Ÿ™‚

Gallery Changed to Gallery 3.0 Code.

Now that Gallery 3.0 Final has been released, I have changed my main Gallery to use it. This wasn’t an overnight thing as I have been using the Gallery 3 code in a test environment since it was in beta. Notice I did not say upgrade, but change. This is a completely new code base from Gallery 2. None of the modules or themes from Gallery 2 are compatible. Why the change? Well, the main reason is that working with the code in this version is so much easier. The database schema is also much easier to comprehend and deal with.

Because of this change, I did have to change how I get a random image from the Gallery to display on my blog and main website. It was fairly easy to make the switch. Because the database schema was easier, I was able to just do a direct database connection and MySQL query to get the information I needed. No inclusion of gallery code or use of Curl connections was necessary. A much more efficient process that took an averageย  of 0.2 seconds off the page load time for my blog!

The other fun part has been locating all the links and image references that needed to be changed. Think I have updated all of them in my blog and main website. For the external links I’ve been modifying the .htaccess file as situations arise. Here are few examples:

   # put redirects for old to new gallery links here
RewriteBase /
RewriteRule ^v/MyPics/HomeTheater/([A-Za-z_0-9\)\(\-]*)\.[A-Za-z]*\.html$ http://gallery.markheadrick.com/Home-Theater/$1 [R=301,L]
RewriteRule ^v/MyPics/([A-Za-z_0-9\)\(\-]*)\.[A-Za-z]*\.html$ http://gallery.markheadrick.com/MiscPics/$1 [R=301,L]
RewriteRule ^v/Nature/([A-Za-z_0-9\)\(\-]*)\.[A-Za-z]*\.html$ http://gallery.markheadrick.com/Nature/$1 [R=301,L]

The current (default) theme that the Gallery uses is heavy in JavaScript use. I’ll keep my eye out for a suitable theme that doesn’t use as much JavaScript; however, it’s really not that bad. Besides, customizing the themes in this version is much easier and since the final code was just released, it’s probably best to stay with the default theme for now. Actually, I do tend to use the default themes most of the time since they are guaranteed to be the most compatible with the latest core code.

Since this version works with Akismet, I have opened this gallery up for comments for now. I had to turn them off in the other one due to overwhelming amounts of spam at times even with captcha modules installed. So feel free to comment. ๐Ÿ™‚

I guess that’s about it for now. Hope you had a happy 10/10/10! ๐Ÿ™‚

Switched Blog Back to Using Math Comment Spam Protection

Since the latest version (3.0) of Math Comment Spam Protection is now compatible with WordPress 3.0.1 and the Twenty Ten theme, I have switched back to using it several days ago. As is the case with any of these math protection plug-ins, it will at best stop some of the automated spambots. It will not prevent someone from answering the math question to post spam. ๐Ÿ™‚


Getting NASCAR RaceView Working with Internet Explorer 8

Update February 21, 2015: Thought I should mention that I cancelled my RaceView subscription a couple years ago so I don’t mess with it anymore.

(Update February 12, 2011: The information in this post is now obsolete with the 2011 NASCAR season as RaceView is now an Adobe Flash application and does not use Java or Octoshape.)


During the first 200 laps or so of the NASCAR race in Bristol, I finally got NASCAR.COM’s RaceView working on my system. Hallelujah brother! LOL. This post will probably get further tweaking after next race. Before I begin I should state that my system is as follows:

  • Running Windows XP Home w/ SP3 with all high priority updates applied. I use the Windows Classic theme which explains why the dialog boxes in the screenshots I have look the way they do. Old school, what can I say.
  • Have Windows Media Player 11 installed.
  • Have Internet Explorer 8 and Firefox 3.6.8 installed.
  • Running latest version of Java (build 1.6.0_21-b07)
  • Using an EVGA 6800GT with NVidia drivers version 178.13. I mention this because many of the newer 190+ drivers have caused RaceView to lock the system harder than a rock in the past when it was working before and re-installing the older video drivers cured it.
  • Running DirectX v9.0c

Now that all of that is out of the way. Much of what I cover here is also mentioned on NASCAR.COM’s TrackPass knowledge base. All I am going to include is what I did that, apparently, got it working, possibly in combination with what the NASCAR.COM webmasters did on their end after I told @NASCAR on Twitter my problems getting nothing but errors.

I decided I would try to get it working with Internet Explorer first. If it doesn’t work with it, it’s not going to work with anything else. Due to the length of this post with all the screenshots, I’m using the read more option here:

Continue reading