04.09.2008, 20:07
Parse error: syntax error, unexpected T_ELSE in /home/www-data/htdocs/g/germanen/www/Forum/inc/functions_forumlist.php on line 342
Das funktioniert gar nicht.
Das funktioniert gar nicht.
// Fetch the last read date for this forum
if($forum['lastread'])
{
$forum_read = $forum['lastread'];
}
else
{
$forum_read = my_get_array_cookie("forumread", $forum['fid']);
}
if(!$forum_read)
{
$forum_read = $mybb->user['lastvisit'];
}
// If the lastpost is greater than the last visit and is greater than the forum read date, we have a new post
if($lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != 0 && empty($forum['password']))
{
$unread_forums++;
$folder = "on";
$altonoff = $lang->new_posts;
}
// PW with new posts
elseif($forum['password'] != "" && $lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != 0)
{
$unread_forums++;
$folder = "pwon";
$altonoff = $lang->forum_pw;
}
//PW without new posts
elseif($forum['password'] != "")
{
$folder = "pwoff";
$altonoff = $lang->forum_pw;
}
// Otherwise, no new posts
else
{
function get_forum_lightbulb($forum, $lastpost, $locked=0)
{
global $mybb, $lang, $db, $unread_forums;
// This forum is closed, so override the folder icon with the "offlock" icon.
if($forum['open'] == 0 || $locked && empty($forum['password']))
{
$folder = "offlock";
$altonoff = $lang->forum_locked;
}
else
{
// Fetch the last read date for this forum
if($forum['lastread'])
{
$forum_read = $forum['lastread'];
}
else
{
$forum_read = my_get_array_cookie("forumread", $forum['fid']);
}
if(!$forum_read)
{
$forum_read = $mybb->user['lastvisit'];
}
// If the lastpost is greater than the last visit and is greater than the forum read date, we have a new post
if($lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != 0 && empty($forum['password']))
{
$unread_forums++;
$folder = "on";
$altonoff = $lang->new_posts;
}
// PW with new posts
elseif($lastpost['lastpost'] > $forum_read && $lastpost['lastpost'] != 0 && $forum['password'] != "")
{
$unread_forums++;
$folder = "pwon";
$altonoff = "Passwortgeschützter Bereich";
}
elseif($forum['password'] != "")
{
$unread_forums++;
$folder = "pwoff";
$altonoff = "Passwortgeschützter Bereich";
}
// Otherwise, no new posts
else
{
$folder = "off";
$altonoff = $lang->no_new_posts;
}
}
return array(
"folder" => $folder,
"altonoff" => $altonoff
);
}