RSS
 

drupal

drush will change your life

in the category of things you might not know, but really should because it'll change the way you build stuff in drupal...

DRUSH.

Drush is this thing for your shell. I installed it from deb.
once installed i can cd into a drupal doc root and type:
drush up

and, like magic, all my modules, themes, and core gets updated to the latest official release. No need to give out file write permission to apache or any other nasties like you see in other projects.

There's a bunch more commands other than "up" - the other one i use most often is:
drush dl [module name]

e.g.
drush dl views

and now i have the latest official release of the views module in my drupal sites/all/modules

Commands: 
 cache-clear (cc)      Clear a specific cache, or all drupal caches.                                                                                                                            
 core-cli (cli)        Enter a new shell optimized for drush use.                                                                                                                               
 core-cron (cron)      Run all cron hooks.                                                                                                                                                      
 core-rsync (rsync)    Rsync the Drupal tree to/from another server using ssh.  Relative paths start from the Drupal root folder if a site alias is used; otherwise they start from the current 

new flickr rippr release

i've just tagged a new release of Flickr Ripper drupal module. New feature is filter imported photos by tag.

Flickr Rippr reads flickr.com for users latest public photos, and turns these into content (nodes) on your drupal website.

You need only publish to flickr.com, and they will automagically appear on your drupal website after each cron run. Join this up with the Views module and make photo galleries, block, and other awesomes.

Example here: http://coffee.geek.nz/photos

geekspeakr.com hackfest

thanks to the ninjas who migrated geekspeakr.com from Drupal5 to Drupal 6, and to a happier server during LCA2010
IMG_0239

quote from Liz Henry, who really enjoyed the hackfest:

It was like Christmas – I hung out with kick ass open source people all day long, heard great talks, gave a talk and asked for more coding and development with other women, and then got to do that very thing with people I greatly admire!

and thanks to Catalyst for the use of their boardroom and intarwebs.

to do list for geekspeakr move
IMG_0233

OLPC hackfest / testfest - Auckland and Wellington

The NZ OLPC "Friends in Testing" meets every saturday in Wellington. This saturday will be the first meeting after a very successful Software Freedom Day here.
http://softwarefreedomday.org/teams/wellington

This saturday is also the first ever meeting of the Auckland group.

What's involved is: brunch, coffee, conversation, intro to the green XO laptops, how the OS works, how to install an activity, and then you test your chosen activity, try to find some bugs. If we find bugs we send a test report back to the project.

If we don't find any bugs we also send a report saying how awesome the project is. Those that know python may wish to track down and destroy the bug, but for the most part we don't.

We've been asked to test the list of activities that are being deployed to kids in Peru soon

We're meeting at 10:30am, and tying the two locations together via irc (we're a bit bandwidth constrained in cafes.

Wellington is at the southern Cross http://thecross.co.nz
Auckland group is at Ironique, 448 Mt Eden Rd, Mt Eden.

Please join us - there will be many newcomers at both events.

p.s. People hacking on other projects are also welcome - we like "cross pollination". I know there are some koha, statusnet and drupal hackers coming.
p.p.s. If you have your own laptop, whatever flavour, bring that along too. The "sugar" software project that powers the OLPC laptops should run on most anything, and if it doesn't work on yours, we'd like to know that too.

#Drupal for breakfast



#Drupal for breakfast, originally uploaded by t-dot-s-dot.

mmmmm

Drupal+Postgres code sprint

On friday we had the first of the Catalyst Drupal+Postgresql Codesprints. About eight drupal devs gathered with laptops, hidden in a meeting room where nobody could find us, and went through the issue list for drupal on postgres.

The issues i want through
http://drupal.org/node/514330 - update to the installation instuctions - wasn't actually needed as the old instructions still work in 8.1 and 8.3.
http://drupal.org/node/400296 - back port of a postgres fix for the simple test module into drupal 6 - the patch needed work. Luckily the patch writer was in the room with me, so he was nudged to fix it. He's done so, now i gotta find time this weekend to look again.

http://drupal.org/node/396388 - thanks @nzkoz for translating this from french :) After much testing on D6 and D7 I just couldn't find how to make this occur. It's obviously happening to many folks who then take the error message and search and find that issue - so I left it with a plea to please add instructions on how to make the error occur.

Turn drupal cvs project into a git repo.

How to make a git repo of a drupal cvs theme or module


CVSROOT=:pserver:anonymous@cvs.drupal.org:/cvs/drupal-contrib cvs login

password = anonymous

