Archive for the 'Web Development' Category

Role Scoper plugin for Wordpress

I like to use private posts, as not everything that I blog about should be read by the public. Several versions of Wordpress ago, I used the Disclose-Secret plugin.

However, development of this plugin hasn’t really happened since version 2.3 of Wordpress, due to significant changes being required from the plugin in order for it to work with the later versions of Wordpress. Now using version 2.5 of Wordpress, I finally decided that I couldn’t wait for Disclose-Secret to catch up, and have converted over to using Role-Scoper. As far as I can tell, Role-Scoper does absolutely everything that Disclose-Secret did, and with so much more flexibility I can’t begin to comprehend. Anything to do with privacy, restrictions, permissions, groups of users permissions, etc.. you name it, it can do it! There were a few minor bugs with it that affected a few users like myself, and I am very proud to have helped Kevin (the author) debug the plugin to produce version 0.9.16, which I believe now does absolutely everything that Disclose-Secret did. Kevin is an excellent coder/hacker, and I think he will do very well in his web development career.

I’m so proud to have been part of debugging this fantastic plugin, that I have taken screenshots of my name in cyberspace. Maybe one day when Kevin becomes the next world famous coder/hacker I can autograph these screenshots and sell them on eBay?

Helping to debug the Role Scoper Wordpress pluginHelping to debug Role Scoper wordpress plugin (2)Screenshot of helping to debug Role Scoper 0.9.17

Download Role Scoper now!

Posted on Tuesday, July 8th, 2008
Under: Computing, Web Development | 1 Comment »

Vegetarians taste better

Posted on Monday, June 30th, 2008
Under: General ranting, Jokes, Web Development | No Comments »

Note to world: Tom Bammann blogging again

I didn’t stop blogging, I’ve just had higher priorities in the last few months. Since I last posted anything substantial, I’ve been doing a lot, and I will attempt to catch up with what I’ve been up to in this post. SWK will be proud!

Foxy1000

In my last post I mentioned I was going to do the Foxy1000 cross country mountain bike endurance race with Nick. We did the 100km race (50km each) but it was much harder than I anticipated. The fact that I had to ride 50km was okay, and the difficulty of the terrain wasn’t too bad although the track did include the Fox Creek downhill trail which I found doing very scary, but was proud that I only dismounted I think at two spots on this downhill track. The reason I had to dismount twice is because at one spot there was a drop-off which you had to negotiate whilst doing a corner on a slope (hard to explain) and another spot where there was just a massive drop-in. When I say drop-in, imagine a slope that’s about 60 degrees below horizontal for several metres! I would possibly attempt these obstacles if I hadn’t already ridden flat-out for about an hour, and didn’t have arms that were worn out and/or had time to stop and adjust my seat-post such that my centre of gravity was more reasonable. But at the end of the day, the idea of a race is to get from A to B as fast as you can, and if it’s on average quicker to get off the bike than to attempt something you’re not confident doing and risk injuring yourself or your bike, then you might as well! (However this hasn’t stopped me on at least one occasion recently which I’ll get to later!) Nick and I took turns at doing 2 x 25km laps each (100km total) and each lap involved 1000m of vertical ascent. Half way through my second lap, I had major cramp in my legs from dehydration. I don’t know how I got dehydrated because I was drinking by the bucket loads after my first lap, and was well hydrated before the first lap even started. I guess it was a hot day. The last 10km was very painful and difficult because of the cramp, but eventually I finished and we came 3rd in the category of Men’s Duo so it was very much worth it! We have been riding together on most weekends usually doing at least 30km rides, and recently becoming closer to 50km rides on some occasions. We hope to do quite well in the 2008 Foxy1000 race. Who knows, maybe in 2009 we might even both race solo! But I much prefer the team idea - besides, Nick is faster than me… at the moment :-) I say “at the moment”, because I’ve been riding my road bike a little bit lately on my trainer to try and build up my leg muscle which is my major weakness from several years of endurance running which stripped me away from leg muscle.

2007-12-08 (Eagle Park Night Race) (10)

