Ich nutze das Sprachmodul von Alexander Zimmerhofer. Funktioniert auch alles super, allerdings stört mich, dass die Flagge der aktuell ausgewählten Sprache nicht angezeigt wird. Bin in PHP-Programmierung ziemlicher Neuling, es wäre toll, wenn mir jemand einen Hinweis geben könnte! Vielen dank für Eure Hilfe

Code: Alles auswählen
<?php
//Sprachmodul - Version 2.3
//für Contenido 4.4.x
//Alexander Zimmerhofer - alexander(at)zimmerhofer.org
//modified 01.12.2004: Uli Steinle
//Sprachmodul zeigt kleine Landesflaggen zum Umschalten der Sprache an, wenn die entsprechenden Kategorien sowie die entsprechenden Artikel online geschaltet sind.
//Im Editormodus wird die Umschaltmöglichkeit IMMER angeboten...
//Konfiguration...
//Diese Zeilen konfigurieren das Modul...
//Aufbau: $picture["Sprach-ID"] = "PFAD zur Flagge";
$picture["1"] = "flagge-de.gif";
$picture["2"] = "flagge-ru.gif";
$picture["3"] = "flagge-en.gif";
$picture["4"] = "flagge-po.gif";
$picture["5"] = "flagge-fr.gif";
$picture["6"] = "flagge-nl.gif";
//Alt-Tag, das angezeigt werden soll. Analog Sprach-ID [idlang]
$alt["1"] = "";
$alt["2"] = "";
$alt["3"] = "";
$alt["4"] = "";
$alt["5"] = "";
$alt["6"] = "";
//AB HIER NICHTS MEHR ÄNDERN...
$mydb = new DB_Contenido;
$sql = "SELECT ARTLANG.idlang, ARTLANG.online, CATLANG.visible FROM ".$cfg["tab"]["art_lang"]." ";
$sql = $sql. "AS ARTLANG, ".$cfg["tab"]["cat_lang"]." ";
$sql = $sql. "AS CATLANG WHERE ARTLANG.idart = $idart AND CATLANG.idcat = $idcat AND ARTLANG.idlang = CATLANG.idlang ORDER BY ARTLANG.idlang ASC";
$mydb ->query ($sql);
// echo $sql;
while ($mydb -> next_record())
{
while(list($lang_id,$picture_pfad) = each($picture))
{
if(strstr($REQUEST_URI,"changeview=edit") || $submit=="editcontent" || strstr($REQUEST_URI,"area=con_editcontent"))
{
if (($lang != ($mydb->f("idlang"))) and (($mydb->f("idlang")) == $lang_id))
{
echo "<a href=".$sess->url("front_content.php?client=$client&idcat=$idcat&changelang=".($mydb->f("idlang"))."&idart=$idart");
echo "><img src=".$picture_pfad." border='0' alt='".$alt[$mydb->f("idlang")]."'></a> ";
}
}
else
{
if (($lang != ($mydb->f("idlang"))) and (($mydb->f("idlang")) == $lang_id) and (($mydb->f("online")) == 1) and (($mydb->f("visible")) == 1))
{
echo "<a href=".$sess->url("front_content.php?&idcat=$idcat&changelang=".($mydb->f("idlang"))."&idart=$idart");
echo "><img src=".$picture_pfad." border='0' title='".$alt[$mydb->f("idlang")]."' alt='".$alt[$mydb->f("idlang")]."'></a> ";
}
}
}
reset($picture);
}
?>