The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

Some Drupal 7 porting tips

Submitted by nk on Fri, 2010-01-22 08:32
  • UPDATE/INSERT often can be updated to a single db_merge.
  • Don't forget to ->execute() your db_select/db_insert/etc
  • Themes can have many variables and you might want to do
    function theme_fivestar_preview($variables) {
      $theme_definition = fivestar_theme();
      foreach ($theme_definition['fivestar_preview']['arguments'] as $key => $default) {
        $$key = $variables[$key];
      }

    Edit: merlinofchaos suggests simply extract($variables, EXTR_SKIP); because that's what templates do.

Commenting on this Story is closed.

Submitted by dereine (not verified) on Fri, 2010-01-22 14:07.

The signature of hook_theme is not as easy :( hook_theme($existing, $type, $theme, $path)

I would use

<?php
  $hooks
= theme_get_registry();
  foreach (
$hooks['foo']['arguments'] as $key => $default) {
    $
$key = $variables[$key];
  }
?>

Submitted by Anonymous on Mon, 2011-02-28 14:41.

Thanks for the info. I just started learning the syntax and the platform! Tell me, can be helpful xp tweaks for it? I'm very grateful for your response!