Since the Foxy1000, apart from weekend rides with Nick (mostly from the city, up to and around Eagle Park) we’ve also been doing the Summer Series races. I find the night races much to fast-paced for my liking, because for my category (Sports Men, which is “C” grade) I generally do 3 laps of about 5km. It sounds like a lot, but it’s all over within 45 to 60 minutes. Since my strength is endurance (i.e. 50km+) I struggle with the sprinting, and my heart rate averages 180bpm (minimum 170bpm, maximum 187bpm). When riding up a hill at 185bpm+ I feel like my heart is going to explode! For this reason I don’t look forward to doing the race, I look forward to completing the race! And it is a good feeling to achieve finishing. The first night race of this summer season was at Flinders Uni. My tactic was to go easy at the start to avoid any 185bpm+ activity in the first two laps. Unfortunately this meant I was stuck behind a couple slow(ish) riders who didn’t let me past. After the first 5 minutes there was an opportunity for me to overtake on a downhill section on a fire-track (i.e. a track designed for a 4WD vehicle to access) which was covered in blue gypsonite crushed rock. Because I built up a lot of speed in an effort to pass the guy before the bottom of the track which turned back into a single track, I wasn’t able to take the corner at the bottom. I think a combination of me going way too fast, my tyre pressure too high, and the rebound dampening of my suspension all worked against me, and although I sort of made the corner after turning right on to the bridge, I was sliding sideways off of the bridge, and in fact slid off into the rocks which formed the bridge. (I call it a bridge, but it’s really just a pile of boulders with finer gravel on top to allow the water to pass through. I snapped the buckle off of my shoe so wasn’t able to continue the race, and I seriously gashed my hip and elbow which I was paying the price for over the next month.

Eagle Park

The second night race of the season was at Eagle Park, and I did okay physically but had a flat tyre towards the end, so overall got a poor time. The third race was again at Eagle Park last night, and I think the training I had been doing has only just started to pay off. Unfortunately, I had a small crash due to my front wheel sliding off the track in a sandy patch on a corner. I was okay and didn’t lose too much time, but I bent my rear derallieur which meant that my chain kept slipping into my wheel between the spokes and rear cassette.

Eagle Park

This happened about 6 times during the remainder of the race, and meant each time I had to get off and pull it back on again, costing about 20 seconds each time. Also I kept losing the gear I was in on most climbs, which made me lose traction on many occasions which cost me a few more minutes overall. Overall I came 6th in my Sports Men category, which was fairly satisfying, even if there weren’t many more than 6! I will take my bike back to the store on Monday and get a yearly overhaul done, even if I can fix it myself. It’s probably about time I had the suspension serviced anyway. After the race last night I went to the Lotus Lounge for going away drinks for a mutual friend of Morven and myself, Monica. It was great to see lots of our friends all together in one place having a good time, but it’s weird going out without Morv! (I’ll explain later in this post where she is at the moment). After the Lotus Lounge, I headed over to The Worlds End bar with a couple uni mates (including Nick who I raced with). Good times were had, but I went home before everyone else because my elbow was oozing yucky stuff from when I slid on the dirt in the race. It is mildly amusing that the scrapes I have from last night are in exactly the same spot as the first summer series race where I stacked it, but nowhere near as bad as the first stack!

80's Night

In October I went to an 80’s night a HQ Nightclub with Morven and her friends. It was to celebrate the birthday of FreshFM radio station. It was a good night, but we were the only people that actually dressed up in 80’s gear! Okay well there were probably about a dozen others that made an effort to dress up, and I can’t really say that I dressed up myself but Morven and her friends did so I felt ripped off and we sort of looked silly. Every now and then you would see someone from the crowd of people dressed in classic 80’s gear. I misunderstood what a barman said at one stage and ended up accidentally ordering 5 different cocktails instead of one! I didn’t mind, we drank them all!

Really the main reason I haven’t been blogging in the last 5 months is because my server hasn’t really been working anyway! Apache (the main part of the webserver) just kept crashing, and not loading after the computer rebooted like it always did before I upgraded to this new computer. Over the last week I’ve updated Wordpress, Gallery, all of my Wordpress plugins, and the webserver software XAMPP. I found it difficult to upgrade my XAMPP installation, and I will write about this upgrade process in a seperate post at least for my own future reference! I took me a VERY long time to work out why Apache wasn’t booting on startup, and I’ve found that the Apache service under Windows Vista doesn’t load under the LocalSystem or Administrator account, I had to create a seperate user account to run it under. This is a problem attributed to the UAC (User Account Control) system of Windows Vista. I will also write about this in a seperate post.

I had a really nice break from work between Christmas and New Years. Christmas was mostly spent with Morven’s family and family friends. For Christmas Morven gave me a bike chain bracelet. I was so happy to unwrap that gift, as I used to have one as a kid (that I had found on the ground with a broken link and repaired it myself) but lost it somewhere along the line and was really upset. Our family was fortunate to receive a CD from my younger cousin in Melbourne, who is manager and website guru for a band called Men Without Pants. We were given their debut album GhosTrain. Men Without Pants - GhosTrainI don’t know how to describe it but I’ll give it a shot: very cool jazz! Really not very descriptive, but I like the sound effects they use, coupled with the cool, semi-philosophical chilled-out lyrics/vocals. You can listen to my favourite track by clicking on the play button.

For the very low price they are asking for the CD (AUD$10) I can’t recommend any more just buying a copy or three or more (for gifts). You can listen to their music on the website too, so go check it out! (Please note I have special permission to play this song on my blog, it is copyright. Please go to their website if you want to hear more.) The band is two of my cousin Carl’s high-school classmates in Melbourne. Two very talented musicians whom I’m sure will go a very long way with their music careers. My cousin Carl is pretty talented too with maths and website technologies, although I have to question his sense of humour given he just sent me this URL to a comic as I’m writing this paragraph which is quite bizarre. Having said that I did laugh profusely after reading it. It’s disturbing how similar Carl and I are!

Over Christmas, I decided that my computer wasn’t performing well enough for my liking (even after upgrading it) with playing Colin McRae Rally Dirt, so I did my research, learned how to overclock my computer (which I will also write about in a separate post). Doing this, and adding a soundcard (instead of using the onboard sound) and adding more RAM has significantly increased my gaming experience, as has purchasing a Logitech Momo steering wheel and pedal set! There is so much enjoyment that can be had driving rally cars in such a realistic rally car simulator game, with amazing visual and effects, using a reasonably realistic steering wheel and pedal set! I’m looking forward to getting Morven “behind the wheel” as she has been known to enjoy a bit of the rally car driving game. She doesn’t like driving using the keyboard, but I haven’t had any alternative up until now. Maybe she’ll perform better using the wheel set and stop using the hand brake so much - who knows! She hasn’t actually seen it yet because I only got it recently after she left.

Morven is doing part of her work placement in a hospital at Stoke on Trent, England. She left nearly two weeks ago (such a long time to be without my lady!) and I will be going and meeting her in London on her last day of work. We will spend two nights in London in an expensive hotel right slap bang in the centre of London, then four nights in Paris again in the slap bang centre of Paris in a very expensive hotel! The last night of Paris will be Valentine’s day, so it should be a very romantic holiday :-) You can check out a map of where we’re going and staying.

