sName;
$d[WY_QK_EDITOR_GLOBAL] = (int)$oElement->bGlobal;
$d[WY_QK_PAGEID] = $goApp->oDocument->iPageID(true);
$d[WY_QK_DI] = $goApp->oDocument->iDocumentInstance();
$d[WY_QK_LOOP_ID] = $goApp->oDocument->iLoopID();
return $d;
}
function sHiddenFieldsForElement(&$oElement)
{
$s = "";
$d = WYEditor::dQueryForElement($oElement);
foreach ($d as $sKey => $sValue) {
$s .= "";
}
$s .= "";
return $s;
}
function sPostSaveScript()
{
global $webyep_bDebug, $goApp;
$s = "";
if ($goApp->bIsiPhone) {
$s .= "";
}
else {
$s .= "";
}
return $webyep_bDebug ? "":$s;
}
function getSizeCookieNames($sIdent, &$sW, &$sH)
{
$sIdent = str_replace(".", "_", $sIdent);
$sIdent = str_replace("-", "_", $sIdent);
$sW = $sIdent . "_w";
$sH = $sIdent . "_h";
}
// these stupid browser use different sizes for:
// window.open
// window.resizerTo and
// window.outWidth/document.body.clientWidth
function tranformSizeForOperation(&$iW, &$iH, $iOP)
{
global $goApp;
if ($goApp->bIsExplorer) {
if ($iOP == WY_EDITOR_OPEN) {
$iW -= 12;
$iH -= 61;
}
}
else if ($goApp->bIsSafari) {
if ($iOP == WY_EDITOR_OPEN) {
$iH -= 22;
}
}
else {
if ($iOP == WY_EDITOR_OPEN) {
$iH -= 15;
}
}
}
// instance methods
function WYEditor()
{
global $goApp;
if (!$goApp->bEditMode) {
$goApp->log("Editor " . basename($_SERVER['PHP_SELF']) . " called in non edit mode");
exit();
}
$this->sFieldName = $goApp->sFormFieldValue(WY_QK_EDITOR_FIELDNAME);
$this->bGlobal = !((int)$goApp->sFormFieldValue(WY_QK_EDITOR_GLOBAL) == 0);
$this->bSave = false;
if ($goApp->sFormFieldValue(WY_QK_ACTION) == WY_QK_EDITOR_SAVE) $this->bSave = true;
// set info in Document object so othes see the right values
$goApp->oDocument->setPageID((int)$goApp->sFormFieldValue(WY_QK_PAGEID));
$iDI = (int)$goApp->sFormFieldValue(WY_QK_DI);
if (!$iDI) $iDI = (int)$goApp->sFormFieldValue(WY_QK_OLD_DI);
$goApp->oDocument->setDocumentInstance($iDI);
$goApp->oDocument->setLoopID((int)$goApp->sFormFieldValue(WY_QK_LOOP_ID));
}
}
?>