Hoi, prima, ich habe es selber geschafft.
Auf die 2 Templates zu verzweigen war ganz einfach, ich habe auch gleich die Tabellen-Header verändert. Die forum-ID's und Bezeichnungen müssen natürlich entsprechend geändert werden:
Code: Alles auswählen
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------------
#
/// INSERT topic_display ///////////////////////////////////////////////////
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
////////////////////////////////////////////////////////////////////////////
#
#-----[ FIND ]------------------------------------------
#
//
// Dump out the page header and load viewforum template
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
// DIFFERENT TEMPLATES INSERT /////// /////////////////////////////////////////
if ($forum_id == 3){
// Forum: Marktplatz
$my_l_topic = "Suche/Biete";
$viewforum_body_tpl = "viewforum_body-2.tpl";
}
elseif($forum_id == 4){
$my_l_topic = "Termine";
$viewforum_body_tpl = "viewforum_body-2.tpl";
}
else{
$viewforum_body_tpl = "viewforum_body.tpl";
$my_l_topic = $lang['Topics'];
}
//////////////////////////////////////////////////////////////////////////////
#
#-----[ FIND ]------------------------------------------
#
$template->set_filenames(array('body' => 'viewforum_body.tpl'));
#
#-----[ REPLACE WITH ]------------------------------------------
#
$template->set_filenames(array('body' => $viewforum_body_tpl));
#
#-----[ FIND ]------------------------------------------
#
'L_TOPICS' => $lang['Topics'],
#
#-----[ REPLACE WITH ]------------------------------------------
#
'L_TOPICS' => $my_l_topic,
Die Geschichte mit den Postings war etwas aufwändiger, damit sie auch schön angezeigt werden... Ich habe das Ganze in eine eigene Datei eingepackt und diese eingebunden
Code: Alles auswählen
#
#-----[ FIND ]------------------------------------------
#
//
// Okay, lets dump out the page ...
//
if( $total_topics )
{
for($i = 0; $i < $total_topics; $i++)
{
$topic_id = $topic_rowset[$i]['topic_id'];
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
/// INSERT topic_display ///////////////////////////////////////////////////
include($phpbb_root_path .'viewtopic_display.'.$phpEx);
///////////////////////////////////////////////////////////////////////////
viewtopic_display.php enthält eine spezielle SELECT Anfrage:
Code: Alles auswählen
$topictitle = str_replace("'", "", $topic_title);
$sql = "SELECT p.*, pt.post_text, pt.post_subject, pt.bbcode_uid, pt.post_id
FROM " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt
WHERE pt.post_subject = '$topictitle'
AND p.post_id = pt.post_id
LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$message = $row['post_text'];
$bbcode_uid = $row['bbcode_uid'];
und "der unterste Teil" der viewtopic.php:
Code: Alles auswählen
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( !$board_config['allow_html'] )
{
if ( $row['enable_html'] )
{
$message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $message);
}
}
//
// Parse message and/or sig for BBCode if reqd
//
if ( $board_config['allow_bbcode'] )
{
if ( $user_sig != '' && $user_sig_bbcode_uid != '' )
{
$user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $user_sig);
}
if ( $bbcode_uid != '' )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
}
}
//
// Parse smilies
//
if ( $board_config['allow_smilies'] )
{
if ( $row['enable_smilies'] )
{
$message = smilies_pass($message);
}
}
//
// Highlight active words (primarily for search)
//
if ($highlight_match)
{
// This was shamelessly 'borrowed' from volker at multiartstudio dot de
// via php.net's annotated manual
$message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace('#\b(" . $highlight_match . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1));
}
//
// Replace naughty words
//
if (count($orig_word))
{
$post_subject = preg_replace($orig_word, $replacement_word, $post_subject);
$message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $message . '<'), 1, -1));
}
//
// Replace newlines (we use this rather than nl2br because
// till recently it wasn't XHTML compliant)
//
$message = str_replace("\n", "\n<br />\n", $message);
$first_post = $message;
setlocale(LC_TIME, 'de_DE');
$post_date = strftime(' %d. %b. %Y', $row['post_time']);

Jo - das war es dann auch schon. Nicht komplett ausgefeilt, aber es geht
sunfish