Hello all, i'm wanting to covert a module for drupal 5.7 to drupal 6.0 i have read the api changes and i did them int he module but i'm still getting errors:

when a user registers:

Fatal error: Call to undefined function db_num_rows() in C:\wamp\www\panzerkampf\sites\all\modules\phpbb\phpbb.module on line 409

lin 409:

 if(db_num_rows($res) != 0) {
    $row = db_fetch_array($res); 
    return $row;
  } else {
    return false;
  }
}

when i want to adjust my sig and press submit i got this error:

Query failed: 0 UPDATE `phpbb_users` SET `user_sig`='

sig test
' , `username`='demon', `username_clean`='demon', `user_email`='mymail@domain.com', `user_email_hash`='159393334417', `user_password` = '$H$9NuPJQ1k8HFG71q1C0wADKEo0cBTIx.', user_pass_convert = 0 WHERE user_id = 1

now the sig gets storred in the drupal database but not the phpbb database.

i also have a question about the new menu thing:
this is the old code:

/**
 * Implementation of hook_menu().
 **/
 
function phpbb_menu($may_cache) {
  global $account, $phpbbcfg;
  
  if ($may_cache) {
    $items[] = array(
      'path' => 'phpbb', 
      'title' => t('phpbb'),
      'callback' => 'phpbb_view',
      'access' => TRUE,
      'type' => MENU_CALLBACK
    );
  } else {
    $new = 0;
    
    // Show private messages?
    $new = _phpbb_pm_count($account->uid);
    
    $items[] = array(
      'path' =>  $phpbbcfg['path_rel'].'inbox',
      'title' => t($phpbbcfg['pm_title']) . ($new ? ' ('. $new .')' : ''),
      'callback' => 'phpbb_view',
      'access' => $account->uid  ? TRUE : FALSE,
      'type' => $account->uid ? MENU_DYNAMIC_ITEM : MENU_CALLBACK
    );
  }
  
  return $items;
}

how would it look in the 6.0 api??

and one question more:

does drupal 6.xx have the database table named "sequences" cause i cant find it....

i'm not wanting to wait for the module author(arkepp) to make a 6.x version..

ps: i'm learning php ...

Comments

demon326@drupal.org’s picture

the first error has bin fixed...