ipeto képe

Majdnem tökéletesen jó, köszönöm szépen. Nagy és fontos újdonság számomra a Page Manager, de a hétvégi olvasgatásból a nézettel közösen való használata kimaradt.
Igazából egyetlen rész nem akar működni: nem jelenik meg a menüpont a megfelelő helyen (igazából sehol sem). A következő oldalt hoztam létre:

  1. $page = new stdClass();
  2. $page->disabled = FALSE; /* Edit this to true to make a default page disabled initially */
  3. $page->api_version = 1;
  4. $page->name = 'munkatars_profil';
  5. $page->task = 'page';
  6. $page->admin_title = 'Munkatárs profilja';
  7. $page->admin_description = '';
  8. $page->path = 'sajat/oldal';
  9. $page->access = array();
  10. $page->menu = array(
  11. 'type' => 'normal',
  12. 'title' => 'Profil',
  13. 'name' => 'main-menu',
  14. 'weight' => '0',
  15. 'parent' => array(
  16. 'type' => 'normal',
  17. 'title' => '',
  18. 'name' => 'navigation',
  19. 'weight' => '0',
  20. ),
  21. );
  22. $page->arguments = array();
  23. $page->conf = array(
  24. 'admin_paths' => FALSE,
  25. );
  26. $page->default_handlers = array();
  27. $handler = new stdClass();
  28. $handler->disabled = FALSE; /* Edit this to true to make a default handler disabled initially */
  29. $handler->api_version = 1;
  30. $handler->name = 'page_munkatars_profil_http_response';
  31. $handler->task = 'page';
  32. $handler->subtask = 'munkatars_profil';
  33. $handler->handler = 'http_response';
  34. $handler->weight = 0;
  35. $handler->conf = array(
  36. 'title' => 'HTTP válaszkód',
  37. 'contexts' => array(
  38. 0 => array(
  39. 'identifier' => 'Nézet - hivatkozott felhasználó',
  40. 'keyword' => 'view-referenced-user',
  41. 'name' => 'view:ref_hivatkozott_felhasznalo-ctools_context_1',
  42. 'id' => 1,
  43. ),
  44. ),
  45. 'relationships' => array(
  46. 0 => array(
  47. 'identifier' => 'Node from view',
  48. 'keyword' => 'node',
  49. 'name' => 'node_from_view',
  50. 'row' => '1',
  51. 'context' => 'context_view:ref_hivatkozott_felhasznalo-ctools_context_1_1',
  52. 'id' => 1,
  53. ),
  54. ),
  55. 'code' => '301',
  56. 'destination' => 'node/%node:nid',
  57. );
  58. $page->default_handlers[$handler->name] = $handler;

Ahogy írtam, a menüelem automatikusan nem jelent meg a főmenüben. A tegnapi elvetélt próbálkozásaimnál ez nem volt gond. Ugyanakkor az útvonal működik, szépen átdob a megfelelő node-ra. Kézzel nyilván létre lehet hozni a menüt, de érdekelne, mi lehet a gond.

0
0
Hojtsy Gábor képe

// $Id$
 
/**
 * @file
 *   Adminisztrációt segítő funkciók a Drupal.hu számára.
 */
 
/**
 * hook_menu() megvalósítás.
 */
function publishboard_menu() {
  $items['publishboard/%'] = array(
    'title'            => 'Beküldött tartalmak',
    'page callback'    => 'publishboard_page',
    'page arguments'   => array(1),
    'access arguments' => array('access administration pages'),
    'type'             => MENU_CALLBACK,
  );
  return $items;
}
 
/**
 * hook_block() megvalósítás.
 */
function publishboard_block($op = 'list', $delta = 0, $edit = array()) {
  if ($op == 'list') {
    return array(0 => array('info' => 'Beküldött tartalmak',
      'weight' => -100, 'enabled' => 1, 'region' => 'right'));
  }
  elseif ($op == 'view' && user_access("access administration pages")) {
    $items = array();
    $names = node_get_types('names');
    list($types, $changed, $unchanged) = publishboard_unread_counters();
    foreach ($types as $type) {
      $title = '';
      if (isset($unchanged[$type]) || isset($changed[$type])) {
        if (isset($changed[$type])) {
          $title .= '<span class="marker">'. $changed[$type] .' új</span>'. (isset($unchanged[$type]) ? ', ' : ' ');
        }
        if (isset($unchanged[$type])) {
          $title .= $unchanged[$type] .' régi ';
        }
        $items[] = @l($title . check_plain($names[$type]), 'publishboard/'. $type, array('html' => true));
      }
    }
    if (count($items)) {
      return array(
        'subject' => 'Beküldött tartalmak',
        'content' => theme('item_list', $items),
      );
    }
  }
}
 
function publishboard_page($type) {
  $_SESSION['node_overview_filter'] = array(
    array('status', 'status-0'),
    array('type', $type),
  );
  drupal_goto('admin/content/node');
}
 
/**
 * A nem olvasott tartalmak számának összesítése.
 */
function publishboard_unread_counters() {
  global $user;
 
  $unchanged = $changed = $list = $types = array();
 
  $result = db_query('SELECT nid, type, changed FROM {node} WHERE status = 0');
  while ($node = db_fetch_object($result)) {
    $list[$node->nid] = $node;
    if (!in_array($node->type, $types)) {
      $types[] = $node->type;
    }
  }
 
  if (count($types)) {
    // Nézzük, hogy az éppen látogató user melyeket látta már ezekből legutóbbi
    // módosításuk óta (melyek így tényleg újak a számára).
    $part = join(", ", array_keys($list));
    $result = db_query("SELECT nid, timestamp FROM {history} WHERE uid = %d AND nid IN ($part)", $user->uid);
    while ($history = db_fetch_object($result)) {
      if ($list[$history->nid]->changed > $history->timestamp) {
        // Van róla adatunk, és régebben látta, mint amikor legutóbb változott.
        @$changed[$list[$history->nid]->type]++;
      }
      else {
        // Volt róla adat, de a változás régebbi, mint a látogatás.
        @$unchanged[$list[$history->nid]->type]++;
      }
      // Kezeltük a history tábla alapján.
      unset($list[$history->nid]);
    }
  }
 
  // Ezeket nem találtuk meg a history táblában, azaz soha nem látta a user,
  // vagy nagyon régen látta. Csak a limitet tudjuk alapul venni.
  foreach ($list as $node) {
    if ($list[$node->nid]->changed > NODE_NEW_LIMIT) {
      @$changed[$node->type]++;
    }
    else {
      @$unchanged[$node->type]++;
    }
  }
 
  return array($types, $changed, $unchanged);
}
gerisz képe

