New Artikel, Downloads, Links Code in theme einfügen!!

Begonnen von Sascha1981, 27 April 2003, 14:48:44

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

Sascha1981

Hey @ll!!!

Ich hab da so ein theme am laufen das normal für nuke 5.5 ist!!
Jetzt würde ich gerne in das theme im header bereich denn Code einfügen das mir angezeigt wird ob neue News, Downloads, Links etc. vorhanden sind!!
  /************************************************************/
/* Function themeheader()                                   */
/************************************************************/

function themeheader() {
    global $dbi, $anonymous, $tableset, $startdate, $user, $banners, $sitename, $slogan, $cookie, $prefix, $thewidth, $thename, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $bgcolor5, $textcolor1, $textcolor2;
    cookiedecode($user);
    $username = $cookie[1];
    if ($username == "") {
        $username = $anonymous;
    }
    echo "<body bgcolor=\"$bgcolor1\" background=\"themes/$thename/images/background.gif\" text=\"$textcolor1\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">\n";

if ($tableset == "3") {
    echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"$thewidth\" border=\"0\" align=\"center\" bgcolor=\"$bgcolor1\">\n"
        ."<tr>\n<td><img src=\"themes/$thename/images/barhead3.gif\" height=\"12\" width=\"1230\"></td>\n</tr>\n"
        #."<tr>\n<td><img src=\"themes/$thename/images/header3.jpg\" alt=\""._WELCOMETO." $sitename\" border=\"0\" height=\"68\" width=\"1230\"></td>\n</tr>\n"
        ."</table>\n";
} else if ($tableset == "2") {
    echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"$thewidth\" border=\"0\" align=\"center\" bgcolor=\"$bgcolor1\">\n"
        ."<tr>\n<td><img src=\"themes/$thename/images/barhead2.gif\" height=\"12\" width=\"980\"></td>\n</tr>\n"
        #."<tr>\n<td><img src=\"themes/$thename/images/header2.jpg\" alt=\""._WELCOMETO." $sitename\" border=\"0\" height=\"68\" width=\"980\"></td>\n</tr>\n"
        ."</table>\n";
} else {
    echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"$thewidth\" border=\"0\" align=\"center\">\n"
        ."<tr>\n<td><img src=\"themes/$thename/images/barhead1.gif\" height=\"12\" width=\"760\"></td>\n</tr>\n"
        #."<tr>\n<td><img src=\"themes/$thename/images/header1.jpg\" alt=\""._WELCOMETO." $sitename\" border=\"0\" height=\"68\" width=\"760\"></td>\n</tr>\n"
        ."</table>\n";
}

    echo "<table cellpadding=\"0\" cellspacing=\"0\" width=\"$thewidth\" border=\"0\" align=\"center\" bgcolor=\"#fefefe\">\n"
        ."<tr>\n<td bgcolor=\"$textcolor1\" colspan=\"3\"><IMG src=\"themes/$thename/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td>\n</tr>\n"
        ."<tr bgcolor=\"$bgcolor1\">\n<td align=\"left\" width=\"33%\"><font size=\"2\" color=\"#363636\">\n";
    if ($username == $anonymous) {
        echo " <a href=\"modules.php?name=Your_Account&op=new_user\">"._NEWUSER."</a></b> / <b><a href=\"modules.php?name=Your_Account\">"._USERLOGIN."</a>\n";
    } else {
        echo " "._TWELCOME." $username: <a href=\"modules.php?name=Your_Account\">"._TACCOUNT."</a> | <a href=\"modules.php?name=Your_Account?op=logout\">"._LOGOUT."</a>";
    }
    echo "</font></td>\n"
        ." <td align=\"center\" width=\"34%\"><font size=\"2\" color=\"#363636\">\n";
    $result = sql_query("select type, var, count from $prefix"._counter." order by type desc", $dbi);
    while(list($type, $var, $count) = sql_fetch_row($result, $dbi)) {
        if(($type == "total") && ($var == "hits")) {
            $total = $count;
            echo  ""._WERECEIVED." $total "._PAGESVIEWS." $startdate\n";
        }
    }
    echo "</font></td>\n"
        ."<td align=\"right\" width=\"33%\"><font size=\"2\">\n";
        $numrows = sql_num_rows(sql_query("select uid from $prefix"._users."", $dbi), $dbi);
    echo ""._WEHAVE." $numrows "._REGSOFAR." </font>\n</td>\n</tr>\n"
        ."<tr>\n<td bgcolor=\"$textcolor1\" colspan=\"3\"><IMG src=\"themes/$thename/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\"></td>\n"
        ."</tr>\n</table>\n"
        ."<table width=\"$thewidth\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
        ."<td><img src=\"themes/$thename/images/pixel.gif\" width=\"1\" height=\"5\" border=\"0\" alt=\"\"></td></tr></table>\n"
        ."<table width=\"$thewidth\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" align=\"center\"><tr valign=\"top\">\n"
        ."<td width=\"160\" valign=\"top\">\n";
    blocks(left);
    echo "</td><td><img src=\"themes/$thename/images/pixel.gif\" width=\"5\" height=\"1\" border=\"0\" alt=\"\"></td><td width=\"100%\" bgcolor=\"$bgcolor1\">\n";
    if ($banners) {
        OpenTable2();
        echo "<center>";
        include("banners.php");
        echo "</center>";
        CloseTable2();
        echo "<br>";
    }
}

Wo muß ich denn ganzen Code da jetzt einfügen???
Vielleicht kann mir jemand weiter helfen!!
Hab es selber schon versucht aber ich kome damit nicht ganz klar!!