then, to get the zen theme you do this command

git-cvsimport -a -p x -v -d :pserver:anonymous@cvs.drupal.org:/cvs/drupal-contrib contributions/themes/zen

or to get the twitter module you do

git-cvsimport -a -p x -v -d :pserver:anonymous@cvs.drupal.org:/cvs/drupal-contrib contributions/modules/twitter

To resync with cvs later, you just run the git-cvsimport command again.

Drupal is a Sandwich

Drupal is a Sandwich | geek.joshwaihi.com
Source: geek.joshwaihi.com

Josh Waihi explains drupal:

I figured the easy way to explain Drupal was to relate it to food. Something we all can relate to. Drupal is like a sandwich. A sandwich has core essentials such as bread and filling but ever sandwich ever made is different in someway. ...    

Drupal is a sandwich!    

Twitter ego module - worth contributing?

I've made a little drupal module that tracks how many followers you have on twitter.

They're shown on this page:
http://coffee.geek.nz/twitterego

It also makes a block you can see on the bottom right of this blog atm.

I'll put the source into github shortly - and maybe i'll put it on drupal.org if there's enough downloads/interest.

How i saved my blog from Digg

yesterday my blog was "dugg" - and appeared on the technology page on Digg.com

It promptly fell over. It's a stock standard untuned debian etch server running drupal, on 256Mytes RAM.. I'd never spent the time to tune it.

So, yesterday, after rebooting I did the following:

1) turn on drupal's agressive caching - this means it saves the entire page it generates into the database so it doesn't need to regenerate.

Drupal south - morning christchurch!

Okay, so Twisted Hop has awesome beer -- the only Hand Pulled Cask Ale i christchurch... hmmm..

40 odd geeks gathered at this pub for some Drupal Conferencing. It's a complete "NERD PROM"

Some things we'd like to see are:
* More New Zealand focused drupal modules -
e.g. Payment gateways
i'd like to find time to make a Zoomin maps API CCK field.
* Maori language translations
* More NZ Drupal association membership
* More rescuing sites from other CMSes

Jonathan mentioned node/8, which is the oldset drupal "bug" that hasn't been fixed. It's a user deleting their own account.

Programme & Sessions | DrupalSouth

Programme & Sessions | DrupalSouthSource: drupalsouth.net.nzReach your audience with effective campaigns using Drupal and CiviCRM, based on experience with the NZ Greens and other advocacy organisations.This is where i am all weekend

Earl Miles named one of 2008 Open Source CMS Most Valued People by Packt Publishing | drupal.org

Earl Miles named one of 2008 Open Source CMS Most Valued People by Packt Publishing | drupal.orgSource: drupal.orgThis morning Earl Miles, also known as merlinofchaos, was named one of the 2008 Open Source

Drupal South - 1st to 2nd November

DrupalSouth is New Zealand's premier Drupal event for 2008 and first Drupal camp. Showcasing New Zealand's top Drupal developers, companies and website-showcases, DrupalSouth is scheduled for Saturday 1 and Sunday 2 of November 2008 in Christchurch.

http://drupalsouth.net.nz/

DrupalSouth | The New Zealand Drupal Event for 2008

DrupalSouth | The New Zealand Drupal Event for 2008Source: drupalsouth.net.nzDrupalSouth is New Zealand's premier Drupal event for 2008 and first Drupal camp.

Beyond the commiter

Drupal is an example of a project with one commiter per branch -- there's is only one person who will be putting code into the DRUPAL-5 branch in CVS. Like wise for all other stable branches.

CVS only has the concept of commiter. All commits on that branch appear to be authored by that one person. The result is, we don't know who wrote what code anymore.

Other version control system have authors. So, while Bob did the commiting, it is recorded that Jane actually is the Author. You can go further and say that Pete did that design work and Sally did the Testing.

flickrippr coming soon!! promise~!!

What's this? the javascript flickr "badge" on brenda's blog? the author of flickrrippr isn't using flickrrippr?

Well now - i just haven't got the whole of flickrrippr working in Drupal 6 yet. the basics are there (and in drupal CVS) but not ready for production yet.

despite the "badge", i still prefer to live with javascript off.

Super Happy Dev House for July

SuperHappyDevHouse Aotearoa is a monthly hackathon, combining serious and not-so-serious productivity with a fun and exciting party atmosphere.

The whole thing is about rapid development, ad-hoc collaboration and cross pollination. Hardcore coders, l33t hax0r, passionate designers, and other types that enjoy software and technology development are welcome. If this sounds like fun to you, then you're one of us.

