Friday, August 31, 2007

Darkhalf 0.2

Added an 'About' section on the left hand column of the 'dark' footer.

Also in the middle section there is now 'Recently' column listing out recent posts. A custom theme function is used to generate this list. I could input parameters 'no of posts' and 'no of weeks' in the function. Currently I'm showing 10 Nos of entries in 2 weeks so it's simple 3 lines.

Thursday, August 30, 2007

This is DarkHalf 0.1

This has a bottom section in black containing all you need for navigation so it's called Half-in-Dark.

Content is not centered in the middle instead it's flushed left. Sufficient space on the right if you wanna put some photos or ads.

For a change this is not of fluid design. The color scheme is not final just something very convenient for the time being. By the way there is no footer in this design, all those stuffs are at the left bottom corner.

For a change again I'll be looking for a suitable header image for this theme. This looks nice in Safari, Firefox for Mac or Opera but terrible in IE especially if you squeeze the browser sideway.

I'm testing Tinyau's Tag Cloud Plugin.

PS: the Tag Cloud plugin is now working, Tinyau found it. Apparently the
function action_add_template_vars( $theme, $handler_vars )

isn't valid prior to r777 if it's written this way

if ( !empty( $this->tag_cloud ) ) {
$theme->tag_cloud= $this->tag_cloud;

the last line has to be replaced by
$theme->assign( 'tag_cloud', $this->tag_cloud );

Tuesday, August 28, 2007

Roundbox is done

I have Roundbox 0.45 activated here [site removed] so theme here is back to default K2.

What's next I don't know but I have been looking at Interface to see if there could be visual trick that I could use to enrich the menu display for my themes.

This Theme changes a bit

I have added color to the bottom part of this theme. I must have said this thousand times that I'm no good at color. You just have to tell me if this is good or not. In fact I like it dull and boring and believe that simple things last longer.

You like this or not I'm afraid I'll be keeping this theme for a while.

TP-Link Router

I didn't realize my wireless router is more than 1 year old now. I bought it July last year.

Since I bought my HomePlug I was using the wireless router as a hardwired router. Friend of mine said why don't we swap, I said OK.

I now have a TP-Link R410 a very old model. I didn't have the original manual but managed to find a similar one to know how to reset it to factory default. It works at last after a few trials.

Monday, August 27, 2007

This is Roundbox 0.45

I have now named the Class as 'Roundbox' for this theme in theme.php

define( 'THEME_CLASS', 'Roundbox' );

In all theme files I then call the custom function specific for this theme using e.g. Roundbox::draw('top','small'). To save typing and typo errors I have the codes generating nested [div] now coming from a function as I have this small and large round corners all over the place. The function looks like


I just have to specify $where (top or bottom) and $size (large or small) at the place where I need them.

The same way is used for displaying postmeta as well. I added a function post_meta for use in the theme files. As postmeta display is repeated a few times in home, entry.single, page.single and search therefore many lines can be replaced by just one line. The lesson learnt is that $post and $user must be passed to the function, thanks Tinyau for the advice.

Sunday, August 26, 2007

Tinyau a Habari Committer

Great to read from here that Tinyau is now a committer of Habari.

I think many of us in the Chinese blogging community will share the joy of having someone in this part of the World speaking our language participating in such a meaningful project. Why is Habari an important project to the blogging world you ask? It's because of WordPress. If you know that core developers of Habari are well known in the WP community then you know why.

As Habari is still an infant so I could pick up a lot along the way. Building theme for Habari for my own use isn't difficult. Testing plugin for Tinyau would also be joyful as our timezone is the same such that chatting with him on GTalk is only few clicks away.

Buidling plugin for Habari is still a far away target as I have yet to get familiar with OOP of PHP and get used to 'hook' and 'sink' of the core. I still don't understand why programming geeks like fishing that much. I have never in my life spent hours holding a nylon wire waiting for a fish.

My current work is simplifying this theme using the MyTheme Class in Theme.php.

Saturday, August 25, 2007

Roundbox 0.4 has colors

Now added colors to this dull and boring theme.

The colors are at the bottombars with bright yellow titles. They look pretty good to my eyes in Safari.

I'll be keep this for a while here before using this at my main site

I also found a few pages that have lost during the import. Apparently if the slug of your page is the same as one of your post then you may hit problem. The importer will add a number suffix to it e.g. 'blogging' for an imported entry and 'blogging-1' as slug for a imported page due to both of them having same original WP slug as 'blogging'.

Friday, August 24, 2007

Roundbox 0.4 has colors

This is roundbox version 0.4

There are only 2 columns and the width of the bottombars are the same as the main content. The content within the first bottombar box isn't expandable just to make it different from the bottom one. That first bottombar box appears only at home.php

I'll be changing the color of the bottombar boxes but I'll do it tomorrow or later.

Tuesday, August 21, 2007

I switched

My main blog has switched to Habari.    Is it risky may be but I'm sure I can learn along the risky path.

I'll be keeping this site as I don't think I'll be able to write plugins for Habari so I may be still able to spare time improving a few plugins that I have done for myself using this site.    Designing templates/themes are relatively easily.    I'm not saying that I could design something really beautiful but making one usable isn't that difficult.    I have done a few already and one that I like is being used here.

Creditability, Reliability and Traceabilty

I'm coaching a new team. I keep on repeating these terms so I made them easy to remember. This is C.R.T.

Creditability is

bringing or deserving credit, honor, reputation, or esteem.

Reliability is

that may be relied on; dependable in achievement, accuracy, honesty, etc.

What we are doing is managing expectations from above and these 2 are most important things that we have to deliver at work. Nobody would expect teammates or subordinates to be unreliable and not creditable.

So why is traceabiltiy important? This is because 'words are cheap' therefore everything we do must be traceable such that we are seen to be well organized. Making things we do documented and traceable will also enable us to learn from our own mistakes.

Monday, August 20, 2007

This is 759

Just upgraded this to r759 and testing Tinyau's Tag Rendering plugin early release. It's now working at a 'round edged' box below.

Thursday, August 16, 2007

Looks different?

My first blog post was dated December 2004. I signed up to Blogger.

In September 2005 I switched to hosted WordPress. WP was version 1.5.2 at that time.

Now you are seeing this site running on Habari developer version 0.2.

Tuesday, August 14, 2007

Polishing RoundBox theme

I'm using this site (now taken down) as a testbed to further polish my theme 'RoundBox'.

I have added

  • recent comments back on but in short form

  • site statistics

  • Google ads between posts and Amazon ads at the end
  • Feedburner subscription by email
  • Removed the ugly '[]' brackets from the pagination

I'm also adding a function in the theme.php to generate html tags necessary for the round corners. This would simplify the code in many files by just a few lines in the theme.php.

Recent comments plugin or not

Tinyau gave me valuable comments on this theme. He thinks the 'bottombar' may be of same width of the content. I have to think about that because I may not have sufficient width for the content.

My first attempt for a plugin was to display recent comments. My requirment is very simple, i.e. just display a few (user selectable) comments with links to the post and how long ago that comment was posted. Tinyau has been using a fairly complicated one for his blogs and he introduced that Brian's recent comments plugin to me which Tinyau also ported to Habari. That's far too much for a dummy like me.

I decided to go back to basic. The Habari wiki has a great example to follow. The only addition I did was to add a function to compute the time difference between time() and when the comment was posted to tell 'how long ago'. That function is placed within the CustomTheme class so I just call it like this

customtheme::timediff($comment->date,2,0,'ago ');

where 2nd argument of the timediff function is number of digits, 3rd is for timezone difference and last argument is text to append the output number.

Monday, August 13, 2007

3rd attempt worked

On last Saturday I tried it for the 3rd time. The subdomain is named 'h3' as I may have 4th or 5th attempt.....

It's working here (now taken down). I suspected that it was about rewrite_rules again as the pagination wasn't working. I used the upgrade MySQL queries provided in this this thread and it worked.

From this thread I see that I wasn't the only one reporting this issue with DR0.2 or svn 745 so I guess I have reported something helpful.

Owen mentioned here, when discussing roadmap for 0.3, that rewrite_rules should be taken out of the database I couldn't agree more unless something like a upgrading script (run as a php file with database connection script, password etc filled in by site owner and MySQL commands needed to EMPTY tables and INSERT new rules) is provided everytime changes are made to the rewrite_rules in the database. This is exactly one of my key worries when deciding on migrating my data to Habari.

Friday, August 10, 2007

Getting ready for migration

I have done a few trials last night at my other domain name getting ready to migrate my main site to Habari.

I used shell to checkout latest svn 745 to a new folder named 'hdr02'. I forgot to enable php5 at that domain name so copied the .htaccess file from this domain there. Creating the folder first was a bad move because I should have created a new subdomain for it first. This was later fixed by pointing the subdomain to that subfolder under 'public_html' in cpanel. It worked. This installation was smooth but just before the site was shown there appeared a long page of error right ahead of the K2 theme, that was weird. Navigating in dashboard was OK and I uploaded plugins and themes I wanted. Next was importing from WP, some 8xx posts. That took a while with lots of errors but at the end of the import the page was cleared. This didn't surprise me as I saw similar thing before while importing but that was just a flash due to a much smaller size database.

This site is here (now taken down) which is broken as pagination isn't working and some pages are lost. I took a screenshot of the errors I saw during import.

I decided to repeat the excercise above the proper way, i.e.

  1. Create a new subdomain h745

  2. shell checkout svn 745 to this subfolder

  3. Run Habari installation (still seeing errors ahead of the k2 theme, oops forgot to take a screenshot!)

  4. Import from a WP site (found same imorting errors or to be exact WARNINGS)

The site here (now taken down) is also broken due to pagination not working. Again some pages are gone.

Investigation goes on!

Thursday, August 9, 2007

This is 742

I did upgrading again. I tried shell access and svn checkout command at my hosting.

There was a few hickups but at the end I did it. I also realized that target folder of checked out files was at the wrong place, i.e. same level as "public_html". I may have to try again the proper command to check files out to the correct folder I want.

What I really want is tutorial on svn commands for use in bash.

With the new svn folder I only need config.php and .htaccess files with themes plugins I want to make it work. That is pretty simple and I'm confident now to move my content from WP and transfer domain name.

This is Roundbox 0.3

I have improved (my words of course) this Roundbox theme a litte. The 'all CSS dropdown menu' is outdated therefore not used anymore. I used a 3 column fluid bottombar for menu at the bottom. How does this look?

Link color is also changed as well and it is not that dull now.

I haven't done further work at shell command line last night as I was tired. I think I need to study a bit more before I could find my ways in command line. Found good resources here. Perhaps I need some practice at a local machine first.

Love your enemies

First of all I shouldn't have called them enemies.    They are our teachers people we need to grow, to learn, to progress to.....they are everything you need in life.    AQ, adversary quotient, we all know what it is now but I didn't come to realize it's great effect until after a few events.

We know how to say friends are mirror we need to see the real 'us'.    Very few would consider enemies real friends.    When I was younger I certainly wouldn't say, when I was beaten by these 'friends', I'm grateful to them.    Now I know.

This is again "think the opposite" attitude.

Few years back I was very upset by a super bullying client who believed to have racial superiority here.    It was few years of hard time and very hard work.    The dark years were also complicated by some internal politics which we tried very hard to avoid but failed.

This turned out to be a great lesson.    I have to be grateful to these people we once hated.    We won't have learnt these great lessons and demanded ourselves to perform beyond our capacity if not because of their bullying behaviour.    We won't have the chance to demonstrate our abilities to bystanders who later become our admirer or superior.

When hard time arrives next time welcome it, enjoy it and earn it.   Be grateful to those who send you those treasure.    Stay away from those who said how great you are as words are cheap they are poison in candy wrap.

Tuesday, August 7, 2007

This is h741

This is developer release 0.2 if you want to try here it is.

I know what I did wrong last night, too tired perhaps, during the setting up of this h741 subdomain and have the config.php file pointing to the old database running the original site. What I should have done was to empty the rewrite_rules tables. I thought I have done that but obviously I haven't and I did that again this morning making sure the tables were empty before running the sql queries provided by Chris Davis.

The orginal site running DR 0.1 is still having problem but I don't care as I could now have that folder complete erased and rename this folder h741 to practice this content moving.

I'll do that tonight if I can find the time.

BTW this is my another theme named RoundBox just to celebrate release of 0.2!

This is

This is to document how I moved (not actually, just upgraded Habari) content between versions, not very professional, but worked.

  • Create a subdomain

  • upload DR0.2 files of the latest release or svn

  • create a database and/or user for this temporary installation

  • run Habari installation not necessary in fact see later post

  • replace config.php of with that from the working site of DR0.1 (say

  • use phpmyadmin to empty (not drop) tables for rewrite_rules in database of

  • run SQL queries (download it from here) to INSERT latest rewrite_rules into the database

At this point should be working under DR0.2 pointing to database of Now if your hosting has this then

  • Login into your hosting cpanel

  • point the subdomain document root of to the folder of

  • delete subdomain (just amending server's httpd.conf, content of subfolder should stay normally)

If you are using Tinyau's Flickrrss Plugin you will also have to amend the url of the cache folder in the plugin config page.

Upgrading DONE!

It doesn’t have to be that clumsy

Of course it doesn't have to be that clumsy as I described in last post about upgrading to latest version.

If you have shell access to your hosting account you could use command line like below to check out the latest svn copy to your installation folder.

svn checkout "habari"

I think "habari" should be my installation folder but am not sure as I haven't tried shell access yet perpahs Site5 support will show me how.

By this I think I could always keep my installation fresh with the latest svn copy.

There is always another clumsier way to overwrite all files in the installation folder.

Saturday, August 4, 2007

New members for the MacBook team

First off is a small, portable, USB notebook speakers.    This is designed for carrying with your notebook.


Next one is Apple's mighty mouse.


The Apple mouse is great my only doubt would be the reliability of the tiny scroll ball which feels very fragile.

Total investment for this lot $90.

Thursday, August 2, 2007

Best Slideshow Application for Mac

I entered the above search string in Omgili and I got below from the first conversation.


Photo to Movie

Final Cut Pro

Adobe Photoshop Lightroom


Some of these are obviously not for me due to the pric$ tag.

By the way Omgili stands for 'Oh My God I Love It'.   It taps into people's personal experiences, solutions to problems and ideas and opinions available in the web.

Wednesday, August 1, 2007


I have an outstanding obligation to make a DVD slideshow for my classmates.

For that reason (excuse) I picked Vista Ultimate version upgrading.    I have used the Windows Movie Maker 2 for XP before and it was easy to use and for a free application it is indeed powerful.    The latest version in Vista is even better on burning your project to a DVD.

My new toy MacBook comes with free applications such iPhoto and iDVD doing similar things.    I tried shareware PhotoPresenter designed for Mac last night.    To my disappointment it isn't as good as Movie Maker as it lacks feature like the time axis and the sound track layer.    PhotoPresenter is truly easy to you, no doubt your grandma would be able to burn a DVD with built-in transitions from her iPhoto library in no time.    That's not for me and my classmates will not be satisfied with that.

I'll keep looking.