Blogs

Twitter

Posted by gordon on Tue, 06/05/2008 - 9:05am

As of late I have been getting into twitter a bit. I have started using twirl to post tweets from desktop which is really cool.

I like so much that I have start tweeting while I am developing letting people know what I am up to now.

You can follow me on http://twitter.com/gheydon

Update: Fix up url for twhirl


AppleTV and Sync'ing woes

Posted by gordon on Sat, 01/09/2007 - 12:48pm

Just after the Apple TV was released I purchased one.

I am really happy with it. But being here in Australia and iTunes doesn't have TV shows available which is disappointing since the Free to air channels are **CRAP** and just screw with all the descent shows and really make it frustrating to watch. (Well back on track) So I have hacked my AppleTV so that I can get my content from my computer in the office.


Captcha on Site

Posted by gordon on Tue, 28/08/2007 - 11:44pm

Since I have upgraded my site to Drupal 5 I have added to Captcha to get rid of the bloody spam comments. Originally I was going to just use the math or other basic captcha's to implement a very clean captcha.

But I was listening to Security Now, Leo and Steve were talking about reCaptcha which not only a allows the use of captcha, but also helps with other projects. Here is a quick snippet of what these projects are

To archive human knowledge and to make information more accessible to the world, multiple projects are currently digitizing physical books that were written before the computer age. The book pages are being photographically scanned, and then, to make them searchable, transformed into text using "Optical Character Recognition" (OCR). The transformation into text is useful because scanning a book produces images, which are difficult to store on small devices, expensive to download, and cannot be searched. The problem is that OCR is not perfect.

So what they do is take these mis-converted words and use them as the captcha image and people responses are passed back to the projects to allow the projects to quickly fix up all the missing words that the OCR's couldn't get.

So if you do need to have captcha on your site, you might as well make it help other projects at the same time. So far for me it is working great. If you want to use recaptcha then you will find it at http://drupal.org/project/recaptcha

 


Well I have finally done it.

Posted by gordon on Sun, 05/08/2007 - 1:27pm

After many months of resistance I finally upgraded my site to Drupal 5.

OK, it was not resistance, I just didn't have time to do it. So now I have done it and I am managed to log into my site after Dreamhost upgraded to PHP 5.2 and I then couldn't log in with 4.7+

Oh well it is done now, so I can move forward and do some cool stuff.


Drupal test sites.

Posted by gordon on Sun, 05/11/2006 - 4:40pm

When developing a new site, for anyone you will generally have test and/or development version of a site. These sites are usually exact copies the live site, and from time to time you will copy the live database to these sites.

Usually when doing this you will go through the site and change some of the configuration values, like the gmap api number, and others like the path to payment gateways and credit card gateway indentification numbers to point to test versions of the payment gateways.

Generally doing this by hand you will miss some parameters, and have it really cause problems later. But there is an answer that will allow you to set these values automatically so that depending on the site, will be rewritten correctly everytime.

In the sites directory you will have a directory for each site, and a settings.php file in each of these directories. Just add to your test file the following

<?php
$conf = array(
  'site_mail' => 'test@example.com.au',
  'ccard_clientid' => 'example_no',
  'ccard_url' => 'https://test.example.com/store/payment/ccard',
  'googlemap_api_key' => 'ABQIAAAAhfBLLoKUHq7LqQ2QBcWQ2hRCSo_fHprJOtfmhc0LOWj7Ebi-6BSINRQq0Kie8sAsQKjO1tEi-ZFxSw',
);
?>

This will override these values above and will mean that you will never need to change them again. 

Also to speed up the download and update of your local database quickly and if you have a ssh connection to your webserver, try the following.

ssh webuser@example.com mysqldump -udbuser -pdbpasswd drupaldb | mysql -ulocaldbuser -pdbpasswd localdrupaldb

If you put this into a small shell script it is just a simple command away.


Now is a great time to be a web developer

Posted by gordon on Mon, 02/10/2006 - 3:01pm

