Migration: The first phase.

Migrating from one structure/site to another can be a complex process. I have certainly found within my new role, where I have been migrating 30+ sites to one drupal multisite installation that the process of moving sites is a convuluted one. Not only can it require the migration of databases, but also the procesig of strings to sanitise them ready for implmentation into a new database system and structure, especially when having to split strings.

Falsifying Timestamp to give the illusion of historical data

I have been looking at a way of inputting content into drupal but falsifying the timestamp to show it as content created years ago. Currently I am in the process of migrating a number of static sites to drupal and as such have to manually copy and paste some of the content across. This then gives timestamps and revisions as new, despite the data being old (between 1-5 years).

I wrote this as a simple way of changing timestamps, obviously not for general use, but it does hack the nodes to pretend its old data:

<?php

Sitemaps: Let them know your there!

Sitemaps are a great way for getting search engines to crawl your sites and get every bit of data into their search engines. Obviously the main point behind search engine optimisation is to get your sites listed higher up, or more relevantly on search terms/keywords that you dictate, so letting search engines reach every last recess of your site is vital in achiving this. Currently the three big search engines are Google, Bing/MSN and Yahoo (although Yahoo may well be using search functions of other search engines very soon after its Microsoft takeover).

XMLWriter() for Google Base and Beyond...

I had a whale of a time trying to get some data posted onto Google Base, to enable the shop to sell items from Google Products. Although I am sure that popular e-commerce packages, and probably CMSs, all have uploader modules/components/plugins to do this for you, it is difficult trying to do a bulk export with xml so here is a quickie I wrote to help with getting the correct syntax for Google base using PHP's XMLWriter tool:

<?php
// THIS IS ABSOLUTELY ESSENTIAL - DO NOT FORGET TO SET THIS
@date_default_timezone_set("GMT");

$writer = new XMLWriter();
// Output directly to the user

@willhallonline

  • UCAS website downed with 100,000 users? Is it me or does that not really seem a lot. Do they not expect people to log on? 3 weeks 1 day ago
  • good day on #drupal and my new server today, problems being solved with minimal effort. Makes me feel good! 3 weeks 1 day ago
  • php... go ahead and excite me! 3 weeks 1 day ago
  • @ncameron I think that recruiter-wall-of-shame.com would just be used to recruit on! 3 weeks 1 day ago
  • simple is good, if only there were simple solutions to all computing questions 3 weeks 2 days ago