Tuesday, October 14, 2008

HTML Tips & Tricks: PX and EM

Since I've never had the chance yet to implement the new design for this blog I decided to roll out a few HTML tips and tricks which I think could help people who are new to HTML web development.

This one focuses on the use of px's and em's in font sizes. In the not so old days if you want to set your website's fonts you would normally use px with font sizes.

A better way to design html web pages is to use em's rather than px's, because by using em's you would enable the site visitors to increase or decrease the font size using their browser. Although modern browsers already support font resizing with px but IE6 and below doesn't.

Another advantage I think is that when designing a page you should set [body{}] in your stylesheet to a fixed font size like [font-size:12px;] and then the rest of your page elements you could use em's this way your default font-size would be 12px but you can increase the size depending on the em's you set.

This is a simple trick I usually implement in the websites I develop.

Thursday, October 2, 2008

This blog's design will be updated soon...

You might notice that I've changed the template for this blog. I will be using this template temporarily until after I finish updating(upgrade) to a much better blog design as soon as possible.

For the meantime, just keep in touch...

Friday, September 19, 2008

Posting this using ScribeFire!

This post was written using ScribeFire, a nifty add-on for the Firefox 3 web browser. What I really liked about this add-on is that I don't have to browse through blogger.com anymore just to post a new blog. With this add-on I can easily browse through other websites while writing my blog. It is a lot easier and more convenient for me to update my blog using ScribeFire.



Having ScribeFire on Firefox has really helped me in my blogging experience. I hope that there would be more interesting plugins and add-ons coming from the developer community of Firefox.

Until the next blog....

Tuesday, September 9, 2008

Introduction to Codeigniter

In this article I will present to you the Codeigniter PHP Framework through a simple web application. The web app will show you how Codeigniter can be used to help in easily developing a simple web database application with Apache, MySQL and PHP.

I used the following setup on my server:
Apache 2.2 Web Server
PHP 5.2.5
MySQL 5.0

To start off, I will be guiding you through the process of installing the framework to you local web server. This will be the first past of a series of articles.

First, you need to get a copy of the latest build of Codeigniter (I used version 1.6.3). Unpack the file, rename the folder to "codeigniter" and then upload to your web server directory. Open config.php file which is located in the application/config directory inside the codeigniter folder and edit the base URL using your preferred text editor to something like this:


$config['base_url'] = "http://localhost/your-code-igniter-folder/";

Set the Index Page to this:

$config['index_page'] = '';

To enable security set XSS_filtering to TRUE, and then I suggest you also set rewrite_short_tags to TRUE to be able to use short tags without editing php.ini file.

Since we will be using MySQL database edit database.php with the following:

$db['default']['hostname'] = "your-hostname";
$db['default']['username'] = "your-username";
$db['default']['password'] = "your-password";
$db['default']['database'] = "your-database";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

We then have to edit autoload.php to be able to automatically load systems for codeigniter. For this project we need to load the url helper:

$autoload['helper'] = array('url');

Tip: The default controller loaded by codeigniter is welcome.php, to be able to edit this open routes.php and edit the following lines:

$route['default_controller'] = "welcome";

to something like this:

$route['default_controller'] = "main";

The next article will be on the actual code implemented in the application.

Sunday, July 13, 2008

JKDefrag Option GUI



Recently I opted to uninstall Defraggler from my laptop to try JKDefragGUI as my disk defrag utility. I am glad I switched to JKDefrag because it was able to free up a whopping 2Gb of space, something that Defraggler was not able to do.

JKDefrag is a very nifty utility to have in your Windows PC. Aside from efficiently defragging the hard drive it can also optimize your registry, perform a system cleanup, system files defrag (I haven't tried this yet), and wash, which accordingly removes all traces of previously deleted files from the hard drive.

I recommend this utility to everyone who are frequently using defragmentation utilities other than this one (of course!).