One of the biggest problems with being a web developer is being able to make sure that all your web site is cross platform. So that it will work on all browsers.

The majority of browsers (firefox, opera, etc) are cross platform. so no matter which os you run you can run these browsers. The problems come with IE and Safari which are only available in Windows, and OS X, and generally most developers have access to a windows machine since IE is the biggest bastard of a browser to develop for, and and the other side Safari is pretty standards compliant.

So most people will take route of getting a Windows machine to sort out IE, and hope more than anything that it will just work.

Now with the release of the Intel Macs 2 things have happened. You can now dual boot, or use parallels on your Mac to test IE, or the old PowerPC macs have become dirt cheap and will run OS X 10.4

Because I just wanted to dip my feet in the Mac waters, I picked up a PowerMac G4 400 for a couple of hundred bucks, and I get to play with OS X, and see if it is for me, and I can test Safari without any issues. It is a bit slow, but to play MP3's and check the layout of pages in Safari it is just right.

At this stage my next laptop is going to be a Macbook, and I am very happy with this.


chx formapi tip.

Posted by gordon on Thu, 24/08/2006 - 10:30am

Yesterday I was having fun with the image module creating a new hook to allow people to build contrib module which will modify images when they are uploaded. see http://drupal.org/node/42835 for more details.

I needed to add in a hook to the node so that it would call my process after the validation had completed. and would always be called no matter what action was taken, Preview or submit.

I triied adding it before the #submit, but it would not call on a preview. After talking with chx, I found a cool feature, and a use for buttons besides firing scripts.

If you have 

<?php
$form['preview'] = array(
  '#type' => 'button',
  '#value' => t('Preview'),
);
?>

When the user clicks on this button, it will submit as normal, but in the forms api, hook_validate() will be called but hook_submit() will not.

Cool for doing previews, but not submit.

Also the Image module now has views integration. Yay.
 


Simple access and Organic Groups integration

Posted by gordon on Wed, 09/08/2006 - 11:29pm

One of the biggest problems with the node_access system is that the you can only really use 1 node access module at a time. So if you want to use simple_access and organic groups together, the access is not really going to work very well. In fact it is totally useless.

Their is the great node_arbitrator module which will allow modules to do this, but you need to use a new hook, that both simple access and og do not support, but both intend to support in the future. (I know that when I get a bit of time I will put it into simple access)


It's been a while

Posted by gordon on Thu, 03/08/2006 - 10:28am

Well I have been very busy over the last month on a couple of projects, so much so that I have not been able to do anything else, or drop a note on what I have been up to.

The biggest thing at the moment in my life is that the baby is now due in less than 4 months. It is starting to kick a lot and Sarah is starting to get use to it. But the little bugger will not kick for me ;-)

We had Xanders 5th birthday a couple of weeks ago, and and we had a lot of fun. We gave him a hot wheels track, and he is just loving it. I did have to stand in line for it at the KMart toy sale, but it was worth it.

Also I have finally done it, I have purchased a Mac. I have had a play with some mac laptops lately, and I have very interest in getting 1 for myself for my next laptop. However this is at least 8-12 months away. But I read this article which told of a guy getting a Mac for $25, and putting on OS X, and it ran just find. So off to ebay I went and picked up a G4/400 with OS X on it, and now I can test all my web sites with Safari, and get a feel for the Mac before I make the big plunge and buy the laptop.

As long as I can run itunes and play my music, I will be a great little machine.


Melbourne Meetup II

Posted by gordon on Thu, 13/07/2006 - 10:20pm

Well it is that time again, and Melbourne is having it's second Meetup.

We have taken up a kind offer from Luke Hodges @ Sustainable Living Foundation to use their premise and internet to make this a much better meetup that people will learn more and gain more from this event.

see http://groups.drupal.org/node/993 for more information and the siteup sheet so we have a good idea on how many people are going to be comming.

I hope to see a good turn out, and hopefully better than we did have last time.