Hallo,
ich bitte um einen Hilfestoß.
Ich habe den Block Last 5 Artikels genommen und habe es zu
einem Modul gemacht, habe 1 zu 1 bis auf halt die üblichen
Angaben für Modul anstatt Block.
Leider will mir das nicht funktionieren?
Habe ich etwas vergessen ( datenbankabfragen ) ?
Hier ist der Quelltext von der index.php des Moduls:
<?php
if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
include("header.php");
$index = 0;
global $prefix, $multilingual, $currentlang, $dbi;
if ($multilingual == 1) {
$querylang = "WHERE (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}
#$content = "<table width=\"100%\" border=\"0\">";
$result = sql_query("select sid, title, comments, counter from ".$prefix."_stories $querylang order by sid DESC limit 0,5", $dbi);
while(list($sid, $title, $comtotal, $counter,$id) = sql_fetch_row($result, $dbi)) {
$content .= "<strong><big>·</big></strong> <a href=\"modules.php?name=News&file=article&sid=$sid\">$title</a><br>";
}
include("footer.php");
?>
Danke im Vorraus Nikole
Die Ausgabe in einem Block ist anders daher funktioniert es nicht. Warum willst du denn die letzten Artikel als Modul laufen lassen und nicht als Block?
Man könnte dies auch direkt im News Modul einbauen. siehe unsere Weblinks und Downloads.
Das ist falsch hier:
Zitat$content .= "<strong><big>ˇ</big></stro ng> <a href=\"modules.php?name=News&file=article&sid=$sid \">$title</a>";
ersetzen mit
Zitatecho "<strong><big>ˇ</big></stro ng> <a href=\"modules.php?name=News&file=article&sid=$sid \">$title</a>";
[Editiert am 5/2/2004 von DarkBoy]
Danke Sehr :kiss
ich stelle eine neue Startseite her für Nuke , deshalb
meine komische Fragen werde wenn es Fertig ist hier Posten.