Archive for category ICT

Date: August 24th, 2012
Cate: ICT

Adding Feature Image to WordPress RSS

So, I wanted to pull in the feature image to a WordPress RSS feed. It took me a little while to figure it out but it was easy enough in the end. The finished product looks like this:

add_filter('the_category_rss', 'add_feature_image');

function add_feature_image( $content ) {
	global $post;
	if(has_post_thumbnail( $post->ID )){
		$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
		return $content . '<featureimage>' . $image[0] . '</featureimage>';	
	}
	else return $content;	
}

So, I first add a filter to the category rss output. Why category I hear you ask, because when you look at /wp-includes/feed-rss2.php you’ll see that the category output in the rss is the only one that outputs it’s own tags. For example, the link tag looks like this:

<link>< ?php the_permalink_rss() ?></link>

So it’s no good for adding tags to. the_category_rss() outputs returns the category names in a tag called category. With me?

Then the filter runs a function (add_feature_image()) which checks to see if there is a feature image and if it does, appends a featureImage tag with the image’s url to the end of the categories.

The above is simply packaged up into a plugin and enabled in the admin section.

Easy!

Date: April 27th, 2012
Cate: ICT
2 msgs

Getting shipment tracking number from order object in Magento

I’ve been pulling my hair out for a few hours trying to figure this one out so I thought it was probably worth writing a quick post about it.

I’d installed the Webshopapps Premium Order Export Module for a client which worked perfectly as expected. However the client wanted shipment tracking information included in the report so I had to modify it slightly.

Getting the Shipment Method was straight forward enough:

$order->getShippingDescription()

However the Tracking number proved to be much more difficult. This is how I ended up doing it:

$tracking = Mage::getResourceModel('sales/order_shipment_track_collection')
	->setOrderFilter($order)
	->getData();
$trackingNumber = $trackings[0]['number'];

Easy enough – I just had to cross reference a few forum posts to figure it out so I thought it was worth mentioning here.

Please note that I’m assuming there is only one tracking number, you might want to modify this if you want the most recent tracking number.

If you’ve got a better way of doing it, please leave a comment.

Date: February 9th, 2012
Cate: ICT, Me, Politics, Travel
2 msgs

Today I Quit Facebook

Today I quit Facebook. I’ve been mulling over it for quite some time now and, in a moment of impulsiveness, I clicked the delete button.

It was time to stop complaining and put my money where my mouth is (was?). I’d actively withdrawn from it anyway, so why not take the final step and leave?

Of course my account won’t actually be deleted for another fortnight, that’s just how FB rolls. They’re worried that I might change my mind in that time so have, very thoughtfully, decided need a bit of a cooling off period.

So why did I do it?

We all know Facebook are essentially a company that trades in a very valuable commodity – highly targeted marketing. Facebook know a lot about you and sell that information to anyone that wants it. Like any of these services, that’s the trade off. You get access to the world largest social media service with a user-base of around 800 million and in return Facebook sells information about you to advertisers. (So why do I keep getting weight loss ads served to my Facebook page?)

So the question is: do I feel that is a fair trade. Is it worth commodifying my personal information so that I can keep up to date with what my friends just ate for dinner? Truthfully, it is up to a point, and up until today I’ve been happy to pay that price. I’m living in London at the moment and the vast majority of the people I know and love are living in Melbourne so I want to see pictures of them and their kids.

I’m also someone that likes to think of themselves as an activist. Whist I’m not as active as I used to be, Facebook is a really handy tool for an activist. When I put together martinfergusonisaratbastard.com it got about 300 hits in the first day – most of which came from Facebook. So I’m reluctant to let that go.

Finally, as far as my reluctance to leave Facebook goes, I’m a web developer. Facebook is central to the online world so I feel like I should do my best to keep up with what is happening on Facebook, at lease from a technological perspective.

So, with all these good reasons to stay on Facebook, why would I leave?

Ownership, commodification and privacy, to name three. Facebook has never really been satisfactory in any of these areas and I’ve finally had enough.

Ownership
I’ve always disliked iPhoto and iTunes. Their default status (and I know you can turn this off) has the program managing your files. That bothers me. They are my files and I’ll do with them as I please thank you very much. My first MP3 player was a 40 Gig iAudio that was essentially just a hard drive. It would simply play every song in the folder you navigated to. It had a horrible interface and was quite clunky but I loved it. It played every format under the sun (critically, including ogg) and I could move files on and off it as I pleased without a program or anything like that. They were my files, why wouldn’t I be able to?

The same can be said for Facebook. I can’t just take my data and go home. I can’t just get a copy of every photo and video I’ve uploaded and do with it as I please.

