UserJS: Twitter-Rounded

I’ve thrown together a quick script for Opera that you can use if you’d like to see rounded corners (aka border-radius). It seems that Twitter currently sends Opera a style sheet with empty settings for rounded corners…

…so, all I did was write a script that will insert a link to a style sheet that’s stored here at kyleabaker.com which overwrites these empty styles with the correct ones.

If you’ve never used scripts before then you should first learn how to setup UserJS. After you’ve setup Userjs, you may need to enable UserJS for secure pages (https) in Opera’s internal configuration page….”opera:config#UserPrefs|UserJavaScriptonHTTPS“. Just check/enable that option. Make sure to click save!

Lastly, save the “Twitter-Rounded” script to your UserJS folder that you setup in the steps above.

Now you have a more pleasant looking Twitter page in Opera 10.5. 😉

WP-UserAgent and WP-TwitterBadge

I’ve just pushed a few updates to my WP-UserAgent and WP-TwitterBadge plugins. If you’re already using them then you should be able to update via your WordPress Admin area shortly.

If you’re not using them yet, feel free to browse around and check into them!

WP-TwitterBadge v0.2 Released

After taking some time to track down a bug that seems to only affect Internet Explorer 6 (why on earth did I bother?) I’ve finally released an update that fixes the error.

After getting several comments about users experiencing errors with this plugin while using IE6 I finally gave in and patched the little bug. Why are they still using IE6?

…well, it works fine now…as far as I know. I’ve had a few people test it with no errors as well as myself, so hopefully if you couldn’t use it before it will work fine now.

To find out more about this WordPress plugin, go to it’s main page. You will find all released versions there (past and present) as well as a link to the official WordPress Plugin page. Feel free to leave feedback!

WP-UserAgent v0.9 Released

I’ve just released an update for the WordPress plugin WP-UserAgent. The update changelog is as follows:

v0.9

  • Added detection for Venenux GNU Linux and Oracle Linux.
  • Added detection for Laconica and MovableType trackbacks.
  • Cleaned some of the code for trackback detections.

You can find out more about WP-UserAgent as well as a download from the main page.

New: Netflix Watch Instantly Timer

I’ve just posted a User Javascript file that allows you to get a quick glance at the total time that you’ve spent watching Netflix Watch Instantly programs.

netflix-watch-instantly-with-userjs

So far I haven’t had enough time to make the script Greasemonkey compatible, but it should be shortly. For now, it works great with Opera.

Thanks to @fearphage for helping me get this sorted out with Greasemonkey as well!

Head on over and grab the script so you can keep tabs on how much time you spend watching tv…online…on netflix. 😉

Finally updated to phpBB 3.0.5

After weeks of postponing the phpBB 3.0.5 update, I’ve finally gotten around to installing it on my BimmerMania.com forums.

I’ve not been very impressed with phpBB since I first started using in way back when the 2.x branch was the latest stable.

Now that phpBB3 has been bombarded with spam, I’ve been forced to try new anti-spam measures.

I’m very disappointed in their community support for this issue, but I was able to find a great post that covers several options. It’s entitled Preventing Spam in 3.0 and it’s been the best sort of spam solutions I’ve found for phpBB3.

If you’re having problems with spam bots on your phpBB forums, then I would highly suggest that you look into these solutions and pick one that works for you.

In the meantime, I’ll be waiting for phpBB to release some sort of solution to all of this and become as reliable and stable as WordPress has been.

Easy theme and plugin (a.k.a. mod) installs, updates and uninstalls would also be highly appreciated. As well as a one click automatic update system for phpBB itself.

phpBB still has a long way to go before it will be as friendly as the current WordPress admin panel, but all of this manual work isn’t enough to convince me that a better solution is available…so I guess I’ll be sticking with phpBB3 for a while.

Why Browser Sniffing is a Bad Idea

For many web developers, browser sniffing has become almost routine. Have you ever noticed that short list of “supported web browsers”?

While browser sniffing may seem like a good idea at first, you may be setting yourself up for problems later.

The biggest problem with browser sniffing is that it is usually relied on far too heavily to even consider removing later. The inner workings of a site can be based (unknowingly sometimes) around working specifically for specified web browsers and nothing more.

One poor use of browser sniffing that I came across today was for EyeWearSelect.com and it just so happens to be an easy fix.

On one of the EyeWearSelect pages, they show a thumbnail preview of a pair of glasses. Below the image is a link entitled “Click to Enlarge”, which uses some javascript to show you a larger picture in a pop-up window. Here’s how they begin the pop-up script..

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}

Basically, the script says…true or false…this is Netscape? Also, true or false…this is Microsoft (Internet Explorer)? ..but what if you’re not using Netscape or Internet Explorer? What if you’re using Opera? or Konqueror?

If you’re using a browser that doesn’t match Netscape or Internet Explorer, then the future checks for isNN and isIE will never match and your browser will be “incompatible” with the scripts. In this case, the incompatibility is that the author never made it possible for those that are compatible.

A simple fix for this would be to change that bit of code to the following, which would basically check for Internet Explorer and then treat all others differently..

if (parseInt(navigator.appVersion.charAt(0))>=4){
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;
var isNN=!isIE;}

They won’t always be this easy for developers to correct, but this script could actually be cleaned up much more than just that.

In most cases, browser sniffing isn’t needed. The more efficient method to follow is capability testing.

If your code requires a web browser with capabilities that others (or not all web browsers) have, then you can use browser sniffing which is a form of hard coding the compatible web browsers…or you can test the browser’s capabilities and see if the javascript that you need to use will be supported.

By using the second method, you make your script much friendlier to the future of both the web and it’s browsers. You will also save yourself some work by not having to update the script each time you want to support another browser that would already be capable of using your script if it weren’t blocked in the first place. 😉

