diff --git a/modules/node.views.inc b/modules/node.views.inc index 2e61ed9c674740f5b93ecdb964b0c7090b7d8d49..0a12ca1f0e41069f4627d92e1136721715bfc180 100644 --- a/modules/node.views.inc +++ b/modules/node.views.inc @@ -624,50 +624,6 @@ function node_views_data() { return $data; } -/** - * Implements hook_views_plugins(). - */ -function node_views_plugins() { - return array( - 'module' => 'views', // This just tells our themes are elsewhere. - 'row' => array( - 'node' => array( - 'title' => t('Content'), - 'help' => t('Display the content with standard node view.'), - 'class' => 'views_plugin_row_node_view', - 'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules - 'base' => array('node'), // only works with 'node' as base. - 'uses options' => TRUE, - 'type' => 'normal', - 'help topic' => 'style-node', - ), - 'node_rss' => array( - 'title' => t('Content'), - 'help' => t('Display the content with standard node view.'), - 'class' => 'views_plugin_row_node_rss', - 'path' => drupal_get_path('module', 'views') . '/modules/node', // not necessary for most modules - 'theme' => 'views_view_row_rss', - 'base' => array('node'), // only works with 'node' as base. - 'uses options' => TRUE, - 'type' => 'feed', - 'help topic' => 'style-node-rss', - ), - ), - 'argument validator' => array( - 'node' => array( - 'title' => t('Content'), - 'handler' => 'views_plugin_argument_validate_node', - ), - ), - 'argument default' => array( - 'node' => array( - 'title' => t('Content ID from URL'), - 'handler' => 'views_plugin_argument_default_node' - ), - ), - ); -} - /** * Implements hook_preprocess_node(). */ diff --git a/modules/search.views.inc b/modules/search.views.inc index 32742b23b2bdd80b2402ef5b485c9b4696dfda54..b3ae5da4865bad1157a01811518a160382a699bb 100644 --- a/modules/search.views.inc +++ b/modules/search.views.inc @@ -128,72 +128,3 @@ function search_views_data() { return $data; } - -/** - * Implements hook_views_plugins(). - */ -function search_views_plugins() { - return; - // @todo: DISABLED. This currently doesn't work. - return array( - 'module' => 'views', // This just tells our themes are elsewhere. - 'row' => array( - 'search' => array( - 'title' => t('Search'), - 'help' => t('Display the results with standard search view.'), - 'handler' => 'views_plugin_row_search_view', - 'theme' => 'views_view_row_search', - 'path' => drupal_get_path('module', 'views') . '/modules/search', // not necessary for most modules - 'base' => array('node'), // only works with 'node' as base. - 'type' => 'normal', - ), - ), - ); -} - -/** - * Template helper for theme_views_view_row_search - */ -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->label()); - - $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); -}