Wednesday, February 28, 2007

Sophie's World

My wife and I had to fight for this.    This is a New York Times bestseller so we can't be wrong buying this.

It's like a detective story and you'll be attracted to it.    Don't be fooled by the word philosophy because this is good even for children at 10 if your kid can manage the simple English.

If you have lived for 40 odd years and believe that you have a bit of authority over people around you then you'll be amazed that how naive you could be about knowledge of things around you, e.g. why does it rain?

I am certainly practicing expert beginner at the moment trying to follow the foot steps of Socrates, Plato, Aristotle and many others.    I don't aim at becoming a philosopher but at least I should attempt to think like a philosopher.

Ultimate Tag Warrior

[tag]UTW[/tag] is the most popular plugin for tags.    I just upgraded to version 3.14159265 when I saw this post.     I regretted it.

I have seen comments about UTW having trouble with WP 2.1, that didn't bother me as all my themes are OK.    With 3.14159265 tags didn't show up.    Categories didn't convert to tags.

I have just gone back to a working version which is 3.1415926 downloaded from here.   Lucky that I could always go back.

Header image

At last I found a header image for this [tag]Classical[/tag] theme from stock.xchng.

Not much left to do before this theme is really a downloadable theme if anyone wants it.

The width of the post area has been changed from 450 to 500px to suit normal image width.    The default Kubrick theme is so difficult to tweak in many respect I hope mine is a lot easier for beginners.


I started serving files for download in October last year.    First few files are theme/template for my [tag]barebones[/tag] series.    'Barebones' is a template of very simple design and it was a record of my learning process from ground up.    Since then there were 4 templates that I have provided for download.    I'm surprised to see that there are total of more than 380 downloads.    I hope those simple, bare minimum designs are easily understood by beginners like me and are helping others to build better eye-catching themes.    I have since then built few themes from those templates.

I'm too lazy doing other things in fact, while using the barebones template, I spotted couple of mistakes which I should have corrected at this site here.

The other 'popular' one is [tag]ezLogin[/tag] plugin which has recorded 387 downloads as of this writing.    Some said why didn't this feature built into the WordPress delivery.     I didn't like widget for sidebar but I think I should at least learn how to widgetize a popular plugin like this one.

I'm also flattered at more than a hundred download for my [tag]Sunset[/tag] theme which no doubt I'm using at my main blog here.    I have yet to discover another site using it or a modded version of it.

Tuesday, February 27, 2007

ezComments 0.1

This [tag]ezComments[/tag] [tag]plugin[/tag] is now at usable state.   This takes 7 arguments.

  • arg1, default = 1, i.e. track/pingback and comments are mingled together.   Use 0 to separately group them;
  • arg2, number of comments to be shown;
  • arg3, number of words of comments to be displayed;
  • arg4, text to be inserted between comment author name and date of comment;
  • arg5, html tag before each comment, default = <li>;
  • arg6, html tag after each comment; default = </li>;
  • arg7, time zone difference in hours.    If current time generated by time() is behind server timestamp of the comment then the time difference will be shown as negative. This can be verified by submitting a comment and tell the time difference by this plugin. The arg7 is then the figure displayed, in my case it was entered as '-5';

Monday, February 26, 2007

Widgetized ezLogin 0.2

Many thanks to David Forrest who widgetized ezLogin version 0.2.   This is now available from download page if you are using widgets for sidebar.

David will also be helping me to test a widgetized version for the latest 0.32.    If you are not using widget download is here.

ezComments 0.02

Now you see ezComments version 0.02 working side-by-side with the other plugin here.   I think mine is slightly better.

I used a workaround to tell trackback/pingback, i.e. if it's not a comment the comment_author_email field is empty.    This has assumed that site owner would have checked the options>discussion>'comment author must fill out name and e-mail' optioned in admin.

The comment_style in database returns nothing that I could use, simply don't know why.    Another characteristic is that if it's a trackback/pingback the comment content is wrapped by [...]. (PS: now have this removed for a nicer display)

I could possibly go further by letting user to have a choice to separately list track/pingback and comment. (PS: done, now they are grouped)

ezComments Plugin

I have written this plugin from ground up.   See this post for details.   The only trouble now is the time zone difference between where the server is located and here.    The quickest and dirtiest way appear to be just insert manually the time difference.

