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

Fehler meldung bei Aktivierung eines selbsterstellten Templates (Theme) mit Artisteer

Eingetragen von chrnagel (2)
am 07.01.2013 - 15:50 Uhr in
  • Themes & Theming
  • Drupal 7.x

Hallo,

ich habe mit Artisteer ein neues Theme für meine Drupalsite erstellt und als Standardseite aktiviert. Jetzt erhalte ich beim Aufruf meiner Seite folgende Fehlermeldung:

Parse error: syntax error, unexpected '.' in /var/www/clients/client557/web8600/web/usr_web/sites/all/themes/cndrupal1/template.php on line 43

Codeauszug - line 43 ist hier die Zeile mit dem Inhalt. default::

switch (get_drupal_major_version()) {

case 5:

require_once("drupal5_theme_methods.php");

break;

case 6:

require_once("drupal6_theme_methods.php");

break;

case 7:

require_once("drupal7_theme_methods.php");

break;

default:

break;

}

Schon jetzt mal danke für Eure Hilfe !

‹ Eigenes Node Template Feldinhalte werden nicht angezeigt? comment.tpl.php -> ›
  • Anmelden oder Registrieren um Kommentare zu schreiben

Lässt sich leider oben nicht

Eingetragen von Genesis (597)
am 07.01.2013 - 16:01 Uhr

Lässt sich leider oben nicht richtig erkennen, code am besten in einen code-Tag setzen, aber steht das:

<?php
default::
?>

bei dir so drin? Wo kommt das denn her, und was soll es tun?

Nehm dir doch mal ein Artiseer-Template als Beispiel, dort sieht es dann so aus:

switch (get_drupal_major_version()) {
case 5:
  require_once("drupal5_theme_methods.php");
  break;
case 6:
  require_once("drupal6_theme_methods.php");
  break;
case 7:
  require_once("drupal7_theme_methods.php");
  break;
          default:
break;
}

  • Anmelden oder Registrieren um Kommentare zu schreiben

Fehlermeldung neues Theme mit Artisteer

Eingetragen von chrnagel (2)
am 07.01.2013 - 17:08 Uhr

Nachstehend mal der komplette code der "template.php

<?php

// $Id



require_once("common_methods.php");





global
$language;

if (isset(
$language)) {

   
$language->direction = LANGUAGE_LTR;

}



switch (
get_drupal_major_version()) {

    case
5:

      require_once(
"drupal5_theme_methods.php");

      break;

    case
6:

      require_once(
"drupal6_theme_methods.php");

      break;

    case
7:

      require_once(
"drupal7_theme_methods.php");

      break;

    default:

          break;

}



/* Common methods */



function get_drupal_major_version() {   

   
$tok = strtok(VERSION, '.');

   
//return first part of version number

   
return (int)$tok[0];

}



function
get_page_language($language) {

  if (
get_drupal_major_version() >= 6) return $language->language;

  return
$language;

}



function
get_page_direction($language) {

  if (isset(
$language) && isset($language->dir)) {

      return
'dir="'.$language->dir.'"';

  }

  return
'dir="'..'"';

}



function
get_full_path_to_theme() {

  return
base_path().path_to_theme();

}



function
get_artx_drupal_view() {

    if (
get_drupal_major_version() == 7)

        return new
artx_view_drupal7();

    return new
artx_view_drupal56();

}



function
get_artisteer_export_version() {

    return
7;

}



if (!
function_exists('render'))    {

    function
render($var) {

        return
$var;

    }

}



