Skip to main content

Ivan Teoh

Something personal yet public

When you insert cd or plug usb drive, the Windows XP will always scan through the device and pop up autoplay dialog box on asking you "what you want to do with these type of files". That will increase risk on letting the virus from the device attacking your computer. I want to stop this. Below are the steps (only for advance user) on disabling autoplay in Windows XP:

  1. Go to Start Menu Run and type in services.msc for open services windows.
  2. Look for Shell Hardware Detection service and click Stop the service.
  3. Right click on Shell Hardware Detection and click Properties on the context menu.
  4. Click Disable as startup type in shell Hardware Detection Properties dialog box then Ok button to close the dialog box.
  5. Later if you want to start the Shell Hardware Detection service, do the steps above, but click Automatics as startup type in Shell Hardware Detection Properties dialog box and click Start the service.

My gallery page is up. This page will have all my travel photos. I will group all the photos taken on the same place in the same gallery. Then I will group all these galleries into my travel album. Currently I am using NextGen gallery (WordPress plugin) for creating this page. For now, both the album and gallery will be in the same page. How to do it? First, I have to make sure Deactivate gallery Page link is enable (checked) in Gallery > Options > Gallery > Gallery Settings section. Then I need to add title, title description and preview image on each gallery. Create an album for grouping all the related gallery on Gallery > Album section.

From now onwards, this site will have PNG image. As PNG image have smaller size compare to JPEG image. It will save some space in the web server. The gallery below have two images. The first one is JPEG image and the second one is PNG image. If you can't see the second image, it means your web browser is old and can't support PNG image. It is time for upgrading to newer web browser, such as Internet Explorer 7, Firefox 3, Safari 3.1, Opera 9.5, etc.

I want my site to have a horizontal menu. So that my friend can easily browse to the page they want. Here are the steps for WordPress 2.6 that I do:

Step 1: Create horizontal menu showing page list

First I have to decide what page need to be in the horizontal menu. Currently, I just need "Home", "Blog" and "About" pages. This navmenu division is right under header division in header.php (theme template file):

16-header.php (Source)

<div id="navmenu">
    <li><a href="<?php echo get_settings('home'); ?>">Home</a></li>
    <li><a href="blog">Blog</a></li>
    <li><a href="about">About</a></li>

Step 2: Add style on the horizontal menu

I need a style that match with the theme. I did it in the rush. After some study, the style.css (theme template file) will have additional code as below:

16-style.css (Source)

/* Begin NavMenu */

#navmenu li
  display: inline;

#navmenu a
  margin:0 10px;
/* End NavMenu */

This site will be customized as bellow:

  • WordPress start at the site's root,
  • The blog will be located at
  • The other pages, such as "about" page will be located at

To achieve the goals above, follow the steps as below:

  1. Create two more pages, "Home" and "Blog" beside "About" page in Manage > Pages > Manage Pages section.
  2. Write something on "Home" page. That will be my front page.
  3. Leave "Blog" page blank as it will be my posts page.
  4. Change the address to the site root directory's URL, in the box for Blog address (URL) of Settings > General > General Settings section.
  5. Update permalinks structure to begin with "/blog/" in Settings > Permalinks > Customize Permalink Structure > Common settings section. In my case, it would be "/blog/%year%/%monthnum%/%postname%/".
  6. Set "Home" as Front page and "Blog" as Posts page in Front page displays of Settings > Reading > Reading Settings section.
  7. Move the WordPress core files to the new folder. In my case, "blog" folder. I did this step in the beginnings of creating WordPress blog platform in my web hosting.
  8. Copy the index.php and .htaccess files from the WordPress directory ("blog" folder) into root directory of the site.
  9. Edit index.php in root directory with text editor.
  10. Change the line that says: require('./wp-blog-header.php'); to the following, using directory name for the WordPress core files: require('./blog/wp-blog-header.php');
  11. Save the file.

I want to customize WordPress, but I don't want to ruin WordPress default theme 1.6 by Michael Heilemann. What I can is duplicating the theme folder. My new theme name will be "Imized". I copy the whole folder default in wp-content/themes and paste to newly create folder named imized. That is not enough. I won't see "Imized" theme in Available Theme section. What did I miss? More one step, which is editing the comment inside style.css:

13-style.css (Source)

Theme Name: WordPress Default
Theme URI:
Description: The default WordPress theme based on the famous
<a href="">Kubrick</a>.
Version: 1.6
Author: Michael Heilemann
Author URI:

    Kubrick v1.5

    This theme was designed and built by Michael Heilemann,
    whose blog you will find at

    The CSS, XHTML and design is released under GPL:


The theme won't be display if the name is the same. After previewing my new theme "Imized" in Available Theme section, I click Activate Imized to activate my duplicate theme.


Today I studied NextGEN gallery homepage. By following NextGEN gallery review introduction, I left all the setting by default. I upload all the previous post images. And then writing [ gallery=1 ] in the post, without space between square brackets will make the gallery with the id "1" shown in the post. From now on, I can't use add image button in ScribeFire for uploading images in my blog if I want to use this plugin. I will use it for now.

Which WordPress gallery plugin I should use? Initially, I want to use Gallery 2. After some study from internet, I realize that I need WPG2 plugin for WordPress to access Gallery 2. And the integration is not easy. At the end, I pick NextGEN Gallery. It is a plugin mainly for WordPress and it used JQuery. I love JQuery. After deciding the gallery plugin, I need to study it quickly. My friends want to see my Angkor Wat trip photos.