drupal

Logging in to drupal 5 using perl

Normally you can call the drupal cron page (/cron.php) as the anonymous user - but - to work around an issue with the simplenews module and taxonomy access control I need to run the cron script as a logged in user.

You need to do three things (for drupal 5 - I used to be able to start at step 2 for drupal 4).

  1. Grab the root page to get the PHPSESSID cookie
  2. Login to associate your cookie with a logged in session
  3. Call the script you want - in this case cron.php
Technorati Tags:

A drupal module for geocaching

I wanted to be able to link to the geocaching.com website for caches automatically depending on the categorization of a post.

Each post that has to do with geocaching already had the geocache names (e.g. GCHZVF or GCRHWQ) associated with them in the Geocaching category.

So - I decided to create a module to do the work for me.

Technorati Tags:

Protecting drupal update

An extra protection can be added to drupal update function by restricting which machines can access it.

Add this to the .htaccess

<FilesMatch "update.php">
Order deny,allow
Deny from all
Allow from 192.168.3.1
Allow from 192.168.3.*
Allow from .host.tld
Allow from hostname.host.tld
</FilesMatch>

Technorati Tags:

Drupal cron script

To avoid having to set up multiple cron lines - here's a script that will read your drupal install(s) and call cron on each one found.

Not sure where I saw the code (rss feed) - but the comment was present in the downloaded code - so thats a pointer to where it starts.

Changes I've made - the dir match is changed from ** to * so that it will follow symlinks. It also handles multiple drupal installs. Timeout wrapping added - one of my sites takes a long while to return.

Technorati Tags:

Upgrading drupal from 4.7 to 5.0

To upgrade a site from drupal 4.7 to 5.0:

I have several sites running drupal 4.7 that will want to be upgraded to 5.0 - here's how I'm thinking of approaching it. Mostly culled from a Lullabot video.

Technorati Tags:

drupal upgrade module status

Current status of modules for various drupal sites. Last updated 2007-01-07 apart from intern which was updated on 2007-02-05

Drupal 5 - third party modules

Drupal 5 is now in beta. Not all the third party modules are converted yet.

Track here: http://drupal.org/node/82257

Technorati Tags:

Regenerating the access tables

After trying to run both Taxonomy Access and Simple Access - and finding that this didn't play well together (drupal 5 is supposed to be able to handle this better) the taxonomy access details were hosed. The actual taxonomies were hidden - but the nodes were displayed.

Thanks to help on the drupal forums - to rebuild this I had to:

  1. Disable taxonomy access (note - thats disable not uninstall)
  2. TRUNCATE node_access in the database
  3. Re-enable taxonomy access

This rebuilt the contents of the node access table and all started playing well together :

Technorati Tags:

Migration to drupal

For a long while this site has been running a combination of wordpress with embedded gallery2 (using the wpg2 plugin).

On wednesday the process of migrating it to drupal again with gallery2 embedded (using the gallery plugin) started - and it's gone surprisingly quickly.

Within a few days I expect to have the last changes made and the site moved over.

Things left to do

  • Do I like this theme or should I theme it myself?
  • Get the tinymce g2image plugin to work (generate the correct links)
Technorati Tags:
Syndicate content
worried