Hmm, wie bau ich sowas bei mir am besten ein, im Forenindex? Ich hab ja auch so einen Last Topic Title on Index MOD bei mir eingebaut, da würde das passen:
Last Topic on Index 1.01a
Das ist bei mir in der index.php wo das sicher dann verändert/angepasst werden müsste:
Code: Alles auswählen
// Last Topic on Index BEGIN
$sql = "SELECT t.topic_id, t.topic_title FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t WHERE p.post_id = " . $forum_data[$j]['forum_last_post_id'] . " AND t.topic_id = p.topic_id;";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select info from post/topic table', '', __LINE__, __FILE__, $sql);
}
$last_topic_data = $db->sql_fetchrow($result);
$ltid = $last_topic_data['topic_id'];
$lttitle = $last_topic_data['topic_title'];
$db->sql_freeresult($result);
$last_post_time = create_date($board_config['default_dateformat'], $forum_data[$j]['post_time'], $board_config['board_timezone']);
$last_post = $last_post_time . '<br />';
// append first 25 characters of topic title to last topic data
if (strlen($lttitle) > 25)
{
$last_post .= $lang['in'] . ' ' . '<a title="' . $lttitle . '" alt="' . $lttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . substr($lttitle, 0, 25) . '...</a><br />';
}
else
{
$last_post .= $lang['in'] . ' ' . '<a title="' . $lttitle . '" alt="' . $lttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . substr($lttitle, 0, 25) . '</a><br />';
}
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? $lang['by'] . ' ' . ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : $lang['by'] . ' ' . '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
// Last Topic on Index END