Startseite
  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche
Startseite › Forum › Drupalcenter.de › Module ›

[gelöst] Advanced Forum und Views

Eingetragen von Kirsten1965 (703)
am 29.01.2010 - 14:03 Uhr in
  • Module
  • Drupal 6.x

Hallo zusammen,

ich habe die neueste Version vom 'Advanced Forum' installiert und alles schien auch gut zu laufen. Dann fiel mir aber auch, dass ich zwar eine Gesamtübersicht hatte und auch die einzelnen Beiträge angezeigt wurden, aber die Übersicht der einzelnen Foren gab nur eine Fehlermeldung aus.

Also bin ich in die Issues des Advanced Forums gegangen und siehe da - ich war nicht die Einzige. Einer der Mitstreiter hat denn auch eine Lösung des Problems gefunden und sie gepostet. Leider bin ich offenbar nicht schlau genug diese auch umzusetzen...

Er schreibt, dass er in Views eine neuen View importiert hat. Dazu hat er die Datei advanced_forum_topic_list.view geöffnet, den Code (bis auf die paar ersten Zeilen) kopiert und dann in die Importierenmaske eingefügt. Das ist mir auch alles klar und ich kann es nachvollziehen. Leider sind die 'ersten paar Zeilen' nicht weiter definiert und ich habe nun schon eine Menge Varianten ausprobiert, allein ich bekomme es nicht hin.

Hier ist der gesamte Code des View:

<?php
// $Id: advanced_forum_topic_list.view,v 1.1.2.12 2009/09/04 04:00:42 michellec Exp $


