Archive for the ‘general’ Category

Oct
22

Wordpress Hacks

Posted in general |

I’ve been putting off upgrading to the latest version of Wordpress as I’ve made some slightly hacky changes to a few of the files which I haven’t kept a proper record of, and inevitably forget to back up before upgrading. But not this time! I have now backed up everything and will put a list of my hacks here, for my future reference and for anyone who feels a bit limited by Wordpress’s templates.

Giving the category listing ‘before’ and ‘after’

I’m honestly not sure why the ability to put in what you want to appear before and after categories isn’t Wordpress by default. All I wanted to do is put those little dots in between the category items to make it the same as the archives listing - which actually does have the ability to choose what goes before and after each item.

After a lot of Googling I eventually came across this tutorial which hacks a few Wordpress files to enables wp_list_categories() to do exactly what I wanted it to. Now I (and you) can add dots, random tags and whatever you like between categories!

Removing the year from archives listing

Listing the year after every month in the archives listing wp_get_archives() seemed a bit pointless to me, especially when it’s listed horizontally the way I have it above. There doesn’t seem to be a way to remove it or change the date format, so again I had to turn to a hacky solution.

Open wp-includes/general-template.php

Around line 431 you should find the following:

$text = sprintf(__(’%1$s %2$d’), $wp_locale->get_month($arcresult->month), $arcresult->year);

See the %2$d part? That’s putting in the year, so replace with:

$text = sprintf(__(’%1$s’), $wp_locale->get_month($arcresult->month), $arcresult->year);

No more year!

Now I’m not saying that these are the best methods for creating a Wordpress template - they’re hacks, prone to problems whenever you upgrade, but the best solutions that I could find to achieve the look that I wanted. If anyone knows a better method of achieving this I’d be grateful if you could tell me so I don’t have to remember what to change every time I upgrade!

May
25

Working the WiiFit

Posted in general |

A few weeks ago I decided to weigh myself for the first time in almost a year, something I’d been afraid to do for ages because the tightening of my clothes seemed to indicate that I certainly wasn’t getting any lighter. Surprisingly it turned out I hadn’t put on any weight at all, although this somehow annoyed me more than what I had been expecting. For the past six months I’ve been walking to and from work and eating far less snacks (mainly because of the greater distance between my new workplaces and the closest bakery), so why does it seem that I’m losing muscle and gaining a size?

I hate it when normal people, or even worse skinny people, say that they’re fat. Obviously it’s a matter of persective - I have at least two friends who are considerably smaller than me who complain to me about their weight, and I’m sure anyone who I complain to who is larger than me feels like I’m being stupid and more than a little insensitive too. I’m not fat. I’m not even overweight. But I still don’t like my body. I guess I can blame the media for that. I like to rationalise that what I really want is to be fit and healthy, so I feel a bit less superficial about it all. Anyway, with these thoughts I decided to take up another type of exercise. Problem is that I’m lazy, it’s getting cold and I hate driving, so my chances of actually making it out to a class regularly seem fairly low. Then people started raving about this WiiFit, and despite not having a Wii it seemd like a good idea…

So a week later I’ve managed to eat relatively healthy (not a diet, I despise diets…), bought myself a WiiFit and hijacked my brother’s shared Wii. I rationlised this to myself by deciding the price of the WiiFit (and possibly a Wii console as well) is at least equal to the amount of money I’ve saved on petrol walking to work for six months, and therefore entirely justified and deserved.

After playing it once I started writing a detailed review, but there’s already plenty of those out there so there isn’t much point in me putting out essentially the same thing for no one to read. I will say that the game is very cute (I’m sure to an annoying extent to many people) and the less gimmicky exercises like the yoga poses and muscle training will probably have pretty decent sticking power (it probably also helped that those ones told me I was awesome at them). I’m aiming to do 30 minutes or so every day and see how I go!

May
15

Burma Cyclone Relief Food Fair

Posted in general |

Any Perthies free this Saturday might want to stop by this - the food fair is run by the local Burmese community and is usually held every fortnight or so. They’ve decided to make this Saturday a fundraiser for the victims of the terrible cyclone in Burma. I’ve been to the food fair a couple of times, and the food is excellent and cheap! Here’s the details:

Food Fete

Delicious Burmese food, sweets & snacks on sale
Date: Saturday 17th May 2008
Time: 10.00 a.m. to 2.00 p.m.
Place:
Australian Asian Association Hall
275 Stirling Street
PERTH

All proceeds to the cyclone victims in Burma.

Unfortunately I’m going to miss out because I have TAFE… but you should go anyway!

Please pass it on :)