class
artx_view_drupal56 {

   

    function
print_head($vars) {

        foreach (
array_keys($vars) as $name)

            $
$name = & $vars[$name];

?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo get_page_language($language); ?>" xml:lang="<?php echo get_page_language($language); ?>" <?php echo get_page_direction($language); ?> >

<head>

  <?php echo $head; ?>

  <title><?php if (isset($head_title )) { echo $head_title; } ?></title> 

  <?php echo $styles ?>

  <?php echo $scripts ?>

  <!--[if IE 6]><link rel="stylesheet" href="<?php echo $base_path . $directory; ?>/style.ie6.css" type="text/css" media="screen" /><![endif]--> 

  <!--[if IE 7]><link rel="stylesheet" href="<?php echo $base_path . $directory; ?>/style.ie7.css" type="text/css" media="screen" /><![endif]-->

  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyle Content in IE */ ?> </script>

</head>



<body <?php if (!empty($body_classes)) { echo 'class="'.$body_classes.'"'; } ?>>

<?php

   
}





    function
print_closure($vars) {

    echo
$vars['closure'];

?>


</body>

</html>

<?php

   
}



    function
print_maintenance_head($vars) {

        foreach (
array_keys($vars) as $name)

            $
$name = & $vars[$name];

?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo get_page_language($language); ?>" xml:lang="<?php echo get_page_language($language); ?>" <?php echo get_page_direction($language); ?> >

<head>

  <?php echo $head; ?>

  <title><?php if (isset($head_title )) { echo $head_title; } ?></title> 

  <?php echo $styles ?>

  <?php echo $scripts ?>

  <!--[if IE 6]><link rel="stylesheet" href="<?php echo $base_path . $directory; ?>/style.ie6.css" type="text/css" media="screen" /><![endif]--> 

  <!--[if IE 7]><link rel="stylesheet" href="<?php echo $base_path . $directory; ?>/style.ie7.css" type="text/css" media="screen" /><![endif]-->

  <script type="text/javascript"><?php /* Needed to avoid Flash of Unstyle Content in IE */ ?> </script>

</head>



<body <?php if (!empty($body_classes)) { echo 'class="'.$body_classes.'"'; } ?>>

<?php

   
}

   

    function
print_maintenance_closure($vars) {

        echo
$vars['closure'];

?>


</body>

</html>

<?php

   
}



    function
print_comment($vars) {

        foreach (
array_keys($vars) as $name)

        $
$name = & $vars[$name];

?>


<div class="comment<?php print ($comment->new) ? ' comment-new' : ''; print ' '. $status; print ' '. $zebra; ?>">



  <div class="clear-block">

  <?php if ($submitted): ?>

    <span class="submitted"><?php print $submitted; ?></span>

  <?php endif; ?>



  <?php if ($comment->new) : ?>

    <span class="new"><?php print drupal_ucfirst($new) ?></span>

  <?php endif; ?>



  <?php print $picture ?>



    <h3><?php print $title ?></h3>



    <div class="content">

      <?php print $content ?>

      <?php if ($signature): ?>

      <div class="clear-block">

        <div>—</div>

        <?php print $signature ?>

      </div>

      <?php endif; ?>

    </div>

  </div>



  <?php if ($links): ?>

    <div class="links"><?php print $links ?></div>

  <?php endif; ?>

</div>

<?php

   
}



    function
print_comment_wrapper($vars) {

        foreach (
array_keys($vars) as $name)

            $
$name = & $vars[$name];

?>


<div id="comments">

  <?php print $content; ?>

</div>

<?php

   
}



    function
print_comment_node($vars) {

        return;

    }



    function
get_incorrect_version_message() {

        if (
get_artisteer_export_version() > 6) {

            return
t('This version is not compatible with Drupal 5.x or 6.x and should be replaced.');

        }

        return
'';

    }

}





