function template_preprocess_views_view_row_search

cis7 search.views.inc template_preprocess_views_view_row_search(&$vars)
cle7 search.views.inc template_preprocess_views_view_row_search(&$vars)
elmsmedia7 search.views.inc template_preprocess_views_view_row_search(&$vars)
icor7 search.views.inc template_preprocess_views_view_row_search(&$vars)
meedjum_blog7 search.views.inc template_preprocess_views_view_row_search(&$vars)
mooc7 search.views.inc template_preprocess_views_view_row_search(&$vars)

Template helper for theme_views_view_row_search

File

sites/all/modules/ulmus/views/modules/search.views.inc, line 160
Provide views data and handlers for search.module.

Code

function template_preprocess_views_view_row_search(&$vars) {
  $vars['node'] = ''; // make sure var is defined.
  $nid = $vars['row']->nid;
  if (!is_numeric($nid)) {
    return;
  }

  // @todo: Once the search row is fixed this node_load should be replace by a node_load_multiple
  $node = node_load($nid);

  if (empty($node)) {
    return;
  }

  // Build the node body.
  $node = node_build_content($node, FALSE, FALSE);
  $node->body = drupal_render($node->content);

  // Fetch comments for snippet
  $node->body .= module_invoke('comment', 'nodeapi', $node, 'update index');

  // Fetch terms for snippet
  $node->body .= module_invoke('taxonomy', 'nodeapi', $node, 'update index');

  $vars['url'] = url('node/' . $nid);
  $vars['title'] = check_plain($node->title);

  $info = array();
  $info['type'] = node_type_get_name($node);
  $info['user'] = theme('username', array('acccount' => $node));
  $info['date'] = format_date($node->changed, 'small');
  $extra = module_invoke_all('node_search_result', $node);
  if (isset($extra) && is_array($extra)) {
    $info = array_merge($info, $extra);
  }
  $vars['info_split'] = $info;
  $vars['info'] = implode(' - ', $info);

  $vars['node'] = $node;
  // @todo: get score from ???
  //$vars['score'] = $item->score;
  $vars['snippet'] = search_excerpt($vars['view']->value, $node->body);
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.