Blogs

Looking forward to Drupal 8 and using ESI

Posted by gordon on Sat, 11/09/2010 - 7:47am

A couple of days ago I started my first Drupal 7 site for a client, and while I was doing that I was listening to the latest Lullabot podcast and Angie was talking a little about the Drupal 8 (very briefly) and about what Larry Garfield was planning for blocks, in that their will be a completely new model which will be more of a pull model instead of the current push model which is currently in Drupal <= 7. This took me back to Drupalcon SF at the Core Developers Summit and other breakout sessions where we started talking about this.


Upgrades not updating properly!!! AAAAArrrrggggghhhh!!!!

Posted by gordon on Mon, 21/06/2010 - 2:23pm

Working on an import of some content for a client I have found that some things were not working such as auto node title.

After spending about 30 minutes banging my head to work out what the problem was. If was a problem that I had forgotten about, as I needed to get around this in the past.

Basically the problem is that when you do an update of your system hook_init() is not called. Normally this is not a problem but what happens in that modules like cck use hook_init() to include the token implementation, or even in the case of strongarm all the $conf is updated during hook_init().


Finally cleaned my site up.

Posted by gordon on Sun, 23/05/2010 - 6:42pm

I did some work today and cleaned up my website so it is not a spam sink and updated all the modules to the latest version of Drupal 5.x. Next is to upgrade it to Drupal 6 ready for Drupal 7. Also I got rid of CAPTCHA and I am now using Mollom which should stop the spam.

I have a number of articles I want to publish and now I have a place to publish these again, and will start publishing again.


Twitter

Posted by gordon on Tue, 06/05/2008 - 10: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 - 1: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 Wed, 29/08/2007 - 12:44am

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 - 2: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 - 5: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 - 4: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 - 11: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.