Today, after from updating my blog I’m taking it rather easy. I’ve done some odd jobs including fixing a shower-head mount, a shower curtain rail, our letter box lid that had broken off, and a rail for a window blind that had popped out of the wall. I’ve been keeping our lawn (Santa Anna Couch) in admirable condition despite the drought. It’s surprising me how little water we can get away with for watering our lawn and keeping it amazingly lush green despite the fact we’re going through a drought. Despite the current water restrictions of a maximum of 3 hours watering per week, we only water the lawn for 1 hour per week. I think the trick to keeping it lush green is to let the lawn grow longer when a heat wave is happening, and cut it back to normal length again after the heat wave. The other trick is to use fertiliser as recommended to keep the roots of the lawn strong, but use organic fertiliser because it won’t burn the lawn if you don’t water it in very well. This way you can apply the organic fertiliser just before rain (if you’re lucky enough to get any). A week or two after fertilising, check for weeds in the lawn. The other reason for using an organic based fertiliser over chemical fertiliser is it is better for the environment, and requires less water to manufacture it. So if you are using chemical fertiliser to keep your roots strong to save water overall, think again! Chemical fertilisers require ridiculous amounts of water to manufacture. Also any weeds will suck out water from the topsoil, so use a cover-spray appropriate to whatever weeds you have. I’ve also been regularly coring the lawn, and using a “Wetta-soil” powder which holds water in the soil after the rain, increasing the time it takes for the water to evaporate back into the heat of the harsh Australian sun. I’ve noticed that the Windsor Green couch has died off in the drought, whilst the Santa Anna Couch has stayed strong! Paul Munn personally recommended to me at his store to use Windsor Green Couch because it tolerates drought conditions better than Santa Anna, but I suspect this was just a sales pitch (unless we have an uncommon soil type/mixture). I would highly recommend to anyone in Adelaide to use Santa Anna couch over Windsor Green (update: discussion continued in a later post.

I should also write about my latest batch of black boys. After a few months now, my latest batch of black boy seedlings (xanthorrea’s) are about 3cm to 10cm tall. Unlike last time where they all died after leaving them in the sun, I’ve been keeping them mostly in the shade, and always constantly moist. I don’t have much experience with growing seedlings of anything but I expect this is a requirement for most seedlings. I am surprised though that black boys in particular are so sensitive to direct sunlight.

Posted on Sunday, January 20th, 2008
Under: Anything sporty, Computing, Gaming, Gardening, Holidays, Web Development, What i get up to | No Comments »

Server Downtime / Disc Brake Finger Tip Slicing & Dicing

You may or may not have noticed that this blog has been dead for a couple weeks. This is firstly because due to a recent price drop in Intel Quad Core CPU’s (specifically, the Q6600) I decided it was a good time to upgrade (even though I just got my first Core 2 Duo CPU this year). I also upgraded the graphics card to a Gainward 8800GTS Golden Sample.

An hour after getting the beast home, and pushing electrons through the thing, it started to die a horrible death of blue screens and random reboots. A logical conclusion (I thought at the time) was that the new CPU that got put in, was a dud. It turns out that the new brand of RAM I had been using (GeIL DDRII 667MHz Dual Channel 2×1GB CAS 3-4-4-8 passively cooled RAM) was not a very good product, and there has been a relatively high percentage of this RAM not working in particular configurations of machines! The store swapped me over to Corsair CAS 4 RAM, and now all is sweet again. It’s possibly slightly slower, but at least it works!

I also just happened by chance to discover a major security loophole with my webserver that delayed me putting it back online. I haven’t got around to fixing it for a couple weeks until now, and it only took about 10 minutes to fix, I just didn’t get around to it.

Recently a friend Nick asked me to join him as a duo in the foxy1000 mountain bike race at Fox Creek, which is a total of a 100km race, 25km per lap, and each lap involves 1000m of vertical ascending. The idea is we would do 50km each, i.e. 2000m ascending each in total. Since I’ve done stuff all riding this year, I went out to Fox Creek on Sunday to get in some training with Nick. As I was putting my bike back together (I have a small boot to fit it in) I put the front wheel on the wrong way around. I then squeezed the front brake and realised instantly the error of my way. With hydraulic disc brakes, if you squeeze the lever with no disc in, the pads get stuck closed together. I tried prying the two pads apart, to no avail. I then tried calling half a dozen bike stores for help, but being a Sunday, none seemed to be open. I also tried phoning a friend to see if they could quickly look up on the internet what to do. Getting really frustrated, and flat phone battery, I gave a screwdriver one last good hard push through the brake pads and voila!! Fixed like new. I think the problem was I wasn’t prying them open from both sides, which would have wedged the two pistons back on an angle and created too much friction due to the angle of force.

Very excitedly, I span the wheel. For some reason, I stuck my finger dangerously close to the rotor. I didn’t realise at the time just quite how sharp all the machined holes are in these disc rotors. My finger nail brushed up against the rotor, and the rotor cut into the middle of my finger nail, grabbing the tip of my finger and wedging it into the brake pad. This cut a third of the way across my finger nail, all the way through. At the time I just grabbed my finger and compressed it to numb the pain, and it didn’t seem to hurt that much. After walking around in circles a little bit trying to distract myself from the pain, I opened up my hand to find it covered in tomato sauce. For some reason I absolutely panicked, possibly because I haven’t actually seen any blood for a few years. Worried what was going to happen to my finger, I drove straight home, and then to a GP clinic where I waited almost 2 hours to get a tetanus shot. By the time I got home, I had wasted 6 hours of my Sunday - most unhappy!!

Posted on Tuesday, August 14th, 2007
Under: Anything sporty, Computing, Security, Web Development, What i get up to | No Comments »

Server Update

Dear anyone that cares, please don’t abuse me if something on my website doesn’t work right now, as I’ve just upgraded Apache, PHP, and MySQL. If you find any security exploits or anything that doesn’t work, please bring them to my attention, as right now I haven’t had time to test.

Posted on Monday, July 9th, 2007
Under: Computing, Web Development | No Comments »

dBeautifier 3.4 for Wordpress 2.0.5 and 2.0.6

Lately I’ve been a little frustrated. I think it was since I upgraded Wordpress to 2.0.5 that it broke my dBeautifier plugin v3.4 for PHP5. Awesome plugin, bummer that Joseph Newing decided to stop supporting it. Lots of people are using it, and will shortly run into this problem. C’mon Joseph, hows about another release update! :)