Próbáljad ki amit aboros írt!

1) - book-navigation.tpl.php

http://api.drupal.org/api/drupal/modules--book--book-navigation.tpl.php/...

Ctrl+C / Ctrl+V

book-navigation.tpl.php

Másoljad elé:

A)

Ha a share modul "fent" van(http://drupal.org/project/facebookshare) Beállításoknál nem kell megadnod a tartalom típusodat, majd mi kitesszük:

<?php
$url = url('node/' . $object->nid, array('absolute' => TRUE));
print theme('facebookshare', $url);
?>

(csak a lapozóban fog szerepelni)

Más tartalom típusnál:
a node.tpl.php -ba a <?php print $links; ?> linkek felé/fölé

<?php  if  ($node->type != 'mynode' && !$teaser): ?>
<?php
$url = url('node/' . $object->nid, array('absolute' => TRUE));
print theme('facebookshare', $url);
?>
<?php endif; ?>
<br/>

B)

A blokkos megoldás

blokkot létrehozol, belepötyögöd amit szeretnél(http://developers.facebook.com/docs/plugins/)

most pedig ezt másold elé:

<?php 
    $block = module_invoke('block', 'block', 'view', 'myblockid');
    print $block['content'];
?>

(így nem kell 2 modult feltenned, fentebb le van írva hogy mi a myblock"ID")

A többi tartalomtípusnál:
a node.tpl.php -ba a <?php print $links; ?> linkek felé/fölé

<?php  if  ($node->type != 'mynode' && !$teaser): ?>
<?php 
$block = module_invoke('block', 'block', 'view', 'myblockid');
print $block['content'];
?>
<?php endif; ?>
<br/>

(ki kell hagyni azt a tartalomtípust ahol a lapozó van, mert nem akarjuk duplán megjeleníteni, na meg nem akarjuk a bevezetőben sem látni. A lapozós tartalomnál azért nem kell a bevezető és teljes nézettel foglalkozni mert a lapozó csak teljes nézetben látszik. A 'mynode' annak a tartalomnak a neve ahol a lapozót használod, myblock amit már írtam)

2) - preprocess

A)

A mytheme könyvtára(valahogy így néz ki a könyvtárszerkezeted, vagy nem)

 //css fájlok
[images] //képek
[templates] //page.tpl.php, node.tpl.php stb...
mytheme.info // szokásos + base theme = koi - a te esetedben
template.php //nincs semmilyen almappában ahogyan pp írta
 
(adjuk a tartalmainkhoz a blokkot amiben a facebookos dolgaink vannak.)
 
[geshifilter-code]&#10;function mytheme_preprocess_node(&amp;$vars) {&#10;if ($vars[&#039;page&#039;] == TRUE &amp;&amp; $vars[&#039;teaser&#039;] == NULL ) &#10;{&#10;$adblock = module_invoke(&#039;block&#039;, &#039;block&#039;, &#039;view&#039;, myblockid);&#10;	   &#10;$vars[&#039;content&#039;] = &#10;	  &#10;&#039;&lt;div class=&quot;social&quot;&gt;&#039; .&#10;$vars[&#039;content&#039;] .= &#039;&#039; . $adblock[&#039;content&#039;] .&#10;&#039;&lt;/div&gt;&#039;&#10;&#10;;&#10;&#10;}&#10;}&#10;[/geshifilter-code] 
mynode, myblockid - értelemszerűen!
Minden tartalomtípusban megjelenik .Meg ugye bár csak teljes nézetben!
 
Így a blokkod a node tartalma és a kommentek között lesz. Ez a legszebb megoldás.
 
(Viszont így a blokk és tartalma, a könyv típusú tartalomnál a lapozó alatt fog megjelenni.)
 
 
 
B)Ha a lapozó felett akarod:
 
[geshifilter-code]&#10;function mytheme_preprocess_node(&amp;$vars) {&#10;if ($vars[&#039;node&#039;]-&gt;type != &#039;mynode&#039; &amp;&amp;  $vars[&#039;page&#039;] == TRUE &amp;&amp; $vars[&#039;teaser&#039;] == NULL ) &#10;{&#10;$adblock = module_invoke(&#039;block&#039;, &#039;block&#039;, &#039;view&#039;, myblockid);&#10;	   &#10;$vars[&#039;content&#039;] = &#10;	  &#10;&#039;&lt;div class=&quot;social&quot;&gt;&#039; .&#10;$vars[&#039;content&#039;] .= &#039;&#039; . $adblock[&#039;content&#039;] .&#10;&#039;&lt;/div&gt;&#039;&#10;&#10;;&#10;&#10;}&#10;}&#10;[/geshifilter-code] 
(kihagytuk a könyv típusú tartalmadat ami a mynode)
 
 book-navigation.tpl.php belepakolod a blokkot ahogyan az első részben és kész is.
 
 
gyorstár
0
0

Csak a szülő kifejezések listázássa

charlos képe

Sziasztok!

Sikerült megoldani a Felfedett szűrés szótár alapján, köszönöm a segítséget! A megoldást végül a Hierarchical Select modul jelentette.

Drupal verzió: 
Melyik modulhoz, modulokhoz kapcsolódik a téma?: 
tiburi képe

Igen a template.php a mindene ezen a sminken (is).