class
artx_view_drupal7 {



    function
print_head($vars) {

        print
render($vars['page']['header']);

    }

   

    function
print_closure($vars) {

        return;

    }



    function
print_maintenance_head($vars) {

        foreach (
array_keys($vars) as $name)

            $
$name = & $vars[$name];

?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" version="XHTML+RDFa 1.0" dir="<?php print $language->dir; ?>">



<head>

  <?php print $head; ?>

  <title><?php print $head_title; ?></title>

  <?php print $styles; ?>

  <?php print $scripts; ?>

  <!--[if IE 6]><link rel="stylesheet" href="<?php echo base_path() . $directory; ?>/style.ie6.css" type="text/css" media="screen" /><![endif]--> 

  <!--[if IE 7]><link rel="stylesheet" href="<?php echo base_path() . $directory; ?>/style.ie7.css" type="text/css" media="screen" /><![endif]-->

</head>

<body class="<?php print $classes; ?>" <?php print $attributes;?>>

<?php

   
}

   

    function
print_maintenance_closure($vars) {

?>


</body>

</html>

<?php

   
}



    function
print_comment($vars) {

        foreach (
array_keys($vars) as $name)

            $
$name = & $vars[$name];

?>


<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>

  <?php print $picture ?>



  <div class="submitted">

    <?php print $permalink; ?>

    <?php

     
print t('Submitted by !username on !datetime.',

        array(
'!username' => $author, '!datetime' => $created));

   
?>


  </div>



  <?php if ($new): ?>

    <span class="new"><?php print $new ?></span>

  <?php endif; ?>



  <?php print render($title_prefix); ?>

  <h3><?php print $title ?></h3>

  <?php print render($title_suffix); ?>



  <div class="content"<?php print $content_attributes; ?>>

    <?php

     
// We hide the comments and links now so that we can render them later.

     
hide($content['links']);

      print
render($content);

   
?>


    <?php if ($signature): ?>

    <div class="user-signature clearfix">

      <?php print $signature ?>

    </div>

    <?php endif; ?>

  </div>



  <?php print render($content['links']) ?>

</div>

<?php

   
}



    function
print_comment_wrapper($vars)    {

        foreach (
array_keys($vars) as $name)

            $
$name = & $vars[$name];

?>


<div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>

  <?php if ($content['comments'] && $node->type != 'forum'): ?>

    <?php print render($title_prefix); ?>

    <h2 class="art-postheader"><?php print t('Comments'); ?></h2>

    <?php print render($title_suffix); ?>

  <?php endif; ?>



  <?php print render($content['comments']); ?>



  <?php if ($content['comment_form']): ?>

    <h2 class="art-postheader"><?php print t('Add new comment'); ?></h2>

    <?php print render($content['comment_form']); ?>

  <?php endif; ?>

</div>

<?php

   
}



    function
print_comment_node($vars) {

        foreach (
array_keys($vars) as $name)

            $
$name = & $vars[$name];

       
$comments = (isset($content['comments']) ? render($content['comments']) : '');

        if (!empty(
$comments) && $page):

?>


<div class="art-box art-post">

    <div class="art-box-body art-post-body">

<div class="art-post-inner art-article">



<div class="art-postcontent">



<?php

       
echo $comments;

?>




</div>

<div class="cleared"></div>





</div>



<div class="cleared"></div>

    </div>

</div>



<?php endif;

}



function get_incorrect_version_message() {

if (get_artisteer_export_version() < get_drupal_major_version()) {

return t('This version is not compatible with Drupal 7.x. and should be replaced.');

}

return '';

}

}

  • 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 1 Woche 22 Stunden
  • Hey danke
    vor 1 Woche 1 Tag
  • Update: jetzt gibt's ein
    vor 1 Woche 2 Tagen
  • Hallo, im Prinzip habe ich
    vor 1 Woche 6 Tagen
  • Da scheint die Terminologie
    vor 1 Woche 6 Tagen
  • Kannst doch auch alles direkt
    vor 2 Wochen 4 Tagen
  • In der entsprechenden View
    vor 2 Wochen 4 Tagen
  • Dazu müsstest Du vermutlich
    vor 2 Wochen 4 Tagen
  • gelöst
    vor 5 Wochen 19 Stunden
  • Ja natürlich. Dass ist etwas,
    vor 5 Wochen 1 Tag

Statistik

Beiträge im Forum: 250233
Registrierte User: 20450

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 11 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