Here is a workaround I developed. I have modified the currently only available copy on the internet from Jeroen Onstenk (thanks buddy!) to include the changes required for the plugin to work with Wordpress 2.0.5 and 2.0.6. If you have any problems at all with this plugin you are welcome to ask me by leaving a comment at the bottom of this post.

;/wp-content/uploads/2007/01/dBeautifier_3.4-PHP5.zip;dBeautifier 3.4 for PHP5 and Wordpress 2.0.5 and 2.0.6;

Summary of Changes

  1. Moved the icons directory from the /wp-content/plugins/dBeautifier/icons/ directory to the /wp-content/icons/ directory. This allows Wordpress 2.0.5 and 2.0.6 to be able to actually display images from the plugins directory.
  2. In order for the above to work, lines 57 to 59 of dBeautifier_Filter.php were modified to the below:
    $img = get_option('siteurl') . "/wp-content/icons/$icon";
            } else {
    $img = get_option('siteurl') . "/wp-content/icons/downloads.png";

    This allows the icons to actually display.

  3. Now about the CSS. For some reason the plugin wasn’t loading the CSS from the dBeautifier.css file included with the plugin, so I added it to my /wp-content/themes/mytheme/style.css file. In fact, I also added a little extra CSS, because the theme I use adds a black border around images. This looks really nice with images in posts, but kind of stuffs up dBeautifier icons. So, the total CSS I added to my /wp-content/themes/mytheme/style.css file is:
    /* CSS I added to get rid of borders on the icons */
    img.icon {
        border: none;
        background: none;
    }
    
    /* CSS by Joseph Newing required for dBeautifier to work nicely */
     .download-link {
        height: 50px;
        background: #f6f6f6;
        border: 1px solid #cccccc;
        margin: 0 0 5px 0;
        padding-left: 15px;
        }
    
     .download-link h4 {
        margin: 0;
        padding: 10px 0 0 5px;
        }
    
     .download-link p {
        margin: 0;
        padding: 0 0 0 30px;
        }
    
     .download-link img {
        float: left;
        margin: 5px 5px 0 5px;
        border: none;
        padding-top: 4px;
        }
  4. Then, in order for my extra little piece of CSS to be implemented by the plugin, I had to change the class on line 93 of dBeautifier_Filter.php to become the icon class:
    Download
  5. Finally, I accidentally overwrote the original icons that Joseph Newing included with the plugin. I obviously prefer myn so I’ll just leave them there for now. You can use whichever ones you want, please yourself.

Installation Instructions

  1. Download the file from above, and unzip it to your wordpress root folder. This download already includes all the modifications except where I moved the plugins CSS into the themes CSS, you will have to do this manually.
  2. Add the following to your /wp-content/themes/mytheme/style.css file:
    /* CSS I added to get rid of borders on the icons */
    img.icon {
        border: none;
        background: none;
    }
    
    /* CSS by Joseph Newing required for dBeautifier to work nicely */
     .download-link {
        height: 50px;
        background: #f6f6f6;
        border: 1px solid #cccccc;
        margin: 0 0 5px 0;
        padding-left: 15px;
        }
    
     .download-link h4 {
        margin: 0;
        padding: 10px 0 0 5px;
        }
    
     .download-link p {
        margin: 0;
        padding: 0 0 0 30px;
        }
    
     .download-link img {
        float: left;
        margin: 5px 5px 0 5px;
        border: none;
        padding-top: 4px;
        }
  3. Activate the plugin, and go to the dBeautifier tab in Options Panel to set your Wordpress directory.
  4. You may like to add the XLS and PDF icons that I accidentally included with this package whilst you’re in the Options Panel. I will likely expand on the icons and file extensions that I use and create another download. If I get around to doing this in the next few weeks I’ll make sure I provide a link from this post.

Posted on Saturday, January 6th, 2007
Under: Computing, How-to guides, Web Development | 9 Comments »

New Blog Theme / Daylight Savings

You may noticed I changed my theme to a new one, from the same author as the last theme I was using, theme Chameleon.

I think this is nicer, please tell me what you think Mike?

P.S. I was testing this theme and realised that this post wasn’t displaying. An while later when it magically popped up, I realised it was because of daylight savings and that the time was confusing itself, and it thought it was in the future when it wasn’t.

Posted on Sunday, October 29th, 2006
Under: Computing, Web Development | No Comments »

IET website for SA & NT

I’m currently working on a new website for the IET (Institution of Engineering & Technology) SA&NT division. I’d appreciate any feedback from anyone in the comments below this text.

I’m currently putting content on it as we speak so don’t be concerned about that, just wondering if you think the colours etc are okay for a professional networking engineering website.

Posted on Thursday, July 6th, 2006
Under: Computing, Web Development | 2 Comments »

RSS feeds and private login

As you can see, there have been quite a few alterations and improvements on my blog lately, whilst I’m having a couple days off after finishing my marking, before I start work next week (hopefully!) Amongst the biggest of changes is I’ve finally fixed up the ‘login’ system which enables you to ‘login’. So now I can allow specific users to read some of my specific ‘private posts’ which is my private journal, not just random crap that I put up here for fun.

To restrict posts to specific users with Wordpress, I recommend using two plugins:

  • Role Manager to create new ‘capabilities’ (for example the user levels 0 through to 10 are capabilities).
  • Then, use Post Restrictions to “Show private posts to other users if at least one of the user’s capabilities meets one of the post’s capabilities.”

Check out the random Chuck Norris quotes on the left :)

For those of you that don’t already use RSS feeds, you will love them. You need a good browser like Firefox. In Firefox, go to Bookmarks -> Manage Bookmarks. Then go File -> New Live Bookmark. Copy & paste to “Feed Location” from the orange icons in my sidebar (i.e. right click on the orange icon, e.g. click on “Entries” for my most recent posts and “Copy link location”) and write a quick name for this Live Bookmark. I recommend saving this in your Bookmarks Toolbar Folder which will appear at the top of your browser, for quick easy access to see if I’ve posted anything new since you’ve last looked.

Posted on Wednesday, July 5th, 2006
Under: Computing, Web Development | No Comments »

plugins I use

Here is a dynamically generated list of all the plugins I use on this Wordpress v2.0.2 installation.

Posted on Saturday, May 6th, 2006
Under: Computing, Web Development | 12 Comments »