Nekem ha engedem, hogy megjelenjen a lenti "hibaüzenet", akkor az alábbi olvasható a főoldalon a ddblock alatt:

#

'news_items'
 
#

stdClass::__set_state(array(
   'node_title' => 'Életveszély az utcákon',
   'node_data_field_pager_item_text_field_pager_item_text_value' => '3',
   'node_type' => 'ddblock_news_item',
   'nid' => '42',
   'node_vid' => '46',
   'node_data_field_slide_text_field_slide_text_value' => 'hjuihjkhjkhjk ghujghj ghjgjhj',
   'node_data_field_image_field_image_fid' => '502',
   'node_data_field_image_field_image_list' => '1',
   'node_data_field_image_field_image_data' => 'a:3:{s:11:"description";s:0:"";s:3:"alt";s:0:"";s:5:"title";s:0:"";}',
   'node_revisions_body' => '
 
Próba ddblock item slide text body Próba ddblock item slide text body Próba ddblock item slide text body Próba ddblock item slide text body
',
   'node_revisions_format' => '2',
   'node_created' => '1266685567',
))

A http://ddblock.myalbums.biz/node/860 elérhető videót végignéztem és hiába írom át a php-t, valahogy nem jelenik meg a kép és a slideshow szövege.
De hol a hiba????

<?php
// $Id: template.php,v 1.1 2009/10/09 09:36:17 antsin Exp $
 
/*
+----------------------------------------------------------------+
|   BlogBuzz for Dupal 6.x - Version 1.0                         |
|   Copyright (C) 2009 Antsin.com All Rights Reserved.           |
|   @license - GNU GENERAL PUBLIC LICENSE                        |
|----------------------------------------------------------------|
|   Theme Name: BlogBuzz                                         |
|   Description: BlogBuzz by Antsin                              |
|   Author: Antsin.com                                           |
|   Website: http://www.antsin.com/                              |
|----------------------------------------------------------------+
*/ 
 
/**
 * Initialize theme settings
 */
if (is_null(theme_get_setting('user_notverified_display'))) {
  global $theme_key;
  // Get node types
  $node_types = node_get_types('names');
 
  /**
   * The default values for the theme variables. Make sure $defaults exactly
   * matches the $defaults in the theme-settings.php file.
   */
  $defaults = array(
    'blogbuzz_style' => 'stone',
  );
 
  // Make the default content-type settings the same as the default theme settings,
  // so we can tell if content-type-specific settings have been altered.
  $defaults = array_merge($defaults, theme_get_settings());
 
  // Get default theme settings.
  $settings = theme_get_settings($theme_key);  
 
  // Don't save the toggle_node_info_ variables
  if (module_exists('node')) {
    foreach (node_get_types() as $type => $name) {
      unset($settings['toggle_node_info_'. $type]);
    }
  }
 
  // Save default theme settings
  variable_set(
    str_replace('/', '_', 'theme_'. $theme_key .'_settings'),
    array_merge($defaults, $settings)
  );
  // Force refresh of Drupal internals
  theme_get_setting('', TRUE);
}
 
function blogbuzz_get_style() {
  $style = theme_get_setting('blogbuzz_style');
  return $style;
}
 
drupal_add_css(drupal_get_path('theme', 'blogbuzz') . '/css/' . blogbuzz_get_style() . '.css', 'theme');
 
function phptemplate_preprocess_page(&$vars) {
 
  // Add conditional stylesheets.
  if (!module_exists('conditional_styles')) {
    $vars['styles'] .= $vars['conditional_styles'] = variable_get('conditional_styles_' . $GLOBALS['theme'], '');
  }
 
  // Classes for body element. Allows advanced theming based on context
  // (home page, node of certain type, etc.)
  $classes = split(' ', $vars['body_classes']);
  // Remove the mostly useless page-ARG0 class.
  if ($index = array_search(preg_replace('![^abcdefghijklmnopqrstuvwxyz0-9-_]+!s', '', 'page-'. drupal_strtolower(arg(0))), $classes)) {
    unset($classes[$index]);
  }
  if (!$vars['is_front']) {
    // Add unique class for each page.
    $path = drupal_get_path_alias($_GET['q']);
    $classes[] = blogbuzz_id_safe('page-' . $path);
    // Add unique class for each website section.
    list($section, ) = explode('/', $path, 2);
    if (arg(0) == 'node') {
      if (arg(1) == 'add') {
        $section = 'node-add';
      }
      elseif (is_numeric(arg(1)) && (arg(2) == 'edit' || arg(2) == 'delete')) {
        $section = 'node-' . arg(2);
      }
    }
    $classes[] = blogbuzz_id_safe('section-' . $section);
  }
 
  $vars['body_classes_array'] = $classes;
  $vars['body_classes'] = implode(' ', $classes); // Concatenate with spaces.
 
  // Add content top & postscript classes with number of active sub-regions
  $region_list = array(
    'main_bottom' => array('main_bottom_one', 'main_bottom_two', 'main_bottom_three', 'main_bottom_four'), 
    'footer' => array('footer_one', 'footer_two', 'footer_three')
  );
  foreach ($region_list as $sub_region_key => $sub_region_list) {
    $active_regions = array();
    foreach ($sub_region_list as $region_item) {
      if ($vars[$region_item]) {
        $active_regions[] = $region_item;
      }
    }
    $vars[$sub_region_key] = $sub_region_key .'-'. strval(count($active_regions));
  }
 
  // Generate menu tree from source of primary links
  $vars['primary_links_tree'] = menu_tree(variable_get('menu_primary_links_source', 'primary-links'));
}
 
/**
 * Override or insert variables into the node templates.
 *
 * @param $vars
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("node" in this case.)
 */
