Development on a Shoestring

Archive for February, 2005

I take it all back

Go the doggies, into the semi-finals!

The Western Bulldogs have progressed to the semi-finals of the Wizard Home Loans Cup after scoring a thrilling 11-point win over 2004 pre-season premiers St Kilda at Launceston’s
Aurora Stadium on Friday night.

Rodney Eade’s Dogs had the lead for most of the night, and were able to hold out the pressing Saints to triumph 2.10.7 (85) to 1.9.11 (74). They now meet either Carlton or Melbourne in next week’s semi-final.

Yes, I know that yet again, in the second half, the opposition was allowed to claw back (into the lead this time). But if they can keep pulling off the win, I’ve decided I don’t care.

Game highlight: Farren Ray kicking a massive ’super-goal’ (such a dumb name. super-goal that is, not Farren) at the end of the 3rd put the Doggies back in front, followed up with the first goal of the 4th to galvanise the lead.

Wordpress powered company site

The one item on my to-do list which has been there the longest has been to add a CMS to control the news section on our website. Typical for a web-development company, our own website is the last thing on our priority. Well, today I can knock it off my list, all thanks to WordPress. After toying with a couple of proprietary products, or the possibility of writing something myself (yeah, sure, I’ve got the time for that) I realised that all I really wanted was a cut-down blog. There’s no need for comments or any of the other features, but the interface, along with the ability to restrict authors to certain activities fit the bill exactly. Not to mention the ability to have RSS/Atom feeds.

Because I had limited time, the solution I came up with is a bit of a messy hack, but it works. I have a fairly simple principle with development: If it works, it was the right way to do it.

(more…)

TTLB Ecosystem Cache Wordpress Plugin

N.Z. Bear has for a while now provided The Truth Laid Bear Ecosystem, which ranks sites based on incoming links & daily traffic, assigning a site a cute animal name based on their ranking (I’m currently a Marauding Marsupial. Awww.)

Orange Haired Boy wrote a great script which provided a javascript function to display your status on your site. This works really well, unfortunately it has the disadvantage that it has to pull data from TTLB site every time your page is loaded, which is time-consuming for the user. Not to mention that I don’t even want to think about what N.Z. Bear’s bandwidth costs are.

So to alleviate both problems, I’ve written a caching plugin for Wordpress. Basically what this does is when it loads on your site for the first time, it goes and grabs the content from the http://www.truthlaidbear.com/showdetails.php script for your site and then puts that content into a file. Then, every time your site is viewed after that, this plugin checks the file and if it’s not more than 24 hours old it just displays the contents of the file. 24 hours should be a short enough time that if you happen to get an Instalanch or Slashdotted, you’ll still be able to display your hubris to all around.

(more…)

Dogs see off the Swans

It was a successful return to the coaches’ box for Rodney Eade on Saturday as the Western Bulldogs advanced to the quarter finals of the Wizard Home Loans Cup but it might be his former apprentice Paul Roos who will go home the happier man.

In what was the first meeting as coaches between Eade and the man who replaced him as coach of Sydney halfway through the 2002 season, the Bulldogs won 1.11.15 (90) to 0.11.4 (70) after breaking the game open in the third quarter.

In fine Bulldogs tradition, leading by 9 points at half-time (low score due to bad kicking, not lack of opportunities), they took the lead to 40 in the 3rd quarter & then let Sydney back to within 16 points in the 4th.

Why oh why can’t we hold on in the last quarter? If Sydney didn’t have Barry Hall, Stuart Maxfield, Paul Williams, Jason Ball, Michael O’Loughlin, Jared Crouch, Jason Saddington, Ben Mathews and Tadgh Kennelly all out, we would have been stuffed.

On a more positive note, Ryan Griffen looks to be the player to watch this season. A rookie with a good opening game & a solid history.

Migrating to Wordpress 1.5

So I’ve had Wordpress installed for all of a week & then they go and release a new version on me. Sigh.

Anyway, I figure if I intend to keep up my web-nerd cred I’d better install it. So I’ve done that & I now need a way to import all my messages from this site to the new site. I’m not game enough to do the direct upgrade thing that’s descibed, I wanted a parrallel cut-over. That’s when I discovered one thing really lacking in Wordpress: There is no export function.

Wordpress has plenty of good scripts for importing posts & comments from other platforms, but nothing to go from one copy of wordpress to another, specifically from one version of wordpress to another. The upgrade instructions show you how to change your current blog from 1.x to 1.5, but not what to do if you want to have them both running at the same time.

In the end I had to do it by doing a DB dump and running the SQL script on the new DB, but I still needed to hack that slightly to get it to work. There are 4 tables that contain the information about the posts & comments: wp_categories, wp_comments, wp_post2cat, wp_postmeta & wp_posts. The only structural change as far as I can see is the removal of the ICBM data (i.e. the post_lat & post_lon fields) from the wp_post table. As it was far easier to modify the 1.5 database than to get the export script to exclude those fields, I just added those two fields to the wp_post table, ran the script then dropped the fields. See, easy!

