ilch Forum » Ilch Clan 1.1 » Fehlersuche und Probleme » DreamStats in 1.0.5 E einbinden

Geschlossen
  1. #1
    User Pic
    W3hrWolf Mitglied
    Registriert seit
    02.04.2005
    Beiträge
    58
    Beitragswertungen
    0 Beitragspunkte
    Hi @ All und frohe Weihnachten euch allen !!

    Ich hab ein nerviges Problem :

    Ich hab auf unserem WebSpace die DreamStats installiert (funzen auch soweit) . Jetzt ist die Frage wie ins Ilch Script integrieren so das die Stats in der Mitte angezeigt werden . Ich hab schon folgendes probiert :

    - Per Menülink per intern_self (öffnet eine neue Seite)
    - Per iFrame mit dem Code (hab ich hier gefunden,öffnet auch eine neue Seite)
    - Per nachladen über HTML Code
    <meta http-equiv="refresh" content="0; URL=http://www.webmaster-resource.de">

    Nichts von dem klappt und es wird immer wieder eine neue Seite geöffnet . Jetzt hab ich über die Suche hier im Forum schon einige Threads gelesen und rumprobiert . Das hat mir leider nicht geholfen bzw. hat nicht funktioniert .

    Könnte mir einer von euch bitte mal helfen das ich das hinbekomm ? Möglichst Schritt für Schritt .

    Danke im Vorraus für eure Hilfe .




    Zuletzt geändert von W3hrWolf am 26.12.2005 - 11:01



    Zuletzt geändert von W3hrWolf am 26.12.2005 - 11:11



    Zuletzt geändert von W3hrWolf am 26.12.2005 - 11:11



    Zuletzt geändert von W3hrWolf am 26.12.2005 - 11:12
    0 Mitglieder finden den Beitrag gut.
  2. #2
    User Pic
    Panicsheep Hall Of Fame
    Registriert seit
    24.08.2004
    Beiträge
    10.192
    Beitragswertungen
    16 Beitragspunkte
    Generell kann man auf diese beiden Arten Seiten einbinden.
    Man muss nur unterumständen in der Datei, die man "includet" ein paar änderungen vornehmen. also z.B. die Pfade zu anderen Dateien oder Bildern müssen ab der index.php des Clanscripts ausgehen.


    FAQ Artikel: [URL=index.php?faqs-s58#FAQ58]HTML-Seiten im Contentbereich anzeigen[/url]
    Viele haben selbsterstellte HTML-Seiten die sie auch nach der Umstellung auf das Ilchscript gerne einbinden möchten.
    Dazu gibt es zwei Möglichkeiten

    1. Datei in selfp_dateiname.htm umbenennen und in den Ordner include hochladen

    2. Folgenden Code verwenden und die datei als datei.php in den ordner include hochladen
    <?php
    defined ('main') or die ( 'no direct access' );
    
    $title = $allgAr['title'].' :: Seitenname';
    $hmenu = 'Seitenname';
    $design = new design ( $title , $hmenu );
    $design->header();
    echo 'hier dein HTML oder einfach nur text';
    $design->footer();
    ?>

    Omnia bona erunt
    0 Mitglieder finden den Beitrag gut.
  3. #3
    User Pic
    W3hrWolf Mitglied
    Registriert seit
    02.04.2005
    Beiträge
    58
    Beitragswertungen
    0 Beitragspunkte
    Danke für deine schnelle Hilfe !!

    Also ich hab mal eine Datei.php erstellt und den Code da eingefügt , mit dem Link für die Stats Page . Jetzt öffnet er wieder eine neue Seite mit den Stats .

    Mit den anpassungen in der index.php der Stats ist das so ne Sache , was muss ich denn da ändern ?

    hab hier mal den Code der index.php (Stats) :

    <?php
    // +---------------------------------------------+
    // |     Copyright © 2004 - 2005 mnProjects      |
    // |     http://www.mnprojects.com               |
    // |     DreamStats System by Miguel Nunes       |
    // +---------------------------------------------+
    
    error_reporting(E_ALL ^ E_NOTICE);
    
    //   D r e a m S t a t s
    //
    //   For Call of Duty 2 version 1.0
    
    define('in_main', true);
    define('in_dreamstats', true);
    
    if (!isset($_GET['server'])) {
    
    ################################### Includes ###################################
    
    @include($rootpath . 'includes/ip_vers.php');
    @include($rootpath . 'includes/core.php');
    
    
    
    
    ################################# Get ServerIP #################################
    
    $server_ip = $row_svip['serverip'];
    $server_port = $row_svip['serverport'];
    
    
    
    ############################# Connect to CoD Server ############################
    
    $server_ip = "udp://" . $server_ip;
    
    @$connect = fsockopen($server_ip, $server_port, $re, $errstr, 30);
    
    if ($connect) {
    socket_set_timeout ($connect, 1, 000000);
    $send = "ÿÿÿÿ" . chr (0x02) . "getstatus";
    fputs($connect, $send);
    fwrite ($connect, $send);
    $output = fread ($connect, 1);
    if (! empty ($output)) {
    do {
    $status_pre = socket_get_status ($connect);
    $output = $output . fread ($connect, 1);
    $status_post = socket_get_status ($connect);
    } while ($status_pre['unread_bytes'] != $status_post['unread_bytes']);
    };
    
    fclose($connect);
    
    $output = explode ("", $output);
    
    
    
    
    ################################ Get Server Info ###############################
    
    $max_index = array_search ("gamename", $output);
    $gamename = $output[$max_index+1];
    
    $max_index = array_search ("mapname", $output);
    $mapname = $output[$max_index+1];
    
    $max_index = array_search ("sv_hostname", $output);
    $hostname = $output[$max_index+1];
    
    $max_index = array_search ("g_gametype", $output);
    $gametype = $output[$max_index+1];
    
    $max_index = array_search ("g_gametype", $output);
    $gametypenofix = $output[$max_index+1];
    
    $max_index = array_search ("sv_pure", $output);
    $pure = $output[$max_index+1];
    
    $max_index = array_search ("sv_pure", $output);
    $pureun = $output[$max_index+1];
    
    $max_index = array_search ("sv_minPing", $output);
    $minping = $output[$max_index+1];
    
    $max_index = array_search ("sv_maxPing", $output);
    $maxping = $output[$max_index+1];
    
    $max_index = array_search ("sv_maxRate", $output);
    $maxrate = $output[$max_index+1];
    
    $max_index = array_search ("sv_maxRate", $output);
    $maxrateun = $output[$max_index+1];
    
    $max_index = array_search ("pswrd", $output);
    $password = $output[$max_index+1];
    
    $max_index = array_search ("shortversion", $output);
    $version = $output[$max_index+1];
    
    $max_index = array_search ("scr_friendlyfire", $output);
    $ff = $output[$max_index+1];
    
    $max_index = array_search ("sv_maxclients", $output);
    $slots = $output[$max_index+1];
    
    $max_index = array_search ("sv_privateClients", $output);
    $pvtcl = $output[$max_index+1];
    
    $max_index = array_search ("protocol", $output);
    $protocol = $output[$max_index+1];
    
    $max_index = array_search ("sv_allowAnonymous", $output);
    $alanyo = $output[$max_index+1];
    
    $max_index = array_search ("sv_floodProtect", $output);
    $floodp = $output[$max_index+1];
    
    $max_index = array_search ("sv_privateClients", $output);
    $pvtcl = $output[$max_index+1];
    
    $max_index = array_search ("scr_killcam", $output);
    $killcam = $output[$max_index+1];
    
    //New on Call of Duty 2
    
    $max_index = array_search ("g_antilag", $output);
    $antilag = $output[$max_index+1];
    
    $max_index = array_search ("sv_voice", $output);
    $voice = $output[$max_index+1];
    
    
    
    ##################### Display slots without private slots ######################
    
    $slots = $slots - $pvtcl;
    
    
    
    
    ############################# Recognize Gametypes ##############################
    
    
    if ($gametype == "dm") {
    $gametype = "Deathmatch";
    }
    if ($gametype == "sd") {
    $gametype = "Search and Destroy";
    }
    if ($gametype == "tdm") {
    $gametype = "Team Deathmatch";
    }
    if ($gametype == "hq") {
    $gametype = "Headquarters";
    }
    if ($gametype == "ctf") {
    $gametype = "Capture The Flag";
    }
    
    
    ############################ Language Construction #############################
    
    if ($killcam == "0") {
    $killcam = " $ffoff";
    }
    if ($killcam == "1") {
    $killcam = " $ffon";
    }
    
    if ($pure == "0") {
    $pure = " $pureservernot ";
    }
    if ($pure == "1") {
    $pure = " $pureserveris ";
    }
    
    if ($antilag == "0") {
    $antilag = " " . $antilagoff;
    }
    if ($antilag == "1") {
    $antilag = " " . $antilagon;
    }
    
    if ($voice == "0") {
    $voice = " " . $voice_off;
    }
    if ($voice == "1") {
    $voice = " " . $voice_on;
    }
    
    if ($password == "0") {
    $password = " $serverhasnopw";
    }
    if ($password == "1") {
    $password = " $serverhasypw ";
    }
    
    if ($ff == "0") {
    $ff = "$ffset $ffoff";
    }
    if ($ff == "1") {
    $ff = "$ffon";
    }
    if ($ff == "2") {
    $ff = "$ffset $ffrf";
    }
    
    if ($maxrate == "0") {
    $maxrate = "$maxrateunl";
    }
    
    if ($killcam == "0") {
    $killcam = $kkoff;
    }
    
    if ($killcam == "1") {
    $killcam = $kkon;
    }
    
    
    
    ############################### Find All Players ###############################
    
    $last_value = count($output) - 1;
    $players_string = $output[$last_value];
    $players_string = explode("n", $players_string);
    $i = 1;
    while ($i != count($players_string)) {
    $split = explode(" ", $players_string[$i], 3);
    
    
    $playerlist[$i-1]['score'] = $split[0];
    @$playerlist[$i-1]['ping'] = $split[1];
    @$playerlist[$i-1]['player'] = $split[2];
    
    
    $i++;
    }
    
    
    ############################## Create Nick Colors ##############################
    
    function colored($color) {
    $color = str_replace("^0", "<font color="#000000">", $color);       //Same Color
    $color = str_replace("^1", "<font color="#ff0000">", $color);       //Same Color
    $color = str_replace("^2", "<font color="#007800">", $color);       //Same Color
    $color = str_replace("^3", "<font color="#ffff00">", $color);       //Same Color
    $color = str_replace("^4", "<font color="#0000ff">", $color);
    $color = str_replace("^5", "<font color="#00ffff">", $color);
    $color = str_replace("^6", "<font color="#ff00ff">", $color);
    $color = str_replace("^7", "<font color="#FFFFFF">", $color);
    $color = str_replace("^8", "<font color="#9facff">", $color);
    $color = str_replace("^9", "<font color="#c0c0c0">", $color);
    return $color . "</font>";
    }
    
    
    
    ############################## Create Player List ##############################
    
    function cmp ($a, $b) {
    if ($a["score"] > $b["score"]) {
    return -1;
    }
    
    
    if ($a["score"] < $b["score"]) {
    return 1;
    }
    
    
    if ($a["score"] == $b["score"]) {
    return 0;
     }
    }
    
    
    
    @usort($playerlist, "cmp");
    $players = count($playerlist) -1;
    
    
    
    ########################### Create Current Map Image ###########################
    
    if (substr($mapname, 0, 3) == "dm/") {
    
    $picture_src = str_replace("dm/", "", $mapname);
    
    } else {
    
    $picture_src = str_replace("obj/", "", $mapname);
    }
    
    $picture_src = "images/mapimages/" . $picture_src . "." . $row_frontpage['mapimages'];
    }
    
    if (!file_exists($picture_src))
    {
     $picture_src = "images/unknowmap.jpg";
    }
    
    
    
    ############################ Display SVOffline page ############################
    
    if (!$slots) {
    include($rootpath . 'html/serveroffline.php');
    exit;
    }
    
    
    
    
    ####################### This is for Call of Duty 2 only! #######################
    
    if ($gamename == "Call of Duty") {
               exit("Call of Duty (1) is not supported in this version of DreamStats. <a href='http://www.mnprojects.com/dreamstats/index.php?act_dspage=4'>Click here to download CoD(1)/CoDUO 3.0 version...</a>");
    }
    
    if ($gamename == "CoD:United Offensive") {
               exit("Call of Duty United Offensive is not supported in this version of DreamStats. <a href='http://www.mnprojects.com/dreamstats/index.php?act_dspage=4'>Click here to download CoD(1)/CoDUO 3.0 version...</a>");
    }
    
    if ($gamename == "etpro") {
               exit("Wolfenstein Enemy Territory is not supported in DreamStats ".$version."");
    }
    
    if ($gamename == "etmain") {
               exit("Wolfenstein Enemy Territory is not supported in DreamStats ".$version."");
    }
    
    if ($gamename == "tcetest") {
               exit("Wolfenstein Enemy Territory: True Combat Elite is not supported in DreamStats ".$version."");
    }
    
    
    
    
    ################################# Display Skin #################################
    
    include('./skins/' . $row_lskin['skin'] . '/design.php');
    
    //And there you go... DreamStats showing the server statistics.
    }
    
    // DreamStats System by Miguel Nunes
    // www.mnprojects.com
    ?>


    Die Seiten liegen wie folgt :

    /html/Homepage/index.php ist das Ilch Script
    /html/ServerStats/PublicServer/index.php ist das Stats-Script

    Könntest du mir mal ein Beispiel aus dem Code geben was ich wo äbdern muss , dann mach ich mir das fertig .

    Danke nochmals !

    // EDIT //

    Hab grad mal rumprobiert , gehn grundsätzlich keine Seiten mehr einzubinden die nicht im Script liegen ?


    Zuletzt geändert von W3hrWolf am 26.12.2005 - 12:37

    // EDIT 2 //

    Habs raus :

    Per iFrame Code

    Eine selfp erstellen mit einem Editor mit folgendem Inhalt :

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
           "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>Eingebettete Frames definieren</title>
    </head>
    <body>
    
    <h1>Fenstergucker</h1>
    
    <p>Gucken Sie mal SELFHTML im Fenster an:</p>
    
    <iframe src="../../../index.htm" width="90%" height="400" name="SELFHTML_in_a_box">
      <p>Ihr Browser kann leider keine eingebetteten Frames anzeigen:
      Sie k&ouml;nnen die eingebettete Seite &uuml;ber den folgenden Verweis
      aufrufen: <a href="../../../index.htm">SELFHTML</a></p>
    </iframe>
    
    </body>
    </html>


    Einfach nach euren Wünschen anpassen und fertig . Bei mir klappt es astrein . Evtl. könntet ihr das mal in die FAQ´s aufnehmen .


    Zuletzt geändert von W3hrWolf am 26.12.2005 - 13:12
    0 Mitglieder finden den Beitrag gut.
Geschlossen

Zurück zu Fehlersuche und Probleme

Optionen: Bei einer Antwort zu diesem Thema eine eMail erhalten