Crazy: Schriftgröße in PHP Datei..

Hi Leutz.

Bräüchte mal Hilfe Betreff eines ForenTickers.

Folgendes Problem:

Möchte auf meiner HO diesen Foreticker Einbauen: [URL=http://mpaforum.gamesagent.org/wbboard/lastp.php]http://mpaforum.gamesagent.org/wbboard/lastp.php[/URL]

Nur ist er bzw. die schrift noch zu groß. Da er so auf meiner [URL=http://maxpayne.gamesagent.net/]Seite[/URL]  nicht in das Menü passt. Die Schrift im Ticker müßte also genau so groß sein wie auf der Seite dann würde es perfekt funktionieren.

Hier mal der HTML-Code der last.php:

<?

/* ----------------------------------- Konfiguration ----------------------------------- */

/* ### URL zum Board Hauptverzeichniss ohne abschliessenden "/" ### */

$boardurl = "http://mpaforum.gamesagent.org/wbboard";

/* ### Gastbezeichnung ### */

$Gast = "Gast";

/* ### Tabellenbreite ### */

$LBtablewitdh = "1%";

/* ### Tabellenkonfiguration ### */

$stdcolor1 = "#EFEFEF"; /* Tabellenfarbe erste Spalte */

$stdcolor2 = "#EFEFEF"; /* Tabellenfarbe zweite Spalte */

$stdcolor3 = "#738bb2"; /* Tabellenfarbe Kopfzeile */

$stdcolor4 = "#EFEFEF"; /* Hintergrund */

$tablefontcolor1 = "#FFFFFF"; /* Schriftfarbe  Kopfzeile */

$tablefontcolor4 = "#333333"; /* Schriftfarbe allgemein */

$tablerahmencolor1 = "#000000"; /*Farbe für den Tabellenrahmen aussen */

$tablerahmencolor2 = "#EFEFEF"; /*Farbe für den Tabellenrahmen innen */

$LBFontFace = "Verdana"; /*Font Face */

/* ### Titelanzeige ### */

$LBTitelView = "Forenticker";

/* ################ Wieviel Letzte Beiträge sollen angezeigt werden ################ */

$anzlastthread = "5";

/* ################ BoardID`s die ausgelassen werden sollen  ################ */

/* ################ (bsp. $boardno = array("0", "6", "11"); die Foren mit den ID`s 6 und 11 werden ausgelassen ################ */

$boardno = array("0");

/* ################ Was soll angezeigt werden?? 1=Wird angezeigt 0= Wird nicht angezeigt ################ */

$anztop = "0"; /* Tabellenkopf */

$anz1 = "0"; /* Nr. */

$anz2 = "0"; /* Postingicon */

$anz3 = "1"; /* Thema */

$anz4 = "0"; /* Erstellt von */

$anz5 = "0"; /* Views */

$anz6 = "0"; /* Anz. Antworten */

$anz7 = "0"; /* Letzte Antwort */

/* ----------------------------------- Konfiguration ende------------------------------- */

require ("_data.inc.php");

require("lthp_functions.php");

$anzlastthread++;

mysql_connect(+++++);

mysql_select_db(########);

$res = mysql_query("SELECT * FROM bb1_threads WHERE boardparentid ORDER BY threadid DESC");

echo "<table cellpadding=4 cellspacing=1 border=0 width="$LBtablewitdh" bgcolor="$tablerahmencolor1">

<tr bgcolor="$stdcolor3" id="title">

<td><font size=1px face="$LBFontFace" color="$tablefontcolor1"> $LBTitelView</font></td>

</tr>

<tr bgcolor="$stdcolor4" id="tablec">

<td><font size=1px face="$LBFontFace">

<table border=0 cellpadding=0 cellspacing=0 width="5%"><TR><td bgcolor="$tablerahmencolor2">

<table cellpadding=1 cellspacing=1 border=0 width="5%">";

if ($anztop == "1"){

echo "<tr>";

if ($anz1 == "1"){

echo "<td bgcolor="$stdcolor3" width="2%" align=center><font size=1pt face="$LBFontFace" color="$tablefontcolor1"><b>Nr.</b></td>";

}

if ($anz2 == "1"){

echo "<td bgcolor="$stdcolor3" width="2%" align=center><font size=1px face="$LBFontFace" color="$tablefontcolor1"></td>";

}

if ($anz3 == "1"){

echo "<td bgcolor="$stdcolor3" width="15%"><font size=3pt face="$LBFontFace" color="$tablefontcolor1"><b>Topic</b></td>";

}

if ($anz4 == "1"){

echo "<td bgcolor="$stdcolor3"><font size=1pt face="$LBFontFace" color="$tablefontcolor1"><b>Erstellt von</b></td>";

}

if ($anz5 == "1"){

echo "<td bgcolor="$stdcolor3"><font size=1pt face="$LBFontFace" color="$tablefontcolor1"><b>Views</b></td>";

}

if ($anz6 == "1"){

echo "<td bgcolor="$stdcolor3"><font size=1pt face="$LBFontFace" color="$tablefontcolor1"><b>Antworten</b></td>";

}

if ($anz7 == "1"){

echo "<td bgcolor="$stdcolor3"><font size=1pt face="$LBFontFace" color="$tablefontcolor1"><b>Letzte Antwort</b></td>";

}

echo "</tr>";

}

$i = 1;

while($thread=mysql_fetch_array($res) AND $i < $anzlastthread) {

$useit = "1";

for ($z = 0; $z < count($boardno); $z++) {

if ($boardno[$z] == $thread[boardparentid]) {

$useit = "0";

}

}

if ($useit == "1") {

if (!$thread[topicicon])

$ViewPosticon = "<img src="$boardurl/images/icons/noicon.gif">";

else $ViewPosticon = "<img src="$boardurl/$thread[topicicon]">";

$newslastuseridqu = mysql_query("SELECT * FROM bb1_posts WHERE threadparentid = $thread[threadid] ORDER BY postid DESC");

$newslastuserid = mysql_fetch_array($newslastuseridqu);

if ($thread[replies]== "0") {

$newslastuser = "";

$newslastuserlink = "";

$newslastuserlinkend = "";

$newslastpost = "";

}

elseif ($newslastuserid[userid] == "0") {

$newslastuser = "<b>$Gast</b>";

$newslastuserlink = "";

$newslastuserlinkend = "";

$newslastpost = "<a href="$boardurl/action.php?action=getlastboard&threadid=$thread[threadid]$session"><img src="$boardurl/images/lastpost.gif" border=0 alt="zum letzten Beitrag gehen"></a>";

}

else {

$lastuserqu = mysql_query("SELECT * FROM bb1_user_table WHERE userid = $newslastuserid[userid]");

$lastuserarr = mysql_fetch_array($lastuserqu);

$newslastpost = "<a href="$boardurl/action.php?action=getlastboard&threadid=$thread[threadid]$session"><img src="$boardurl/images/lastpost.gif" border=0 alt="zum letzten Beitrag gehen"></a>";

$newslastuser = "<b>$lastuserarr[username]</b>";

$newslastuserlink = "<a href="$boardurl/members.php?mode=profile&userid=$newslastuserid[userid]">";

$newslastuserlinkend = "</a>";

}

if ($thread[authorid] == "0") {

$firstuser = "<b>$Gast</b>";

$firstuserlink = "";

$firstuserlinkend = "";

}

else{

$firstuserqu = mysql_query("SELECT * FROM bb1_user_table WHERE userid = $thread[authorid]");

$firstuserarr = mysql_fetch_array($firstuserqu);

$firstuser = "<b>$firstuserarr[username]</b>";

$firstuserlink = "<a href="$boardurl/members.php?mode=profile&userid=$thread[authorid]">";

$firstuserlinkend = "</a>";

}

$longdateformat = "DD.MM.YYYY, HH:II";

$firstdatum  =  $thread['starttime'];

$firstdatum = formatdate($firstdatum,$longdateformat,1);

$prfirstd ="<br><font size=1>$firstdatum</font>";

if ($thread[replies]== "0") {

$prlastd ="";

}

else{

$lastdatum  =  $thread['timelastreply'];

$lastdatum = formatdate($lastdatum,$longdateformat,1);

$prlastd ="<br><font size=1>$lastdatum</font>";

}

echo "<tr>";

if ($anz1 == "1"){

echo "<td bgcolor=$stdcolor1 width="5%" align=center><font size=1pt color="$tablefontcolor4">",$i,"</font></td>";

}

if ($anz2 == "1"){

echo "<td bgcolor=$stdcolor2 width="5%" align=center><font size=1pt color="$tablefontcolor4">$ViewPosticon</font></td>";

}

if ($anz3 == "1"){

echo "<td bgcolor=$stdcolor1 width="2%"><font size=1px color="$tablefontcolor4"><a href=$boardurl/thread.php?threadid=",$thread['threadid'],"&boardid=",$thread['boardparentid'],">",$thread['threadname'],"</a></font></td>";

}

if ($anz4 == "1"){

echo "<td bgcolor=$stdcolor2 align=left width="5%" nowrap><font size=1 color="$tablefontcolor4">$firstuserlink$firstuser$firstuserlinkend$prfirstd</font></td>";

}

if ($anz5 == "1"){

echo "<td bgcolor=$stdcolor1 align=center width="5%"><font size=1 color="$tablefontcolor4">",$thread['views'],"</font></td>";

}

if ($anz6 == "1"){

echo "<td bgcolor=$stdcolor2 align=center width="5%"><font size=1 color="$tablefontcolor4">",$thread['replies'],"</font></td>";

}

if ($anz7 == "1"){

echo "<td bgcolor=$stdcolor1 align=left width="5%" nowrap><table><tr><td>$newslastpost</td><td nowrap><font size=1 color="$tablefontcolor4">$newslastuserlink$newslastuser$newslastuserlinkend$prlastd</font></td></tr></table></td>";

}

echo "</tr>";

$i++;

}

}

echo "</table>

</td></tr></table>

</td></tr></table>

<br>";

mysql_close;

?>

Was müßte Ich wo ändern, das die Schriftgröße im Ticker mit der der Seite Identisch ist? Vielleicht könnte mal jemand den richtigen Code posten.

Danke schon mal.

  1. Hi,

    [URL=http://mpaforum.gamesagent.org/wbboard/lastp.php]http://mpaforum.gamesagent.org/wbboard/lastp.php[/URL]

    </faq/#Q-19>

    Hier mal der HTML-Code der last.php:

    Und mit welchem Recht postest Du den _gesamten_ Scheiß-Code? Entschuldige den Ausbruch, aber manchmal frage ich mich, ob Leute beim Anblick von HTML oder Programmcode das Denken einstellen.

    Was müßte Ich wo ändern, das die Schriftgröße im Ticker mit der der Seite Identisch ist?

    Den Code. Finde heraus, wo die Schriftgröße gesetzt wird; vergleiche mit der Methodik, die Du bisher anwendest; gleiche an.

    Vielleicht könnte mal jemand den richtigen Code posten.

    Dieses Projekt heißt SelfHTML, nicht GetHTML. Beschreibe Dein Problem (i.e.: beschreibe, warum Du es nicht selbst schaffst), dann wird Dir geholfen, dies zu lösen, um _selbst_ das gewünschte Ergebnis zu erzielen.

    Cheatah

    1. Guten Abend,

      Den Code. Finde heraus, wo die Schriftgröße gesetzt wird; vergleiche mit der Methodik, die Du bisher anwendest; gleiche an.

      Eine kleine hämische Anmerkung, die die Lösung bei richtigem Lesen enthält. ;) (Ich stimme dem Affen *SCNR* übrigens vollkommen zu, zumal Schriftgrössen mit PHP exakt nichts zu tun haben.)

      1. HTML (und auch PHP) sind englisch-sprachige Programmier- bzw. Beschreibungssprachen.
      2. Schriftgrösse heisst auf englisch font size
      3. Besagtes font size im Quelltext suchen.
      4. px dürfte die Abkürzung für Pixel sein, pt entsprechend für Punkt
      5. et voìla, da sind die Stellen.
      6. Sowohl PHP als auch HTML-Code sind in diesem Script an so einigen Stellen so dermassen falsch und grausam, dass meine eh schon zu kurzen Haare kerzengrade stehen.

      Gute Nacht, Thoralf, dessen Wecker in 3h geht und der SelfForum deswegen scheisse findet! ;)