Drupal Camp - Sydney 18/10/2008

today 18/10/2008 was the Sydney Drupal Camp - held at University of NSW campus in Camperdown & hosted by the Drupal Australia Group. Ryan Cross did a fantastic job organising the "unconference" with assistance from many people in the group. I'm too tired right now to write up my notes about it - suffice to say it was a great event and I learnt a few new tips to try out. I'll try write more tomorrow & post the photos (I only took a few) after some sleep. I'd helped out by recording audio of the sessions which will be uploaded to the group site & available for those who couldn't make it.

attached are the raw notes I took during the day - pasted below for searching purposes. I spent all day in the "B" area - which was beginners, but they went through some of the new drupal 6 modules I haven't used much yet. area "A" was more for the hardcore programmers.

photos @ http://www.flickr.com/photos/aliak_com/tags/drupalcampau08

there are more photos by woulfe / Faculty of Pharmacy, University of Sydney @ http://peu.pharm.usyd.edu.au/content/drupal/content.html


audio files on archive.org uploaded using creator=drupalcampau08 for easier searching & grouping

these are raw notes - so some details may need to be checked as I might have misheard!!
(the code fragments are probably not written correctly, but should give an idea of what to search for)


(part of the ) intro to the day by Ryan Cross


session 1

drupal basics
0 to drupal in 15mins
-- by Erle Pereira



- nodereference field type - linking up 2 pieces of info

- query & display
- view by category

- each content type has a set of templates
- hooking - changing the functionality of drupal
- step 1 - prepare
- form api, hooks
- web app - control the form

- form_alter function
-- menu hooks, hooks => make a new module

function producthelper form_alter(&$form,$form_state,$form_id)


create customer cck type

create shipping address cck type
-- add a field for 'customer' and make it cck type node reference, so this points to the customer cck type
-- then select drop down, customer.title is the one that will be displayed etc.
-- so when u fill in shipping address, you see the customer select dropdown, so u can select the customer for that shipping address



session 2

converting a static html to drupal theme
- by Ivan Zugec


drupal 6