$view = new view;
$view->name = 'advanced_forum_topic_list';
$view->description = 'Shows the topics in a given forum';
$view->tag = 'Advanced Forum';
$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('fields', array(
  'nid' => array(
    'label' => 'Nid',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      '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' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'relationship' => 'none',
  ),
  'teaser' => array(
    'label' => 'Teaser',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 1,
      'max_length' => '200',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 1,
      'html' => 0,
    ),
    'exclude' => 1,
    'id' => 'teaser',
    'table' => 'node_revisions',
    'field' => 'teaser',
    'relationship' => 'none',
  ),
  'topic_icon' => array(
    'label' => '',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'hot_topic_threshold' => '15',
    'exclude' => 0,
    'id' => 'topic_icon',
    'table' => 'node',
    'field' => 'topic_icon',
    'relationship' => 'none',
  ),
  'title' => array(
    'label' => 'Topic / Topic starter',
    'alter' => array(
      'alter_text' => 1,
      'text' => '<span class="forum-topic-title">[title]</span> ',
      'make_link' => 1,
      'path' => 'node/[nid]',
      'link_class' => '',
      'alt' => '[teaser]',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'timestamp' => array(
    'label' => 'Has new content',
    'alter' => array(
      'alter_text' => 1,
      'text' => '[timestamp] ',

      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'comments' => 1,
    'exclude' => 0,
    'id' => 'timestamp',
    'table' => 'history_user',
    'field' => 'timestamp',
    'relationship' => 'none',
  ),
  'topic_pager' => array(
    'label' => 'Topic Pager',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'total_pages_shown' => '3',
    'exclude' => 0,
    'id' => 'topic_pager',
    'table' => 'node',
    'field' => 'topic_pager',
    'relationship' => 'none',
  ),
  'name_1' => array(
    'label' => 'Name',
    'alter' => array(
      'alter_text' => 1,
      'text' => '<br /> by [name_1] ',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_user' => 1,
    'overwrite_anonymous' => 0,
    'anonymous_text' => '',
    'exclude' => 0,
    'id' => 'name_1',
    'table' => 'users',
    'field' => 'name',
    'relationship' => 'none',
  ),
  'created' => array(
    'label' => 'Post date',
    'alter' => array(
      'alter_text' => 1,
      'text' => 'on [created]',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
  'comment_count' => array(
    'label' => 'Replies',
    '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,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'empty' => '0',
    'hide_empty' => 0,
    'empty_zero' => 1,
    'set_precision' => FALSE,
    'precision' => 0,
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'exclude' => 0,
    'id' => 'comment_count',
    'table' => 'node_comment_statistics',
    'field' => 'comment_count',
    'relationship' => 'none',
  ),
  'new_comments' => array(
    'label' => 'New comments',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'set_precision' => FALSE,
    'precision' => 0,
    'decimal' => '.',
    'separator' => ',',
    'prefix' => ' (',
    'suffix' => ' new)',
    'link_to_comment' => 1,
    'no_empty' => 1,
    'exclude' => 0,
    'id' => 'new_comments',
    'table' => 'node',
    'field' => 'new_comments',
    'relationship' => 'none',
  ),
  'totalcount' => array(
    'label' => 'Views',
    '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,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'empty' => '0',
    'hide_empty' => 0,
    'empty_zero' => 1,
    'set_precision' => FALSE,
    'precision' => 0,
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'exclude' => 0,
    'id' => 'totalcount',
    'table' => 'node_counter',
    'field' => 'totalcount',
    'relationship' => 'none',
  ),
  'last_comment_name' => array(
    'label' => 'Last comment author',
    'alter' => array(
      'alter_text' => 1,
      'text' => 'by [last_comment_name]<br />',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'target' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_user' => TRUE,
    'exclude' => 0,
    'id' => 'last_comment_name',
    'table' => 'node_comment_statistics',
    'field' => 'last_comment_name',
    'relationship' => 'none',
  ),
  'last_updated' => array(
    'label' => 'Last post',
    '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,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'date_format' => 'small',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'last_updated',
    'table' => 'node_comment_statistics',
    'field' => 'last_updated',
    'relationship' => 'none',
  ),
  'sticky' => array(
    'label' => 'Sticky',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'type' => 'yes-no',
    'not' => 0,
    'exclude' => 1,
    'id' => 'sticky',
    'table' => 'node',
    'field' => 'sticky',
    'relationship' => 'none',
  ),
  'comment' => array(
    'label' => 'Comment status',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'exclude' => 1,
    'id' => 'comment',
    'table' => 'node',
    'field' => 'comment',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'sticky' => array(
    'order' => 'DESC',
    'id' => 'sticky',
    'table' => 'node',
    'field' => 'sticky',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'tid' => array(
    'default_action' => 'ignore',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    '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,
      '15' => 0,
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'blog' => 0,
      'advpoll_binary' => 0,
      'advpoll_ranking' => 0,
      'forum' => 0,
      'book' => 0,
      'comment' => 0,
      'discussion' => 0,
      'group' => 0,
      'page' => 0,
      'profile' => 0,
      'story' => 0,
      'uprofile' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '2' => 0,
    ),
    '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('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('title', 'Forum Name');
$handler->override_option('empty', 'No posts in this forum.');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 20);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'forum_topic_list');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 0,
  'sticky' => 1,
  'order' => 'desc',
  'columns' => array(
    'nid' => 'nid',
    'teaser' => 'teaser',
    'topic_icon' => 'topic_icon',
    'title' => 'title',
    'timestamp' => 'title',
    'topic_pager' => 'title',
    'name_1' => 'title',
    'created' => 'title',
    'comment_count' => 'comment_count',
    'new_comments' => 'comment_count',
    'totalcount' => 'totalcount',
    'last_comment_name' => 'last_updated',
    'last_updated' => 'last_updated',
    'sticky' => 'sticky',
    'comment' => 'comment',
  ),
  'info' => array(
    'nid' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'teaser' => array(
      'separator' => '',
    ),
    'topic_icon' => array(
      'separator' => '',
    ),
    'title' => array(
      'sortable' => 1,
      'separator' => ' ',
    ),
    'timestamp' => array(
      'separator' => '',
    ),
    'topic_pager' => array(
      'separator' => '',
    ),
    'name_1' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'created' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'comment_count' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'new_comments' => array(
      'separator' => '',
    ),
    'totalcount' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'last_comment_name' => array(
      'sortable' => 1,
      'separator' => '<br />',
    ),
    'last_updated' => array(
      'sortable' => 1,
      'separator' => '<br />',
    ),
    'sticky' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'comment' => array(
      'sortable' => 0,
      'separator' => '',
    ),
  ),
  'default' => 'last_updated',
  'tid' => '',
));

Welchen Teil muss ich denn nun nehmen? Wäre nett, wenn mir da jemand helfen könnte. Danke!

Kirsten

‹ Funktionsweise von me-Alias Ajax Attribute Calculations Prozentuale Angaben ›
  • Anmelden oder Registrieren um Kommentare zu schreiben

View importieren

Eingetragen von stBorchert (6003)
am 29.01.2010 - 14:50 Uhr

Nimm einfach alles ohne die ersten beiden Zeilen.

Ich persönlich hätte jetzt ja einfach mal einen View exportiert um zu sehen, wie das auszusehen hat und dass dann auf den zu importierenden View übertragen.

 Stefan

--
Sei nett zu Deinem Themer!

  • Anmelden oder Registrieren um Kommentare zu schreiben

Klassisches Beispiel von Betriebsblindheit

Eingetragen von Kirsten1965 (703)
am 29.01.2010 - 15:25 Uhr
stBorchert schrieb

hätte jetzt ja einfach mal einen View exportiert um zu sehen, wie das auszusehen hat

*hust*

Man muß einfach auch drauf kommen. Danke für den Tipp.

Kirsten

  • Anmelden oder Registrieren um Kommentare zu schreiben

Klappt doch nicht

Eingetragen von Kirsten1965 (703)
am 29.01.2010 - 15:30 Uhr

Wenn ich es so mache, dann erhalte ich folgende Fehlermeldung:

Zitat:

Die Feld-Behandlungsroutine node_counter.totalcount ist nicht verfügbar.
Die View konnte nicht importiert werden.

Und nun?

  • Anmelden oder Registrieren um Kommentare zu schreiben

Views mit dem Import zerschossen ....

Eingetragen von Kirsten1965 (703)
am 01.02.2010 - 15:26 Uhr

Hallo,

ich habe mir wohl bei dem Versuch die View doch noch zu importieren etwas zerschossen! Wenn ich nun versuche z.B. http://localhost/user/6 aufzurufen oder einen anderen User, erhalte ich folgende Fehlermeldung:

Fatal error: Call to undefined method stdClass::init_display() in D:\xampp\htdocs\sites\all\modules\views\views.module on line 323

Wo hat sich da was aufgehängt und wie kann ich es wieder reparieren? Eigentlich hat er ja immer angezeigt, dass der View nicht importiert werden konnte....

Kirsten

  • Anmelden oder Registrieren um Kommentare zu schreiben

Alte Version genommen

Eingetragen von Kirsten1965 (703)
am 02.02.2010 - 11:43 Uhr

Nachdem auch im Issue des Advanced Forums keine Hilfestellungen gegeben werden, habe ich mich entschlossen, die vorherige Version zu nutzen und somit ist die Fehlermeldung auch erledigt.

Gruß,

Kirsten

  • Anmelden oder Registrieren um Kommentare zu schreiben

Benutzeranmeldung

  • Registrieren
  • Neues Passwort anfordern

Aktive Forenthemen

  • für drupal11 ein Slider Modul
  • [gelöst] W3CSS Paragraphs Views
  • Drupal 11 neu aufsetzen und Bereiche aus 10 importieren
  • Wie erlaubt man neuen Benutzern auf die Resetseite zugreifen zu dürfen.
  • [gelöst] Anzeigeformat Text mit Bild in einem Artikel, Drupal 11
  • Social Media Buttons um Insteragram erweitern
  • Nach Installation der neuesten D10-Version kein Zugriff auf Website
  • Composer nach Umzug
  • [gelöst] Taxonomie Begriffe zeigt nicht alle Nodes an
  • Drupal 11 + Experience Builder (Canvas) + Layout Builder
  • Welche KI verwendet ihr?
  • Update Manger läst sich nicht Installieren
Weiter

Neue Kommentare

  • melde mich mal wieder, da ich
    vor 3 Tagen 48 Minuten
  • Hey danke
    vor 3 Tagen 19 Stunden
  • Update: jetzt gibt's ein
    vor 4 Tagen 13 Stunden
  • Hallo, im Prinzip habe ich
    vor 1 Woche 1 Tag
  • Da scheint die Terminologie
    vor 1 Woche 2 Tagen
  • Kannst doch auch alles direkt
    vor 1 Woche 6 Tagen
  • In der entsprechenden View
    vor 1 Woche 6 Tagen
  • Dazu müsstest Du vermutlich
    vor 1 Woche 6 Tagen
  • gelöst
    vor 4 Wochen 2 Tagen
  • Ja natürlich. Dass ist etwas,
    vor 4 Wochen 3 Tagen

Statistik

Beiträge im Forum: 250233
Registrierte User: 20449

Neue User:

  • Mroppoofpaync
  • 4aficiona2
  • AppBuilder

» Alle User anzeigen

User nach Punkten sortiert:
wla9461
stBorchert6003
quiptime4972
Tobias Bähr4019
bv3924
ronald3857
md3717
Thoor3678
Alexander Langer3416
Exterior2903
» User nach Punkten
Zur Zeit sind 0 User und 18 Gäste online.

Hauptmenü

  • » Home
  • » Handbuch & FAQ
  • » Forum
  • » Übersetzungsserver
  • » Suche

Quicklinks I

  • Infos
  • Drupal Showcase
  • Installation
  • Update
  • Forum
  • Team
  • Verhaltensregeln

Quicklinks II

  • Drupal Jobs
  • FAQ
  • Drupal-Kochbuch
  • Best Practice - Drupal Sites - Guidelines
  • Drupal How To's

Quicklinks III

  • Tipps & Tricks
  • Drupal Theme System
  • Theme Handbuch
  • Leitfaden zur Entwicklung von Modulen

RSS & Twitter

  • Drupal Planet deutsch
  • RSS Feed News
  • RSS Feed Planet
  • Twitter Drupalcenter
Drupalcenter Team | Impressum & Datenschutz | Kontakt
Angetrieben von Drupal | Drupal is a registered trademark of Dries Buytaert.
Drupal Initiative - Drupal Association