function blogbuzz_preprocess_node(&$vars, $hook) {
  // Special classes for nodes
  $classes = array('node');
  if ($vars['sticky']) {
    $classes[] = 'sticky';
  }
  if (!$vars['status']) {
    $classes[] = 'node-unpublished';
    $vars['unpublished'] = TRUE;
  }
  else {
    $vars['unpublished'] = FALSE;
  }
  if ($vars['uid'] && $vars['uid'] == $GLOBALS['user']->uid) {
    $classes[] = 'node-mine'; // Node is authored by current user.
  }
  if ($vars['teaser']) {
    $classes[] = 'node-teaser'; // Node is displayed as teaser.
  }
  // Class for node type: "node-type-page", "node-type-story", "node-type-my-custom-type", etc.
  $classes[] = blogbuzz_id_safe('node-type-' . $vars['type']);
  $vars['classes'] = implode(' ', $classes); // Concatenate with spaces
}
 
/**
 * Override or insert variables into the block templates.
 *
 * @param $vars
 *   An array of variables to pass to the theme template.
 * @param $hook
 *   The name of the template being rendered ("block" in this case.)
 */
function blogbuzz_preprocess_block(&$vars, $hook) {
  $block = $vars['block'];
 
  // Special classes for blocks.
  $classes = array('block');
  $classes[] = 'block-' . $block->module;
  $classes[] = 'region-' . $vars['block_zebra'];
  $classes[] = $vars['zebra'];
  $classes[] = 'region-count-' . $vars['block_id'];
  $classes[] = 'count-' . $vars['id']; 
 
  // Render block classes.
  $vars['classes'] = implode(' ', $classes);
}
 
function blogbuzz_preprocess_comment(&$vars, $hook) {
  // Add an "unpublished" flag.
  $vars['unpublished'] = ($vars['comment']->status == COMMENT_NOT_PUBLISHED);
 
  // If comment subjects are disabled, don't display them.
  if (variable_get('comment_subject_field_' . $vars['node']->type, 1) == 0) {
    $vars['title'] = '';
  }
 
  // Special classes for comments.
  $classes = array('comment');
  if ($vars['comment']->new) {
    $classes[] = 'comment-new';
  }
  $classes[] = $vars['status'];
  $classes[] = $vars['zebra'];
  if ($vars['id'] == 1) {
    $classes[] = 'first';
  }
  if ($vars['id'] == $vars['node']->comment_count) {
    $classes[] = 'last';
  }
  if ($vars['comment']->uid == 0) {
    // Comment is by an anonymous user.
    $classes[] = 'comment-by-anon';
  }
  else {
    if ($vars['comment']->uid == $vars['node']->uid) {
      // Comment is by the node author.
      $classes[] = 'comment-by-author';
    }
    if ($vars['comment']->uid == $GLOBALS['user']->uid) {
      // Comment was posted by current user.
      $classes[] = 'comment-mine';
    }
  }
  $vars['classes'] = implode(' ', $classes);
}
 
function blogbuzz_preprocess_ddblock_cycle_block_content(&$vars) {
  if ($vars['output_type'] == 'view_fields') {
    $content = array();
    // Add slider_items for the template 
    // If you use the devel module uncomment the following line to see the theme variables
    // dsm($vars['settings']['view_name']);  
    // dsm($vars['content'][0]);
    // If you don't use the devel module uncomment the following line to see the theme variables
    drupal_set_message('<pre>' . var_export($vars['settings']['view_name'], true) . '</pre>');
    drupal_set_message('<pre>' . var_export($vars['content'][0], true) . '</pre>');
    if ($vars['settings']['view_name'] == 'showcase_with_image') {
      foreach ($vars['content'] as $key1 => $result) {
        // add slide_image variable 
        if (isset($result->node_data_field_image_field_image_fid)) {
          // get image id
          $fid = $result->node_data_field_image_field_image_fid;
          // get path to image
          $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
          //  use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
          if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_slide'] <> '<none>'){
            $slider_items[$key1]['slide_image'] = 
            theme('imagecache', 
                  $vars['imgcache_slide'], 
                  $filepath,
                  $result->node_title);
          }
          else {          
            $slider_items[$key1]['slide_image'] = 
              '<img src="' . base_path() . $filepath . 
              '" alt="' . $result->node_title . 
              '"/>';     
          }          
        }
        // add slide_text variable
        if (isset($result->node_data_field_slide_text_field_slide_text_value)) {
          $slider_items[$key1]['slide_text'] =  $result->node_data_field_slide_text_field_slide_text_value;
        }
        // add slide_title variable
        if (isset($result->node_title)) {
          $slider_items[$key1]['slide_title'] =  $result->node_title;
        }
        // add slide_read_more variable and slide_node variable
        if (isset($result->nid)) {
          $slider_items[$key1]['slide_read_more'] =  l('Continue', 'node/' . $result->nid);
          $slider_items[$key1]['slide_node'] =  'node/' . $result->nid;
        }
      }
      $vars['slider_items'] = $slider_items;  
    }
 
    if ($vars['settings']['view_name'] == 'news_items') {
      foreach ($vars['content'] as $key1 => $result) {
        // add slide_image variable 
        if (isset($result->node_data_field_pager_item_text_field_image_fid)) {
          // get image id
          $fid = $result->node_data_field_pager_item_text_field_image_fid;
          // get path to image
          $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
          //  use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
          if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_slide'] <> '<none>'){
            $slider_items[$key1]['slide_image'] = 
            theme('imagecache', 
                  $vars['imgcache_slide'], 
                  $filepath,
                  $result->node_title);
          }
          else {          
            $slider_items[$key1]['slide_image'] = 
              '<img src="' . base_path() . $filepath . 
              '" alt="' . $result->node_title . 
              '"/>';     
          }          
        }
        // add slide_text variable
        if (isset($result->node_data_field_pager_item_text_field_slide_text_value)) {
          $slider_items[$key1]['slide_text'] =  $result->node_data_field_pager_item_text_field_slide_text_value;
        }
        // add slide_title variable
        if (isset($result->node_title)) {
          $slider_items[$key1]['slide_title'] =  $result->node_title;
        }
        // add slide_read_more variable and slide_node variable
        if (isset($result->nid)) {
          $slider_items[$key1]['slide_read_more'] =  l('Continue', 'node/' . $result->nid);
          $slider_items[$key1]['slide_node'] =  'node/' . $result->nid;
        }
      }
      $vars['slider_items'] = $slider_items;  
    } 
 
  }
}  
 
