psychopyko welcome to psychopyko.com

29Nov/09

Musings of a psycho #48

Another hot week in Sydney and another week closer to the end of 2009!

Sunday, 22 November 2009

#326 - Hot weather makes me feel lazy.

Today was a super hot and humid day in Sydney and I just simply felt like doing nothing at all. The day was indeed a very lazy day, just sat at my desk doing not much at all. In fact halfway through the day I just decided to lie down and sleep, though not much longer afterwards I woke up because it was too hot. Tried googling to see if there was any explanations to why hot weather makes people sleepy or lazy, but unfortunately didn't come up with anything useful other than a random comment on a forum saying "Cold weather makes me sleepy too. Being awake makes me feel sleepy."

Continue reading "Musings of a psycho #48"

15Aug/09

More Link Modifier…now in Danish!

It has been about two years ago when I decided to give php a go and write a WordPress plugin. This plugin was what I called "More Link Modifier" and it came about because I didn't like the behaviour of the default 'more' link, which basically was fixed text and jumped to the section where the more link was within that post (usually somewhere in the middle). It seems like many people also don't quite like the default more link since there has been over 1400 downloads as of today!

I must admit that after finishing the initial release of the plugin I never really got back to add more to it (though I do think it has enough 'features' as is, don't want feature creep!). In fact, I don't think I've touched it ever since submitting the first version (shame on me :( ).

However, in the past few weeks I was contacted by Georg Adamsen who had very kindly translated the admin settings into Danish - thanks Georg :) So now armed with the files edited by Georg that enabled the Danish translation, I looked at code that I had written some two years ago (yay for comments) and reviewed the comments on More Link Modifier download page to see if any changes were needed. Surprisingly I didn't make any drastic changes, only a few small cosmetic changes. Having said all that, there are some possibilities of a few small additions to the plugin, in particular use of 'the_content_more_link' filter available from WordPress 2.8 that allows adding extra attributes to the more link.

4Apr/08

upgraded to WordPress 2.5

On March 18th when I saw the sneak peak for WordPress 2.5 I was amazed and couldn't wait till the release date. Not long after, comes March 30th when WordPress 2.5 was finally released :) Unfortunately, the first week of April was a super busy week, so haven't yet had a chance to upgrade until now.

Write Post in WordPress 2.5

So here it is - the new and shiny WordPress 2.5 with K2 RC5. This time the upgrade went much smoother than upgrading to 2.3, no more drama with file permissions - FileZilla is wonderful. Though this time, since K2 wasn't quite ready for WordPress 2.5, there have been a few minor bugs (though so far easy to fix).

For those who are still unsure if they should upgrade to 2.5, I strongly recommend you do! The upgrading process is simple (I recommend you use FileZilla), and even though the Dashboard (in admin) looks a bit foreign to begin with it soon becomes very nice and easy to use - especially when writing posts :)

For those who are also using 2.5 and K2 RC5, here are the two small fixes that I've found so far after the upgrade.

theloop.php (line 12)
original:

require_once( preg_replace( '/wp-content.*/', '', $_SERVER['SCRIPT_FILENAME'] ) . 'wp-config.php' );

change to:

require_once( preg_replace( '/wp-content.*/', '', $_SERVER['SCRIPT_FILENAME'] ) . '/wp-config.php' );

rollingarchive.php (line 10)
original:

require_once( preg_replace( '/wp-content.*/', '', $_SERVER['SCRIPT_FILENAME'] ) . 'wp-config.php' );

change to:

require_once( preg_replace( '/wp-content.*/', '', $_SERVER['SCRIPT_FILENAME'] ) . '/wp-config.php' );

The other bug which I am still looking at is with the plugin dDeviantArt which doesn't seem to quite work with version 2.5, hopefully it'll be a relatively simple fix.

As the adversary is always out there to get us, I'm sure there are more hidden bugs/broken pages etc. So if you do find something that is broken please tell me! Thanks :)

ps. not a bug, but I'm definitely going to have to find a plugin for formatting code - the above 4 lines look horrible! anyone have good suggestions?

1Oct/07

upgraded to WordPress 2.3

As some of you may or may not know, WordPress 2.3 was released about a week ago on Monday 24th September. So since I had a bit of time, decided I should upgrade from 2.2.2. After some drama with the incorrect file permissions of the uploaded files I finally managed to get everything working (I hope!) so now I'm using the brand new WordPress 2.3 release :)

With this upgrade I've also upgraded to K2 RC1 as on their page it is suggested to use RC1 with 2.3. The front-end should look relatively similar, with the exception that tags are now only shown when you view the full post - since I've disabled Ultimate Tag Warrior and now using the inbuilt tagging system that comes with 2.3.

If you do find any problems with my blog, please send me an email and I'll go and try to fix it up!

7Sep/07

my first plugin!

After a few nights of "Just 5 more minutes...", I finally finished writing my first plugin for WordPress :) The More Link Modifier. Not long after 'hacking' some files to change the 'more link' to behave as I wanted, I started thinking about the possibility of writing a plugin to prevent the need for the 'hacking'. After some research I decided it would be very possible; so despite my lack of time started coding the plugin. The final product is a bit different (it's better!) to what I had initially in mind, but I'm sure there is still more room for improvement - so any suggestions welcome!

Finishing the plugin gave me a very nice sense of accomplishment - though realising that I had used camelCase, but WordPress uses underscore_notation was a bit annoying. Got plans for a few other plugins (must remember to use underscore_notation in the future), though they'll probably have to wait until after assignments are done...unless I start procrastinating...