Datum ändern

Hallo!

Ich möchte ein News-Script in meine Website einbinden und finde SimpleNews ganz nett. Was mich allerdings stört, ist die englische Datumsanzeige, z.B. „February 12, 2007, 6:23 pm“.

Was muss ich am folgenden Code verändern, dass stattdessen „12. Februar 2007, 18:23 Uhr“ angezeigt wird?

// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
// Display the sticky post (if there is one) and 
// if comments/email/article are not being viewed.
// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 

 $query = "SELECT \* FROM simplenews\_articles WHERE sticky = 'on' ";
 $sticky = mysql\_query($query) or die (mysql\_error());

 while ($data = mysql\_fetch\_assoc($sticky)) {

 $news\_id = $data['news\_id'];
 $title = $data['title'];
 $poster = $data['poster'];
 $date = $data['date'];
 $topic\_id = $data['topic'];
 $text = $data['snippet'];
 $snippet = bbcode($text);
 $snippet = nl2br($snippet); 
 $snippet = stripslashes($snippet);

 // Get Topic Image
 $query = "SELECT icon FROM simplenews\_topics WHERE topic\_id = '$topic\_id'";
 $res = mysql\_query($query) or die (mysql\_error());
 $dat = mysql\_fetch\_assoc($res);

 $icon = $dat['icon'];

// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
// Sticky Post Template Code
// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 

 // Theme Template Variables -- These Get Replaced
 $themevars = (array(
 "{TITLE}",
 "{POSTER}",
 "{TIMESTAMP}",
 "{TOPIC\_ICON}",
 "{SNIPPET}",
 "{THEME}"));

 // Replace Theme Template Variables With These
 $replacevars = (array($title, $poster, $date, $icon, $snippet, $theme));

 // Template File to Use
 $template = "../simplenews/themes/$theme/sticky.tpl";

 // Call Template Parsing Function
 page\_parse($template,$themevars,$replacevars);

 }

 }

// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
// Begin loop to display articles until $postlimit is 
// reached.
// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

 while ($data = mysql\_fetch\_assoc($result)) {

 $news\_id = $data['news\_id'];
 $title = $data['title']; 
 $poster = $data['poster'];
 $date = $data['date'];
 $topic\_id = $data['topic'];

 // Get Topic Icon
 $query = "SELECT icon FROM simplenews\_topics WHERE topic\_id = '$topic\_id'";
 $res = mysql\_query($query) or die (mysql\_error());
 $dat = mysql\_fetch\_assoc($res);

 $icon = $dat['icon'];

// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
// Set some variables for the HTML output
// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

 if ($action == "article") {

 // Snippet
 $text = $data['snippet'];
 $text = bbcode($text);
 $text = nl2br($text);
 $snippet = stripslashes($text);

 // Full Article
 $text = $data['article'];
 $text = bbcode($text);
 $text = nl2br($text);
 $article = stripslashes($text);

 $full\_article = $data['article'];

 } else if ($action == "email" || $action == "comment") {

 // Snippet
 $text = $data['snippet'];
 $full\_article = $data['article'];
 $text = bbcode($text);
 $text = nl2br($text);
 $snippet = stripslashes($text);

 } else {

 // Snippet 
 $text = $data['snippet'];
 $full\_article = $data['article'];
 $text = bbcode($text);
 $text = nl2br($text);
 $snippet = stripslashes($text);

 }

 // If there is a full article, this will create a link to it
 if (!empty($full\_article)) {

 $full\_link = " [Ganzen Artikel anzeigen](%2524PHP_SELF?action=article&news_id=%2524news_id)";
 $full\_article = "";

 } else {

 // No link
 $full\_link = "";

 }

// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
// Output template for each news article.
// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 

 // Theme Template Variables -- These Get Replaced
 $themevars = (array(
 "{PHP\_SELF}",
 "{NEWS\_ID}",
 "{POSTER}",
 "{TITLE}",
 "{TIMESTAMP}",
 "{SNIPPET}",
 "{ARTICLE}",
 "{NUM\_COMMENTS}",
 "{THEME}",
 "{TOPIC\_ICON}",
 "{FULL\_ARTICLE\_LINK}"));

 // Replace Theme Template Variables With These
 $replacevars = (array($php\_self, $news\_id, $poster, $title, $date, $snippet, $article, $comments, $theme, $icon, $full\_link));

 // Template File to Use
 $template = "../simplenews/themes/$theme/article.tpl";

 // Call Template Parsing Function
 page\_parse($template,$themevars,$replacevars);

Danke im Voraus,

Matthias

also in diesem codeaußschnitt wird das Datum nicht formatiert.

im normalfall gibt es irgendwo eine function date("…"…); in der der String formatiert wird.

näheres:

http://de.php.net/date

gruß
Phillip