/**
* Display the simple view of rows one after another
*/
function blogbuzz_preprocess_views_view_unformatted(&$vars) {
$view     = $vars['view'];
$rows     = $vars['rows'];
 
$vars['classes'] = array();
// Set up striping values.
foreach ($rows as $id => $row) {
   $vars['classes'][$id] = 'views-row views-row-' . ($id + 1);
   $vars['classes'][$id] .= ' views-row-' . ($id % 2 ? 'even' : 'odd');
   if ($id == 0) {
     $vars['classes'][$id] .= ' views-row-first';
   }
}
$vars['classes'][$id] .= ' views-row-last';
}
 
/**
* Override the search block form so we can change the label
* @return 
* @param $form Object
*/
function phptemplate_search_block_form($form) {
  $output = '';
 
  // the search_block_form element is the search's text field, it also happens to be the form id, so can be confusing
  $form['search_block_form']['#title'] = t('');
 
  $output .= drupal_render($form);
  return $output;
}
 
function blogbuzz_links($links, $attributes = array('class' => 'links')) {
  $output = '';
 
  unset($links['blog_usernames_blog']);
 
  if (count($links) > 0) {
    $output = '<ul'. drupal_attributes($attributes) .'>';
 
    $num_links = count($links);
    $i = 1;
 
    foreach ($links as $key => $link) {
      $class = $key;
 
      // Add first, last and active classes to the list of links to help out themers.
      if ($i == 1) {
        $class .= ' first';
      }
      if ($i == $num_links) {
        $class .= ' last';
      }
      if (isset($link['href']) && $link['href'] == $_GET['q']) {
        $class .= ' active';
      }
      $output .= '<li class="'. $class .'">';
 
      if (isset($link['href'])) {
        // Pass in $link as $options, they share the same keys.
        $link['html'] = TRUE;
        $output .= l('<span>'. check_plain($link['title']) .'</span>', $link['href'], $link);
      }
 
      else if (!empty($link['title'])) {
        // Some links are actually not links, but we wrap these in <span> for adding title and class attributes
        if (empty($link['html'])) {
          $link['title'] = check_plain($link['title']);
        }
        $span_attributes = '';
        if (isset($link['attributes'])) {
          $span_attributes = drupal_attributes($link['attributes']);
        }
        $output .= '<span'. $span_attributes .'>'. $link['title'] .'</span>';
      }
 
      $i++;
      $output .= "</li>";
 
      if($attributes['class'] == 'links term-links') {
       $output .= " /";
      }
      $output .= "\n";
    }
 
    $output .= '</ul>';
  }
 
  return $output;
}
 
function blogbuzz_menu_item_link($link) {
  if (empty($link['options'])) {
    $link['options'] = array();
  }
 
  // If an item is a LOCAL TASK, render it as a tab
  if ($link['type'] & MENU_IS_LOCAL_TASK) {
    $link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
    $link['options']['html'] = TRUE;
  }
 
  if (empty($link['type'])) {
    $true = TRUE;
  }
 
  // Do special stuff for PRIMARY LINKS here
  if ($link['menu_name'] == 'primary-links') {
    $link['title'] = '<span>' . check_plain($link['title']) . '</span>';
    $link['options']['html'] = TRUE;
  }
 
  return l($link['title'], $link['href'], $link['options']);
}
 
/**
 * Converts a string to a suitable html ID attribute.
 *
 * http://www.w3.org/TR/html4/struct/global.html#h-7.5.2 specifies what makes a
 * valid ID attribute in HTML. This function:
 *
 * - Ensure an ID starts with an alpha character by optionally adding an 'id'.
 * - Replaces any character except alphanumeric characters with dashes.
 * - Converts entire string to lowercase.
 *
 * @param $string
 *   The string
 * @return
 *   The converted string
 */
function blogbuzz_id_safe($string) {
  // Replace with dashes anything that isn't A-Z, numbers, dashes, or underscores.
  $string = drupal_strtolower(preg_replace('/[^a-zA-Z0-9-]+/', '-', $string));
  // If the first character is not a-z, add 'id' in front.
  if (!ctype_lower($string{0})) { // Don't use ctype_alpha since its locale aware.
    $string = 'id' . $string;
  }
  return $string;
}
 
/*
* Override filter.module's theme_filter_tips() function to disable tips display.
*/
function blogbuzz_filter_tips($tips, $long = FALSE, $extra = '') {
  return '';
}
 
function blogbuzz_filter_tips_more_info () {
  return '';
}
 
/*!
 * Dynamic display block preprocess functions
 * Copyright (c) 2008 - 2009 P. Blaauw All rights reserved.
 * Version 1.6 (01-OCT-2009)
 * Licenced under GPL license
 * http://www.gnu.org/licenses/gpl.html
 */
 
 
/**
 * Override or insert variables into the ddblock_cycle_pager_content templates.
 *   Used to convert variables from view_fields  to pager_items template variables
 *  Only used for custom pager items
 *
 * @param $vars
 *   An array of variables to pass to the theme template.
 *
 */
