Subscribe to the RSS feed
GO Blog

Archive for March, 2008

Quick random output script (PHP)

I often find that I would like to show some elements of a page on random occasions. Ad placement, for example, is randomised on GOTXT.com.au.

Whatever your need is, there is a nice and easy way to pull it off, and that is with the following code:

<?php
$random = (rand(1,2)); // 50-50, picks a random number between 1 and 2.
echo “normal text” . ($random==1 ? “show 50% of time” : “other output” ) . “continue normal text”; //condensed if statement
?>

Obviously it might be easier to use regular if/elseif/else statements to control a wider range of random events.

Code Andrew 31 Mar 2008 No Comments

Drupal development - GO TXT

Drupal logo Over the past few weeks I have been steadily working on GO TXT.com.au, creating a new version of the site completely powered by Drupal ( + modules and some custom code). It’s really come a long way, and if you have the time please register and give it a whirl.

Most of the interesting work is with the integration of the SMS classes and all the tracking stuff there. There is a lot of code spent on user-verification and it’s still not ideal. Drupal’s registration system doesn’t seem suited to do you ‘Accept our Terms of Service/Accept our Terms and Conditions?’ style options.

Being built on Drupal 6.1, there are not a lot of modules available to plug directly in to the site. The ones I am relying most heavily on (and recommend to anyone developing a community site) include:

I am however having real issues with Google’s Site Authentication feature for AdSense. Ideally it would be great if the Googlebot could crawl user-only pages, and then be able to serve up some decent content-specific ads (and not something with horribly low eCPMs). I haven’t managed to get it working yet as the Googlebot doesn’t seem to handle the session well, if at all.

Another problem I faced today was with someone trying to create accounts en masse and use that to send heaps of free SMSes. Currently a rather poor hack is patching up that particular problem ;-). 

Moral of the story: Drupal is a fantastically versatile CMS.

CMS & GOtxt Andrew 29 Mar 2008 No Comments

We have a winner

retro-125×125.jpgRhys from Retro Garden has won the advertising give away competition. You can now see the Retro Garden advert on the sidebar. I love some of the older aracade games and if you are too, I recommend checking out the site, there are a growing number of articles there.

Thanks to everyone for participating - I certainly think that this may become a nice freebie to give away every now and then.

A special mention also goes to the virus must be stopped.

GO Blog Andrew 28 Mar 2008 1 Comment

Time is precious

We have been absolutely swamped with work recently. I don’t know what has prompted it, but new clients are swarming us and current clients want to expand and progress their current websites. It is a very busy time for everyone here.

I am aiming to get some free time to post some more things here - I have plenty of ideas for a change - but that free time is elusive ;-).

In the meantime remember to post a comment on our advertising give away. Not long now before I pick a winner of a 125×125 ad spot on the blog here.

Hope everyone has a great Easter and enjoys a break.

GO Blog Andrew 20 Mar 2008 1 Comment

Productivity tips revisited

List and notesIt seems every second blog post I read on Digg or Reddit is a comprehensive dialogue on how to maximise your time or the ten top ways to xyz. Generally they are unimaginative pieces which only serve to take up space and allow the author to engage in some rather verbose explanations and descriptions. Sometimes they are not. It is in this light that I’m going to try and write my own list. Sincere apologies if the resulting post doesn’t offer something useful, but the aim and effort is there.

1. Lists are not a cure-all. Motivation needs to come from within yourself
Don’t worry, the irony is not lost on me. ‘Top 10′ lists litter magazines and blogs. People like them because they are presented with information in a quick and easy-to-access structure. I certainly think that there is a place for the bullet-point list, but when it comes to being productive and constructive with your time usage they seem to offer little more than a short-term burst of hope and motivation. People feel like they have achieved something by reading a good list. No, you have not.

To achieve your goals (or perhaps to even garner the will power to document them) you do require some level of will power. It is very easy to delay and procrastinate, far too easy. You have to be frank and honest to yourself, and force yourself into starting productive and worthwhile habits. It can be a difficult process but it’s worth it if you can stick it out and force yourself to focus and really work on a regular basis.

2. Reddit/Digg/StumbleUpon are not going to help you stay on track
Yes they are interesting sources of news and other tidbits. They are also nearly guaranteed to distract you. I would also add instant messaging to the list here. Everyone (myself included) attempts to convince themselves that IM is a necessary application and that it simply must always be on. This isn’t true, and we all know it, even when you use it for ‘work’. An hour or two without distractions is worth four or five otherwise.

If you’re reading this and nodding your head then, to take the Nike approach, just do it. Close all the sites that you’re visiting and start whatever tasks may be pressing. Once you are finished that you can go and reward yourself by wasting time with whatever you want to.

3. Work can be your passion, but it can still get boring
You might have decided to start working for yourself, or you might have found your dream job - congratulations - but that doesn’t mean that you are going to stay happy and motivated. The truth is that even interesting jobs have menial tasks that you would rather not have to do. My best piece of advice is to handle these as they come up. Don’t allow a big backlog of tasks to appear. Whether you work for yourself, someone else or if you’re still studying, try to stay on top of your work on a weekly basis. If you allow things to get out of control you will only want to avoid it more. It’s about forcing yourself to do the unpleasant stuff now, so that you don’t need to constantly feel guilty about it.

4. Short term goals complement long term objectives
Have a dream. Whether it be financial, academic, sports related, relationship orientated or just some other personal goal. I think life is more interesting when you have some sort of direction or aim. But your overarching dream is not going to make you complete your daily tasks with much motivation. You therefore should also have some short term objectives or goals that correspond to your passion. The trick is to see how working now will pay off later for you.

5. Lists generally need to be nice round numbers
Life isn’t all nice and uniform. Some things might not apply to you, some things might not work for you. As long as you try though, as best you can, then you should be able to do whatever you want.

GO Blog Andrew 15 Mar 2008 No Comments

WordPress plugin - CommentLuv

CommentLuv is hereI am a bit of a fan of this plugin. It’s a good idea to reward people for their comments, and CommentLuv makes reciprocation nice and easy. I have had the plugin sitting on my PC’s desktop for a few weeks now while I deliberated installing it or not and thought that it probably makes sense. I like to hope people find the posts I write are relevant and interesting, and if this plugin helps more people find your posts just by leaving a comment here, then so much the better.

Everyone is probably familiar with this WordPress plugin, so I won’t dive into details. If you have a WP blog yourself and want to show some… no, I’ll refrain from intentional puns. Click here if you want to find out more or download the plugin.

I hope you all benefit from getting some small increase in exposure.

Plugins Andrew 09 Mar 2008 6 Comments

Next Page »

Recommended: Buy movies online.