Letzte Beiträge
Verfasst: 21.05.2009 19:01
Hallo
Ich benutze seit gut einem Jahr von Kendoo ein Script für die Anzeige der letzten 10 Beiträge. Nun kommt auf einmal "Keine Daten verfügbar" ... geändert habe ich nichts.
Die Datei forum.xml ist aktuell und enthält die letzten 10 Beiträge ...
Kann mir jemand helfen ... hier der Code vom last_topics.php
<div>
<font face="Tahoma">
<body bgcolor="#CCCCCC">
<?php
function object2array($object){
$return = NULL;
if(is_array($object)) {
foreach($object as $key => $value) $return[$key] = object2array($value);
}
else{
$var = get_object_vars($object);
if($var) {
foreach($var as $key => $value)
$return[$key] = object2array($value);
}
else
return strval($object);
}
return $return;
}
$xml_filename="http://www.circolosvizzero.ch/Forum/forum.xml";
if(!$xml_content = @simplexml_load_file($xml_filename)) {
echo "Keine Daten verfügbar";
}
else {
$inhalt = object2array($xml_content);
for($i=0;$i<8;$i++){
switch ($inhalt['topic'][$i]['typ']){
case 3: $icon = "announce_unread.gif"; $title = "Announcement"; break;
case 2: $icon = "announce_unread.gif"; $title = "Global Announcement"; break;
case 1: $icon = "sticky_unread.gif"; $title = "Sticky"; break;
default: $icon = "topic_unread.gif"; $title = "Topic";
}
echo "<a style=\"color:#0B4A70;\" href=\"http://www.circolosvizzero.ch/Forum/vie ... =".$inhalt['topic'][$i]['f_id']."&t=".$inhalt['topic'][$i]['t_id']."&p=".$inhalt['topic'][$i]['p_id']."#p".$inhalt['topic'][$i]['p_id']."\" title=\"".$inhalt['topic'][$i]['subject']."\" onclick=\"window.open(this.href); return false;\">".((strlen($inhalt['topic'][$i]['subject'])>40)?utf8_substr($inhalt['topic'][$i]['subject'],0 , 40)."...":$inhalt['topic'][$i]['subject'])."</a>\n<span style=\"font-size:x-small;\">Autor: <strong><span style=\"color:".(($inhalt['topic'][$i]['colour'])?"#".$inhalt['topic'][$i]['colour']:"black").";\">".$inhalt['topic'][$i]['starter']."</span></strong> Antwort: ".$inhalt['topic'][$i]['poster']."\n".date("d.M Y, H:i", $inhalt['topic'][$i]['zeit'])."</span><br />\n\n";
}
}
?>
</div>
Ich benutze seit gut einem Jahr von Kendoo ein Script für die Anzeige der letzten 10 Beiträge. Nun kommt auf einmal "Keine Daten verfügbar" ... geändert habe ich nichts.
Die Datei forum.xml ist aktuell und enthält die letzten 10 Beiträge ...
Kann mir jemand helfen ... hier der Code vom last_topics.php
<div>
<font face="Tahoma">
<body bgcolor="#CCCCCC">
<?php
function object2array($object){
$return = NULL;
if(is_array($object)) {
foreach($object as $key => $value) $return[$key] = object2array($value);
}
else{
$var = get_object_vars($object);
if($var) {
foreach($var as $key => $value)
$return[$key] = object2array($value);
}
else
return strval($object);
}
return $return;
}
$xml_filename="http://www.circolosvizzero.ch/Forum/forum.xml";
if(!$xml_content = @simplexml_load_file($xml_filename)) {
echo "Keine Daten verfügbar";
}
else {
$inhalt = object2array($xml_content);
for($i=0;$i<8;$i++){
switch ($inhalt['topic'][$i]['typ']){
case 3: $icon = "announce_unread.gif"; $title = "Announcement"; break;
case 2: $icon = "announce_unread.gif"; $title = "Global Announcement"; break;
case 1: $icon = "sticky_unread.gif"; $title = "Sticky"; break;
default: $icon = "topic_unread.gif"; $title = "Topic";
}
echo "<a style=\"color:#0B4A70;\" href=\"http://www.circolosvizzero.ch/Forum/vie ... =".$inhalt['topic'][$i]['f_id']."&t=".$inhalt['topic'][$i]['t_id']."&p=".$inhalt['topic'][$i]['p_id']."#p".$inhalt['topic'][$i]['p_id']."\" title=\"".$inhalt['topic'][$i]['subject']."\" onclick=\"window.open(this.href); return false;\">".((strlen($inhalt['topic'][$i]['subject'])>40)?utf8_substr($inhalt['topic'][$i]['subject'],0 , 40)."...":$inhalt['topic'][$i]['subject'])."</a>\n<span style=\"font-size:x-small;\">Autor: <strong><span style=\"color:".(($inhalt['topic'][$i]['colour'])?"#".$inhalt['topic'][$i]['colour']:"black").";\">".$inhalt['topic'][$i]['starter']."</span></strong> Antwort: ".$inhalt['topic'][$i]['poster']."\n".date("d.M Y, H:i", $inhalt['topic'][$i]['zeit'])."</span><br />\n\n";
}
}
?>
</div>