Categories
Tips & How To's

Firefox 3.0, How To Make Old Extensions Work

Firefox 3.0 beta 1 is out. As with previous releases of Firefox, the new version number breaks your extensions. Here’s how to fix them.

  1. Open about:config (don’t mind the new roadblock)
  2. Right-Click the list and create a new boolean ‘extensions.checkCompatibility’, set it to false
  3. Restart Firefox

Update: This does not appear to work on the beta 4 release.

Categories
Tips & How To's

.htaccess Mobile Browser Redirect

Checkout the latest version of the ruleset first.
I just finished building out a simple little mobile site for hiphopdx.com. When I asked Google the best way to detect mobile browsers with PHP, it led to me this PHP code by Andy Moore. After a few minutes of contemplating the best way to include the code in the existing CMS framework I realized that it would probably be best to move the functionality outside of PHP. I mean, why clutter up display code with HTTP traffic manipulation. The website’s main traffic cop Apache is already perfectly capable of handling the duties already.

Here’s how to redirect mobile traffic using a .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/m/.*$
RewriteCond %{HTTP_ACCEPT} "text/vnd.wap.wml|application/vnd.wap.xhtml+xml" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "acs|alav|alca|amoi|audi|aste|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "dang|doco|eric|hipt|inno|ipaq|java|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-" [NC,OR]
RewriteCond %{HTTP_USER_AGENT}  "maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|opwv" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "palm|pana|pant|pdxg|phil|play|pluc|port|prox|qtek|qwap|sage|sams|sany" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|w3cs|wap-|wapa|wapi" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "wapp|wapr|webc|winw|winw|xda|xda-" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "up.browser|up.link|windowssce|iemobile|mini|mmp" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "symbian|midp|wap|phone|pocket|mobile|pda|psp" [NC]
RewriteCond %{HTTP_USER_AGENT} !macintosh [NC] #*SEE NOTE BELOW
RewriteRule ^(.*)$ /m/ [L,R=302]

I did my best to translate the PHP code verbatim, if you want to understand what each line is doing you’ll want to check out the original code. Testing for all those user agents is probably a little overkill, but Mr Moore is a “dotMobi certified mobile web developer” I’m going to assume he knows what he’s talking about.

*The “tosh” user agent (I’m assuming this is for a Toshiba browser?) happens to catch browser on any browser on the Mac OS. I had to add !macintosh to skip macs. The iPhone/iPod Touch does not identify itself as “macintosh.”

Categories
Google Tips & How To's

Add Facebook Events to Google Calendar, 2 Simple Steps

I just discovered the most amazing, useful mashup. You can automatically add your Facebook events to your Google calendar! This way whenever you accept an event invite it shows up on your google calendar, with all the details! It just takes 2 simple steps.

  1. Pull up your facebook events page, click the “Export Events” link at the top. That brings up a little dialogue box with a URL. Copy that URL.fbevent.png
  2. Open your Google calendar settings page. Click the “Calendars” tab, under “other calendars” click “add calendar, click the “Add By URL” tab. You’ll be presented with a form that’s able to accept the URL you just copied from Facebook!

Voila!
You’ll now see your Facebook events in Google calendar. Thusly, minimizing the amount of websites you have to open to figure out when you have time to visit your mother.

Categories
Tips & How To's Websites

WhyFireFoxIsBlocked is wrong! Adblock Plus is 100% Detectable!

whyfirefoxisblocked.com does not know what they’re talking about. Ad Block Plus is 100% lame and 100% detectable.

The following code detects ad block plus:

index.html:
<script language="javascript"> var disabled = false; </script>
<script src="something.js?thisistotrickyou=http://a.as-us.falkag.net/...
dat/njf/41/domain.com/ros_pop_tag.js"></script>
<script language="javascript">
if(!disabled){
// DO SOMETHING HERE, like a redirect
alert("You Are Using Ad Block Plus or some other blocking software! Please don\'t, our site operates on ad revenue."); }
</script>

something.js:
disabled = true;

Proof of concept

Categories
Tips & How To's

Adding Linebreaks in Open Office Calc

To add a linebreak to open office’s version of excel – calc, use ctrl+enter.
Not alt+enter like in Excel or shift+enter like many web-based editors.