25.03.2007, 11:12
Es würde mich mal interessieren ob es auch beim MyBB so geht wie hier www.jiggle.de und zwar das die letzten neuen Beiträge auf der Startseite gezeigt werden.
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="4"><strong>{$lang->latest_threads}</strong></td>
</tr><tr><td class="tcat" width="40%" align="center">Thema</td><td class="tcat" width="20%" align="center">Ansichten</td><td class="tcat" width="20%" align="center">Antworten</td><td class="tcat" width="20%" align="center">Letzter Beitrag</td></tr>
{$threadlist}
</table>
<br />
<tr>
<td class="trow1" align="center">
<strong><a href="{$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}">{$thread['subject']}</a></strong>
</td><td class="trow2" align="center">{$thread['views']}</td><td class="trow1" align="center">{$thread['replies']}</td><td class="trow2" align="center">
von {$lastposterlink}<br />
{$lastpostdate} {$lastposttime}
</td>
</tr>
{$welcome}
{$pms}
{$search}
{$stats}
{$whosonline}
</td>
<td> </td>
<td width="*" valign="top">
{$announcements}
{$latestthreads}
</td>
</tr>
</table>
{$footer}
</body>
</html>
if($threadlist)
{ // show the table only if there are threads
eval("\$latestthreads = \"".$templates->get("portal_latestthreads")."\";");
}
}
// Latest forum discussions from an subforum
$specialfid = ''; // Which fid you want to show; only give one number
if($mybb->settings['portal_showdiscussions'] != "no" && $mybb->settings['portal_showdiscussionsnum'])
{
$altbg = "trow1";
$threadlist = '';
$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|%' AND fid='".$specialfid."'
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']) > 25)
{
$thread['subject'] = my_substr($thread['subject'], 0, 25) . "...";
}
$thread['subject'] = htmlspecialchars_uni($thread['subject']);
eval("\$threadlist .= \"".$templates->get("portal_latestthreadssub_thread")."\";");
$altbg = alt_trow();
}
if($threadlist)
{ // show the table only if there are threads
eval("\$latestthreadssub = \"".$templates->get("portal_latestthreadssub")."\";");
}
}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="4"><strong>{$lang->latest_threads}</strong></td>
</tr><tr><td class="tcat" width="40%" align="center">Thema</td><td class="tcat" width="20%" align="center">Ansichten</td><td class="tcat" width="20%" align="center">Antworten</td><td class="tcat" width="20%" align="center">Letzter Beitrag</td></tr>
{$threadlist}
</table>
<br />
<tr>
<td class="trow1" align="center">
<strong><a href="{$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}">{$thread['subject']}</a></strong>
</td><td class="trow2" align="center">{$thread['views']}</td><td class="trow1" align="center">{$thread['replies']}</td><td class="trow2" align="center">
von {$lastposterlink}<br />
{$lastpostdate} {$lastposttime}
</td>
</tr>
Mak schrieb:Wo genau liegt das Problem? (Fehlermeldung?)