FEED TWITTER

Targeting Chrome with Javascript

Google ChromeDisclaimer: Do not use a javascript hack to fix each browser rather than adjusting your style sheets or using a reset style sheet first to solve the big stuff. This is last resort stuff here.

I managed to find a way to have Chrome show styles only set for Internet Explorer. Don’t ask me how but it has something to do with pulling Twitter updates via a js file into a custom WordPress template. The updates themselves already have styles attached to them before I pull them in so I have to undo/override them on my side.

This worked for all browsers using a conditional statement for IE and that straightened it all out – except Chrome. I know what you’re thinking. It can’t be broken in Chrome if it works in Safari. They’re both based on Webkit so they have to obey the same rules. Well, I found one they don’t agree on.

Anyway, here’s a last resort solution for you that will target any browser you want to via the style sheets by just adding the browser name to the selector like .chrome. I was led to the solution via Nathan Rice’s post on the subject but I used the one described in the contents since I couldn’t get his to play nice with the rest of what was going on. Here’s that solution:

Just upload this file to your server, call the script in the header of the page like this:

<script src="css_browser_selector.js"  type="text/javascript"></script>

and then just set your trouble maker selectors using the browser name as a class. So let’s say you want links to be red for IE 6, black for Chrome and blue for Firefox 3.5. You’d do this in your style sheet:

.ie7 a { color: red; }
.chrome a { color: black; }
.ff3_5 a { color: blue; }

Pretty snazzy and works like a charm. Again, don’t use unless you have to but it’s great to know this is out there. There are tons more usage examples and all the browser class titles here.

PeachPit (Pearson Education)

Apple Mail “Missing Plugin” Errors and How to Fix

Apple MailSo you open your mail and your client has sent you a screenshot or image to look at and you naturally think he or she is doing something wrong. What you’re looking at is a blank image with the words “Missing Plugin” on it. The first thing I assumed was that there was a Flash update and maybe one of the browsers didn’t update correctly. I was wrong and it was me, or at least my Apple Mail program.

It turns out that during the last round of updates or possibly a software update over the weekend (I reboot my Mac so seldom it’s difficult to pinpoint which update caused it) the Java settings have been reset or updated on your computer. Here’s how you fix it (courtesy of the smart people over at Mac OS X Hints):

  1. Go to Applications > UtilitiesJava Preferences.app
  2. Click on Java Preferences.app
  3. Under General (the already selected tab), click “Restore Defaults” in the top half of the app window.
  4. Close Java Preferences
  5. Restart Mail
  6. Go back to living a happy, peaceful existence

Java Preferences

PeachPit (Pearson Education)

WordPress 3.0 is out!

Update 2: Looks like wp-security-scan is also having some conflict issues /killing the admin on a few sites I’ve done upgrades on. I’m deactivating that where necessary.

Check out the video below highlighting the changes in this newest (and long awaited) version.

Send me a note if you’d like me to build you a site using this awesome content management system / blogging platform or if you have questions concerning your current WordPress site. Those of you with sites already based on WordPress and hosted with GroovySoup will be updated as we sort through the changes and make sure everything works as it should. Remember: all installs are different due to the plugins you use and the custom code used in your site themes. These differences can cause parts of the site to stop functioning correctly until they are sorted out. That’s why we’re taking our time rolling this one out :)

Update: We did find a bug with our site and All in One SEO forcing us to deactivate that plugin. It’s not necessarily the plugin’s fault but turning it off solved our issue which was the live site not displaying correctly or at all.