Smacking sequences in drupal

After a data restore (server exploded) i had a few sequences outta whack - mostly because i decided to cherry pick which tables i restored.

Here's the php I typed out in a hurry to put those sequences right.
It works on drupal, because sequences are named so you can work out which table+column they link to

<?php
pg_connect('dbname=.....');
$result = pg_query("SELECT c.relname AS sequencename FROM pg_class c WHERE (c.relkind = 'S')");


while($row = pg_fetch_object($result)) {
  $s = $row->sequencename;
  echo "$s\n";
  if (!  pg_query("SELECT nextval('" . $s . "')")) {

Joomla - Drupal - What's the diff?

Last week i was over in Sydney and caught up with some truly awesome people - i drank heaps of rather good beer, ate some kangaroo, rode on the world's steepest incline railway, went to cebit, and booth babed for the linuxchix and the drupal stalls. (not necesarily in that order)

grand plans for couchdb storage email client

after getting angry with kmail performance (it's a great email client, but i have 10+years of email in it so it's slow) -- i decided i might do better keeping my email in a text-ey index thingie like lucence or solr Being a recent "i <3 erlang" convert, i was distracted by couchdb, which is a document orientated database built in erlang.

So, between avoiding doing timesheets, i've started up a ruby script.. I'm building this for me alone, though i will WTFPL anything if someone asks.

Drupal fun in Sydney

Yesterday was Drupal Barcamp day for me. about 25 to 30 people - Mostly developers turned up, with maybe 4 non-developers

Active vs. Inactive on planet.nztech.org

<?php
//get the file data

if (! $data = file('http://planet.nztech.org/')) return;

//count the posts per person
for($i=0; $i<= sizeof($data); $i++) {
$line = $data[$i];
$prev = $data[$i-1];
$next = $data[$i+1];
if (preg_match('!$!', $line)) {
if (preg_match('! @ !', $next)) {
$name = trim(preg_replace('!$!', '', $line));
$posts[$name]++;
}
}
}

//graph the percentage as pie chart
$total = 230;
$active = sizeof($posts);
$inactive = $total - $active;

include "/home/brenda/libchart/classes/libchart.php";

$chart = new PieChart(500, 400);

$dataSet = new XYDataSet();

$dataSet->addPoint(new Point('Active', ($active/ $total)*100));
$dataSet->addPoint(new Point('Inactive', ($inactive/ $total)*100));

$chart->setDataSet($dataSet);

$chart->setTitle("blogs with posts showing on planet.nztech.org");

$image = '/home/brenda/drupal/blogfiles/nztech_active.png';
unlink($image);
$chart->render($image);

?>
blogs with posts showing on planet.nztech.org

<?php

$chart = new HorizontalBarChart(400, 700);

$dataSet = new XYDataSet();

ksort($posts);
foreach($posts as $name => $count) {
$dataSet->addPoint(new Point($name, $count));
}

$chart->setDataSet($dataSet);

$chart->getPlot()->setGraphPadding(new Padding(5, 30, 20, 140));
$chart->setTitle("Number of Posts");

$image = '/home/brenda/drupal/blogfiles/nztech_posts.png';
unlink($image);
$chart->render($image);

?>
Number of Posts by user

Impromptu Survey of planet.nztech.org

<?php
$companies = 19;
$women = 16;
$unknown = 35 - $companies;
$total = 230;

$men = $total - $women - $unknown;

include "/home/brenda/libchart/classes/libchart.php";

$chart = new PieChart(500, 400);

$dataSet = new XYDataSet();

$dataSet->addPoint(new Point('Men', ($men / $total)*100));
$dataSet->addPoint(new Point('Women', ($women / $total)*100));
$dataSet->addPoint(new Point('Group+Companies', ($companies / $total)*100));
$dataSet->addPoint(new Point('Unknown', ($unknown / $total)*100));

$chart->setDataSet($dataSet);

$chart->setTitle("planet.nztech.org");

$image = '/home/brenda/drupal/blogfiles/nztech.png';
unlink($image);
$chart->render($image);
?>

Drupal Conference cancelled

with 3 weeks notice.

This leaves me and a collegue wasting money on tickets to sydney and accomodation already paid for with no conference to go to.http://groups.drupal.org/node/10895We are sorry to announce that the Drupal Asia Pacific Conference ..... have been postponed to a later date..... the challenges imposed by a tight deadline and the logistics of integrating with the CeBIT expo have been too much to overcome.[insert giant lol cat "fail" sign]