ich habe gerade versucht einen neuen content-typ für die module zu generieren. leider bin ich gescheitert.
der neue typ (CMS_CODE) den ich anlegen will, soll ermöglichen, dass man direkt html-quelltext einfügen kann.
er soll also so funktionieren, wie das modul CMS_TEXT, nur das keine zeichen konvertiert werden.
in der editor-ansicht öffnet sich zwar das formular mit der "textarea" zur eingabe, nur wird der inhalt nicht in der datenbank gespeichert.
kann mir jemand helfen?
oder muss ich nur irgendwo anders noch einen eintrag für den neuen content-typ machen?
matze
db-eintrag in con_typ:
Code: Alles auswählen
/**
* CMS_CODE
*/
$tmp = $a_content["CMS_CODE"][$val];
$tmp = urldecode($tmp);
if ($edit) {$editbutton = "<A HREF=\"".$sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_CODE&typenr=$val&lang=$lang")."\"><IMG SRC=\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edittext.gif\" border=0></A>";
$editbutton = AddSlashes(AddSlashes($editbutton));
$tmp = $tmp.$editbutton;}
include.CMS_CODE.inc.php:
Code: Alles auswählen
<?
if ($doedit == "1") {
consaveContentEntry($idartlang, "CMS_CODE", $typenr, $CMS_CODE);
conGenerateCodeForArtInAllCategories($idart);
header("Location:".$sess->url($cfgClient[$client]["path"]["htmlpath"]."front_content.php?area=$tmp_area&idart=$idart&idcat=$idcat&lang=$lang&changeview=edit")."");
}
?>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="<?php print $cfg["path"]["contenido_fullhtml"] . $cfg["path"]["styles"] ?>contenido.css">
</head>
<body>
<table width="100%" border=0 cellspacing="0" cellpadding="0" bgcolor="#ffffff">
<tr>
<td width="10" rowspan="4"><img src="<?php print $cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"] ?>spacer.gif" width="10" height="10"></td>
<td width="100%"><img src="<?php print $cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"] ?>spacer.gif" width="10" height="10"></td>
<td width="10" rowspan="4"><img src="<?php print $cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"] ?>spacer.gif" width="10" height="10"></td>
</tr>
<tr>
<td>
<?php
getAvailableContentTypes($idartlang);
echo " <FORM name=\"editcontent\" method=\"post\" action=\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["includes"]."include.backendedit.php\">";
$sess->hidden_session();
echo " <INPUT type=hidden name=lang value=\"$lang\">";
// echo " <INPUT type=hidden name=submit value=\"editcontent\">";
echo " <INPUT type=hidden name=typenr value=\"$typenr\">";
echo " <INPUT type=hidden name=idart value=\"$idart\">";
echo " <INPUT type=hidden name=action value=\"10\">";
echo " <INPUT type=hidden name=type value=\"$type\">";
echo "<INPUT type=hidden name=doedit value=1>";
echo " <INPUT type=hidden name=idcat value=\"$idcat\">";
echo " <INPUT type=hidden name=idartlang value=\"$idartlang\">";
echo "<INPUT type=hidden name=changeview value=\"edit\">";
echo " <TABLE cellpadding=$cellpadding cellspacing=$cellpadding border=0>";
echo " <TR><TD valign=top class=text_medium> ".$typenr.". ".$a_description[$type][$typenr].": </TD><TD class=content>";
echo " <TEXTAREA name=CMS_TEXT ROWS=15 COLS=90>".urldecode($a_content[$type][$typenr])."</TEXTAREA>";
echo " </TD></TR>";
$tmp_area = "con_editcontent";
echo " <TR valign=top><TD colspan=2><br>
<a href=".$sess->url($cfgClient[$client]["path"]["htmlpath"]."front_content.php?area=$tmp_area&idart=$idart&idcat=$idcat&lang=$lang")."><img src=\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_cancel.gif\" border=0></a>
<INPUT type=image name=submit value=editcontent src=\"".$cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_ok.gif\" border=0>
</TD></TR>";
echo " </TABLE>
</FORM>";
?>
</td></tr></table>
</body>
</HTML>