function blogbuzz_preprocess_ddblock_cycle_pager_content(&$vars) {
  if (($vars['output_type'] == 'view_fields') && ($vars['pager_settings']['pager'] == 'custom-pager')){
    $content = array();
    // Add pager_items for the template 
    // If you use the devel module uncomment the following lines to see the theme variables
    // dsm($vars['pager_settings']['view_name']);     
    // dsm($vars['content'][0]);     
    // If you don't use the devel module uncomment the following lines to see the theme variables
    // drupal_set_message('<pre>' . var_export($vars['pager_settings'], true) . '</pre>');
    // drupal_set_message('<pre>' . var_export($vars['content'][0], true) . '</pre>');
    if ($vars['pager_settings']['view_name'] == 'news_items') {
      if (!empty($vars['content'])) {
        foreach ($vars['content'] as $key1 => $result) {
          // add pager_item_image variable
          if (isset($result->node_data_field_image_field_image_fid)) {
            $fid = $result->node_data_field_image_field_image_fid;
            $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
            //  use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
            if (module_exists('imagecache') && 
                is_array(imagecache_presets()) && 
                $vars['imgcache_pager_item'] <> '<none>'){
              $pager_items[$key1]['image'] = 
                theme('imagecache', 
                      $vars['pager_settings']['imgcache_pager_item'],              
                      $filepath,
                      check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value));
            }
            else {          
              $pager_items[$key1]['image'] = 
                '<img src="' . base_path() . $filepath . 
                '" alt="' . check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value) . 
                '"/>';     
            }          
          }
          // add pager_item _text variable
          if (isset($result->node_data_field_pager_item_text_field_pager_item_text_value)) {
            $pager_items[$key1]['text'] =  check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value);
          }
        }
      }
    }
    $vars['pager_items'] = $pager_items;
  }    
}
0
0
pentike képe

Te is 6.1-es fordítást telepítettél? Mert szerintem ez nagyobb, mint az előzőek és éppen néhány bájttal lépi át a limitet.

Én most kibővítettem a fordítószkriptet, minden modult egyesével szed be. A fordítási fájlokat a gyökérbe egy hu könyvtárba kell rakni és úgy futtatni a kódot a gyökérből. A po fájlok meglétét/nem létét nem nézi!!

Ez picit hosszú, de úgy látom nem lehet fájlt feltölteni.

include_once 'includes/bootstrap.inc';
include_once 'includes/common.inc';
include_once 'includes/locale.inc';
  $file = (object) array('filepath' => 'hu/aggregator-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/archive-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/block-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/blogapi-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/blog-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/book-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/comment-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/common-inc.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/contact-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/drupal-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/file-inc.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/filter-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/forum-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/general.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/locale-inc.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/locale-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/menu-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/node-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/path-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/poll-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/profile-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/queue-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/search-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/statistics-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/system-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/taxonomy-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/throttle-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/upload-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/user-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  $file = (object) array('filepath' => 'hu/watchdog-module.po');
  _locale_import_po($file, 'hu', 'overwrite');
  header('Location: index.php');
  exit();
0
0
neptunus képe

Ha valakit érdekel a téma, akkor itt a megoldása a kérdésemnek. Csak a Views-os DDBLOCK-ra vonatkozó részt másolom ide,amit a template.php-be kell beilleszteni az első sor (< ? php) nélkül

/*!
 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 *
 * VIEWS SLIDESHOW DYNAMIC DISPLAY BLOCK preprocess functions
 * Author P.P. Blaauw
 * Version 1.3 (07-SEP-2009)
 * Licenced under GPL license
 * http://www.gnu.org/licenses/gpl.html
 */
 
 /**
 * Override or insert variables into the views_slideshow_ddblock_cycle_block_content templates.
 *   Used to convert variables from view_fields to slider_items template variables
 *
 * @param $vars
 *   An array of variables to pass to the theme template.
 * 
 */
function casio3_preprocess_views_slideshow_ddblock(&$vars) {
  drupal_rebuild_theme_registry();
  $settings = $vars['views_slideshow_ddblock_slider_settings'];
  // for showing debug info
  views_slideshow_ddblock_show_content_debug_info($vars);
  if ($settings['output_type'] == 'view_fields') {
    if ($settings['view_name'] == 'hangszerek' && $settings['view_display_id'] == 'block_1') {
      if (!empty($vars['views_slideshow_ddblock_content'])) {
        foreach ($vars['views_slideshow_ddblock_content'] as $key1 => $result) {
          // add slide image variable
 
// BB FILEPATH CODE START
 
$filepath = FALSE;
          if (isset($result->node_data_field_pager_item_text_field_imce_imagepath_imceimage_path)) {
	    $filepath=$result->node_data_field_pager_item_text_field_imce_imagepath_imceimage_path;
	    // is there an initial '/'?
	    $position = strpos($filepath, '/'); // this should normally be 0
	    if(  ($position !== FALSE) && ($position == 0)) {
	      // if so, strip it
	      $filepath = substr($filepath, 1);
	    }
          } // .. or via ImageField
          else 
          if (isset($result->node_data_field_image_field_image_fid)) {
            $fid = $result->node_data_field_image_field_image_fid;
            $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
           }
 
	  if ($filepath) {
              $slider_items[$key1]['slide_image'] = 
                '<img src="' . base_path() . $filepath . 
                '" alt="' . check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value) . 
                '"/>';     
 
          }
 
// BB FILEPATH CODE END
 
          // add slide_text variable
          if (isset($result->node_data_field_pager_item_text_field_slide_text_value)) {
            $slider_items[$key1]['slide_text'] =  check_markup($result->node_data_field_pager_item_text_field_slide_text_value);
          }
          // add slide_title variable
          if (isset($result->node_title)) {
            $slider_items[$key1]['slide_title'] =  check_plain($result->node_title);
          }
          // add slide_read_more variable and slide_node variable
          if (isset($result->nid)) {
            $slider_items[$key1]['slide_read_more'] = '<a href="' . base_path() . 'node/' .  $result->nid . '">' . t('Read more') . '</a>';
            $slider_items[$key1]['slide_node'] = base_path() . 'node/' . $result->nid;
          }
        }
      }
    }    
    $vars['views_slideshow_ddblock_slider_items'] = $slider_items;
 
  }
 
}  
/**
 * Override or insert variables into the views_slideshow_ddblock_cycle_pager_content templates.
 *   Used to convert variables from view_fields  to pager_items template variables
 *  Only used for custom pager items
 *
 * @param $vars
 *   An array of variables to pass to the theme template.
 *
 */
