Some drush commandos for setting up a drupal site quickly
Here a collection of our favorite modules. Just copy these lines into your .bashrc and deploy sites faster :) # get modules alias drushmodules=’drush dl translation_helpers ckeditor cck views webform token pathauto admin_menu filefield imagefield imageapi imagecache date google_analytics image advanced_help link devel jquery_update globalredirect transliteration logintoboggan rules content_profile views_bonus flag front vertical_tabs adminrole login_destination stringoverrides admin [...]
Nice drush theme commando’s
theme-enable => pm-enable theme-disable => pm-disable (it’s possible to just use: drush en/dis THEMENAME) theme-info => pm-info theme-list => pm-list –type=theme theme-list-enabled => pm-list –type=theme –status=enabled theme-set-default => vset theme_default theme-set-admin => vset admin_theme theme-status => status theme Have fun!
update: Getting a working simplenews mail application
I’m busy building an standalone newsletter application using simplenews. So my attempt to create some kind of documentation for a working drupal based newsletter solution. Use Simplenews 2-dev (at this moment 31-3-2010) it’s really great! Keep up the good work! simplenews template 2-dev ( at this moment you have to apply a patch #640740: Fatal error with [...]
Calling a view from code
$view=views_get_view(“VIEW_NAME”); //replace products with the name of the view created in step 1 $view->set_arguments(array($node->uid)); $view->build(‘default’); //use “default” if you want to retrieve the default display of your view, if not, the name of the specific display $view->execute(); foreach($view->result as $result) { //$result // Do something with $result here. Each result is an object, so for [...]
get a CCK field by query
<?php $field = content_fields(‘field_date’); $db_info = content_database_info($field); $result = db_query(“SELECT COUNT(*) AS count FROM {node} n INNER JOIN {term_node} tn ON n.vid = tn.vid INNER JOIN {“. $db_info['table'] .”} ctd ON n.vid = ctd.vid WHERE tn.tid = 25 AND ctd.” . $db_info['columns']['value']['column'] . ” > NOW() AND n.changed > %d”, $newtime); ?> thanks to drewish
drupal variables in theme files
Theme variables available to all Drupal template files $zebra In the case of multiple renderings of a template in one request, this indicates if this is an odd or even invocation. The value is odd or even. Perfect for generating stuff like zebra tables etc. $id In the case of multiple renderings of a template in one request, [...]

Nice drupal image galleries modules using Views
A selection of image gallery modules for drupal using the views module.