This was way to fiddly for your average joe-user, there really needs to be a way to export all your posts & comments in a standard format that can be imported into other Wordpress blogs and also into other platforms. If you do need to do this, here’s the code:

alter table wp_posts ADD COLUMN post_lat FLOAT(12,31) after post_excerpt;
alter table wp_posts ADD COLUMN post_lon FLOAT(12,31) after post_lat;

###INSERT STATEMENTS HERE####

alter table wp_posts drop column post_lat;
alter table wp_posts drop column post_lon;

Just replace ###INSERT STATEMENTS HERE#### with the insert statements from the database backup (procedure is shown here) for the tables mentioned above.

So anyway, the long and the short of it is that we’re now running on 1.5, and I haven’t changed anything yet. Time to start on a whole new template!. I’ve installed the very nice Greentrack theme and over the next few days/weeks I’m going to try and hack it into exactly what I want. Props to Sadish for his top work on wpthemes.

Pear Firefox Search Plugin

I’ve got a new Firefox/Mozilla/Netscape search plugin available for PEAR. Just follow the link and click on "PEAR Packages Search" and it will install automatically. I’ve submitted this to Mycroft, but it could be ages until it get’s updated there.

For those who are interested, here is the code. This plugin will produce the results list in the sidebar of Mozilla & Netscape as well as working as a Firefox search plugin.

# Status: Working beta
# Mozilla/Netscape 6+ plugin for http://pear.php.net/
# by Glenn Slaven<gdalziel at gmail dot com>
#
# Created: January 04, 2005
# Last updated: January 04, 2005
#
# The PEAR Package Search has many other options that could be used, see
# http://pear.php.net/package-search.php for more details.

<search
name="PEAR Packages"
description="PEAR Package Search"
method="GET"
version="7.1"
action="http://pear.php.net/package-search.php"
searchForm="http://pear.php.net/package-search.php"
update="http://resources.slaven.net.au/mycroft_pear/pear.src"
updateCheckDays=3
queryEncoding="utf-8"
queryCharset="utf-8"
>

<input name="pkg_name" user>
<input name="bool" value="AND">
<input name="sourceid" value="Mozilla-search">
<input name="submit" value="Search">
<inputnext name="pageID" factor="1">
<inputprev>

<interpret
browserResultType="result"
charset = "UTF-8"
resultListStart="<!-- resultListStart -->"
resultListEnd="<!-- resultListEnd -->"
resultItemStart="<!-- resultItemStart -->"
resultItemEnd="<!-- resultItemEnd -->"
>

# Needs to be changed to mycroft address once accepted
<browser
update="http://resources.slaven.net.au/mycroft_pear/pear.src"
updateIcon="http://resources.slaven.net.au/mycroft_pear/pear.gif"
updateCheckDays=3
>
</search>

Advertise Here

Subscribe by email

Enter your email address:

Delivered by FeedBurner


Elsewhere

Liked 28 stories

That's how I roll

Artists blaming iTunes for changing music tastes. I got news for these idiots, iTunes only responded to forces in the marketplace. If you want to sell an album, make one worth buying.

FUCKEN PARTY!!!! [pic]

Here’s a small gallery of awesome monsters and aliens made entirely in LEGO!

Ten commandments for developers

Is It Real or Fake?

Why we bill by the hour

IE8 beta2 released

Stargate: Universe has a Go! New series starts 2009

Celebrate haircare pioneer who overcame discrimination to become a millionare...by discriminating against boys of course.

Theft vs. piracy vs. file sharing? Nonono...

Duke Nukem Forever Is In Testing, 'Several Hours" Playable

ACLU doesn't defend the Civil liberties of just ANYONE...

Your chance of getting out alive [Pic]

Girls Just Wanna Have Fun

Vote up if you are a secret Reptilian Overlord who intends to keep humans in perpetual servitude and wish the global shadow governments would chill the fuck out.

Password must be 6 letters: yes. Must contain a numeral: yes. Must not say your bank is pants: WTF?

Appeal Court Overrules Family Court's Shakedown of Dad

Only Chinese performers were skilled, disciplined and obedient enough to lay on the sort of song and dance display seen on Sunday at the Olympics

It’s time to put a deadline on dropping IE6

Zero Punctuation: Braid

An essay on how "Star Trek" ignored fundamental principles of engineering.

Foam Monster wants his hand back... [PIC]

M.C. Escher worked for Blizzard! [pic]

Ahoy Smegheads! a brand new, 1 hour Red Dwarf episode had been commissioned by BBC Worldwide

Overplaying Cards [comic]

Is anything worth its weight in gold?

The Dirty Secret of Clean Energy- "While generating it is getting easier, moving it to market is not."

Friday 13:51

Whohoo! I just got into the stackoverflow beta!

Tuesday 18:53

Top Rated Posts

Verse of the Day

Lift up your eyes on high and see: who created these? He who brings out their host by number, calling them all by name, by the greatness of his might, and because he is strong in power not one is missing. (Isaiah 40:26, ESV) (Listen)

Networks & References