Schau mal mein edit vom letzten Post.
Nochmal zusammengefasst.
Das hier steht in der last_topics.php (liegt im root) :
Code: Alles auswählen
<?php
// ############ Anfang Festlegung der Vorgaben ########################################
// Laenge der angezeigten Themenueberschrift in Buchstaben
$topic_length = '20';
// Maximal angezeigte Beiträge
$topic_limit = '5';
// Eingeschraenkte Forumsanzeige ('0' = Aus; '1' = Ein)
$special_forums = '1';
// IDs der zugelassenen Foren (nur wenn Forumsanzeige = "1"); Trennung der IDs mit einem Komma
$forum_ids = '43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78';
// Relative Pfadangabe zur config.php
$config_path = '/';
// Absoluter Pfad des Forums auf dem Server, bitte eingeben !!!
$root_path = 'http://fck-recorder.bplaced.net/';
// ############ Ende Vorgaben #######################################
//Ermittlung des aktuellen Server-Verzeichnisses für Einbindung config.php
$path = dirname(__FILE__);
// Einbinden der phpBB-Konfigurationsdatei und somit Ermittlung der MySQL-Zugangsdaten
include_once($path.$config_path .'config.php');
// Verbindungsaufbau mit Zugangsdaten aus config.php, Fehlermeldung bei Problemen
mysql_connect($dbhost, $dbuser, $dbpasswd) OR die('Serververbindung fehlgeschlagen');
// Verbindung mit der phpBB-Datenbank herstellen
mysql_select_db($dbname) OR die('Datenbankverbindung fehlgeschlagen!');
//Abfrage ob Foreneinschraenkung gesetzt per Verzweigung und Uebergabe der moeglichen IDS an die Variable
$where_forums = ( $special_forums == '0' ) ? '' : 't.forum_id NOT IN ('. $forum_ids .') AND ';
//Definition der SQL-Abfrage
$sql = "SELECT t.*, f.forum_id, f.forum_name, u.username AS first_poster, u.user_id AS first_poster_id, u2.username AS last_poster, u2.user_id AS last_poster_id, p.post_username AS first_poster_name, p2.post_username AS last_poster_name, p2.post_time
FROM ". $table_prefix ."topics t, ". $table_prefix ."forums f, ". $table_prefix ."users u, ". $table_prefix ."posts p, ". $table_prefix ."posts p2, ". $table_prefix ."users u2
WHERE $where_forums t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id
ORDER BY t.topic_last_post_id DESC LIMIT $topic_limit";
//Durchfuehrung der SQL-Abfrage und Ergebnisuebergabe an $result
$result = mysql_query($sql);
// Wenn Abfrafge fehlgeschlagen = Fehlermeldung
if( !$result )
{
die('SQL-Abfrage fehlgeschlagen!: '. mysql_error());
exit();
}
//Definition Array für Aufnahme der Abfragedaten
$line = array();
// Uebergabe der Daten bis zum letzten Datensatz an Array per Schleife
while( $row = mysql_fetch_array($result) )
{
$line[] = $row;
}
// Strukturiertes Auslesen des Arrays und Variablenuebergabe
for( $i = 0; $i < count($line); $i++ )
{
$forum_id = $line[$i]['forum_id']; //Forums-ID
$forum_url = $root_path .'viewforum.php?f='. $forum_id; //Forums-Link
$topic_id = $line[$i]['topic_id']; //Themen-ID
$topic_url = $root_path .'viewtopic.php?t='. $topic_id; //Themen-Link
// Ausgabeformat der Beitragsueberschrift (Thema)
$topic_title = ( strlen($line[$i]['topic_title']) < $topic_length ) ? $line[$i]['topic_title'] : substr(stripslashes($line[$i]['topic_title']), 0, $topic_length) .'...';
// Themenklassifizierung
$topic_type = ( $line[$i]['topic_type'] == '2' ) ? 'Beitrag ': '';
$topic_type .= ( $line[$i]['topic_type'] == '3' ) ? 'Globaler Beitrag ': '';
$topic_type .= ( $line[$i]['topic_type'] == '1' ) ? 'Kritischer Beitrag ': '';
$topic_type .= ( $line[$i]['topic_vote'] ) ? 'Abstimmung ': '';
$views = $line[$i]['topic_views'];
$replies = $line[$i]['topic_replies'];
$first_time = date('d.m.Y', $line[$i]['topic_time']);
$first_author = ( $line[$i]['first_poster_id'] != '-1' ) ? '<a href="'. $root_path .'profile.php?mode=viewprofile&u='. $line[$i]['first_poster_id'] .'" target="_blank">'. $line[$i]['first_poster'] .'</a>' : ( ($line[$i]['first_poster_name'] != '' ) ? $line[$i]['first_poster_name'] : 'guest' );
$last_time = date('d.m.Y', $line[$i]['post_time']);
$last_author = ( $line[$i]['last_poster_id'] != '-1' ) ? $line[$i]['last_poster'] : ( ($line[$i]['last_poster_name'] != '' ) ? $line[$i]['last_poster_name'] : 'guest' );
$last_url = '<a href="'. $root_path .'viewtopic.php?p='. $line[$i]['topic_last_post_id'] .'#'. $line[$i]['topic_last_post_id'] .'" target="_blank">'. $last_author .'</a>';
// ############## Eigentliche Ausgabe der Beitraege #############
echo '<div>';
// Forumsname und Link, bei Bedarf loeschen
echo '<p><a href="'. $forum_url .'" target="_blank">'. $line[$i]['forum_name'] .'</a><br />';
// User, Bei Bedarf loeschen
echo $last_url.'<br />';
// Datum, Bei Bedarf loeschen
echo $last_time.'<br />';
// Thema und Link, Bei Bedarf loeschen
echo '<a href="'. $topic_url .'" target="_blank">'. $topic_title .'</font></a></p>
</div>';
// ############## Ende Eigentliche Ausgabe ##############
}
mysql_close(); // Beendigung der Datenbankverbindung
?>
und das hier hab ich in die overall_header.html eingebaut :
Code: Alles auswählen
</script>
<link href="{T_THEME_PATH}/web/style.css" rel="stylesheet" type="text/css" media="screen, projection" />
</head>
<body class="{S_CONTENT_DIRECTION}">
<div class="outside">
<div class="top-left"></div><div class="top-center"></div><div class="top-right"></div>
<div class="inside">
<div class="notopgap">
<a name="top"></a>
<div id="wrapheader">
<div id="logodesc">
<a class="logo" href="{U_INDEX}"><img src="{T_IMAGESET_PATH}/site-logo-{SITE_LOGO_RANDOM}.png" alt="Logo" title="Logo" /></span></a>
</div>
</div>
<script type="text/javascript">
<!--
var iH = "300";
var iB = "600";
document.write('<iframe '
+ 'allowtransparency="yes" '
+ 'height="' + iH + '" '
+ 'width="' + iB + '" '
+ 'frameborder=0 '
+ 'src="last_topics.php">'
+ '</iframe>');
//-->
</script>
<br />
<table class="tablebg" cellspacing="1" width="100%">
<tr>
<td class="row1" height="60px" width="73%">
Und das ist doch diese andere mögichkeit. Oder nicht ?
Funktionieren tut es aber immer noch nicht so wie ich es will (siehe edit in meinem letzten post).