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

flatforum unter yaml

Eingetragen von popkopff (14)
am 26.07.2007 - 15:58 Uhr in
  • Themes & Theming

Hallo Folks,

hat jemand schon mal das Flatforum unter dem yaml Template
installiert. Ich habe Drupal 5.1 laufen merge die 2 Templatedateien.
Keine Fehlermeldung aber auch keine Auswirkung auf das Forum hat jemand einen Rat.

Hier mal meine template.php :

<?php
/*
* ######################################################################################################
* # "YAML für Drupal" (c) von Alexander Hass (http://www.yaml-fuer-drupal.de) ##########################
* ######################################################################################################
*
*  YAML for Drupal : 5.x-2.5.2.4
*  Dateiversion    : 06.04.07
*  Datei           : template.php
*  Funktion        : Zentrales Template
*/

/*
* This snippet tells Drupal to load up a different page-front.tpl.php layout
* file automatically. For use in a page.tpl.php file.
*
* This works with Drupal 4.5, Drupal 4.6, Drupal 4.7 and Drupal 5
*/
function _phptemplate_variables($hook, $vars = array()) {
  switch (
$hook) {
    case
'page':
      global
$user;

     
// Load the XML prolog for standard compliant browsers if caching is inactive.
      // The function page_set_cache() does not cache pages if $user->uid has a value.
      // Additional the XML prolog can only added to YAML for Drupal if a user is
      // logged into Drupal (caching inactive) or caching is globaly disabled on the site.
     
if ((_browser_xml_prolog_compliant() && $user->uid) || (_browser_xml_prolog_compliant() && !(variable_get('cache', 0)))) {
       
$vars['xml_prolog'] = '<?xml version="1.0" encoding="utf-8"?>
'."\n" ;
      }

      // Load region content assigned via drupal_set_content().
      foreach (array('fontsize_init','fontsize_links') as $region) {
        $vars[$region] = drupal_get_content($region);
      }

      break;
  }
 
  // node_style module is installed and active
  if (module_exists('node_style')) {
    return module_invoke('node_style', 'return_vars', $hook, $vars);
  }
  else {
    return $vars;
  }
static $is_forum;
  $variables = array();
  if (!isset($is_forum)) {
    if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == '') {
      $nid = arg(1);
    }
    if (arg(0) == 'comment' && arg(1) == 'reply' && is_numeric(arg(2))) {
      $nid = arg(2);
    }
    if ($nid) {
      $node = node_load(array('nid' => $nid));
    }
    $is_forum = ($node && $node->type == 'forum');
    _is_forum($is_forum);
  }
  if ($is_forum) {
    switch ($hook) {
      case 'comment' :
        $variables['template_file'] = 'node-forum';
        $variables['row_class'] = _row_class();
        $variables['name'] = $vars['author'];
        $variables['userid'] = $vars['comment']->uid;
        $joined = module_invoke('flatforum', 'get_created', $vars['comment']->uid);
        $variables['joined'] = $joined ? format_date($joined, 'custom', 'Y-m-d') : '';
        $posts = module_invoke('flatforum', 'get', $vars['comment']->uid);
        $variables['posts'] = $posts ? $posts : 0;
        $variables['submitted'] = format_date($vars['comment']->timestamp);
        $subject = $vars['comment']->subject;
        $variables['title'] = empty($subject) ? '&nbsp' : $subject;
        $variables['content'] = $vars['comment']->comment;
        $variables['links'] = empty($vars['links']) ? '&nbsp' : $vars['links'];
        break;
      case 'node' :
        $variables['row_class'] = _row_class();
        $variables['userid']=$vars['node']->uid;
        $joined = module_invoke('flatforum', 'get_created', $vars['node']->uid);
        $variables['joined'] = $joined ? format_date($joined, 'custom', 'Y-m-d') : '';
        $posts = module_invoke('flatforum', 'get', $vars['node']->uid);
        $variables['posts'] = $posts ? $posts : 0;
        $variables['title'] = empty($vars['title']) ? '&nbsp' : $vars['title'];
        $variables['content'] = $vars['node']->body;
        $variables['links'] = empty($vars['links']) ? '&nbsp' : $vars['links'];
        break;
    }
  }
  return $variables;
}
function _row_class() {
  static $forum_row = TRUE;
  $forum_row = !$forum_row;
  return $forum_row ? 'odd' : 'even';
}
function _is_forum($arg = NULL) {
  static $is_forum = FALSE;
  if ($arg) {
    $is_forum = $arg;
  }
  return $is_forum;
}




/* This snippet changes primary links layout */
function phptemplate_links_primary($links) {
  $output = '';
  if (count($links)) {
    $output .= '<ul>';
    foreach ($links as $link) {
      $output .= '<li';
      if ($link['href'] == $_GET['q']) {
        $output .= ' id="current"';
      }
      $output .= '>'. l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']) .'</li>';
    }
    $output .= '</ul>';
  }
  return $output;
}