In contrast, I’m heavily integrated with Google. They aren’t perfect either but at lease with Google I can take my data and go elsewhere whenever I wish. Ironically, it will be when Google take this capacity away from me that I’ll feel the need to leave.

There are also intellectual property issues here that are probably beyond the preview of this post. But who owns the copyright over a photo that I upload to Facebook or a status update? What can the images I’ve uploaded be used for? I don’t have control over that and, fundamentally, I should.

All of this combined with Facebook’s persistant changing of the rules and defaulting everything to public has eroded my faith.

Commodification
Of course Google commodifies my personal information as well, but with Facebook it seems far more intrusive. The information is less anonymised, more readily available for sale and just seems more insidious than other services. Surely this will only get worse with it multi-billion dollar Initial Public Offering

I don’t think it is necessarily problematic to sell things in a targeted manner to users of a service if they have opted in. It’s something I would consider exploiting for Sommelier.net.au. But Facebook take this too far. The information that can be bought by advertisers is far more detailed than I am comfortable with a corporation having.

Which ties into my final point.

Privacy
Facebook knows a lot about you. A lot. A terrifying amount. More than I am happy for any one person, let alone corporation, to know.

I’m a strongly libertarian sort of person. Civil liberties are central to everything I believe in and key to protecting one’s rights is privacy.

Facebook knows too much about me already and has a tendency to broadcast that information whenever it can. It’s key to their business model.

In addition, I don’t have enough trust in a corporation like Facebook to protect my privacy. It isn’t in their interest to do so. I think it’s safe to say that there isn’t a government department in the world that knows as much about me as Facebook and they are far less accountable. Hell, the FBI have admitted to being able to make staffing reductions due to the amount of information they can now get just by looking someone up on Facebook.

Moreover, Facebook track you by stealth when you’re away from the site. Every ‘Like’ button on a website is another little spy for Facebook. And Facebook aren’t playing fairly in this realm. You simply shouldn’t be able to track someone once they have left that site. But Facebook do it incessantly, even once you’ve logged out. Hell, they keep ‘shadow’ profiles of people that don’t have Facebook accounts. To quote George HW Bush, “this aggression will not stand.”

As part of my discontent with Facebook’s surveillance techniques, I will also be removing ‘Like’ Buttons from any website I run. Especially Your Voice in House so people can use the service without a fear that they will be tracked by a corporation. It’s only ego-metrics anyway.

So that’s it. I’m sick of being sold, I’m sick of being spied on and I’m sick of not being able to control my own data. I cannot tolerate this social compact any longer. I quit. I’ll miss knowing what my friends are up, but they’ve all got my email address, they all know my blog and they are all welcome to follow me on Twitter. Hell, Google me if you need.

So who knows. Maybe I’ll utilise that 14 day window and reactivate my account. Maybe I create a new account with a nom de plume so i can continue to spy on ex-girlfriends friend’s children as they grow. But for now at least, I’m feeling quite liberated.

Date: October 28th, 2011
Cate: ICT

Gallery Only Update (version 1.1)

The first update for Gallery Only is now available.

It makes some minor changes to the layout on both the HTML and CSS side which means that anything appearing below the gallery is spaced out a little better.

We’ve added a new class, .go_clear which adds this spacing and could be edited for the purposes of customisation if needed.

Date: October 19th, 2011
Cate: ICT, Travel
2 msgs

Gallery Only

I’m pretty excited to demonstrate by new Gallery Plugin for WordPress. It’s the first one I’ve generated from scratch and uploaded to the WordPress site.

The plugin replaces the default gallery with clean looking gallery Carousel which utilises the Moodular jQuery plugin

To demonstrate it here are some photos taken by Ariane Barton on our recent holiday:

I’ll update this article once you can download the plugin from the WordPress Site.

Update: You can download the plugin from here.

Update: and it’s now up on the WordPress Plugin Directory site.

Date: November 7th, 2010
Cate: ICT
2 msgs

A List of Country Names and Codes

I’ve had the need for a list of countries lately. There are plenty around but the ones I could find in .csv format were all at least a few years out of date.

So after a fair bit of cut and paste I have pulled together a list which you, dear reader, are most welcome to.

You can down the csv of countries and country codes here | and the sql file here.

If you notice any errors, please let me know and I’ll update the files.

I’ve also pasted my list over the page.
more))

Date: October 28th, 2010
Cate: ICT, Politics

Copyright and Concentration

Today’s Age reports that Australian Centre for Contemporary Art is hurrying to defend this:

In the installation, artists and the public are invited to email works to the gallery, which are vetted, printed and displayed in a process streamed live to a website.

