Skip to Content

Drupal in Malaysia

Drupal: Views block delta converted to md5 hash

Byte Craft's blog on drupal - Fri, 01/08/2010 - 09:03

Find out this only through reading the views.module code. In case of your views block display has a long name (> 32 chars)(the views name would be used as delta in block table), Views would hash it through md5. You can get the list of hashed names stored in the variable table as views_block_hashes. For example, mine:-

Array ( [ba843477361f490ca5c9e42548f0127d] => imagegallery_block_latest_images-block_1 )

The related code is in line 298 of views.module.

Categories: Drupal in Malaysia

Installing Drupal from command line

Byte Craft's blog on drupal - Tue, 12/08/2009 - 11:04

Using twill because until Drupal 7, there's no way you can install Drupal without opening the browser.

#debug http 1
go http://192.168.1.6:12000/install.php?profile=pulut&locale=en
code 200
find "To set up your Pulut database, enter the following information."
#show_cookies

fv 1 db_type pgsql
fv 1 db_path gmp
fv 1 db_user kamal
fv 1 db_pass abc123

submit op

find "All necessary changes to <em>./sites/default</em> and <em>./sites/default/settings.php</em> have been made. They have been set to read-only for security."

fv 1 site_mail kamal@bytecraft.com.my
fv 1 account[name] admin
fv 1 account[mail] kamal@bytecraft.com.my
fv 1 account[pass][pass1] abc123
fv 1 account[pass][pass2] abc123
fv 1 update_status_module[1] 0

submit op

find "Congratulations, Pulut has been successfully installed"

clear_cookies
go http://192.168.1.6:12000/

fv 1 name admin
fv 1 pass abc123

submit op
find "Log out"

It's pretty crude at the moment but I guess a good start. Couple with some other tools I'm working on, installing Drupal can be fully automated. The next step is to convert this twill script into Python equivalent to be more flexible.

Update

Here some good and better explanation on this from Lin Clark's blog.

Categories: Drupal in Malaysia
Syndicate content