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().
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.
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
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.
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.
With the new forms api I have stopped using hidden fields,
because depending on the fields and how they are used they can be
insecure, or allow nasty users to do funny things to forms that
are being posted.
Well for a project that I am doing I had a situation where I
needed to use a hidden value to be updated by some js, and I ran
into some problems in that if I had to submit the form multiple
times the value I set was being lost.