* warning: array_fill() [function.array-fill]: Number of elements must be positive in /home/htdocs/includes/database.inc on line 235.
* warning: implode() [function.implode]: Bad arguments. in /home/htdocs/includes/database.inc on line 235.
* warning: array_keys() [function.array-keys]: The first argument should be an array in /home/htdocs/modules/user/user.module on line 500.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/htdocs/modules/user/user.module on line 500.

CommentFileSizeAuthor
#6 nodeauthor14.patch1.84 KBMichaelK-1

Comments

wodor’s picture

if u need any additional info feel free to email me ( wodor at wodor.net )

alexgieg’s picture

The exact same error message appears here when I try to install.

meba’s picture

Can you please try 6.x-1.4? http://drupal.org/node/232527

dorien’s picture

I have the exact same error with 6..x-1.5!

meba’s picture

And not with 1.4? Damned, I think I have two mixed CVS repositories. Your page layout wasn't in 1.3 :((( I will fix this of course, I am sorry.

MichaelK-1’s picture

StatusFileSize
new1.84 KB

6.x-1.4 works.

Here is a patch (against the HEAD Version which is equivalent to 1.4).

And here is what is does:


function nodeauthor_perm() {
  return array('edit own info', 'view author info'); // "" => ''
}


function nodeauthor_menu() {
  $items = array();
  $items['admin/content/nodeauthor'] = array(
      'title' => t('Nodeauthor'), // add t()
      'description' => t('Modify which node types displays nodeauthor information'), // add t()
      'page callback' => 'drupal_get_form',
      'page arguments' => array('nodeauthor_admin_settings'),
      'access arguments' => array('administer site configuration'),
      );
  return $items;
}


function nodeauthor_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  switch ($op) {
    case 'alter':
      if (user_access('view author info')) { // "" => ''
        $allowed = variable_get('nodes_add_info', array());    
        if ($allowed[$node->type]) {
          $user = user_load(array('uid' => $node->uid));
          if (!empty($user->info)) {
            // Display picture if enabled
            if (variable_get('showpicture', 0) && !empty($user->picture)) {
              $picture = $user->picture;
            } else {
              $picture = NULL;
            }
            $path = drupal_get_path('module', 'nodeauthor');
            drupal_add_css($path . '/nodeauthor.css');
            $info = check_markup($user->info, $user->format);
            $node->body .= theme('authorinfo', $info, $picture);
          }
        }
      }
      break;
  }
}


// "" => ''
function theme_authorinfo($info, $picture) {
  $output = '<div class="nodeauthor-info"><span>' . t('About the author') . '</span>';
  if (isset($picture)) {
    $output .= '<div class="nodeauthor-pic"><img src="'. file_create_url(check_plain($picture)) .'" alt="'. t('User picture') .'" /></div>';
  }
  $output .= $info;
  $output .= '</div>'; // old: $ret .= '</div>';
  return $output;
}
andramine’s picture

Version: 6.x-1.2 » 6.x-1.5

ok, so i am 1.5, what should i do since there is a patch for 1.4 not 1.5?

MichaelK-1’s picture

I think the best solution is to use 6.x-1.4 with the patch I applied. The only important change it does is the closing of the div element. Rest are only small changes (adding t() for l10n or using '...' instead of "..." for a cleaner code).

meba’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.