If you run compatibility tests and find that a certain feature will not be available, that’s the time to announce that the user should update their browser or use a different one all together.

Of all of the times that I’ve seen browser sniffing, only a couple have every been properly used. One of those was a browser sniffer that would display instructions and images explaining how to download and save a file to your computer. The images were of course specific to the browser that I was using for a more useful set of instructions.

If you should happen to come across a web site that suggests that your browser is not compatible, fire off an email and let them know that you would appreciate more accurate scripting and detection for your web browser let them know that you would appreciate more accurate scripting!

New WordPress Twitter Badge Plugin!

After coming across this nifty little Twitter Badge at Techie-Buzz while reading a Google Chrome OS article, I realized how cool their little Twitter link was and I instantly new it was going to be on kyleabaker.com as well. 😀

wp-twitterbadge-01

After a quick look at the source code of the page, I had decided to build a quick plugin for WordPress to insert the same code. So the plugin process began.

I didn’t want to hard code it into the footer of my K2 theme, because I frequently update to the latest K2 theme nightly builds. This way would save me a lot of trouble and even make this neat little Twitter Badge available to thousands. And so…WP-TwitterBadge was born.

wp-twitterbadge-02

I traced the code back to an embeded script from go2web20.net and realized how n00b friendly this script would have been to install anyway even without an easier plugin to install it for you, but the fact that it would save me time in the future was well worth it.

Basically, if you’re not using the WordPress plugin, you just link the script and set a few variables. This made it very easy to make it customizable as well!

Just mimicking their own setup page, I was able to make a quick Options page featuring a live preview (as all of my plugins have so far 😉 ). I even coded the preview with way less script than they used on their own page since extreme error checking is really not needed (everything is live so you can see the problems there).

wp-twitterbadge-03

At a rate of 20-30+ new downloads per hour I would say that this plugin is by far my most favored project…considering that it hasn’t been reviewed yet (no trackbacks thus far) by anyone whereas others already have.

If you’d like to checkout this little Twitter Badge on your own site, just head over to the plugin page or search for “WP-TwitterBadge” from your “Add New Plugins” page in WordPress and install it from there. If you like it, pass it on!

WordPress Plugin WP-UserAgent 0.8

I’ve just updated WP-UserAgent to version 0.8, covering a lot of ground over the past few days. As I’m working to reach a stable and solid 1.0 release, I’m also working towards a feature complete plugin.

Version 0.8 offers support for detecting ~90 different web browsers and ~35 different operating systems (counting each version of windows).

wp-useragent-0-8-img1

Easy access to WP-UserAgent settings is worked right into the Plugins page. No more need to search for options to edit!

Once you find the options page, you’ll find a cleaned up look and feel, along with a real-time preview of how your changes will appear.

wp-useragent-0-8-img2

If you’re in need of a cool geeky WordPress plugin, why not give WP-UserAgent a shot? It’s an interesting way to find out a few details about your subscribers and other visitors!

Find out more details, changelogs and downloads on the official WP-UserAgent plugin page.

NC State ACM/AITP Website Update

I just finished (or reached the publishing or pushing live step) the update to the NC State ACM/AITP website.

The improvements over the previous design are pretty drastic when it comes to user interface and ease of use.

I ended up going with a K2 theme for Drupal since I’m such a big fan, but it just didn’t seem right for the site at first. I ended up going through and modifying a great deal of a barely and poorly done version that I came across online so I had to finish up most of it myself, but that just allowed for making it suit my (read ‘our’…for the club) needs.

acm-aitp-site-upgrade-2009

After working with the html and tweaking it hardcore until I got it clean so it passes HTML Validation inspection it was time to tweak the CSS.

This became a breeze with Opera’s Dragonfly developer tools. I was able to select an element and tweak the style sheet live so I could see real-time results. After making an adjustment it’s as simple as updating the actual stylesheet.

After tweaking the style almost obsessively for hours the first day I decided it was time for a break. It wasn’t long before I got back into the groove the next day and finished it up (for the time being).

I really have to say that I am in love with Dragonfly now. I’ve used Firebug in the past and to be honest I’ve never been a Firefox fanboy…it’s a good browser, but it’s not pushing standards support at the rate that I want and Opera is just better at a lot of the things that I use and need from a browser… anyways, I got used to Firebug a while back and Dragonfly vs. Firebug isn’t a fair competition because the both are still very different, but I find Dragonfly being easier to use ever second compared to Firebug.

After getting the code working it was time to push the update. As a result, the NC State ACM/AITP club now has a much friendlier outlet on the web!

Now I have the pleasure of tackling any smaller issues such as stylesheet problems. 😀 Updating the content will now be much less of a pain now that it can be updated directly from the browser for most everything.

YouTube Ads

As you may have noticed already, YouTube has started rolling a few ads in some of the videos.

My first experience with these new ads came with a music video by Akon:

They aren’t really that obtrusive, but they are a little annoying after a little while. I mean, you’re there to watch the video right? Not to have it partially cut off by an advertisement that you couldn’t care less about. 😛

Unfortunately it seems as though the Internet is turning to ads more and more for videos and radio. Recently Pandora began streaming advertisements on their radio channels which were once pure music.

Obviously they must find a profitable strategy, but it’s sad to see that the Internet’s advertising is now worse than television advertising.

Personally, I’ve made an effort to keep all of my websites advertising free. I believe in clean and clear designs and that leaves no room for advertisements. They not only seem to hurt visitor counts and hits, but also destroy the overall appearance of your site.

Hopefully a cleaner alternative will find it’s way into our Internet in the near future. If not then we can always rely on our browser ad blockers. 😛