/* This snippet changes seconday links layout */
function phptemplate_links_secondary($links, $delimiter = ' | ', $leftcab = '', $rightcab = '') {
  // Display the left cap of the 'button bar'
  $output  = '';
  $output .= $leftcab;
  $link_count = count($links);
  $current = 1;
  foreach ( $links as $link ) {
      // Print the link
      $output .= l($link['title'], $link['href'], $link['attributes'], $link['query'], $link['fragment']);
      // Only print the delimiter if not the last link
      if ( $current < $link_count ) {
          $output .= $delimiter;
      }
      $current++;
  }
  // Display the right cap of the 'button bar'
  $output .= $rightcab;
  return $output;
}

/* This snippet changes default menu layout */
function phptemplate_menu_tree($pid = 1) {
  if ($tree = menu_tree($pid)) {
    $output .= "<ul class=\"menu\">";
    $output .= $tree;
    $output .= "</ul>";
    return $output;
  }
}
function phptemplate_menu_item($mid, $children = '', $leaf = TRUE) {
  return '<li class="'. ($leaf ? 'leaf' : ($children ? 'expanded' : 'collapsed')) .'">'. menu_item_link($mid) . $children ."</li>\n";
}

/*
* Add backlinks required by license to footer.
* 
* This back linking maybe only removed, if you possess
* a YAML Framework and YAML for Drupal license.
*
* For more information read the "YAML" and "YAML for Drupal" license, please.
*
* Licenses:
* YAML - http://www.yaml.de
* YAML for Drupal - http://www.yaml-for-drupal.com
*/
function phptemplate_footer_message($output = '', $delimiter = ' | ') {
  $output  .= '<p>';
 
  // If you don't like the validation links, simply comment out the following four lines.
  $output .= t('<p style="text-align:center;"><a href="http://validator.w3.org/check/referer" title="Validate XHTML" target="_blank">XHTML</a>');
  $output .= $delimiter;
  $output .= t('<a href="http://jigsaw.w3.org/css-validator/check/referer" title="Validate CSS" target="_blank">CSS</a>');
  $output .= $delimiter;

  /*
  GERMAN:
  Diese Rückverlinkung darf nur entfernt werden,
  wenn Sie eine YAML-Framework Lizenz besitzen.
  :: Lizenzbedingungen: http://www.yaml.de

  ENGLISH:
  This back linking maybe only removed,
  if you possess a YAML Framework license.
  :: License conditions: http://www.yaml.de
  */
  $output .= t('<a href="http://www.corsado.de/" target="_blank">Corsado.de</a> &copy; 2006-@year', array('@year' => date('Y')));
  $output .= $delimiter;

  /*
  GERMAN:
  Diese Rückverlinkung darf nur entfernt werden,
  wenn Sie eine YAML für Drupal Lizenz besitzen.
  :: Lizenzbedingungen: http://www.yaml-fuer-drupal.de
 
  ENGLISH:
  This back linking maybe only removed,
  if you have possess a YAML for Drupal license.
  :: License conditions: http://www.yaml-for-drupal.com
  */
$output .= t('Design von <a href="http://www.zoe-and-rick.de/" target="_blank">Zoe-and-Rick.de</a> &copy; @year', array('@year' => date('Y')));

  $output .= '</p>';
  return $output;
}

/*
* We will detect if client is Internet Explorer. Then we are able to add
* the XML prolog for XHTML Standard Compliance Mode for other Browsers.
*
* Today IE is the only known Software we need to workaround and therefor we
* only detect IE browser and suppose all other browsers render correctly with
* XML prolog.
*/
function _browser_xml_prolog_compliant () {
  $ua = $_SERVER['HTTP_USER_AGENT'];

  if (eregi("msie",$ua) && !eregi("opera",$ua)) {
    // This is not a Opera pose as IE
    $clientdata = explode(" ",stristr($ua,"msie"));
    $client['version'] = $clientdata[1];

    if ($client['version'] >= 7) {
      // IE >= 7.0: http://blogs.msdn.com/ie/archive/2005/09/15/467901.aspx
      $xml_prolog_compliant = true;
    }
    else {
      // IE <= 6.0
      $xml_prolog_compliant = false;
    }
  }
  // all other browsers
  else {
    $xml_prolog_compliant = true;
  }

  return $xml_prolog_compliant;
}

Über Hilfe würde ich sehr freuen.

Gruß

Popkpopff

‹ This page is not Valid XHTML 1.0 Strict! resizable-textarea im Internet explorer verschoben ›
  • 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 2 Wochen 2 Tagen
  • Hey danke
    vor 2 Wochen 3 Tagen
  • Update: jetzt gibt's ein
    vor 2 Wochen 4 Tagen
  • Hallo, im Prinzip habe ich
    vor 3 Wochen 1 Tag
  • Da scheint die Terminologie
    vor 3 Wochen 1 Tag
  • Kannst doch auch alles direkt
    vor 3 Wochen 6 Tagen
  • In der entsprechenden View
    vor 3 Wochen 6 Tagen
  • Dazu müsstest Du vermutlich
    vor 3 Wochen 6 Tagen
  • gelöst
    vor 6 Wochen 2 Tagen
  • Ja natürlich. Dass ist etwas,
    vor 6 Wochen 3 Tagen

Statistik

Beiträge im Forum: 250233
Registrierte User: 20459

Neue User:

  • ByteScrapers
  • Mroppoofpaync
  • 4aficiona2

» 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 19 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