Tag Archives: Firefox

Blog Upgraded to WordPress v3.5 and Twenty Twelve Theme

I’ve upgraded my blog from WordPress v3.4.2 to v3.5 and changed over to the new default Twenty Twelve theme within the last day or so. The process went as follows:

  • Backed up the existing file structure and database on both my local development copy (I have Apache, MySQL, and PHP installed on my PC) and the one you’re viewing now.
  • Updated a couple of my plug-ins that had new versions out.
  • Updated the Twenty Ten and Twenty Eleven themes that had newer versions (I suspect to work better with the newer version of WordPress).
  • Ran the automatic upgrade to go from WordPress 3.4.2 to 3.5 which took around 10 seconds to complete.
  • Did my usual modification of the /wp-includes/vars.php file to force $is_apache to true so I don’t have to rely on the software to detect something which I know is true:
    // Server detection

     * Whether the server software is Apache or something else
     * @global bool $is_apache

    // $is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
    $is_apache = true;

As far upgrading the WordPress core itself, that’s really all there was to it. The rest centered around working with the new Twenty Twelve theme and tweaking it to my liking. The following outlines some of the major points during my initial testing and theme tweaking:

  • The first thing I did was create a Twenty Twelve child theme and placed in an appropriate style.css (you have to) and copied over the functions.php file from my Twenty Eleven child theme. I also copied over the Twenty Twelve’s header.php and footer.php files as I knew I would be modifying them.
  • Activated my new child theme and looked at the main page. This first thing I noticed right off was that each post had a duplicate image. There were two Happy Thanksgiving images, two Veterans Day images and so on. Went poking around on the WordPress.org forums and found the reason. I needed to modify the theme’s content.php file and comment out (or remove) a line that contained the_post_thumbnail(); as follows (I modified the copy that I placed into my child theme):
         // this was causing the featured image to show in the post:
         /* if ( ! post_password_required() && ! is_attachment() ) :
         <?php if ( is_single() ) : ?>
         <h1 class="entry-title"><?php the_title(); ?></h1>

That corrected the duplicate image problem. Since I had included the post’s featured image within the post’s content, this was causing it to display again.

During this image testing, I discovered that my Gallery3 Picker plug-in had stopped working. It was not showing a Gallery3 tab in the add Media window. As it has been 2 years since any updates were made to it and the fact that I really didn’t need it. I just got rid of that plug-in.

At this point things seemed to be OK and I began to modify the child theme’s header.php and footer.php files and tweak the theme’s options (background, header, menus, widgets, etc) and CSS to suit my needs. It was during this that I noticed a lot of words at the end of a line of text were being broken up with hyphens. I’m thinking to myself, “What’s up with that!?”. I right-clicked where the text was and inspected the element to see what CSS was associated with it (using Firefox 17.0.1 in Windows 7 Pro 64bit) and this is what I saw related to word-wrapping:

.site-content article {
   word-wrap: break-word;
   -webkit-hyphens: auto;
   -moz-hyphens: auto;
   hyphens: auto;

Well, I was having none of this so I added the following to my child theme’s style.css file to over-ride it:

.site-content article {
   word-wrap: break-word;
   -webkit-hyphens: none;
   -moz-hyphens: none;
   hyphens: none;

That stopped the hyphenations from occurring while still breaking up really long words that are too big for the width of the post’s content. For more information about this hyphenation business: Mozilla Development Network: hyphens.

That’s been the major stuff worth noting. The other CSS tweaks for font colors and such are just personal taste and everyone’s going to have their own opinion on what looks the best. πŸ™‚ If I discover some other bizarre thing related to the upgrade or new theme I’ll make a post then.

My plea to NASCAR.COM and TrackPass (RaceView) Developers

It’s probably a good thing I waited until today to write this; otherwise, it would have been full of many colorful words. πŸ™‚ This is a follow-up to my last post. I tried to run NASCAR.COM’s RaceView during the Michigan race this past Sunday and all I got was either a window with “loading” at the bottom or just a solid white window. This occurred in both Firefox and Internet Explorer. I opened up the Java console in both Firefox and IE and it just had a Java error of a Null pointer assignment:

 at com.sun.opengl.util.JOGLAppletLauncher.start(JOGLAppletLauncher.java:385)
 at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException

Yes, I did try to reload several times. So I gave up and just started PitCommand to listen to Dale Jr’s audio. I did have to start it in IE first before the audio would work in Firefox and I just didn’t care to investigate this further. I was frustrated and missing the race. Before you ask, I do meet their minimum system requirements.

Now, I don’t mind troubleshooting problems; however, I do not want to do it during the actual race! It totally ruins the fan’s experience. How can you expect fans to search knowledge bases and forums, reinstall Java, plug-ins, audio and video drivers, and do whatever else might be potentially involved? It boggles my mind that there isn’t a race simulator that we can test these applications with during the week. If I was a NASCAR website/TrackPass developer I’d scream for this. I am quite sure the website team has no desire to fix the software during races either (I only hope they at least have some internal system to do this). Normally I wouldn’t give a flying fruitcake about it, but I am paying more for TrackPass than I am for my webhosting here that my blog, among several other sites, is on. The IndyCar RaceControl works (yes, they do loose timing and scoring sometimes but that’s an issue at their end when it happens) and it’s free.

This will probably be my last season to subscribe to RaceView. If the preview works during next year’s Daytona 500 then I might reconsider; otherwise, I’ll just stick with the scanner.

I welcome any comments about other’s experiences and how you got it to work, if you did.

Blog has been upgraded to WordPress v3.0!

I have upgraded my blog to WordPress v3.0 which was just released a couple days ago. As I always do, I backed-up all my files and database before proceeding. I have a local copy of my blog on the PC so I upgraded it first. I did the auto upgrade option again which seemed to have worked well. Even so, once again I had to edit the /wp-includes/vars.php file to force $is_apache to true (see below) since the SERVER_SOFTWARE variable comes back as WebServerX instead of Apache.

// Server detection

 * Whether the server software is Apache or something else
 * @global bool $is_apache

//$is_apache = ((strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) || (strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false)) ? true : false;
$is_apache = true;
 * Whether the server software is IIS or something else
 * @global bool $is_IIS

$is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) ? true : false;

I also had to edit the /wp-login.php file and add session_start(); at the beginning for the Register Plus plug-in to work properly as PHP sessions are not automatically started at my webhost (I could make them auto-start if I wanted but I’d rather have control of it via my scripts):

 * WordPress User Page

Now I could have stopped here; however, I wanted to use the new default WordPress theme, Twenty Ten which had a wider footprint and additional functionality beyond the previous default theme. I also figured it would be the most stable and up-to-date theme to work with the new WordPress version.Β  I made of a copy of the theme and placed it into its own directory, giving it my own name.

Since this was a new theme, I had to modify some of the PHP files to add my custom code. All I really had to do was add a JavaScript code snippet to the /mytheme/header.php file that some of my archived pages use to show and hide parts of their content. I also had to add a piece of code to the /mytheme/comments.php file for the Math Comment Spam Protection plugin to function; however, this theme’s coding of the comment form was much different and from what I could tell would have to do a lot of hacking around with the code to get it to work. So, I decided to look for something else. I came across the Block-Spam-By-Math plugin. This one worked with the new theme and I didn’t have to add any additional code anywhere to make it work! During this time frame where I did not have a functioning Math protection plugin, Akismet caught around 55 spam comments! This was in less than a day and a half. Since adding in the new plugin, Akismet has only seen one new spam comment. This just proves how many spam comments a plugin like this will stop.

Update: August 24, 2010: The Math Comment Spam Protection is now compatible with WordPress 3.0.1 and have switched my blog back to using it.

At this stage all I’m really doing is playing around with CSS styles to get the blog to appear how I want. This is where things like Firebug for Firefox come in real handy by telling me where an element is getting its style from. It will tell you about the element’s inheritance, which file(s) contain the CSS, and the line numbers within those files. By the way, I found the CSS Tutorials at W3Schools to be rather helpful in testing out various font-size and line-height combinations which this theme seems to use heavily. I may change its use of fixed pixel sized line-heights in favor of relative values so that they scale properly with changes in font size, we’ll see. πŸ™‚

Before I close and while there’s still 30 minutes left in the day, I just wanted to wish my dad and all the other dads out there a Happy Father’s Day!! πŸ˜€

How I got NASCAR RaceBuddy working in Firefox.

Update July 14, 2012: Thought I should mention that the issues I had below were under Windows XP Home/SP3. Currently, I have a completely new system running Windows 7 Pro/SP1 64-bit (hardware specs) with Firefox 13.0.1 and Adobe Flash 11.3.300.265 with Protected Mode enabled. I’ve never had a problem with RaceBuddy not working other than the Flash plug-in crashing once or twice; however, during some races, like today’s Nationwide race, no issues. This and the previous two versions of Flash have caused some grief amongst some users just watching normal videos in Firefox, Chrome, and even IE but nothing specific to just RaceBuddy.

During the NASCAR Truck race on Friday, NASCAR.COM made TruckBuddy available.Β  It was very similar to RaceBuddy they had last year during the TNT races. You get a choice of several live video feeds along with a mosaic feed of 4 video streams at once and a live chat feature.


When I first tried it with Firefox (version 3.6 or 3.6.2), the video portion did not work and the live chat portion on the right side would not work properly either. It would let me attempt to login via Twitter and provided the typical Twitter Allow/Deny Connection authorization window; however, upon returning to the application it did nothing and acted like I had never logged in.


I solved the video problem by disabling Adblock Plus on the NASCAR.COM site. Apparently, if the video advertisement does not play first, then nothing else will or at least problematically.

I solved the chat problem by enabling 3rd-party cookies which I have disabled by default (Tools -> Options -> Privacy). Upon further examination, I could disable 3rd-party cookies again if I gave exceptions to the following:

  • gigya.com
  • livechat.gigya.com
  • socialize.gigya.com

After the race was over, I re-enabled Adblock Plus for NASCAR.COM :). Hopefully this helps anyone else trying to get RaceBuddy working with Firefox should they have it again.

How I got LongURL Mobile Expander 2.0.0 to Show Tooltips Again.

After updating to LongURL Mobile Expander v2.0.0 it stopped showing Tooltips with the destination when I would move the mouse over a short URL. I would also get “current domain is NULL” errors when browsing locally (I have a local copy of Apache installed for development). The problem existed in both Firefox 3.0.11 and 3.5.

I got it working after seeing a comment here: https://addons.mozilla.org/en-US/firefox/addon/8636 so all the credit goes to Matthias Jansen.

Edit the file: C:\Documents and Settings\(user)\Application Data\Mozilla\Firefox\Profiles\(your profile)\extensions\{a7101e54-830c-4d33-a3ed-bedc17ec44da}\content\longurlmobileexpander.js

I am using Windows XP so your location might be different.

Around line 79, change

var current_domain = document.location.href.match(/^https?:\/\/(?:www\.)?([^\.]+\.[^\/]+)/i);


var current_domain = document.location.href.match(/^https?:\/\/(?:www\.)?([^\.]+(\.[^\/]+)?)/i);

Update: I’ve been told here that the following change is also needed. Around line 89, change

if ((domain !== current_domain[1]) && (typeof(this.known_services[domain]) !== 'undefined')) {


if ((current_domain != null) && (domain !== current_domain[1]) &amp;&amp; (typeof(this.known_services[domain]) !== 'undefined')) {

After doing this and re-enabling the extension.. it started working. I can now see the tooltip pop-ups and it’s supposed to fix the current_domain is null problem. Hopefully this will help anyone else that ran into this issue. πŸ™‚