function fuzzysearch_preprocess_fuzzysearch_result in Fuzzy Search 6
File
- ./
fuzzysearch.module, line 161 - Module file for fuzzysearch module.
Code
function fuzzysearch_preprocess_fuzzysearch_result(&$variables) {
$node = $variables['node'];
if (module_exists('taxonomy')) {
$variables['taxonomy'] = taxonomy_link('taxonomy terms', $node);
}
else {
$variables['taxonomy'] = array();
}
if ($variables['teaser'] && $node->teaser) {
$variables['content'] = $node->teaser;
}
elseif (isset($node->body)) {
$variables['content'] = $node->body;
}
else {
$variables['content'] = '';
}
$variables['date'] = format_date($node->created);
$variables['links'] = !empty($node->links) ? theme('links', $node->links, array(
'class' => 'links inline',
)) : '';
$variables['name'] = theme('username', $node);
$variables['node_url'] = url('node/' . $node->nid);
$variables['terms'] = theme('links', $variables['taxonomy'], array(
'class' => 'links inline',
));
$variables['title'] = check_plain($node->title);
// Flatten the node object's member fields.
$variables = array_merge((array) $node, $variables);
// Display info only on certain node types.
if (theme_get_setting('toggle_node_info_' . $node->type)) {
$variables['submitted'] = theme('node_submitted', $node);
$variables['picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $node) : '';
}
else {
$variables['submitted'] = '';
$variables['picture'] = '';
}
}