But the project, called myworkisintheaustraliancentreforcontemporaryart, is a promotion for Hewlett Packard, and the fine print gives the technology giant extensive copyright.

It just struck me as a great example of all that is wrong with the current Intellectual Property regime that permeates most of the globe at the moment. It typifies the loss of control over their own art that many artists are facing and the concentration of intellectual property into the hands of a shrinking number of highly litigious multi-national corporations.

To state the obvious, how does this do anything to encourage creativity or protect artists?

Date: October 26th, 2010
Cate: Goonanism Websites, ICT

A Comparison of Free, Open-Source Content Management Systems

I’ve just returned home from the ACTU Media and Communications Conference where I delivered a presentation on free, Open-Source Content Management Systems in the context of cheaper alternatives for Union websites.

Please feel free to leave comments/questions below and note that I do freelance web development work which you can email me about hammy@goonanism.com

See over the page for my presentation.

more))

Date: September 28th, 2010
Cate: Blogs, ICT, Politics

A Passing Note on Grog’s Gamut

Until a few days ago, I’d seen ‘Grog’s Gamut‘ appear in my twitter feed from time to time as someone I follow retweeted him, but never really paid attention.

Of course since then James Massola has revealed the identity of Grog’s Gamut and the interwebs have spewed forth huge volumes of work on the man and his anonymity. This is hardly surprising given that it is an issues that just about everyone that blogs or tweets has put some thought into from time to time.

For the record, I don’t think it was unethical to out Grog’s Gamut. However, I do think it’s quite boring and I question to value in doing so. There is probably a little public interest, not because he’s a public servant, but because it is gossip. I don’t see how traditional media expects to be taken seriously when it prints boring rubbish like this.

To make matters worse, the boringness of this sort of reporting is further punctuated by the fact that the only reason anyone is interested in Grog’s Gamut is because he’s quite good at what he does and is yet another example of new media are out performing traditional media.

But for me the more interesting question the issue raises is on of trust and legitimacy. In traditional media, what is written falls under the banner of the once respected masthead of the paper they are writing for. New Media practitioners have to actually earn the trust of their audience and that is even harder to do if you are anonymous.

Grog’s Gamut was clearly a good read – so good he managed to influence the ABC’s the managing director Mark Scott. By all accounts he was insightful and that cut through the cacophony of other blogs that are less insightful (like this one). To have your writing noticed, acknowledged and trusted* when no one knows who you are or what your credentials are is quite remarkable.

*The same issue presents itself to wikileaks and I think it’s fair to say that there is currently a concerted effort to undermine the trust that the organisation enjoys that legitimacy by a range of people.

Date: September 16th, 2010
Cate: ICT

NBN and Market Failure

Criticism of Labor’s National Broadband Network all seems to be pointed fairly squarely at the economic viability of the scheme. Or perhaps more specifically, is it necessary to provide fibre to the home for 93% of the population when those in more remote areas could simply use wireless while the major population centres get fibre to the premises?

In yesterday’s Crikey Peter J.Cox of Cox Media (who could really do with a new website) said:

My concern is not with the need for national broadband but with the arguments for delivering a 100 MB, or 1 GB fibre, system to nearly every home in the country at an extraordinary cost.

… and Malcolm Turnbull took a similar line in the Sydney Morning Herald today:

The real question is about the government spending $43 billion on an infrastructure project and asserting, but not demonstrating, that it will deliver value for money.

Now, just to be clear, $43 billion is a huge amount of money. But I think it is money well spent. Of course I don’t know the details of the way it will be spent but I’m happy for our Government to spend $43 billion on providing 93% of the population which up to 1Gb internet connects, both up and down. Providing these speeds both up and down is a very important point as well and enables a wide range of things that ADSL wireless do not and cannot have the capacity for.

Better still, the technology is as future proof as you can get. We’re talking about approaching the speed of light which is generally the upper limit of human endeavours for now. Moreover, it’s capacity is astounding, far exceeding anything wireless or satellite could even begin to imagine.

By and large, the market system is pretty good at determining prices for most things. However it clearly fails in some key areas. Health and education are the obvious two but there are others. In a country the size of Australia, market forces will not be able to provide rural and regional Australia (ie those most isolated and reliant on telecommunications) with an internet service of the likes of the NBN. Therefore it is necessary for the government to step in, spend up and deliver a service to 93% of the population that will put us on par with countries like South Korea. Imagine that, Broken Hill having the same sorts of internet speeds as Japan.

The Rudd Government had two good ideas, their stimulus package (thank you for my $900) and their NBN policy. If there is a problem with the NBN, it is that the Government intends to sell it at some stage in the future. I say we should keep it in public hands.