Nu ook in het Nederlands.
 

Enable and configure modules


cd sites/default

Preparation

We need drush, drupal and a few modules. You can download the http://build2be.com/sites/build2be.com/files/db.dump.tar.gz and http://build2be.com/sites/build2be.com/files/drupaljam.build2be.com.tar.gz The end result will be all the green enabled modules in the picture below.

Create and Fill the database

Just follow README.mysql.txt

mysqladmin -u root -p create drupaljam_demo
mysql -u root -p
> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON drupaljam_demo.* TO 'drupaljam_demo'@'localhost' IDENTIFIED BY 'drupaljam_demo';

Prepare settings.php

mv default.settings.php settings.php
chmod 777 settings.php

Add the site to apache (my steps)

cd /etc/apache2/sites-available/
cp drupaljam.dev drupaljam.demo
vi drupaljam.demo
a2ensite drupaljam.demo
vi /etc/hosts
# add 127.0.0.3 drupal.demo

free form:

Get the modules

Get a list of modules. What I did was use ls mysite/all/modules/ as a template and removed drush from that list.

./drush dl admin_menu advanced_help date drupalforfirebug drush_mm \
event flag og pathauto smartqueue_og token votingapi adminrole \
cck devel drush_sm fivestar nodequeue \
og_vocab rules timeline views wysiwyg

Drush nicely downloads all given drupal projects.


Project admin_menu (6.x-1.4) downloaded to /home/clemens/htdocs/drupaljam.build2be.com/www/sites/all/modules/. [success]
...

Getting drush and installing drupal.

Get drush and test it.

mkdir drupaljam.build2be.com
cd drupaljam.build2be.com/
wget http://ftp.drupal.org/files/projects/drush-All-Versions-2.0.tar.gz
tar
xzf drush-All-Versions-2.0.tar.gz
rm drush-All-Versions-2.0.tar.gz
./drush/drush

Get drupal without thinking.

clemens@clemens-laptop:~/htdocs/drupaljam.build2be.com$ ./drush/drush dl drupal
Project drupal (6.12) downloaded to /home/clemens/htdocs/drupaljam.build2be.com/. 
mv drupal-6.12 www

I want drush inside my sites/all/modules tree.


mkdir www/sites/all/modules

Block the Builder presentation at Drupal Jam 2009-06-26 Utrecht

This book is about what step I took to prepare the (temporary) demo site and what my presentation is about. Bob the Builder

From _en_ into a translatable _en_

On a multi language site it is desirable to translate the drupal English into the customers Englich likings.

Steps taken

  1. Goto /admin/settings/language/add
    1. Add a custom languages with language prefix en, name en-ours, english English @ Our place and native English @ Our Place
    2. Make your new language the default.
    3. Disable drupal's en
    4. Change the name en-ours into en

Relocating the files directory

Trying best practices I occasionally move the files directory from DRUPAL_ROOT/files/my-site.com to DRUPAL_ROOT/sites/my-sites/files

Doing this has some implications for the files table content. All file-path are pointing to the wrong location.

Quick solution for this is an mysql replace update query.

select replace(filepath, 'files/my-site/', 'sites/my-site/files/') from files;
# update files set filepath=replace(filepath, 'files/my-site/', 'sites/my-site/files/')"

Or through drush

Managing your svn repository with external ones

So you finally have your own svn repository. But you need to use external code as well. And you want to keep track of changes in those external code. Then use svn:externals. This tells subversion there are external subversion repositories destined to blend into the current folder. I learned this from a script thanks to Wim Leers

First let's create an externals to a repository in the current directory.

svn propedit svn:externals .

If this fails configure an editor like this

export EDITOR=vi

Pages

Subscribe to build2be/com/e RSS