function casio3_preprocess_views_slideshow_ddblock_pager_content(&$vars) {
  $settings = $vars['views_slideshow_ddblock_pager_settings'];
  // for showing debug info
  views_slideshow_ddblock_show_pager_debug_info($vars);
  if (($settings['output_type'] == 'view_fields') && 
      ($settings['pager'] == 'number-pager' || 
      $settings['pager'] == 'custom-pager' ||
      $settings['pager'] == 'scrollable-pager' )) {
    if ($settings['view_name'] == 'hangszerek' && $settings['view_display_id'] == 'block_1') {
      if (!empty($vars['views_slideshow_ddblock_content'])) {
        foreach ($vars['views_slideshow_ddblock_content'] as $key1 => $result) {
          // add pager_item_image variable
 
// BB FILEPATH CODE START
 
$filepath = FALSE;
          if (isset($result->node_data_field_pager_item_text_field_imce_imagepath_imceimage_path)) {
	    $filepath=$result->node_data_field_pager_item_text_field_imce_imagepath_imceimage_path;
	    // is there an initial '/'?
	    $position = strpos($filepath, '/'); // this should normally be 0
	    if(  ($position !== FALSE) && ($position == 0)) {
	      // if so, strip it
	      $filepath = substr($filepath, 1);
	    }
          } // .. or via ImageField
          else 
          if (isset($result->node_data_field_image_field_image_fid)) {
            $fid = $result->node_data_field_image_field_image_fid;
            $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
           }
 
	  if ($filepath) {
                      $pager_items[$key1]['image'] = 
                '<img src="' . base_path() . $filepath . 
                '" alt="' . check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value) . 
                '"/>';     
 
          }
 
// BB FILEPATH CODE END
 
 
          // add pager_item _text variable
          if (isset($result->node_data_field_pager_item_text_field_pager_item_text_value)) {
            $pager_items[$key1]['text'] =  check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value);
          }
        }
      }
    }
    $vars['views_slideshow_ddblock_pager_items'] = $pager_items;
  }    
 
}

Remélem, lesz aki tudja használni!
Üdvözlet mindenkinek!
Péter

0
0

Földes Péter

aboros képe

http://aboros.com/webshare/term_node_count-20121122-185555.jpg
ennyi? nincs most egy komplett helymeghatározás beépítve úgyhogy az nem látszik, de ha van idő azt is be lehet. meg persze akkor a userek oldalára kis listákat ugyanígy vagy akár ilyen naptárszerűt vagy timelinejst :) vagy bármit.

szerk, ja bocs, itt a view. importáld be. azt kell megfigyelni hogy az advanced (haladó beállítások?) részben lehet állítani egy olyat, hogy "Use aggregation" és azt igenre kell állítani. Aztán minden mezőnél így meg lehet mondani hogy mi legyen, distinct, vagy count, max, min, sum vagy mifene. És persze az is trükkös hogy ez egy taxonomy term nézet igazából ami node relationshipet meg author relationshipet használ. az author csak azért kellett, hogy lehessen exposed filter a userra.

screenshot: http://aboros.com/webshare/term_node_count-sc-20121122-190434.jpg
export:

$view = new view;
$view->name = 'term_node_count';
$view->description = 'Displays node count values for terms';
$view->tag = '';
$view->base_table = 'taxonomy_term_data';
$view->human_name = 'term_node_count';
$view->core = 7;
$view->api_version = '3.0';
$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['title'] = 'Tag usage';
$handler->display->display_options['use_ajax'] = TRUE;
$handler->display->display_options['group_by'] = TRUE;
$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']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '100';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
$handler->display->display_options['pager']['options']['expose']['items_per_page_options_all'] = 0;
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
  'name' => 'name',
  'nid' => 'nid',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
  'name' => array(
    'sortable' => 0,
    'default_sort_order' => 'asc',
    'align' => '',
    'separator' => '',
  ),
  'nid' => 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: Taxonomy term: Content with term */
