pragmaMx Support Forum

Archive => veraltete bzw. unsupportete Systeme und Module => Alt Archive => PHPNuke 5.2-6.0 & VKP 5.5 => Thema gestartet von: Wilfried am 30 Juli 2002, 16:09:33

Titel: Icons im Forum Block
Beitrag von: Wilfried am 30 Juli 2002, 16:09:33
Habe Nuke 5.4 installiert und das Forum.
Wenn ich den Forum Block aktiviere, werden nur Icons angezeigt, wenn man beim Posting ein Icon ausgewählt hat ansonsten keine.
Es muss doch eine Lösung geben?
Danke
Titel: Re: Icons im Forum Block
Beitrag von: Wilfried am 30 Juli 2002, 16:15:52
...... ich meine natürlich die Smilies.
Titel: Re: Icons im Forum Block
Beitrag von: DarkBoy am 30 Juli 2002, 16:30:26
Hm
 welches  Forum nutzt du denn ?

aber  diese  abfrage  könnte dir helfen
Zitatif ($icon == ""){
$icon="hot_red_folder.gif";
    }

sit aber nur ein Besipiel, dann wird  immer  das  hotrod bild gesetzt  wenn keins  vorhanden .
Titel: Re: Icons im Forum Block
Beitrag von: Wilfried am 30 Juli 2002, 16:34:36
.. reicht mir völlig.
In welche Datei einfügen?

Danke, alles Gute.
Titel: Re: Icons im Forum Block
Beitrag von: DarkBoy am 30 Juli 2002, 16:36:17
na wenn das Problem im Block ist in die  Blockdatei :)

musste mal schauen,  da ich  nicht weiss welches Forum  du nutzt
Titel: Re: Icons im Forum Block
Beitrag von: Wilfried am 30 Juli 2002, 16:41:54
übrigends nutze ich das Forum:
 PHPBB Forum Addon 1.4.0
Titel: Re: Icons im Forum Block
Beitrag von: Wilfried am 30 Juli 2002, 16:49:25
So sieht der Block aus:

if (eregi("block-Forums.php", $PHP_SELF)) {
    Header("Location: index.php");
    die();
}

global $prefix, $dbi, $sitename;

$result = sql_query("SELECT topic_id, topic_title, forum_id FROM $prefix"._bbtopics." ORDER BY topic_time DESC LIMIT 10", $dbi);
$content = "<br>";
while(list($topic_id, $topic_title, $forum_id) = sql_fetch_row($result, $dbi)) {
    $res = sql_query("select image from $prefix"._posts." where post_id='$topic_id'", $dbi);
    list ($image) = sql_fetch_row($res, $dbi);
    $content .= "<img src=\"images/forum/subject/$image\" border=\"0\" alt=\"\" width=\"15\" height=\"15\"> <a href=\"modules.php?mop=modload&name=Forum&file=viewtopic&topic=$topic_id&forum=$forum_id\">$topic_title</a><br>";
}
$content .= "<br><center>[ <a href=\"modules.php?name=Forum\">$sitename "._BBFORUMS."</a> ]</center>";

?>

[Editiert am 30/7/2002 von Wilfried]
Titel: Re: Icons im Forum Block
Beitrag von: DarkBoy am 30 Juli 2002, 16:58:58
Na dann versuche ich da mal so  auf die schnelle aber ich habe kein  phpBB zum testen.
 
Zitat$result = sql_query("SELECT topic_id, topic_title, forum_id FROM $prefix"._bbtopics." ORDER BY topic_time DESC LIMIT 10", $dbi);
$content = "<br>";
while(list($topic_id, $topic_title, $forum_id) = sql_fetch_row($result, $dbi)) {
$res = sql_query("select image from $prefix"._posts." where post_id='$topic_id'", $dbi);
if ($image == ""){
$image="IRGENDEINBILDNAME.gif";
    }
list ($image) = sql_fetch_row($res, $dbi);
$content .= "<img src=\"images/forum/subject/$image\" border=\"0\" alt=\"\" width=\"15\" height=\"15\"> <a href=\"modules.php?mop=modload&name=Forum&file=viewtopic&topic=$top ic_id&forum=$forum_id\">$topic_title</a><br>";

 aber nicht schimpfen wenn dieses schnelle provisorische nicht geht, aber da kannste ansetzen :)
Titel: Re: Icons im Forum Block
Beitrag von: Wilfried am 30 Juli 2002, 17:02:57
... alles klar, hab es hingekriegt.

Danke Dir nochmals.
Titel: Re: Icons im Forum Block
Beitrag von: DarkBoy am 30 Juli 2002, 17:03:47
Also ist der Vorschlag oben richtig oder hasste andere Lösung?
Titel: Re: Icons im Forum Block
Beitrag von: Wilfried am 30 Juli 2002, 18:16:03
Ich habe folgendes vor die Zeile $content.... eingefügt:


if ($icon == ""){$icon="hot_red_folder.gif";}

geändert habe ich:  icon in  image.

Das .gif konnte ich dann auswählen.

Danke nochmals
Wilfried