ThWboard Support-Forum (Archiv)

Ort: / Boardübersicht / Code Hack Requests / Die letzten X Posts anzeigen


Seite 1 von 1

PhoenixDH schrieb am 13.04.2004 um 12:13 Uhr

Ich habe folgenden Code:

<?
include "inc/header.inc.php";

switch ($g_user['userlevel']) {
      case 0:
            //normaler User / Gast
            $query_str = "AND board.boarddisabled = 0";
            break;
      case 1:
            //Administrator / Operator
            $query_str = "";
            break;
       default:
            //normaler User / Gast
            $query_str = "AND board.boarddisabled = 0";
            break;
}

$i=0;
$a_active_threads = array();
$r_active_threads = thwb_query("
                        SELECT post.posttime, post.threadid, thread.threadtopic, board.boardname
                        FROM $pref"."post AS post, $pref"."thread AS thread, $pref"."board AS board
                        WHERE post.threadid = thread.threadid AND board.boardid = thread.boardid ".$query_str."
                        ORDER BY posttime DESC");
while( $active_threads = mysql_fetch_array($r_active_threads) )
{

       if (in_array ($active_threads['threadid'], $a_active_threads))
       {
             continue;
       }
       else
       {
             $a_active_threads [] = $active_threads['threadid'];
             $i++;
             if ($i < 5)
             {
                $ii='';
                $ii .=$i;
             }
             else
             {
                $ii=$i;
             }

             $active_threads_table      .= "<nobr><font face=\"Arial, Helvetica, sans-serif\" size=\"1\">$ii
                        . <a target=\"_top\" href=\"".$config[board_baseurl]."/showtopic.php?threadid=".$active_threads['threadid']."\">".$active_threads['threadtopic'].'</a>'
                                                .'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font size="1">'
                                                .form_date($active_threads['posttime'])
                                                .'</font></nobr><br></font>';
       }
       if ($i == "5") {break;}
}
echo "<b>Die $count letzten Forumsbeiträge</b><br>";
print $active_threads_table;
?>

Jetzt habe ich folgendes Problem, diese Datei liegt im Ordner Page/Forum, ich will sie aber in einer Datei im Verzeichnis Page mit Include einfügen, da bekomme ich aber die Meldung Forum noch nicht installiert, was läuft falsch ?

MrNase schrieb am 15.04.2004 um 10:29 Uhr

Lösche

if( !@include('./inc/config.inc.php') )
{
    print 'Das Forum ist noch nicht installiert! Klicken Sie <a href="./admin/install.php">hier</a>, um mit der Installation zu beginnen.';
    exit;
}

aus der header.inc.php :)

Seite 1 von 1