$view = new view; $view->name = 'Recomanacions'; $view->description = 'Llistat de recomenacions de cursos, ofertes de feina o publicitat per a un usuari'; $view->tag = 'usuaris'; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Per defecte', 'default'); $handler->override_option('fields', array( 'title' => array( 'label' => '', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'link_class' => '', 'alt' => '', 'prefix' => '', 'suffix' => '', 'target' => '', 'help' => '', 'trim' => 0, 'max_length' => '', 'word_boundary' => 1, 'ellipsis' => 1, 'html' => 0, 'strip_tags' => 0, ), 'empty' => '', 'hide_empty' => 0, 'empty_zero' => 0, 'link_to_node' => 1, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'none', ), )); $handler->override_option('arguments', array( 'tid' => array( 'default_action' => 'default', 'style_plugin' => 'default_summary', 'style_options' => array(), 'wildcard' => 'all', 'wildcard_substitution' => 'Tot', 'title' => '', 'breadcrumb' => '', 'default_argument_type' => 'php', 'default_argument' => '', 'validate_type' => 'none', 'validate_fail' => 'empty', 'break_phrase' => 1, 'add_table' => 0, 'require_value' => 0, 'reduce_duplicates' => 0, 'set_breadcrumb' => 0, 'id' => 'tid', 'table' => 'term_node', 'field' => 'tid', 'validate_user_argument_type' => 'uid', 'validate_user_roles' => array( '2' => 0, '3' => 0, '9' => 0, '4' => 0, '5' => 0, '6' => 0, '8' => 0, '10' => 0, '7' => 0, ), 'override' => array( 'button' => 'Sobrescriu', ), 'relationship' => 'none', 'default_options_div_prefix' => '', 'default_argument_fixed' => '', 'default_argument_user' => 0, 'default_argument_php' => '$uid = arg(1); $profile = content_profile_load(\'profile\', $uid); if (!empty($profile->taxonomy)): return; $terms = array(); foreach ($profile->taxonomy as $term) { $terms[] = $term->7; } if (!empty($terms)): return implode(\'+\',$terms); ', 'validate_argument_node_type' => array( 'poll' => 0, 'ad' => 0, 'faq' => 0, 'feed' => 0, 'feed_item' => 0, 'long_answer' => 0, 'matching' => 0, 'multichoice' => 0, 'quiz_directions' => 0, 'scale' => 0, 'short_answer' => 0, 'truefalse' => 0, 'quiz' => 0, 'forum' => 0, 'book' => 0, 'course' => 0, 'curs' => 0, 'documents' => 0, 'empreses' => 0, 'links' => 0, 'ofertes_treball' => 0, 'page' => 0, 'perfil_professional' => 0, 'productes_llibreria' => 0, 'profile' => 0, 'story' => 0, 'ubicacio' => 0, 'videos' => 0, 'webform' => 0, ), 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', 'validate_argument_vocabulary' => array( '1' => 0, '2' => 0, '4' => 0, '19' => 0, '20' => 0, '16' => 0, '3' => 0, '6' => 0, '7' => 0, '8' => 0, '13' => 0, '15' => 0, '5' => 0, '9' => 0, '10' => 0, '11' => 0, '18' => 0, '12' => 0, '17' => 0, '14' => 0, ), 'validate_argument_type' => 'tid', 'validate_argument_transform' => 0, 'validate_user_restrict_roles' => 0, 'validate_argument_is_member' => 'OG_VIEWS_DO_NOT_VALIDATE_MEMBERSHIP', 'validate_argument_group_node_type' => array( 'perfil_professional' => 0, ), 'validate_argument_signup_status' => 'any', 'validate_argument_signup_node_access' => 0, 'validate_argument_php' => '', ), )); $handler->override_option('filters', array( 'status_extra' => array( 'operator' => '=', 'value' => '', 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'status_extra', 'table' => 'node', 'field' => 'status_extra', 'relationship' => 'none', ), 'type' => array( 'operator' => 'in', 'value' => array( 'ad' => 'ad', 'curs' => 'curs', 'ofertes_treball' => 'ofertes_treball', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('title', 'Et pot interessar...'); $handler->override_option('empty', 'No tenim recomanacions (encara) per a fer-te. Prova d\'afegir més interessos editant el teu perfil d\'usuari.'); $handler->override_option('empty_format', '1'); $handler->override_option('use_more', 1); $handler->override_option('use_more_always', 0); $handler->override_option('use_more_text', '[+]'); $handler = $view->new_display('block', 'Bloc: Interessos', 'block_1'); $handler->override_option('block_description', ''); $handler->override_option('block_caching', -1);