Ejemplo n.º 1
0
 function webyep_richText($sFieldName, $bGlobal, $sCSSURL = "", $bObfuscate = true)
 {
     global $goApp;
     $o = new WYRichTextElement($sFieldName, $bGlobal, $sCSSURL, $bObfuscate);
     $s = $o->sDisplay();
     if ($goApp->bEditMode) {
         echo $o->sEditButtonHTML("edit-button-rich-text.gif");
         if (!$s) {
             $s = $o->sName;
         }
     }
     echo $s;
 }
Ejemplo n.º 2
0
<?php

// WebYep
// (C) Objective Development Software GmbH
// http://www.obdev.at
$webyep_bDocumentPage = false;
$webyep_sIncludePath = "..";
include_once "{$webyep_sIncludePath}/webyep.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/elements/WYRichTextElement.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYTextArea.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYEditor.php";
$bOK = false;
$sResponse = WYTS("RichTextSaved");
$sHelpFile = "richtext-element.php";
$oEditor = new WYEditor();
$oElement = new WYRichTextElement($oEditor->sFieldName, $oEditor->bGlobal);
$oTAHTMLCode = new WYTextArea("HTML_CODE", $oElement->sText());
if ($oEditor->bSave) {
    $oElement->setText($oTAHTMLCode->sText());
    $oElement->save();
    $bOK = true;
} else {
    $sOnLoadScript = 'document.forms[0].HTML_CODE.focus();';
}
$goApp->outputWarningPanels();
// give App a chance to say something
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>

<title>
Ejemplo n.º 3
0
<?php

// WebYep
// (C) Objective Development Software GmbH
// http://www.obdev.at
$webyep_bDocumentPage = false;
$webyep_sIncludePath = "..";
include_once "{$webyep_sIncludePath}/webyep.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/elements/WYRichTextElement.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYTextArea.php";
include_once @webyep_sConfigValue("webyep_sIncludePath") . "/lib/WYEditor.php";
$sResponse = WYTS("RichTextSaved");
$oEditor = new WYEditor();
$oElement = new WYRichTextElement($oEditor->sFieldName, $oEditor->bGlobal, "", false);
if ($oEditor->bSave) {
    $oElement->setText($goApp->sFormFieldValue('CKEditor1'));
    $oElement->save();
} else {
    $sContent = $oElement->sText();
    $sCSSURL = $goApp->sFormFieldValue(WY_QK_RICH_TEXT_CSS);
}
$oCKBaseURL = od_clone($goApp->oProgramURL);
$oCKBaseURL->addComponent("opt");
$oCKBaseURL->addComponent("ckeditor");
$oCKJSURL = od_clone($oCKBaseURL);
$oCKJSURL->addComponent("ckeditor.js");
switch ($webyep_iLanguageID) {
    case WYLANG_GERMAN:
        $sCKLanguageCode = "de";
        break;
    case WYLANG_SRPSKI:
Ejemplo n.º 4
0
    $tmpString = str_replace(chr(146), chr(39), $tmpString);
    $tmpString = str_replace("'", "&#39;", $tmpString);
    //convert all types of double quotes
    $tmpString = str_replace(chr(147), chr(34), $tmpString);
    $tmpString = str_replace(chr(148), chr(34), $tmpString);
    //	$tmpString = str_replace("\"", "\"", $tmpString);
    //replace carriage returns & line feeds
    $tmpString = str_replace(chr(10), " ", $tmpString);
    $tmpString = str_replace(chr(13), " ", $tmpString);
    return $tmpString;
}
$bOK = false;
$sResponse = WYTS("RichTextSaved");
$sHelpFile = "richtext-rte-element.php";
$oEditor = new WYEditor();
$oElement = new WYRichTextElement($oEditor->sFieldName, $oEditor->bGlobal, "", false);
if ($oEditor->bSave) {
    $oElement->setText($goApp->sFormFieldValue('RTE_FORM_ELEMENT'));
    $oElement->save();
    $bOK = true;
} else {
    $sContent = rteSafe($oElement->sText());
    $sCSSURL = $goApp->sFormFieldValue(WY_QK_RICH_TEXT_CSS);
}
$goApp->outputWarningPanels();
// give App a chance to say something
if (file_exists("../opt/rte/cbrte")) {
    $sRTEIncludePath = "../opt/rte/cbrte";
} else {
    $sRTEIncludePath = "../opt/rte";
}