Archive for category: Web Development

6 WordPress plugins for better user experience

6 WordPress plugins for better user experience

Allow your users to Subscribe to comments

When you allow users to leave there opinions they might want to follow up that conversation. Although it’s possible to do that by subscribing the comments RSS they might want to get email warnings instead.
I’ve been using Subscribe to Comments for years and I’ve found a reasonable number of users subscribing to comments on posts they have given their opinions. Allowing your readers to choose if they want to be warn when there’s an update on a specific post is improving the user experience.

WordPress Subscribe to comments plugin

Users can edit their comments after submitting them

One of the most embarrassing comments I’ve ever made was about 2 years ago on a popular blog. It was past 1am and I was finishing up some work when I did a pause. I read an interesting post about SEO and left my comment. Fortunately I went back to the post again and re-read it. I ended up noticing that the comment I had left was pure nonsense. I wish I had the chance to change that. Would save me some embarrassment.

For that you have a plugin called WP Ajax Edit Comments which allows all users to edit their own comments without the need to be registered or logged in.

Better printing experience

One other subject I take in consideration is printing. The most common practice when someone wants to print an interesting post is printing the whole blog layout or printing a selection. But the best practice is when a user chooses to print and will only print what he wants.
For this you have two options:

  1. Create a specific CSS for print
  2. Use a plugin for that effect

Personally I prefer to create a specific stylesheet for print and apply the layout I want. But WP-Print plugin does a terrific job
and it’s a very good alternative for hand-coding your printing styles.

iPhone, Cell Phone, PDA navigation

Recently I just ended my mobile internet contract. The reason is quite simple, I don’t use it that much and when I do I don’t really get to visit the websites I want. Smashing Magazine has a mobile version of their website but, for example, Abduzeedo doesn’t and when I tried to reach it with my mobile phone it jammed it with too many images, javascript and information that I didn’t want to see.

WordPress Mobile Pack plugin will help you adapt your WordPress site to mobile browsers and not just iPhones.
Again you can do a specific CSS stylesheet for the effect but the plugin covers that very well.

Speed up your website

How often do you visit websites and when they take too long to load their content you simple leave them? This is common on websites that are hosted on shared servers and have a considerable amount of traffic.
When someone visits your site or blog the server gets requests to display everything on that page. When you have a site with heavy images or simple allot of images it’s normal that page loading time takes longer than it should.
Fortunately for WordPress powered sites there’s WP Super Cache that will cache the pages making the loading time faster thus improving user experience on your website.
For small websites or pages with little content or not so rich in images you might not notice much difference.

Give users a quick navigational reference with a Sitemap

Usually when you speak about sitemaps on WordPress you are refering to XML Sitemaps for Google Webmaster Tools, Bing’s Webmaster Central, etc. In this case I am speaking of a page with a reference to existing links on your website.

This is important for 2 primary reasons:

  1. Users have a quick reference to categories, pages and posts separated by category
  2. Search engine robots have a place to crawl to your posts thus indexing more pages for your website

There are many plugins to create sitemaps on WordPress. Personally I recommend Sitemap Generator WordPress plugin for this effect.

7 de February de 2010 4 comments Read More
Learning HTML5 and CSS3

Learning HTML5 and CSS3

9 de January de 2010 0 comments Read More
E-mail spam filter with jQuery

E-mail spam filter with jQuery

jQuery currently has a plugin called Mailme – Email Defuscator created specifically to protect and filter email from spam.
Let’s take a look at it’s function and basic use:


jQuery.fn.mailme = function() {
    var at = / at /;
    var dot = / dot /g;
    this.each( function() {
        var addr = jQuery(this).text().replace(at,"@").replace(dot,".");
        var title = jQuery(this).attr('title')
        $(this)
            .after(''+ addr +'')
            .remove();
    });
};

This function allows you to define your email link and the title to be shown on mouse over that link. Here’s the sample html syntax:

 <span class="mailme" title="Send me a letter!">me at mydomain dot com</span>

Using a spam with the class mailme you can define the title and the email using words instead of symbols. If you want extra protection create your own words for the at sign (@) and dot. In this particular case what robots will crawl is: me at mydomain dot com but the user will actually see me@mydomain.com and the user is actually able to click it.

You can set the addr var on the jQuery function to something else. Personally I like having pages with contact form so when you click on the link it will take you to the contact form page instead of opening an email program. Just pay attention you still need to execute the jQuery code to replace the text for the symbols: jQuery(this).text().replace(at,”@”).replace(dot,”.”);.

Now you can create simple and effective email spam filters that reduce spam considerably since spiders are unable to track emails, especially if you develop a personified code.

3 de January de 2010 0 comments Read More
How to install SQLite3 for Ruby on Rails on Windows

How to install SQLite3 for Ruby on Rails on Windows

For what I understood the Rails team decided that development was easier when using SQLite instead of MySQL thus making SQLite3 the new default for RoR versions after 2.0.2.

Installing SQLite 3 on Windows

  1. Go to SQLite official download page and look for Precompiled Binaries For Windows and click on the .zip file.
    In my case the most recent version is sqlite-3_6_20.zip so let’s download the file.
  2. After downloading the file extract the sqlite3.exe file to Ruby bin directory (Ruby » Bin).
  3. Now you need to download 2 extra files a .dll file and a .def file (damn you windows). On SQLite official download page look for sqlitedll-(version) being version the current version of SQLite. In my case this is sqlitedll-3_6_20.zip. You can find this file under Precompiled Binaries For Windows section on the download page.
  4. After downloading the sqlitedll zip file you need to extract the sqlite3.dll and sqlite3.def files to Windows System32 folder.
  5. After inserting the dll and def files on System32 folder open your command line and type gem install sqlite3-ruby
  6. Now SQLite3 should be properly installed on your Windows RoR server.
    Start your RoR server (Command line » ruby script/server) or use NetBeans.
  7. Open a browser window and type http://localhost:3000. You should get a welcome page saying «Welcome aboard». Click on the link called “«About your application’s environment» too see some information about your server. You should have a line saying Database adapter sqlite3

Ruby on Rails server with SQLite3 installed

And that’s it. You have installed SQLite on your Windows RoR server. Feel free to comment.

6 de December de 2009 4 comments Read More