--- clipper.module_old 2006-03-31 06:40:03.815402608 -0800 +++ clipper.module 2006-03-31 06:42:08.830397440 -0800 @@ -415,3 +415,29 @@ exit(); } } + + +/** + * Views interfaces + * @ingroup signup_views_api + */ +function clipper_views_tables() { + $tables['relations'] = array( + "filters" => array( + "left_id" => array( + "name" => "Clipper: Node is a parent", + "operator" => array('is a'), + "list" => array("parent"), + "handler" => "views_handler_filter_children", + "value-type" => "array", + "help" => t("This filter allows you to only show nodes that are clipper parents") + ), + ), + ); + return $tables; +} + +function views_handler_filter_children($op, $filter, $filterinfo, &$query) { + $query->ensure_table("relations"); + $query->add_where("relations.left_id = node.nid"); +}