Drupal Logo

Drupal7Camp Leeds 2011: A Review

25th May 2011 - 25 minutes read time

This weekend I attended the Druapl7Camp 2011 in Leeds and so I booked a hotel room for the weekend and managed to find the right place on Saturday morning. I was one of the first to arrive and was able to greet people as the came through the door. With coffee flowing nicely and the wifi appearing to be stable we all set down to the first session.

Drupal 7 Camp Introduction
Photo By Richard Burford

Day 1

Install Party/Webfaction Demo
Steve Cowie

Logging In As Superuser In Drupal 6 SimpleTest

19th May 2011 - 4 minutes read time

Sometimes the most complex part of using SimpleTest is making sure that everything is working as it should before you start your tests. This means setting up the correct modules and creating the correct content types in advance. Because SimpleTest works by issuing CURL requests to pages the most reliable way of doing certain tasks is to use the administration forms as you normally would. Taking an example, if you want to enable a block from a module you should submit the block form, adding the blocks you need to the various different regions this like.

Drupal Logo

Drupal7Camp Leeds 2011 This Weekend

17th May 2011 - 2 minutes read time

ImageThis weekend (21st-22nd May) will be the Drupal7Camp 2011 in Leeds and I have organised myself tickets and hotel to attend. Drupal7Camp is a barcamp that is devoted Drupal 7, and so will consist of talks and sessions from the attendees. As a result the actual sessions list will not be decided until the day and will also consist of some informal discussions and workshops.

I will be representing #! code at the event (probably with my #! code t-shirt) and will be giving a session on the use of the new queues functionality in Drupal 7.

Drupal Logo

Drupal 6 Upload Module Reference Warnings

16th May 2011 - 4 minutes read time

I was testing out a new Drupal project build and found this strange error when uploading files to nodes using the Upload module. This error produced a lot of warning messages that appeared on the screen (in the process alarming my project manager) but appeared to have no impact on the actual function of the module, or the file uploaded. Essentially, when a file was uploaded the following errors were produced.

PHP Logo

PHP Question: Defining Constants

9th May 2011 - 4 minutes read time


What does the following code do?

define("MY_CONSTANT", array(1,2,3,4,5));



If this code is run it will produce the following error:

PHP Logo

PHP Question: Class Methods

4th May 2011 - 4 minutes read time


What is the difference between these two lines of code and can you produce the background code used for them?

PHP Logo

PHP Question: PHP Script Shape

1st May 2011 - 5 minutes read time


Write a PHP script that will print out the following text in the correct diamond shape.

  1. *
  2. ***
  3. *****
  4. *******
  5. *********
  6. *********
  7. *******
  8. *****
  9. ***
  10. *










PHP Logo

PHP Question: Print Object

28th April 2011 - 3 minutes read time


The following code was executed.

  1. <?php
  2. class MyClass {
  3. private $foo = "bar";
  4. }
  6. $myObject = new MyClass();
  7. echo $myObject;

Which produced the following error.

  1. Catchable fatal error: Object of class MyClass could not be converted to string in test.php on line 7
  3. Call Stack:
  4. 0.0011 323736 1. {main}() /test.php:0

How can the code be simply changed to prevent this error and produce some form of result?