The other puzzle now is how to tell trackbacks and pingbacks.    Pingbacks obviously have no email address filled in that could be checked in the codes.    I'm doing a trackback test from this post here.    Getting the comment_type from the database appears to be not a solution.

The draft version of this plugin is working at also working here, it's named ezComments on the sidebar.

links for 2007-02-25

Saturday, February 24, 2007

ezLogin 0.31

Thanks David for writing in, his comment is here.    He has done a widgetized [tag]plugin[/tag] version.    John said it here that he was look for a plugin to work with widget.

If you are using 0.31 then you may like to do some little adjustments to the look of it.

At around line 70, you'll see below

if ($numcomments):
$return .= ""
$return .= sprintf(__('(%s) comments in moderation'), number_format($numcomments));
$return .= " »
else: $return .= "no comments in moderation";
$return .= ""

The closing tag /ul is placed after "endif".   It is better this way in fact

$return .= ""
if ($numcomments):
$return .= ""
$return .= sprintf(__('(%s) comments in moderation'), number_format($numcomments));
$return .= " &raquo;
else: $return .= "no comments in moderation";
echo $return;

The text or link about comment moderation is then placed outside the unordered listing on a separate line.

WARNING: don't copy from the box above as codes are not displayed correctly above.

Friday, February 23, 2007

Recent Comment Plugin

I have been using Raoul's Simple Recent Comments plugin with some minor mods to it.   I tried to improve on it and asked question in forum, didn't get anywhere at the end.

Raoul's plugin isn't simple and with fairly complicated sql query using clauses like "LEFT OUTER JOIN", "WHERE", "ORDER BY" and "LIMIT" etc.

Now I have rewritten it from the ground up getting hints from WordPress's \wp-admin\index.php file.    This is the file first loaded when you logged in.    I can see recent comments listed there.

My plugin is now very simple with 2 reusable functions written, one to truncate the comment, using PHP's explode and implode, and the other one to calculate time different between when comment was posted and "now".    I can find good use of these functions elsewhere.    Raoul's plugin uses "SUBSTRING(comment_content,1,$src_length) AS com_excerpt" which is far too hard for beginner like me.

On the sidebar I have put them side-by-side for a test.    My [tag]plugin[/tag] is named [tag]ezComments[/tag].

PS: there is an issue on the time different my time zone here and where the server is located.    I could manually adjust to this but there should be a better way I guess.

links for 2007-02-22

Thursday, February 22, 2007

ezLogin 0.31

One more link added to this [tag]plugin[/tag] now at version 0.31.

It was like this at 0.3

I thought I could make them shorter and simpler so it looks like this now at 0.31

Is this better? "Admin" (username) is a link when clicked brings you to the page where you could change your profile/change password. Now you can see number of comments in moderation as well so you could go moderating your comments with just one click.

Download page is here, this post shows you how to use it in your sidebar.

links for 2007-02-21

Wednesday, February 21, 2007

Blog from Windows Live Writer

This is a post sent from beta version 1.0.1(6).    Get a free copy here.   Download is a 3.58Mb msi file.

Installation and detection of this blog was a breeze if you have your blog installed on root domain.      I have to manually enter blog url since this blog is installed on a subdomain.

