I pay quite a bit to have fast internet, and for the most part, I'm pretty satisfied. Over the last few years, however, I've found that on a rare occasion FIOS inexplicably has problems loading pages. When I try a "SpeedTest" I still see speeds north of 35mpbs! So why can't I load a YouTube video? The answer is simple, because FIOS and many other ISPs by default assign you to terrible DNS servers. They're terrible for two reasons: 1) if you incorrectly type a URL, you get an search result/advertisement and 2) they're often slow and cause pages to not load at all.

There are two ways to fix it, but I'll give you the easiest way first:

  1. Find your network connections in "Control Panel" on Windows, "Network" in system Preferences for Mac OSX.
  2. Go to OpenDNS.com, scroll to the bottom of the page
  3. Select the option to choose DNS manually and enter the IP addresses from the OpenDNS page. Here are some instructions on Mac and and on PC (this is pretty similar in Windows 7 and XP)

The other way is by setting the DNS on your router. The advantage here is that you don't have to do it for every computer on your network.

Explanation of DNS

A DNS service is the way that your computer can turn a website domain into a number called an "IP Address". If your computer can not figure out the number for every website you visit, the site won't load! When you go to a website, the DNS server first looks up the number, and then sends you to the website all behind the scenes. ISP's DNS services are terrible. They focus more on serving you ads for typos than providing decent service. The reason that some websites work, and others don't is because your computer stores its most frequent lookups in a database called a "cache." If your cache were empty and your DNS was not working, then nothing would work at all.

Benefits of using alternative DNS

  • Faster load times
  • Increased security (many providers such as OpenDNS provider protection by blocking harmful websites
  • More reliability (depending on which DNS provider you use, I've had perfect uptime with OpenDNS)
Mar 2

People are never satisfied with WYSIWYG plugins. One of the biggest frustrations, especially when working with an Administration theme, is that what appears in the editor is NOT the same as what appears on the website. And the "preview" button does no good either. For instance, if you've got custom spacing, list styles, or specific classes for typography, you're not going to see them in your WYSIWYG editor, and therefore, what you see is not what you get.

So how do we fix it? These instructions assume you've got WYSIWYG API setup as well as at least one editor enabled. For our example, I'll be using TinyMCE.

  1. Create an editor.css in your theme wherever your other CSS files are
  2. Edit the "editor.css" file and add @imports to your normally included CSS styles. You don't need to include print.css but you would need to include any resets, typography, or color files you normally include. See here for a good example of how to import other CSS files. Now your editor.css will have all your normal website styles!
  3. Where does this content go in your layout? My content ends up in a div with the ID "content". Where does TinyMCE content go? Right in the body! In the case of TinyMCE, the id tinymce is added to the body. You need to add the SAME styles to #tinymce as you had in #content. Do this in editor.css after the imports. Example:
    /* Example editor.css */
    @import url("reset.css");
    @import url("typography.css");
    @import url("style.css");
    
    /* overrides to make tinymce match #content */
    #tinymce {background:#fff; padding:10px;}
    
  4. No go to site configuration->WYSIWYG and edit your profile. Under the "CSS" area, select "Define CSS" and put "%bsites/all/themes/YOURTHEME/css/editor.css" for the css path. (tested only for TinyMCE)
  5. Notice that you can also define some custom classes which users can use, these classes must be defined in your theme's CSS, not in the editor.css. If you're import was done correctly, it'll get picked up by editor.css anyway.

If all went well, your editor's input area should be styled just like how it's output. Now what you see is really what you get!

Oct 29

It's been a few months since I blogged. I've been busy. In addition to working on a few new websites, I've also been writing a new app.

In the next few weeks, I should have some alphas up for testing on Drupal.org. It's not a module... it's a desktop application that brings the power of Drush to the Window's, Mac, or Linux environments with a graphical user interface.

The challenge has been Windows, so that's what I tackled first. And that means that the first releases will actually be Windows only, but support for Linux and Mac will be trivial. So what are the features?

  • Easy to install, just run the setup file
  • Easy to configure, just type in your remote connection's settings
  • Supports and saves multiple connections, no need for tricky "Drush Alias" files
  • Local Drush installation is NOT required
  • Works with Drush 3.3 and any version of Drupal
  • Run Cron, re-index your search, check status, download/enable modules, update your site, export your database, run bootstrapped PHP scripts, and more coming soon!
  • 100% open source based on Flex 4.1 SDK

I apologize for all the bolding in this post, I'm just excited. Screen shots should be up within a few days. Once this thing is on Drupal.org, I hope I can get some contributors to add features.

Oct 26

In general, I don't really care if a website passes validation so long as it looks okay and performs well. While teaching an XHTML class a few months ago, I was randomly typing things into the W3C validator and discovered that BBC validates perfectly on XHTML 1.0 Strict. For a site that large, that's very impressive! I decided to do a comparison of similar sites.

Website Type Errors Warnings
bbc.co.uk XHTML 1.0 Strict 0 0
washingtonpost.com XHTML 1.0 Transitional 599 265
foxnews.com XHTML 1.0 Transitional 138 5
cnn.com HTML 4.01 Transitional 76 25
msnbc.msn.com HTML 4.01 Transitional 274 31
reddit.com XHTML 1.0 Transitional 5 147
digg.com XHTML 1.0 Transitional 191 293
Jul 26

Attached is a module that styles the IMCE module to match the CKEditor module. This is based on the previous work that Mike the Coder and Danny Joris before him. I made it so that you don't have to modify your theme to get it working, and more specifically, two themes since I'm using admin theme. The only thing you have to do for it to work is to put the "sprites.png" from the CKEditor download into the "images" folder of the module. It's found at "skins/kama/images/sprites.png".

Jun 25

Well, I finally cracked and got a twitter account. follow me at @jrowny.

Jun 24

Unfortunately, I will be turning on comment approval because I am getting a lot of spam, despite reCaptcha. I thought about Mollom but I don't want a paid service. Their free service might work, so I may give it a shot.

May 29

WOW! PressFlow is amazingly fast. My question is, why would anyone NOT use it? I've got a pretty basic site running now, which should launch too, that's loading in 0.15 seconds. The site, previously running on ColdFusion and a CMS called FarCry averaged load times of 4 to 5 seconds. That means It's gotten about 30 times faster.

In other news, I'm confirmed as a speaker at Drupal Design Camp Boston. It's a free conference. I'll be giving the same presentation I gave at DrupalCon San Fran. http://boston2010.design4drupal.org/sessions/jquery-views-and-view-themeing

May 27

I previously posted how I solved the problem of RadioButtonGroups inside repeaters, you can see that post here. Unfortunately, today, I discovered that radio button groups are a scam. You don't need them at all!? Why, you ask? If you just set the "groupName" property, they are automatically created.

<mx:Repeater id="someRepeater">
<mx:HBox>   
  <mx:RadioButton id="Yes" groupName="{someRepeater.currentIndex}"/>
  <mx:RadioButton id="No" groupName="{someRepeater.currentIndex}"/>
  <mx:RadioButton id="Maybe" groupName="{someRepeater.currentIndex}"/>      
 </mx:HBox>
</mx:Repeater>

If you ever need to access your RadioButtonGroup, you can just call a radio button by its id, and use the "group" property. I really hope this wasn't common knowledge that everyone but me knew.

May 26

Pages

Subscribe to Front page feed