$handler->display->display_options['relationships']['nid']['id'] = 'nid';
$handler->display->display_options['relationships']['nid']['table'] = 'taxonomy_index';
$handler->display->display_options['relationships']['nid']['field'] = 'nid';
$handler->display->display_options['relationships']['nid']['required'] = 0;
/* Relationship: Content: Author */
$handler->display->display_options['relationships']['uid']['id'] = 'uid';
$handler->display->display_options['relationships']['uid']['table'] = 'node';
$handler->display->display_options['relationships']['uid']['field'] = 'uid';
$handler->display->display_options['relationships']['uid']['relationship'] = 'nid';
$handler->display->display_options['relationships']['uid']['required'] = 0;
/* Field: Taxonomy term: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'taxonomy_term_data';
$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']['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']['trim'] = 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_taxonomy'] = 1;
/* Field: COUNT(Content: Nid) */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['relationship'] = 'nid';
$handler->display->display_options['fields']['nid']['group_type'] = 'count';
$handler->display->display_options['fields']['nid']['label'] = 'Count';
$handler->display->display_options['fields']['nid']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['nid']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['nid']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['nid']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['nid']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['nid']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
$handler->display->display_options['fields']['nid']['alter']['html'] = 0;
$handler->display->display_options['fields']['nid']['element_label_colon'] = 1;
$handler->display->display_options['fields']['nid']['element_default_classes'] = 1;
$handler->display->display_options['fields']['nid']['hide_empty'] = 0;
$handler->display->display_options['fields']['nid']['empty_zero'] = 0;
/* Field: MAX(Content: Post date) */
$handler->display->display_options['fields']['created']['id'] = 'created';
$handler->display->display_options['fields']['created']['table'] = 'node';
$handler->display->display_options['fields']['created']['field'] = 'created';
$handler->display->display_options['fields']['created']['relationship'] = 'nid';
$handler->display->display_options['fields']['created']['group_type'] = 'max';
$handler->display->display_options['fields']['created']['label'] = 'Last use';
$handler->display->display_options['fields']['created']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['created']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['created']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['created']['alter']['external'] = 0;
$handler->display->display_options['fields']['created']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['created']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['created']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['created']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['created']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['created']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['created']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['created']['alter']['trim'] = 0;
$handler->display->display_options['fields']['created']['alter']['html'] = 0;
$handler->display->display_options['fields']['created']['element_label_colon'] = 1;
$handler->display->display_options['fields']['created']['element_default_classes'] = 1;
$handler->display->display_options['fields']['created']['hide_empty'] = 0;
$handler->display->display_options['fields']['created']['empty_zero'] = 0;
$handler->display->display_options['fields']['created']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['created']['date_format'] = 'long';
/* Field: MIN(Content: Post date) */
$handler->display->display_options['fields']['created_1']['id'] = 'created_1';
$handler->display->display_options['fields']['created_1']['table'] = 'node';
$handler->display->display_options['fields']['created_1']['field'] = 'created';
$handler->display->display_options['fields']['created_1']['relationship'] = 'nid';
$handler->display->display_options['fields']['created_1']['group_type'] = 'min';
$handler->display->display_options['fields']['created_1']['label'] = 'First use';
$handler->display->display_options['fields']['created_1']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['external'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['created_1']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['created_1']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['trim'] = 0;
$handler->display->display_options['fields']['created_1']['alter']['html'] = 0;
$handler->display->display_options['fields']['created_1']['element_label_colon'] = 1;
$handler->display->display_options['fields']['created_1']['element_default_classes'] = 1;
$handler->display->display_options['fields']['created_1']['hide_empty'] = 0;
$handler->display->display_options['fields']['created_1']['empty_zero'] = 0;
$handler->display->display_options['fields']['created_1']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['created_1']['date_format'] = 'long';
/* Sort criterion: COUNT(DISTINCT Content: Nid) */
$handler->display->display_options['sorts']['nid']['id'] = 'nid';
$handler->display->display_options['sorts']['nid']['table'] = 'node';
$handler->display->display_options['sorts']['nid']['field'] = 'nid';
$handler->display->display_options['sorts']['nid']['relationship'] = 'nid';
$handler->display->display_options['sorts']['nid']['group_type'] = 'count_distinct';
$handler->display->display_options['sorts']['nid']['order'] = 'DESC';
/* Filter criterion: Content: 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'] = 'nid';
$handler->display->display_options['filters']['created']['operator'] = '<=';
$handler->display->display_options['filters']['created']['value']['type'] = 'offset';
$handler->display->display_options['filters']['created']['exposed'] = TRUE;
$handler->display->display_options['filters']['created']['expose']['operator_id'] = 'created_op';
$handler->display->display_options['filters']['created']['expose']['label'] = 'Post date';
$handler->display->display_options['filters']['created']['expose']['use_operator'] = 1;
$handler->display->display_options['filters']['created']['expose']['operator'] = 'created_op';
$handler->display->display_options['filters']['created']['expose']['identifier'] = 'created';
$handler->display->display_options['filters']['created']['expose']['multiple'] = FALSE;
/* Filter criterion: Content: Author uid */
$handler->display->display_options['filters']['uid']['id'] = 'uid';
$handler->display->display_options['filters']['uid']['table'] = 'node';
$handler->display->display_options['filters']['uid']['field'] = 'uid';
$handler->display->display_options['filters']['uid']['relationship'] = 'nid';
$handler->display->display_options['filters']['uid']['value'] = '';
$handler->display->display_options['filters']['uid']['exposed'] = TRUE;
$handler->display->display_options['filters']['uid']['expose']['operator_id'] = 'uid_op';
$handler->display->display_options['filters']['uid']['expose']['label'] = 'Author';
$handler->display->display_options['filters']['uid']['expose']['operator'] = 'uid_op';
$handler->display->display_options['filters']['uid']['expose']['identifier'] = 'uid';
$handler->display->display_options['filters']['uid']['expose']['multiple'] = FALSE;
$handler->display->display_options['filters']['uid']['expose']['reduce'] = 0;
 
/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'taxonomy_stat';

a viewst tudom hogy könnyű feladni, de nem érdemes.

2
0

-
clear: both;

aboros képe

$view = new view;
$view->name = 'user_posts';
$view->description = 'Displays all posts of a user.';
$view->tag = '';
$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', 'Defaults', 'default');
$handler->override_option('relationships', array(
  'content_profile_rel' => array(
    'label' => 'Content Profile',
    'required' => 0,
    'type' => 'profile',
    'id' => 'content_profile_rel',
    'table' => 'users',
    'field' => 'content_profile_rel',
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'title' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'type' => array(
    'label' => 'Type',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'exclude' => 1,
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'uid' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'default_argument_type' => 'user',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'uid',
    'table' => 'users',
    'field' => 'uid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '3' => 0,
    ),
    'relationship' => 'content_profile_rel',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'blog' => 0,
      'biblio' => 0,
      'group' => 0,
      'page' => 0,
      'profile' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_node_flag_name' => '*relationship*',
    'validate_argument_node_flag_test' => 'flaggable',
    'validate_argument_node_flag_id_type' => 'id',
    'validate_argument_user_flag_name' => '*relationship*',
    'validate_argument_user_flag_test' => 'flaggable',
    'validate_argument_user_flag_id_type' => 'id',
    'validate_argument_is_member' => 0,
    'validate_argument_php' => '',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('title', 'Content by the user');
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'list');
$handler->override_option('style_options', array(
  'grouping' => 'type',
  'type' => 'ul',
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', 'Content submitted by the user');
$handler->override_option('block_caching', -1);

nem tudom, hogy ezt ha így beimportálod ahogy van, akkor működni fog e vagy hogy ez alapján fel tudod te építeni kattintgatva a sajátodat, próbáld meg beimportálni. (van a játszótéren flag modul is és az ha nálad nincs, nem tudom, hogy probléma lesz e)
ha nem megy kérdezzetek!

0
0

-
clear: both;