14.01.2010, 00:14
Das ist wirklich merkwürdig. Wenn ein Template nicht gefunden wird, gibt es normalerweise eine Fehlermeldung. Stimmen die Variablen mit den Definitionen in der portal.php überein oder hast du an den Namen etwas geändert?
Zitat:Stimmen die Variablen mit den Definitionen in der portal.php überein oder hast du an den Namen etwas geändert?
$templatelist = "portal_welcome,portal_welcome_membertext,portal_stats,portal_search,portal_whosonline_memberbit,portal_whosonline,portal_latestthreads_thread_lastpost,portal_latestthreads_thread,portal_latestthreads,portal_latestthreadssub,portal_latestthreadssub_thread,portal_announcement_numcomments_no,portal_announcement,portal_announcement_numcomments,portal";
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'] && $thread['lastpost'] > $forum_read)
{
if($thread['lastread'])
{
$last_read = $thread['lastread'];
}
else
{
$last_read = $read_cutoff;
}
}
else
{
$last_read = my_get_array_cookie("threadread", $thread['tid']);
}
if($forum_read > $last_read)
{
$last_read = $forum_read;
}
if($thread['lastpost'] > $last_read && $moved[0] != "moved")
{
$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";
$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");
eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
$unreadpost = 1;
}
else
{
$folder_label .= $lang->icon_no_new;
$new_class = "";
}
// Latest forum discussions
if($mybb->settings['portal_showdiscussions'] != 0 && $mybb->settings['portal_showdiscussionsnum'])
{
$altbg = alt_trow();
$threadlist = '';
$gotounread = '';
$query = $db->query("
SELECT t.*, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE 1=1 $unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
ORDER BY t.lastpost DESC
LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
);
while($thread = $db->fetch_array($query))
{
$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
$lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
// Don't link to guest's profiles (they have no profile).
if($thread['lastposteruid'] == 0)
{
$lastposterlink = $thread['lastposter'];
}
else
{
$lastposterlink = build_profile_link($thread['lastposter'], $thread['lastposteruid']);
}
if(my_strlen($thread['subject']) > 40)
{
$thread['subject'] = my_substr($thread['subject'], 0, 40) . "...";
}
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$thread['threadlink'] = get_thread_link($thread['tid']);
if(!is_array($forum_cache))
{
cache_forums();
}
if($thread['lastpost'] > $last_read && $moved[0] != "moved")
{
$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";
$unreadpost = 1;
$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");
eval("\$gotounread = \"".$templates->get("portal_latestthreads_thread")."\";");
}
else
{
$folder_label .= $lang->icon_no_new;
$new_class = "";
}
$latestthreads['forum'] = htmlspecialchars_uni($forum_cache[$thread['fid']]['name']);
$threadstarter = build_profile_link($thread['username'], $thread['uid']);
eval("\$threadlist .= \"".$templates->get("portal_latestthreads_thread")."\";");
$altbg = alt_trow();
}
if($threadlist)
{
// Show the table only if there are threads
eval("\$latestthreads = \"".$templates->get("portal_latestthreads")."\";");
}
}
$gotounread = '';
$isnew = 0;
$donenew = 0;
$lastread = 0;
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])
{
$forum_read = $readforums[$thread['fid']];
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($forum_read == 0 || $forum_read < $read_cutoff)
{
$forum_read = $read_cutoff;
}
}
else
{
$forum_read = $forumsread[$thread['fid']];
}
if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read)
{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
}
if($thread['lastpost'] > $cutoff)
{
if($thread['lastpost'] > $cutoff)
{
if($thread['lastread'])
{
$lastread = $thread['lastread'];
}
else
{
$lastread = 1;
}
}
}
if(!$lastread)
{
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);
if($readcookie > $forum_read)
{
$lastread = $readcookie;
}
else
{
$lastread = $forum_read;
}
}
if($thread['lastpost'] > $lastread && $lastread)
{
$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";
$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");
eval("\$gotounread = \"".$templates->get("portal_latestthreads_thread")."\";");
$unreadpost = 1;
}
else
{
$folder_label .= $lang->icon_no_new;
$new_class = "";
}
<a href="{$thread['newpostlink']}"><img src="{$theme['imgdir']}/jump.gif" alt="{$lang->goto_first_unread}" title="{$lang->goto_first_unread}" /></a>
// Latest forum discussions
if($mybb->settings['portal_showdiscussions'] != 0 && $mybb->settings['portal_showdiscussionsnum'])
{
$altbg = alt_trow();
$threadlist = '';
$gotounread = '';
$isnew = 0;
$donenew = 0;
$lastread = 0;
$query = $db->query("
SELECT t.*, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE 1=1 $unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
ORDER BY t.lastpost DESC
LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
);
while($thread = $db->fetch_array($query))
{
$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']);
$lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
// Don't link to guest's profiles (they have no profile).
if($thread['lastposteruid'] == 0)
{
$lastposterlink = $thread['lastposter'];
}
else
{
$lastposterlink = build_profile_link($thread['lastposter'], $thread['lastposteruid']);
}
if(my_strlen($thread['subject']) > 40)
{
$thread['subject'] = my_substr($thread['subject'], 0, 40) . "...";
}
$thread['subject'] = htmlspecialchars_uni($parser->parse_badwords($thread['subject']));
$thread['threadlink'] = get_thread_link($thread['tid']);
if(!is_array($forum_cache))
{
cache_forums();
}
//Start
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid'])
{
$forum_read = $readforums[$thread['fid']];
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
if($forum_read == 0 || $forum_read < $read_cutoff)
{
$forum_read = $read_cutoff;
}
}
else
{
$forum_read = $forumsread[$thread['fid']];
}
if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read)
{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
}
if($thread['lastpost'] > $cutoff)
{
if($thread['lastpost'] > $cutoff)
{
if($thread['lastread'])
{
$lastread = $thread['lastread'];
}
else
{
$lastread = 1;
}
}
}
if(!$lastread)
{
$readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);
if($readcookie > $forum_read)
{
$lastread = $readcookie;
}
else
{
$lastread = $forum_read;
}
}
if($thread['lastpost'] > $lastread && $lastread)
{
$folder .= "new";
$folder_label .= $lang->icon_new;
$new_class = "subject_new";
$thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost");
eval("\$gotounread = \"".$templates->get("portal_gotounread")."\";");
$unreadpost = 1;
}
else
{
$folder_label .= $lang->icon_no_new;
$new_class = "";
}
$latestthreads['forum'] = htmlspecialchars_uni($forum_cache[$thread['fid']]['name']);
$threadstarter = build_profile_link($thread['username'], $thread['uid']);
eval("\$threadlist .= \"".$templates->get("portal_latestthreads_thread")."\";");
$altbg = alt_trow();
}
if($threadlist)
{
// Show the table only if there are threads
eval("\$latestthreads = \"".$templates->get("portal_latestthreads")."\";");
}
}
<tr>
<td class="trow1" align="left">
<span class="smalltext"><strong><a href="{$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}">{$thread['subject']}</a></strong></span><br />
<span class="antw">Starter: {$thread['username']}</span>
</td>
<td class="trow2" align="left">
<span class="smalltext"><a href="{$mybb->settings['bburl']}/forumdisplay.php?fid={$thread['fid']}">{$latestthreads['forum']}</a>
</span></td>
<td class="antw"><span class="smalltext">{$thread['replies']}</span></td>
<td class="trow1"align="left"><span class="smalltext">{$thread['views']}</span></td>
<td class="trow2"align="left"><span class="smalltext">{$lastpostdate} {$lastposttime}</span>
<div align="right" style=" float:right;">
<span class="smalltext"><a href="{$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}&action=lastpost"><img src="http://diehoerbar.net/forum/images/pfeilrot.gif" border="0" alt="pfeil" /></a></span>
</div><br />
<span class="smalltext">von {$lastposterlink}</span>
</td>
</tr>