required :
- images folder
- .info file for your theme -> holds info like name of theme folder, version, engine (most often used is phptemplate - others are smarty (eg big company where designers only use that), regions (screen areas - eg left/right sidebar, content, footer), core (drupal version this can run on)
- you can add as many regions as you like called whatever you want

page.tpl.php file
- main template file - this is really the only one required
- head_title -> into title tag
- then print head, print styles, print ..

logo, site name

print theme('links', $primary_links, array('class',

- print $footer
- print $closure - required, or some other modules don't work
- eg garland theme has everything in it

important variables
- ...
- help
- title
- content
- feed_icons

- learning drupal 6 - module development
- drupal 6 - building powerful & robust websites with drupal 6
- pro drupal developement

- sometimes you get a blank page when making a new theme
- paste in default theme if it's not there

barron theme - tableless css theme - good to start with
good base themes - basic, sky (can convert to wiregarden)

use framework, then modify


general chatter between sessions



session 3

agileware.net applications
-- by justin freeman

computed field
open office export
polygons with google maps

- no more photoshop, great graphic design
- takes the text on the page, runs it through GD library (graphics lib) and replaces it on your page
- can set colour, font, size, use a transparency

try zektron font/typeface

writes the text as an image on the page
put fonts in files/fonts (for example)
- can do multiline, drop shadow, transparent/& it's colour backgrounds
- can output at jpg, gif

eg for all filtered text, or all H1, H2, replace text with signwriter, replace custom tags

T1 libraries - for non-true type fonts?
- no - use truetype fonts and GD library. use all lowercase truetype fonts
- apply filter text (on certain html tags)
- or .tpl file

- use full html input format

open office exporter

- cck - store quotes, invoices etc data in drupal then use open office exporter to create an xml file open office doc

cck widgets

$filename = "ooo-{$node->nid)>.odt";

in open office doc, [var.contact_details] - it will look for the "var." and then replace the section in the open office doc with the variable
- so u put the line items
- this uses GLOBALS - most sites will have register globals off though - so watch out for this

java libraries, php libraries (dom pdf), command line ---> create pdf files
fop?? xslt easy to export as pdf??

so they use drupal as a report writer


edit view - drupal 5 atm


- customer wanted ms excel like functionality - table like editing
- good for updating adding database records

- uses jquery to add, delete, update nodes. can load files, images, select dates
- ajax
- obeys validation rules too

- build a view
- appears as a view type 'editview title' etc
- if it's a cck field u can save it, if it's not, eg title then you might need to code a new save-node (which is called) (check??)
- validation rules - eg in cck, check that title is required. if it's not supplied then gives a message
- update each row after editing


after lunch


session 4

panels 2
alpha/beta for drupal 6. works on drupal 5

from beginner to pro
-- by Jeff H. from Marmaladesoul



- eg to give the frontpage a different layout

panels_front url. then set this as the main page

- the panel layout options only occurs within the content area of your current theme
- ignore the titles section of panels in layout settings

- advanced settings
-- disable drupal blocks/regions - for a frontpage panel this will remove the left column nav bar

- content tab
-- click the + button in the pane. then u can select what content types u can put in the panels
- add a custom content type
- u can add css tags/classes in most of these areas to apply extra css instructions to it later (it adds them as css tags)
css - u don't need the .josh just use josh for the class name. and u can use multiple, just separate the list with space

- useful with views
- u can embed a view straight into the panel
- convert same view into multiple panes. once it's a pane u can modify what it does/shows

views panes (in admin page)
- connect the view to the panel --> pane
- category = views (define your own, these then appear in the list of content types in the box above)
- views can only use page & blog (views 1, views 2 can do more)
- allow the pane configuration to modify the items to display setting = checked, then passes this control through to the panels page, so if multiple users/groups. then each group/user could assign different values for these in their own view rather than using the site-wide value

offset - to skip first article (it's shown in full / feature article), show the second article (in a list). also good for sticky articles at top of page

then go back to panel content, and add the view panel
you can override the title
eg joshs news %title
- u can use keywords from context

devel module
- automatically generates some users and a dummy page for theme demos

so in the panel, create the main section with the article view panel. then in the centre/bottom panel, use the same view but a different view panel which shows the articles in list form instead of full view

--- part 2

advanced panels

- create a node page override
- on blog pages, show other blog posts by same author
- news node pages, show other news articles on same topic

- latest blogs
argument : user : UID s author, display all values, title=blogs by %1
add panel page : title is replaced later, path= node/%
panel page : context tab : arguments, contexts, relationships
- arguments - these are at the end of the url, expects a number/integer, userid, vocabulary id, taxonomy term id (category)
- contexts - haven't used it much
- relationship

add an argument
- specify a new keyword eg node_title
- own display - for your own articles of that type

- user from node

node1 blog entry & node1 story entry - these have their own new views
now when u add content to the panel, there's a node context content section and a user context section

articles by same user
- in the panel view
- argument
UID is author
from context
required context=user

then add this to the panel
title= %user's latest blogs
in left column
can change to table view to show the list

export from a test site, then import:
veiws panes
- make sure tinyMCE is switched off


session 5

CSS theme modification

-- by Sheree from marmalade soul


part 1:


part 2 :


css edit $30 for mac - marcrabbit.com - mac rabbit
- xray mode - allows u to check the pages in the drupal site
- similar to firebug

glossy blue theme is being modified in this example / demo

duplicate glossy blue to christmascats theme
rename glossyblue.info to christmascats.info
edit christmascats.info & change name, description & u can delete the project section (this is added by drupal when u submit a theme to drupal.og and it is used to track when new versions are released)
screenshot - this is the screenshot in the themes list in admin 150x90

textmate for mac - to edit the text files


open style.css in css edit

click on inspector in css edit
replace the graphic files .gifs for your new theme

toggle between xray view
check the different sections/components and change colours/margins/padding etc
make sure u have dummy content in the site before u start theming it so u check the H1, H2 headings etc

don't change the float elements as it could break the theme
- add padding/margins instead to position items


session 6

recording from phone recorder (presenters + audience) :


recoding of same session using microphone (presenters only)

(quicktime .mov file)

building a website
freestyling ...
-- by Aimee & Ivan

part 1
8:29 start

fckeditor - wysiwyg editor

searches on cck types

part 2

views 2

block view

- now we can create nice views for users as u can create it on the user node type

- select it as a link & remove the default title: prefix
- click save


calendar - just to display in the calendar
- date api
- cck & views - to create a content type & display it on the calendar

video tutorial on web - drupal videos / drupal tutorials - for date module - 1 hour

::: location: