huhh, hát csináltam inkább én is egyet
itt van:
$view = new view; $view->name = 'felhasznalok'; $view->description = 'Megjeleníti a felhasználói fiókokat egy táblázatban.'; $view->tag = ''; $view->base_table = 'users'; $view->core = 6; $view->api_version = '2'; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('fields', array( 'name' => array( 'label' => 'Name', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'absolute' => 0, 'link_class' => '', 'alt' => '', 'rel' => '', '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, 'hide_alter_empty' => 1, 'link_to_user' => 1, 'overwrite_anonymous' => 0, 'anonymous_text' => '', 'exclude' => 0, 'id' => 'name', 'table' => 'users', 'field' => 'name', 'relationship' => 'none', ), 'mail' => array( 'label' => 'E-mail', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'absolute' => 0, 'link_class' => '', 'alt' => '', 'rel' => '', '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, 'hide_alter_empty' => 1, 'link_to_user' => 'mailto', 'exclude' => 0, 'id' => 'mail', 'table' => 'users', 'field' => 'mail', 'relationship' => 'none', ), 'created' => array( 'label' => 'Created date', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'absolute' => 0, 'link_class' => '', 'alt' => '', 'rel' => '', '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, 'hide_alter_empty' => 1, 'date_format' => 'small', 'custom_date_format' => '', 'exclude' => 0, 'id' => 'created', 'table' => 'users', 'field' => 'created', 'relationship' => 'none', ), 'access' => array( 'label' => 'Last access', 'alter' => array( 'alter_text' => 0, 'text' => '', 'make_link' => 0, 'path' => '', 'absolute' => 0, 'link_class' => '', 'alt' => '', 'rel' => '', '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, 'hide_alter_empty' => 1, 'date_format' => 'small', 'custom_date_format' => '', 'exclude' => 0, 'id' => 'access', 'table' => 'users', 'field' => 'access', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', )); $handler->override_option('cache', array( 'type' => 'none', )); $handler->override_option('title', 'Felhasználók'); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'grouping' => '', 'override' => 1, 'sticky' => 1, 'order' => 'desc', 'summary' => '', 'columns' => array( 'name' => 'name', 'mail' => 'mail', 'created' => 'created', 'access' => 'access', ), 'info' => array( 'name' => array( 'sortable' => 1, 'separator' => '', ), 'mail' => array( 'sortable' => 1, 'separator' => '', ), 'created' => array( 'sortable' => 1, 'separator' => '', ), 'access' => array( 'sortable' => 1, 'separator' => '', ), ), 'default' => 'access', )); $handler = $view->new_display('page', 'Page', 'page_1'); $handler->override_option('path', 'felhasznalok-tablazat'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'description' => '', 'weight' => 0, 'name' => 'navigation', ));
ezt importáljad be és akkor látni fogod mit csinál. nincsenek benne a neked kellő mezők, mert azok nálam ugye nem léteznek, de az elvet mutatja általános mezőkkel. nézd meg mi hogyan van beállítva. főleg azt, hogy a stílusa táblázat.
-
clear: both;
- A hozzászóláshoz regisztráció és bejelentkezés szükséges
Ezt valószínüleg csak
akkor lehet elmagyarázni, ha már csináltál valaha valamilyen views listát.
Felteszed a Views Bonus Pack modult a 6-os oldaladra és bekapcsolod.
Aztán importáld be ezt (admin/build/views/import):
$view = new view; $view->name = 'uc_product_export'; $view->description = 'Export ubercart product to CSV file'; $view->tag = ''; $view->base_table = 'node'; $view->human_name = 'UC product export'; $view->core = 6; $view->api_version = '3.0'; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Alapértelmezések */ $handler = $view->new_display('default', 'Alapértelmezések', 'default'); $handler->display->display_options['use_more_text'] = 'tovább'; $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Alkalmazás'; $handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Alaphelyzet'; $handler->display->display_options['exposed_form']['options']['exposed_sorts_label'] = 'Rendezés'; $handler->display->display_options['exposed_form']['options']['sort_asc_label'] = 'Növekvő'; $handler->display->display_options['exposed_form']['options']['sort_desc_label'] = 'Csökkenő'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['pager']['options']['expose']['items_per_page_label'] = 'Elemek száma oldalanként'; $handler->display->display_options['pager']['options']['expose']['items_per_page_options_all_label'] = '- Mind -'; $handler->display->display_options['pager']['options']['expose']['offset_label'] = 'Eltolás'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; /* Mező: Termék: Cikkszám */ $handler->display->display_options['fields']['model']['id'] = 'model'; $handler->display->display_options['fields']['model']['table'] = 'uc_products'; $handler->display->display_options['fields']['model']['field'] = 'model'; $handler->display->display_options['fields']['model']['alter']['alter_text'] = 0; $handler->display->display_options['fields']['model']['alter']['make_link'] = 0; $handler->display->display_options['fields']['model']['alter']['absolute'] = 0; $handler->display->display_options['fields']['model']['alter']['external'] = 0; $handler->display->display_options['fields']['model']['alter']['replace_spaces'] = 0; $handler->display->display_options['fields']['model']['alter']['trim_whitespace'] = 0; $handler->display->display_options['fields']['model']['alter']['nl2br'] = 0; $handler->display->display_options['fields']['model']['alter']['word_boundary'] = 1; $handler->display->display_options['fields']['model']['alter']['ellipsis'] = 1; $handler->display->display_options['fields']['model']['alter']['strip_tags'] = 0; $handler->display->display_options['fields']['model']['alter']['trim'] = 0; $handler->display->display_options['fields']['model']['alter']['html'] = 0; $handler->display->display_options['fields']['model']['element_label_colon'] = 1; $handler->display->display_options['fields']['model']['element_default_classes'] = 1; $handler->display->display_options['fields']['model']['hide_empty'] = 0; $handler->display->display_options['fields']['model']['empty_zero'] = 0; $handler->display->display_options['fields']['model']['hide_alter_empty'] = 1; $handler->display->display_options['fields']['model']['link_to_node'] = 0; /* Mező: Tartalom: Cím */ $handler->display->display_options['fields']['title']['id'] = 'title'; $handler->display->display_options['fields']['title']['table'] = 'node'; $handler->display->display_options['fields']['title']['field'] = 'title'; $handler->display->display_options['fields']['title']['label'] = 'Név'; $handler->display->display_options['fields']['title']['alter']['alter_text'] = 0; $handler->display->display_options['fields']['title']['alter']['make_link'] = 0; $handler->display->display_options['fields']['title']['alter']['absolute'] = 0; $handler->display->display_options['fields']['title']['alter']['external'] = 0; $handler->display->display_options['fields']['title']['alter']['replace_spaces'] = 0; $handler->display->display_options['fields']['title']['alter']['trim_whitespace'] = 0; $handler->display->display_options['fields']['title']['alter']['nl2br'] = 0; $handler->display->display_options['fields']['title']['alter']['word_boundary'] = 1; $handler->display->display_options['fields']['title']['alter']['ellipsis'] = 1; $handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0; $handler->display->display_options['fields']['title']['alter']['trim'] = 0; $handler->display->display_options['fields']['title']['alter']['html'] = 0; $handler->display->display_options['fields']['title']['element_label_colon'] = 1; $handler->display->display_options['fields']['title']['element_default_classes'] = 1; $handler->display->display_options['fields']['title']['hide_empty'] = 0; $handler->display->display_options['fields']['title']['empty_zero'] = 0; $handler->display->display_options['fields']['title']['hide_alter_empty'] = 1; $handler->display->display_options['fields']['title']['link_to_node'] = 1; /* Mező: Termék: Eladási ár */ $handler->display->display_options['fields']['sell_price']['id'] = 'sell_price'; $handler->display->display_options['fields']['sell_price']['table'] = 'uc_products'; $handler->display->display_options['fields']['sell_price']['field'] = 'sell_price'; $handler->display->display_options['fields']['sell_price']['alter']['alter_text'] = 0; $handler->display->display_options['fields']['sell_price']['alter']['make_link'] = 0; $handler->display->display_options['fields']['sell_price']['alter']['absolute'] = 0; $handler->display->display_options['fields']['sell_price']['alter']['external'] = 0; $handler->display->display_options['fields']['sell_price']['alter']['replace_spaces'] = 0; $handler->display->display_options['fields']['sell_price']['alter']['trim_whitespace'] = 0; $handler->display->display_options['fields']['sell_price']['alter']['nl2br'] = 0; $handler->display->display_options['fields']['sell_price']['alter']['word_boundary'] = 1; $handler->display->display_options['fields']['sell_price']['alter']['ellipsis'] = 1; $handler->display->display_options['fields']['sell_price']['alter']['strip_tags'] = 0; $handler->display->display_options['fields']['sell_price']['alter']['trim'] = 0; $handler->display->display_options['fields']['sell_price']['alter']['html'] = 0; $handler->display->display_options['fields']['sell_price']['element_label_colon'] = 1; $handler->display->display_options['fields']['sell_price']['element_default_classes'] = 1; $handler->display->display_options['fields']['sell_price']['hide_empty'] = 0; $handler->display->display_options['fields']['sell_price']['empty_zero'] = 0; $handler->display->display_options['fields']['sell_price']['hide_alter_empty'] = 1; $handler->display->display_options['fields']['sell_price']['set_precision'] = 0; $handler->display->display_options['fields']['sell_price']['precision'] = '0'; $handler->display->display_options['fields']['sell_price']['decimal'] = ','; $handler->display->display_options['fields']['sell_price']['separator'] = ''; $handler->display->display_options['fields']['sell_price']['format_plural'] = 0; $handler->display->display_options['fields']['sell_price']['format'] = 'numeric'; /* Szűrő: Tartalom: Típus */ $handler->display->display_options['filters']['type']['id'] = 'type'; $handler->display->display_options['filters']['type']['table'] = 'node'; $handler->display->display_options['filters']['type']['field'] = 'type'; $handler->display->display_options['filters']['type']['value'] = array( 'product' => 'product', ); /* Display: Product export */ $handler = $view->new_display('feed', 'Product export', 'export'); $handler->display->display_options['pager']['type'] = 'none'; $handler->display->display_options['pager']['options']['offset'] = '0'; $handler->display->display_options['style_plugin'] = 'views_csv'; $handler->display->display_options['style_options']['provide_file'] = 1; $handler->display->display_options['style_options']['filename'] = 'uc_product_export.csv'; $handler->display->display_options['style_options']['parent_sort'] = 0; $handler->display->display_options['style_options']['quote'] = 1; $handler->display->display_options['style_options']['seperator'] = ';'; $handler->display->display_options['style_options']['header'] = 1; $handler->display->display_options['path'] = 'admin/content/product-export'; $translatables['uc_product_export'] = array( t('Alapértelmezések'), t('tovább'), t('Alkalmazás'), t('Alaphelyzet'), t('Rendezés'), t('Növekvő'), t('Csökkenő'), t('Elemek száma oldalanként'), t('- Mind -'), t('Eltolás'), t('Cikkszám'), t('Név'), t('Eladási ár'), t(','), t('Product export'), );
Legalább 3.x verziójú views-nek kell fent lenni az oldaladon.
Add hozzá a termékmezőidet, mentsd el és exportálhatod, ha beírod az oldal nevét és utána a admin/content/product-export címet.
Üdv!
Dudás József
- A hozzászóláshoz regisztráció és bejelentkezés szükséges
kicsit trükkös, de jó felé indultál
user alapú nézet kell, ami használ egy node relationshipet (két relationship lesz összesen, egyik file, másik node. a node -ot kell neked használni) aztán kell egy filter, ami node: post date » not null, és az előbb hozzáadott relationshipet használja majd.
itt a nézet exportja, amivel kikísérleteztem neked ezt a megoldást. előtte még nem csináltam ilyet, jó móka volt. ;)
$view = new view; $view->name = 'users'; $view->description = ''; $view->tag = ''; $view->base_table = 'users'; $view->human_name = 'Users'; $view->core = 6; $view->api_version = '3.0-alpha1'; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Defaults */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['options']['distinct'] = TRUE; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'table'; $handler->display->display_options['style_options']['columns'] = array( 'access' => 'access', 'login' => 'login', 'name' => 'name', 'picture' => 'picture', ); $handler->display->display_options['style_options']['default'] = '-1'; $handler->display->display_options['style_options']['info'] = array( 'access' => array( 'sortable' => 0, 'default_sort_order' => 'asc', 'align' => '', 'separator' => '', ), 'login' => array( 'sortable' => 0, 'default_sort_order' => 'asc', 'align' => '', 'separator' => '', ), 'name' => array( 'sortable' => 0, 'default_sort_order' => 'asc', 'align' => '', 'separator' => '', ), 'picture' => array( 'sortable' => 0, 'default_sort_order' => 'asc', 'align' => '', 'separator' => '', ), ); $handler->display->display_options['style_options']['override'] = 1; $handler->display->display_options['style_options']['sticky'] = 0; /* Relationship: User: Nodes authored */ $handler->display->display_options['relationships']['uid']['id'] = 'uid'; $handler->display->display_options['relationships']['uid']['table'] = 'users'; $handler->display->display_options['relationships']['uid']['field'] = 'uid'; $handler->display->display_options['relationships']['uid']['required'] = 0; /* Field: User: Picture */ $handler->display->display_options['fields']['picture']['id'] = 'picture'; $handler->display->display_options['fields']['picture']['table'] = 'users'; $handler->display->display_options['fields']['picture']['field'] = 'picture'; $handler->display->display_options['fields']['picture']['alter']['alter_text'] = 0; $handler->display->display_options['fields']['picture']['alter']['make_link'] = 0; $handler->display->display_options['fields']['picture']['alter']['absolute'] = 0; $handler->display->display_options['fields']['picture']['alter']['external'] = 0; $handler->display->display_options['fields']['picture']['alter']['trim'] = 0; $handler->display->display_options['fields']['picture']['alter']['nl2br'] = 0; $handler->display->display_options['fields']['picture']['alter']['word_boundary'] = 1; $handler->display->display_options['fields']['picture']['alter']['ellipsis'] = 1; $handler->display->display_options['fields']['picture']['alter']['strip_tags'] = 0; $handler->display->display_options['fields']['picture']['alter']['html'] = 0; $handler->display->display_options['fields']['picture']['element_label_colon'] = 1; $handler->display->display_options['fields']['picture']['element_default_classes'] = 1; $handler->display->display_options['fields']['picture']['hide_empty'] = 0; $handler->display->display_options['fields']['picture']['empty_zero'] = 0; /* Field: User: Name */ $handler->display->display_options['fields']['name']['id'] = 'name'; $handler->display->display_options['fields']['name']['table'] = 'users'; $handler->display->display_options['fields']['name']['field'] = 'name'; $handler->display->display_options['fields']['name']['alter']['alter_text'] = 0; $handler->display->display_options['fields']['name']['alter']['make_link'] = 0; $handler->display->display_options['fields']['name']['alter']['absolute'] = 0; $handler->display->display_options['fields']['name']['alter']['external'] = 0; $handler->display->display_options['fields']['name']['alter']['trim'] = 0; $handler->display->display_options['fields']['name']['alter']['nl2br'] = 0; $handler->display->display_options['fields']['name']['alter']['word_boundary'] = 1; $handler->display->display_options['fields']['name']['alter']['ellipsis'] = 1; $handler->display->display_options['fields']['name']['alter']['strip_tags'] = 0; $handler->display->display_options['fields']['name']['alter']['html'] = 0; $handler->display->display_options['fields']['name']['element_label_colon'] = 1; $handler->display->display_options['fields']['name']['element_default_classes'] = 1; $handler->display->display_options['fields']['name']['hide_empty'] = 0; $handler->display->display_options['fields']['name']['empty_zero'] = 0; $handler->display->display_options['fields']['name']['link_to_user'] = 1; $handler->display->display_options['fields']['name']['overwrite_anonymous'] = 0; /* Field: User: Last access */ $handler->display->display_options['fields']['access']['id'] = 'access'; $handler->display->display_options['fields']['access']['table'] = 'users'; $handler->display->display_options['fields']['access']['field'] = 'access'; $handler->display->display_options['fields']['access']['alter']['alter_text'] = 0; $handler->display->display_options['fields']['access']['alter']['make_link'] = 0; $handler->display->display_options['fields']['access']['alter']['absolute'] = 0; $handler->display->display_options['fields']['access']['alter']['external'] = 0; $handler->display->display_options['fields']['access']['alter']['trim'] = 0; $handler->display->display_options['fields']['access']['alter']['nl2br'] = 0; $handler->display->display_options['fields']['access']['alter']['word_boundary'] = 1; $handler->display->display_options['fields']['access']['alter']['ellipsis'] = 1; $handler->display->display_options['fields']['access']['alter']['strip_tags'] = 0; $handler->display->display_options['fields']['access']['alter']['html'] = 0; $handler->display->display_options['fields']['access']['element_label_colon'] = 1; $handler->display->display_options['fields']['access']['element_default_classes'] = 1; $handler->display->display_options['fields']['access']['hide_empty'] = 0; $handler->display->display_options['fields']['access']['empty_zero'] = 0; /* Field: User: Last login */ $handler->display->display_options['fields']['login']['id'] = 'login'; $handler->display->display_options['fields']['login']['table'] = 'users'; $handler->display->display_options['fields']['login']['field'] = 'login'; $handler->display->display_options['fields']['login']['alter']['alter_text'] = 0; $handler->display->display_options['fields']['login']['alter']['make_link'] = 0; $handler->display->display_options['fields']['login']['alter']['absolute'] = 0; $handler->display->display_options['fields']['login']['alter']['external'] = 0; $handler->display->display_options['fields']['login']['alter']['trim'] = 0; $handler->display->display_options['fields']['login']['alter']['nl2br'] = 0; $handler->display->display_options['fields']['login']['alter']['word_boundary'] = 1; $handler->display->display_options['fields']['login']['alter']['ellipsis'] = 1; $handler->display->display_options['fields']['login']['alter']['strip_tags'] = 0; $handler->display->display_options['fields']['login']['alter']['html'] = 0; $handler->display->display_options['fields']['login']['element_label_colon'] = 1; $handler->display->display_options['fields']['login']['element_default_classes'] = 1; $handler->display->display_options['fields']['login']['hide_empty'] = 0; $handler->display->display_options['fields']['login']['empty_zero'] = 0; /* Filter: Node: Post date */ $handler->display->display_options['filters']['created']['id'] = 'created'; $handler->display->display_options['filters']['created']['table'] = 'node'; $handler->display->display_options['filters']['created']['field'] = 'created'; $handler->display->display_options['filters']['created']['relationship'] = 'uid'; $handler->display->display_options['filters']['created']['operator'] = 'empty'; /* Display: Page */ $handler = $view->new_display('page', 'Page', 'page_1'); $handler->display->display_options['path'] = 'users'; $translatables['users'] = array( t('Defaults'), t('more'), t('Apply'), t('Reset'), t('Sort By'), t('Asc'), t('Desc'), t('Items per page'), t('- All -'), t('Offset'), t('nodes'), t('Picture'), t('Name'), t('Last access'), t('Last login'), t('Page'), );
importáld be, látni fogod mit-hogyan.
-
clear: both;
- A hozzászóláshoz regisztráció és bejelentkezés szükséges
itt egy view, ami ezt csinálja
importáld be és látni fogod mit állítottam be. ez a nézet a bejelentkezett usereket listázzak, akiknek az utolsó aktivitása kevesebb, mint két perccel ezelőtt volt.
-
clear: both;