okay ich habs...
neuer con_type
CMS_HTML
Code: Alles auswählen
/**
* CMS_HTML
*/
$tmp = $a_content['CMS_HTML'][$val];
$tmp = urldecode($tmp);
$tmp = AddSlashes(AddSlashes($tmp));
$tmp = str_replace("\\\'","'",$tmp);
$tmp = str_replace("\$",'\\\$',$tmp);
cInclude("includes", "functions.lang.php");
cInclude("classes", "class.htmlelements.php");
if ($edit) {
if ($tmp == "") {
$tmp = " ";
}
$insiteEditingDIV = new cHTMLDiv;
$insiteEditingDIV->setId("HTML_".$db->f("idtype")."_".$val);
$insiteEditingDIV->setEvent("Focus", "this.style.border='1px solid #bb5577';");
$insiteEditingDIV->setEvent("Blur", "this.style.border='1px dashed #bfbfbf';");
$insiteEditingDIV->setStyleDefinition("border", "1px dashed #bfbfbf");
$insiteEditingDIV->setStyleDefinition("direction", langGetTextDirection($lang));
$insiteEditingDIV->updateAttributes(array("contentEditable" => "true"));
$insiteEditingDIV->setContent("_REPLACEMENT_");
/* Edit anchor and image */
$editLink = $sess->url("front_content.php?action=10&idcat=$idcat&idart=$idart&idartlang=$idartlang&type=CMS_HTML&typenr=$val");
$editAnchor = new cHTMLLink;
$editAnchor->setLink("javascript:setcontent('$idartlang','" . $editLink . "');");
$editButton = new cHTMLImage;
$editButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_edithtml.gif");
$editButton->setBorder(0);
$editButton->setStyleDefinition("margin-right", "2px");
$editAnchor->setContent($editButton);
/* Save anchor and image */
$saveAnchor = new cHTMLLink;
$saveAnchor->setLink("javascript:setcontent('$idartlang','0')");
$saveButton = new cHTMLImage;
$saveButton->setSrc($cfg["path"]["contenido_fullhtml"].$cfg["path"]["images"]."but_speichern.gif");
$saveButton->setBorder(0);
$saveAnchor->setContent($saveButton);
/* Process for output with echo */
$finalEditButton = $editAnchor->render();
$finalEditButton = AddSlashes(AddSlashes($finalEditButton));
$finalEditButton = str_replace("\\\'","'",$finalEditButton);
$finalEditingDiv = $insiteEditingDIV->render();
$finalEditingDiv = AddSlashes(AddSlashes($finalEditingDiv));
$finalEditingDiv = str_replace("\\\'","'",$finalEditingDiv);
$finalEditingDiv = str_replace("_REPLACEMENT_", $tmp, $finalEditingDiv);
$finalSaveButton = $saveAnchor->render();
$finalSaveButton = AddSlashes(AddSlashes($finalSaveButton));
$finalSaveButton = str_replace("\\\'","'",$finalSaveButton);
$tmp = $finalEditingDiv . $finalEditButton . $finalSaveButton;
}
für CMS_HTMLHEAD
CMS_HTML durch CMS_HTMLHEAD , einmal "HTML_" durch "HTMLHEAD_" und but_edithtml.gif durch but_edithead.gif ersetzen... (ansonsten selber code)
und das beispiel
'Test' "Test" \'Test\' \"Test\" ' " $ \$
funktioniert in jeder konstellation...