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
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
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.
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.
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.
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)
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.
Over the last month or so I have doing a project which involved installing CiviCRM for my clients contact managements needs. So because of this I have been crawling around CiviCRM quite a bit.
One of my clients requirements to a membership system which is linked to both CiviCRM and Drupals E-Commerce, and gives access to the parts of the system, and some other items such as books, and resources.
I developed this membership system in Drupal, and used the CiviCRM API to update contacts. But when enquiring on contacts the problem was getting easy access to the membership information and history. The obvious answer was to add a tab to the contacts page for the membership information.
The problem with this is that the membership system was developed in Drupal, and not in CiviCRM, so adding the tab, and making the tab look like a CiviCRM page was going to be a challenge.
I have been interviewed by Jeff Roberts of Lullabot about the E-Commerce Release and other things.
If has got a lot of good information, and it was a fun chat.
When I was watching Call for Help tonight, Leo showed off Bryght.com on the show as well as demonstrated the new twit.tv site which is being created by lullabot.
This was pretty cool, and I think we can really add the "seen on tv" tag.
This is shown on episode #377, which has not been put on the site yet. I will update in the next day or so.
Update: Added the link to the episode.