Ich bin auch der Sucht des Contenido verfallen und habe einige Anpassungen am System durchgeführt.
Wer mag, der kann folgende Änderungen übernehmen.
"Der Artikel" ist ein extrem starkes Modul, das in der Regel für eine ganze Seite aussreicht und um das Modul noch etwas flexibler zu machen, haben wir (kunde und ich) einige Änderungen im LINK durchgeführt.
Es war nicht möglich einen LINK auf ein BILD zu legen unter einem TEXT!
nun geht es:-)
![Bild](http://www.jsit.de/multilinkklein.jpg)
IN der DB muss allerdings ein kleine Änderung rein:
die VAR CMS_LINK , der code muss etwas angepasst werden.
hier der MYSQL UPDATECODE:
Code: Alles auswählen
# Connection: localhost
# Host: localhost
# Saved: 2003-02-26 20:11:06
#
UPDATE con_type SET code= '$tmp = $a_content["CMS_LINK"][$val];\r\nif (is_numeric($tmp)) {$tmp="\\".\\$sess->url(\\"front_content.php?lang=$lang&idcatside=".$tmp."\\").\\"";}\r\nelseif (stristr($tmp,":")) {$temp;} else {$tmp=$cfgClient[$client]["path"]["htmlpath"].$tmp;}\r\n/*\r\nelseif (substr($tmp,0,6)=="mailto") {}\r\nelseif (substr($tmp,0,6)!="mailto") {if (substr($tmp,0,7)=="http://") {}\r\nelseif (substr($tmp,0,7)!="http://") {$tmp = "".$tmp;}}\r\n*/'
WHERE type='CMS_LINK';
Code: Alles auswählen
<?
//geändert: j.Schaaf www.JSIT.de 23-02-03
//geändert: 05.03.03 j.Schaaf www.JSIT.de
//
//
//
if ($submit == "editcontent") {
consaveContentEntry($idsidelang, "CMS_LINK", $typenr, $CMS_LINK);
consaveContentEntry($idsidelang, "CMS_LINKDESCR", $typenr, $CMS_LINKDESCR);
consaveContentEntry($idsidelang, "CMS_LINKTARGET", $typenr, $CMS_LINKTARGET);
conGenerateCodeForSideInAllCategories($idside);
Header("Location:".$sess->url("front_content_edit.inc.php?area=$tmp_area&idside=$idside&idcat=$idcat&lang=$lang")."");
}
?>
<html>
<head>
<title>contenido</title>
<link rel="stylesheet" type="text/css" href="<? print $ContenidoPath ?>content.css">
</HEAD>
<BODY MARGINHEIGHT=0 MARGINWIDTH=0 LEFTMARGIN=0 TOPMARGIN=0>
<table width="100%" border=0 cellspacing="0" cellpadding="0" bgcolor=<? echo "$bg"; ?> >
<tr>
<td width="10" rowspan="4"><img src="<? print $ContenidoPath.$cfgPathImg ?>space.gif" width="10" height="10"></td>
<td width="100%"><img src="<? print $ContenidoPath.$cfgPathImg ?>space.gif" width="10" height="10"></td>
<td width="10" rowspan="4"><img src="<? print $ContenidoPath.$cfgPathImg ?>space.gif" width="10" height="10"></td>
</tr>
<tr>
<td>
<?
$sql = "SELECT * FROM $cfgTab_content AS A, $cfgTab_side_lang AS B, $cfgTab_type AS C WHERE A.idtype=C.idtype AND A.idsidelang=B.idsidelang AND B.idsidelang='$idsidelang'";
$db->query($sql);
while ($db->next_record()) {
$a_content[$db->f("type")][$db->f("typeid")] = $db->f("value");
$a_description[$db->f("type")][$db->f("typeid")] = $db->f("description");
}
echo "\n <FORM name=\"editcontent\" method=\"post\" action=\"".$sess->url("front_content_edit.inc.php")."\">";
$sess->hidden_session();
echo "\n <INPUT type=hidden name=lang value=\"$lang\">";
echo "\n <INPUT type=hidden name=submit value=\"editcontent\">";
echo "\n <INPUT type=hidden name=typenr value=\"$typenr\">";
echo "\n <INPUT type=hidden name=idside value=\"$idside\">";
echo "\n <INPUT type=hidden name=idcat value=\"$idcat\">";
echo "\n <INPUT type=hidden name=idsidelang value=\"$idsidelang\">";
echo "\n <INPUT type=hidden name=action value=\"10\">";
echo "\n <INPUT type=hidden name=type value=\"$type\">";
echo "\n <TABLE cellpadding=$cellpadding cellspacing=$cellpadding border=0>";
echo "\n <TR><TD valign=\"top\" class=head nowrap> ".$a_description["CMS_LINK"][$typenr].": </TD><TD class=content>";
echo "\n<INPUT type=hidden name=CMS_LINK VALUE=\"".$a_content["CMS_LINK"][$typenr]."\">";
//echo $a_content["CMS_LINK"][$typenr];
if (is_numeric($a_content["CMS_LINK"][$typenr])) {
$a_link_intern_value = $a_content["CMS_LINK"][$typenr];
$a_link_extern_value = "";
$a_link_image_value = 0; //JSIT 23-02-03 //jsit-05.03.03
} else {
$a_link_intern_value = "0";
//START - JSIT 23-02-03
if (stristr($a_content["CMS_LINK"][$typenr],":")){
$a_link_image_value = 0;
$a_link_extern_value = $a_content["CMS_LINK"][$typenr]; //jsit-05.03.03
} else {
$a_link_extern_value = ""; //jsit-05.03.03
$a_link_image_value = $a_content["CMS_LINK"][$typenr];
}
//ENDE - JSIT 23-02-03
}
echo "<table border=\"1\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\"><tr>";
echo "<td valign=top>Externer Link</td><td>\n";
echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
echo "\n<td><input type=\"radio\" value=\"\" name=\"link\" onclick=\"editcontent.CMS_LINKextern.value=this.value;\" checked>datei</td>";
echo "\n<td><input type=\"radio\" value=\"http://\" name=\"link\" onclick=\"editcontent.CMS_LINKextern.value=this.value;\">http</td>";
echo "\n<td><input type=\"radio\" value=\"https://\" name=\"link\" onclick=\"editcontent.CMS_LINKextern.value=this.value;\">https</td>";
echo "\n<td><input type=\"radio\" value=\"ftp://\" name=\"link\" onclick=\"editcontent.CMS_LINKextern.value=this.value;\">ftp</td>";
echo "\n<td><input type=\"radio\" value=\"mailto:\" name=\"link\" onclick=\"editcontent.CMS_LINKextern.value=this.value;\">mailto</td>";
echo "\n</tr><tr>";
echo "\n<td><input type=\"radio\" value=\"news://\" name=\"link\" onclick=\"editcontent.CMS_LINKextern.value=this.value;\">news</td>";
echo "\n<td><input type=\"radio\" value=\"gropher://\" name=\"link\" onclick=\"editcontent.CMS_LINKextern.value=this.value;\">gropher</td>";
echo "\n<td><input type=\"radio\" value=\"telnet://\" name=\"link\" onclick=\"editcontent.CMS_LINKextern.value=this.value;\">telnet</td>";
echo "\n<td><input type=\"radio\" value=\"wais://\" name=\"link\" onclick=\"editcontent.CMS_LINKextern.value=this.value;\">wais</td>";
echo "<td> </td><td>";
echo "</tr></table>";
echo "\n<INPUT type=text name=CMS_LINKextern VALUE=\"".$a_link_extern_value."\" SIZE=45 style=\"width:300; width=300;\" onchange=\"editcontent.CMS_LINK.value=this.value; editcontent.CMS_LINKintern.value=0; editcontent.CMS_IMGintern.value=0;\"></td>";
echo "</tr><td>Interner Link</td><td>\n";
$sql = "SELECT * FROM $cfgTab_cat_tree AS TREE, $cfgTab_cat_side AS CATSIDE, $cfgTab_cat AS CAT, $cfgTab_cat_lang AS CATLANG, $cfgTab_side_lang AS SIDELANG WHERE TREE.idcat=CATSIDE.idcat AND CATSIDE.idcat=CATLANG.idcat AND CATLANG.idlang='$lang' AND CATSIDE.idside=SIDELANG.idside AND SIDELANG.idlang='$lang' AND CAT.idcat=TREE.idcat AND CAT.idclient='$client' ORDER BY TREE.idtree";
$db->query($sql);
echo "\n<SELECT name=CMS_LINKintern SIZE=1 style=\"width:300; width=300;\" onChange=\"editcontent.CMS_LINK.value=this.value; editcontent.CMS_LINKextern.value='';editcontent.CMS_IMGintern.value=0;\">";
if ($a_link_intern_value != 0) {
echo "\n<option value=0>".$lngForm["nothing"]."</option>";
} else {
echo "\n<option value=0 selected>".$lngForm["nothing"]."</option>";
}
while ($db->next_record()) {
$spaces = "";
for ($i=0; $i<$db->f("level"); $i++) {
$spaces = $spaces . " ";
}
if ( $db->f("idcatside") != $a_link_intern_value ) {
echo "\n<option value=\"".$db->f("idcatside")."\">$spaces ".$db->f("name")."---".$db->f("title")."</option>";
} else {
echo "\n<option value=\"".$db->f("idcatside")."\" selected>$spaces ".$db->f("name")."---".$db->f("title")."</option>";
}
}
echo "\n</SELECT></td>";
//START - JSIT 23-02-03
echo "</tr><td>Interne Bilder</td><td>";
echo "\n<SELECT name=CMS_IMGintern SIZE=1 style=\"width:300; width=300;\" onChange=\"editcontent.CMS_LINK.value=this.value; editcontent.CMS_LINKextern.value='';editcontent.CMS_LINKintern.value=0;\">";
if ($a_link_image_value != "") {
echo "\n<option value=0>".$lngForm["nothing"]."</option>";
} else {
echo "\n<option value=0 selected>".$lngForm["nothing"]."</option>";
}
$sql = "SELECT * FROM $cfgTab_upl WHERE idclient='$client' ORDER BY dirname,filename";
$db->query($sql);
while ($db->next_record()) {
$_link= "pics:".$db->f("dirname")."/".$db->f("filename"); //- JSIT 26-02-03
$_link1="img:".$db->f("dirname")."/".$db->f("filename"); //- JSIT 26-02-03
$_link3= $db->f("dirname")."/".$db->f("filename"); //- JSIT 26-02-03
//if ($db->f("idupl") != $a_content["CMS_LINK"][$typenr]) {
// JSIT 26-02-03
if ($_link != $a_content["CMS_LINK"][$typenr] && $_link1 != $a_content["CMS_LINK"][$typenr] && $_link3 != $a_content["CMS_LINK"][$typenr]) {
echo "\n<option value=\"".$db->f("dirname")."/".$db->f("filename")."\">".$db->f("dirname")."/".$db->f("filename")." [".$db->f("description")."]</option>";
} else {
echo "\n<option value=\"".$a_content["CMS_LINK"][$typenr]."\" selected>".$db->f("dirname")."/".$db->f("filename")." [".$db->f("description")."]</option>";
if ($db->f("dirname")=="img" ||$db->f("dirname")=="pics") $isimg=$db->f("dirname")."/".$db->f("filename"); // jsit 05.03.03
}
}
echo "\n</SELECT>\n";
if(isset($isimg)) echo "\n<br><b>Vorschau 100x100:</b><br><img src=\"".$cfgClient[$client]["path"]["htmlpath"].$isimg."\" width=\"100\" height=\"100\">\n";
echo "\n</td></tr></table>\n";
//ENDE - JSIT 23-02-03
echo " </TD></TR>";
echo " <TR><TD valign=top class=head nowrap> ".$a_description["CMS_LINKDESCR"][$typenr].": </TD><TD class=content>";
echo " <TEXTAREA name=CMS_LINKDESCR ROWS=1 COLS=60 style=\"width:300; width=300;\">".$a_content["CMS_LINKDESCR"][$typenr]."</TEXTAREA>";
echo " </TD></TR>";
echo " <TR><TD valign=top class=head nowrap> ".$a_description["CMS_LINKTARGET"][$typenr].": </TD><TD class=content>";
echo " <INPUT type=text name=CMS_LINKTARGET VALUE=\"".$a_content["CMS_LINKTARGET"][$typenr]."\" SIZE=60 onChange=\"setlinktargettosomething();\">";
echo " <INPUT TYPE=checkbox name=checkboxlinktarget value=\"1\" onClick=\"setlinktargettoblank();\" ";if ($a_content["CMS_LINKTARGET"][$typenr]=="_blank") echo " checked"; echo ">Link in neuem Fenster öffnen.</INPUT>
<!---------JavaScript-------------------->
<script language=\"JavaScript\">
<!--
function setlinktargettosomething() {
document.editcontent.checkboxlinktarget.value = 1;
document.editcontent.checkboxlinktarget.checked = false;
}
function setlinktargettoblank() {
if (document.editcontent.checkboxlinktarget.value == 1) {
document.editcontent.CMS_LINKTARGET.value = \"_blank\";
document.editcontent.checkboxlinktarget.value = 0;
} else {
document.editcontent.CMS_LINKTARGET.value = \"\";
document.editcontent.checkboxlinktarget.value = 1;
}
}
//-->
</SCRIPT>
";
echo " </TD></TR>";
$tmp_area = "con_editcontent";
echo " <TR valign=top><TD colspan=2><br>
<a href=".$sess->url("front_content_edit.inc.php?area=$tmp_area&idside=$idside&idcat=$idcat&lang=$lang")."><img src=\"".$ContenidoPath.$cfgPathImg."but_cancel.gif\" border=0></a>
<INPUT type=image name=submit value=editcontent src=\"".$ContenidoPath.$cfgPathImg."but_ok.gif\">
</TD></TR>";
echo " </TABLE>
</FORM>";
?>
</td></tr></table>
</body>
</HTML>
Jörg