This works like a word processor and interface is clean and easy to use.    Features are pretty full considering this is only a beta, you have

  1. Date/time editing using a calendar
  2. Comments open/close
  3. Trackback allow/deny
  4. Categories selection (can't find add new category?)
  5. Tag insertion
  6. Download all your published posts (all, I doubted as there are over 800 here?)
  7. Automatic save drafts
  8. View in normal, web layout, web preview and HTML
  9. Like Word you have automatic spell check before publishing and even autocorrect
  10. Preview in broswer mode and updating of style such that preview is accurate

Best of all, which makes blogging straight from Word 2007 useless, is that you could view/edit HTML code.

If you are a developer you could write plugin to make this better, e.g. a good plugin now available is flickr4writer.

Blogging from Word 2007

I have just experienced that recently. Setting up was easy and there was no problem at all blogging from within Word. If you don't know such feature exists in your piece of expansive software just purchased read this.

Does this serve my needs? No, not at all. I'll still be using Performancing plugin for Firefox to blog from my browser.

If you are writing a document with multiple use then blogging straight from Word is great. For me it's very likely that I may have to amend the codes behind adding class to float an image or adding hot links of images from Flickr etc.

I'll wait when there is add-on for Word available such that I could amend codes behind my blog posts.

links for 2007-02-20

Tuesday, February 20, 2007

Classical isn’t Kubrick

The default theme "Kubrick" is notorious in tweaking. Although it comes with WordPress it isn't meant for beginners. If you don't believe me do a quick search in Support forum.

This theme named [tag]Classical[/tag] that I'm working on was originally Kubrick. Now this doesn't look like it. The difficult part for beginners in Kubrick is the header image. The file functions.php isn't easy for beginners.

Now these difficult parts are gone.

Face lift for Sunset

A minor face lift was made to the [tag]Sunset[/tag] theme. I'm not releasing a new version if you are using this theme you can consider changing just the CSS file following below. The few lines in the CSS file were below

#leftbar .tab {
background: url('image/footer.gif') repeat-x;
padding:5px 0 5px 5px;
#leftbar .tab a {
#leftbar .tab a:hover {
padding:5px 0 5px 5px;

Now change the above lines to

#leftbar .tab {
background: url('image/tab.png') repeat-x;
height:27px; /* was 30 */
#leftbar .tab a {
padding:5px 0 5px 5px;
#leftbar .tab a:hover {
background: url('image/tabhover.png') repeat-x;
padding:5px 0 5px 5px;

Take note at the new image "tab.png" and "tabhover.png" used. You can see the new sidebar tab here.

I didn't use any fancy software to do the new tab image. Hope Bill doesn't mind I "borrowed" two 1x27 pixels strips from his WMP version 11. That makes a good match for dark theme. I cropped the image using genuine Microsoft Paint and Office Picture Manager.

You can do this all by yourself. If anyone really wants a download let me have your comments.

Friday, February 16, 2007

Sidebar improved

Just added some colors to the sidebar show/hide menu groups, mouse over to see if you like it.

Links are also added to alert visitors if they are looking for my [tag]ezLogin[/tag] and [tag]ezCount[/tag] plugins.

Thursday, February 15, 2007

Gmail for everyone

Anyone can sign up this free service now with 2.817Mb (and counting) of storage. Head up here.

The new feature called "mail fetcher" is also available now, see this for details. The catch is that you stay with Gmail and check mails from 5 other non-gmail accounts.

Wednesday, February 14, 2007

My sites down again and returned

This happened again just an hour ago. My host's technical support said this time is different from last event.

The incident on the 1st was related to hardware and that issue has been addressed. This incident totally unrelated and was a result of an inbound flood of http requests which were unable to be filtered out in time to prevent the disruption to service

Theme is broken in IE7

This theme [tag]Classical[/tag] is perfectly OK in Firefox. Found it broken in IE7 with a few menu groups moved to the end of the post behind a "div" for tagcloud.

I commented out the php lines for the moment, here are the current findings so far

  1. It's not because of the conditional sidebar scripts

    if ( is_home() || is_page() )

  2. It's not because of the DHTMLGoodies showhide javascripts that I used for this theme.
  3. It may have something to do with the new function wp_list_bookmarks in WP2.1


Currently it works if I use the deprecated function

without any parameters.

Search goes on. Problem is now solved. It was all because of the missing "ul" tags wrapping around of function.

Tuesday, February 13, 2007


You are seeing Classical now.

There aren't too many changes to the default theme v1.6 that comes with WP2.1 I changed below to suit my taste.

  1. Font for the post
  2. Post meta, aligned left in 3 lines
  3. DHTMLGoodies show/hide scripts for the sidebar
  4. Color change, very minor

Snap Preview Anywhere Enhancement

You may find the SPA annoying whenever you mouse over a link here. It is annoying especially when you really want to click the link instead of previewing a site. PS: I have to use 2 different sets of scripts because having an image at the end of each link in a dark theme isn't very nice.

This is a major enhancement check out this blog post here. I just don't see why I have to sign up again instead of them telling existing users how to amend the script already placed in my files.

Now to see a preview you have to mouse over exactly at that little icon at the end of each link.

Sunday, February 11, 2007

Back to Basic?

Yes! There is no theme switching here as you have dedicated site for each theme I made, check out links on the sidebar.

I'm going to work on this Default theme and I'll name it "classical" for the time being.

Any improvements, bug fixings and changes will still be posted here for all the themes I made.

Saturday, February 10, 2007

Sunrise Sunset

[tag]Sunrise[/tag] [tag]sunset[/tag] is what nature does.

Simple is beautiful so is theme for this site. I'll have only 2 from now on. Switching between sunrise and sunset is at the footer. If you come here in the middle of the night you might want to see sunshine and bright background. Once in a while you want to see colorful sunset.

New Home for Sunrise

This theme [tag]Sunrise[/tag] has a new home.


New home for Sunset

This theme has a new home.


Thursday, February 8, 2007

Script writer, detector what are you?

I don't know why.    I do this all the time.

Be a life detective is what I have written about earlier.    If I'm really analyzed by a professional then the outcome could be that I'm not confident enough in what I do.

In my first job in this industry I had to work very long hours, it was a tiny little company with only a few people.    I also spent many "brain hours" outside the office to get myself mentally prepared.    Perhaps I was scared to be unprepared at work.    That became a habit.

When I have gained a bit more experience I enjoy predicting outcome, e.g. how my client will react, what was in his/her mind, why did he say this or that....etc.   I become a detective.    In recent years I analyzed myself.

One of my client gave me a nickname "Mr Agenda" meaning that I don't like attending meeting without agenda.    I'm sure many of you know of some companies that like holding endless meetings without agendas and following up actions.   With agenda I know what to prepare for.

Like a detective I like writing up scripts to describe the crime.    With the limited information and a bit of guess work I could make up the stories behind someone's behavior, motives, movements....etc.     95% of the time I was wrong.    This doesn't matter as I'm doing a life long experiment, investigation, study or research that nobody can ever be assured of outcome.    This has been a good practice mentally helping me to understand people around me which includes the one in the mirror and be prepared.

We are writing our own story and acting a role everyday.    Are you prepared?   Do you want to have a look at the scripts already written for you?

Change log - Sunrise 0.5

I see a few downloads of [tag]Sunrise[/tag] already therefore I should be recording here a few minor changes to the CSS file. These are my omission and/or minor improvement.
#centerpost ul ol li {
margin-left:65px !important;
#centerpost ol ul li {
margin-left:65px !important;
#commentform {
font: 12px "Trebuchet MS";
#commentform #author, #email, #url {
background-color: #ffff80;
font: 14px "Trebuchet MS";

The first 2 are for unordered listing nested within ordered list and the other way round. The bottom 2 are to polish up the font for the comment area.

Wednesday, February 7, 2007

Sunrise 0.5

This version [tag]Sunrise[/tag] is done and I have stopped working on it. See it here in action.

This site has this theme available as well, if you switch to it, but not using exactly the same codes e.g. buttons at the footer only applicable to my main site.

I'm quite pleased with this design and this is available for download here.

PS: Perhaps some notes for those who may try this
  1. I have used two sets of javascripts from dhtmlgoodies.   The scripts are in one single file inside a "js" folder.   Reference to this file is at the header.
  2. The dropdown content script has an optional script for speed adjustment it's placed at the footer, it looks like below
  3. The List based DHTML menu has an arrow image named "arrow.png" for the sub-menu.   This must be placed at the root of your WordPress folder.    You can change this file but the javascript file must also be changed accordingly.
  4. The active menu at the "topbar" automatically hides itself when the mouse cursor has moved away and the default time was 1200 microseconds.    I have set it to 2000 which is 2 seconds.    If you want to change that look for the variable "timeBeforeAutoHide" in the javascript file and change the figure after it.
  5. There are couple of page templates available for this theme.    One of them is for blogroll, categories and archives, example this one.    Another one is for theme-switcher (e.g. this), at present the theme switcher plugin doesn't work at the "topbar" of this theme.
  6. The Simple Recent Comment plugin (current version 0.1.2 by GNot) if you are using it doesn't work out of the box.   Look for this at around line 81.
    $output .= "\n

    and have it changed to
    $output .= "\n";
    Do the same at line 85 where this time remove the "ul" closing tag there.
  7. As a feature the default WordPress search isn't available because I use Technorati and Google's site search.   You could always add that back in if you want.
  8. Plugins that are working great for this theme are
  9. Various places that you have to customize for your own site such as Feedburner's feed, meebome, Google analytics and Snap Preview Anywhere (script in header.php file) etc.

Tuesday, February 6, 2007

This theme will stay

This is how I like it

  1. This is simple
  2. Almost imageless
  3. Showing only 3 posts
  4. No fancy colors
  5. No sidebar
  6. Relatively fast loading (I really can't tell)
  7. Fluid design
  8. Works almost the same in Firefox 2 and IE7

I have spent too much time during last week making this and have missed few topics that I should have written about. Perhaps I should stop right here.

What I have previously in my other theme [tag]Sunset[/tag] is now all here. Make a switch here if you want.

“Sunrise” is almost done

It's almost done here, it's still in the name of S1 (temporary nickname for [tag]Sunrise[/tag]) at the moment.

I dropped the idea of "no menu" and the "topbar" there is of minimalistic design so it's loaded pretty fast.    As in this site I haven't yet added styles for blockquote, codebox (not needed there?)...etc

The default block quote

Monday, February 5, 2007

Both FF and IE7 will like this now

The browser issue for this theme [tag]Sunrise[/tag] is now fixed, see this post here.    If you are coming with IE7 it's working but of course not as nice as in FF, e.g. I couldn't control width of the box when you mouse over say "archives".

I'm now working on an extreme version as I was wondering how I could group menu items in the "topbar".    That extreme menu version will have "no menu".

Saturday, February 3, 2007

“Simply White” Theme - Part 2

I have the problems removed and it's now working here for both Firefox and IE.    At my other site I named it [tag]Sunrise[/tag].

To identify the problem I made a copy of it as 'S1'. S1 was working fine locally on both browsers, it was then uploaded. It failed as predicated in IE7 once I have my site's sidebar codes copied across. It was narrowed down to the sidebar.

Next step was a file compare and I found below code was causing the problem.

Once I have 'sort_column=menu_order' removed it worked?!!! I don't know why but this cured.

The other culprit was this

I left only "title_li" parameter in it still didn't work. I had to go back to
<?php get_links('60', '
  • ', '
  • ', '
    ', FALSE, 'id', FALSE, FALSE, -1, TRUE); ?>
    to make it work. Again I have no time to find out why.

    The outstanding tasks for this theme are
    1. CSS for links and sub-links at the topbar menu
    2. An 'Sunrise' image for header
    3. Theme-switcher plugin to work with this theme
    4. May be lastly a way to even hide the topbar menu

    Friday, February 2, 2007

    This "Sunrise" theme

    You'll see there is no sidebar and the menu which is supposed to appear between the lines above isn't there if you are using IE7.

    It's perfectly alright if you are using Firefox which is recommended.    I described the problem yet to be solved here.

    I'm pleased with this [tag]Sunrise[/tag] design as long as I could solve these outstanding issues.    If you want to switch to the old dark theme named 'sunset' look up this page in the menu above.

    “Simply White” theme

    I have a little problem with this design (PS: now called [tag]Sunrise[/tag]) using scripts from dhtmlgoodies.

    The menu, which I called 'topbar' in the theme, is made of list based DHTML menu.   This is working fine as in this theme here.    I then added another script called dropdown content for the postmeta such that it's hidden until it's clicked.

    I have both incorporated into a theme and it was working fine locally.   I uploaded it last night for trial here it was also all OK running in Firefox.   In IE7 I got error with the 'topbar' menu failed to show up.

    To identify the issue I disabled the 'topbar' scripts and the hidden postmeta part at this site was working OK.     For this site the postmeta part hasn't been added and the 'topbar' menu is working fine on IE7.

    I really don't know what caused it.    I'll restore both scripts here and at least it works in Firefox.

    My sites were down for a short while

    It was last night just before I attempt to upload my latest theme "[tag]Sunrise[/tag]" which you are seeing now.

    All my domains are down then I checked out my server status at my hosting.   The server load was showing 34.49 and "inotifyd" was shown as failed.

    Technical support said "inotifyd" has to do with the flashback server.   This is the first time I experienced the flashback feature of my hosting.    In fact after the server has come back I changed the theme without success I guess I was just viewing cached pages sent from the flashback.

    links for 2007-02-01

    Thursday, February 1, 2007

    Improved ’simply white’

    Solved couple of issues for this theme (PS: now called [tag]Sunrise[/tag]).

    1. Modified Simple Recent Comment plugin such that it works with the menu for this theme. The problem was due to 'ul' wrap sent from the plugin which is not needed.
    2. The 'topbar' menu modified a bit, I think this looks better.
    3. All images are now having border and background except that for Technorati for tags.

    I have yet to look into theme switcher plugin (PS: now created a page for that, switch theme) to make it work for now theme switching is available from a page.