function WYLogonButtonElement($bV) { parent::WYElement("logon-button", true); $this->sEditorPageName = ""; $this->setVersion(WY_LOGONBUTTON_VERSION); $this->bVisible = $bV; }
function WYMenuElement($sN, $bG, $oURL, $sT, $oB) { //global $webyep_bUseTablesForMenus; parent::WYElement($sN, $bG); $this->sEditorPageName = "menu.php"; $this->iEditorWidth = 500; $this->iEditorHeight = 500; $this->sEditButtonCSSClass = "WebYepMenuEditButton"; $this->aCurrentPath = array(); $this->aOpenTrees = array(); $this->aCloseTrees = array(); $this->iLastTitleID = 0; // check for old version $this->dConvertData(); $this->setVersion(WY_MENU_VERSION); if (!isset($this->dContent[WY_DK_ITEMSARRAY])) { $this->dContent[WY_DK_ITEMSARRAY] = array(); } if (!isset($this->dContent[WY_DK_MAXID])) { $this->dContent[WY_DK_MAXID] = 0; } $this->oURL =& $oURL; $this->sTarget = $sT; $this->sListType = 'ul'; $this->getActiveItems($this->dContent[WY_DK_ITEMSARRAY]); }
function WYRichTextElement($sN, $bG, $sCSSURL, $bObfuscate) { parent::WYElement($sN, $bG); $this->sEditorPageName = "rich-text.php"; $this->iEditorWidth = 850; $this->iEditorHeight = 620; $this->sEditButtonCSSClass = "WebYepRichTextEditButton"; if ($sCSSURL) { $this->oCSSURL = new WYURL($sCSSURL); $this->oCSSURL->makeSiteRelative(); } else { $this->oCSSURL = od_nil; } $this->bObfuscate = $bObfuscate; $this->setVersion(WY_RICHTEXT_VERSION); if (!isset($this->dContent[WY_DK_CONTENT])) { // check whether a Long Text Element with same field name left some data... $oLT = new WYLongTextElement($sN, $bG, false); if ($oLT->sText() != "") { $this->dContent[WY_DK_CONTENT] = $oLT->sDisplay(); } else { $this->dContent[WY_DK_CONTENT] = ""; } } }
function WYShortTextElement($sN, $bG) { parent::WYElement($sN, $bG); $this->sEditorPageName = "short-text.php"; $this->iEditorWidth = 450; $this->iEditorHeight = 250; $this->sEditButtonCSSClass = "WebYepShortTextEditButton"; $this->setVersion(WY_SHORTTEXT_VERSION); if (!isset($this->dContent[WY_DK_CONTENT])) { $this->dContent[WY_DK_CONTENT] = ""; } }
function WYAttachmentElement($sN, $bG = false, $sCustomIcon = "") { parent::WYElement($sN, $bG); $this->sEditorPageName = "attachment.php"; $this->iEditorWidth = 650; $this->iEditorHeight = 250; $this->sCustomIcon = $sCustomIcon; $this->sEditButtonCSSClass = "WebYepAttachmentEditButton"; $this->setVersion(WY_ATTACHMENT_VERSION); if (!isset($this->dContent[WY_DK_ATTACHMENT_FILENAME])) { $this->dContent[WY_DK_ATTACHMENT_FILENAME] = ""; } }
function WYLongTextElement($sN, $bG, $bHide) { global $goApp; parent::WYElement($sN, $bG); $this->sEditorPageName = $goApp->bIsiPhone ? "long-text-iphone.php" : "long-text.php"; $this->iEditorWidth = 520; $this->iEditorHeight = 450; $this->sEditButtonCSSClass = "WebYepLongTextEditButton"; $this->bHideEMailAddress = $bHide; $this->setVersion(WY_LONGTEXT_VERSION); if (!isset($this->dContent[WY_DK_CONTENT])) { $this->dContent[WY_DK_CONTENT] = ""; } }
function WYReadMoreElement($sN, $sL = "", $sTP = "", $sTF = "") { parent::WYElement($sN, false); $this->sEditorPageName = "read-more.php"; $this->iEditorWidth = 450; $this->iEditorHeight = 250; $this->sEditButtonCSSClass = "WebYepReadMoreEditButton"; $this->setVersion(WY_READMORE_VERSION); $this->sLinkText = $sL == '' ? $sN : $sL; $this->sTargetPage = $sTP; $this->sTargetFrame = $sTF; if (!isset($this->dContent[WY_DK_CONTENT])) { $this->dContent[WY_DK_CONTENT] = ""; } }
function WYGuestbookElement($sN, $iMax, $sEMail, $bHide) { parent::WYElement($sN, false); $this->iMaxEntries = $iMax; $this->sEMail = $sEMail; $this->bHideEMailAddresses = $bHide; $this->sEditorPageName = "#"; // no editor $this->setVersion(WY_GUESTBOOK_VERSION); if (!isset($this->dContent[WY_DK_GB_ENTRIES])) { $this->dContent[WY_DK_GB_ENTRIES] = array(); } if (!isset($this->dContent[WY_DK_GB_BLOCKED_IPS])) { $this->dContent[WY_DK_GB_BLOCKED_IPS] = array(); } }
function WYGalleryElement($sN, $bG, $iTNw, $iTNh, $iC = 3, $iIw = 0, $iIh = 0, $iCellWidth = 0) { global $goApp; parent::WYElement($sN, $bG); $this->iTNWidth = $iTNw; $this->iTNHeight = $iTNh; $this->iImageWidth = $iIw; $this->iImageHeight = $iIh; $this->iCellWidth = $iCellWidth == 0 ? (int) round($iTNw * 1.2) : $iCellWidth; $this->iCols = $iC; $this->sEditorPageName = "gallery.php"; $this->iEditorWidth = 430; $this->iEditorHeight = 400; $this->setVersion(WY_GALLERY_VERSION); $this->iEditedID = false; if (!isset($this->dContent[WY_DK_GALLERY_ID_ARRAY])) { $this->dContent[WY_DK_LOOPIDARRAY] = array(); } if ($goApp->bEditMode && $this->bUserMayEditThisElement()) { $this->dispatchEditAction(); } }
function WYLoopElement($sN) { global $goApp; parent::WYElement($sN, false); $this->sEditorPageName = ""; $this->setVersion(WY_LOOP_VERSION); if (!isset($this->dContent[WY_DK_LOOPIDARRAY])) { $this->dContent[WY_DK_LOOPIDARRAY] = array(1); } else { if (!count($this->dContent[WY_DK_LOOPIDARRAY])) { $this->dContent[WY_DK_LOOPIDARRAY] = array(1); } } if (!isset($this->dContent[WY_DK_DISABLEDLOOPIDARRAY])) { $this->dContent[WY_DK_DISABLEDLOOPIDARRAY] = array(); } $this->iLoopID = 0; $this->iEditedID = false; $this->iLoopIDJustDeleted = 0; if ($goApp->bEditMode && $this->bUserMayEditThisElement()) { $this->dispatchEditAction(); } $this->iElementsLeft = count($this->_aLoopIDs()); }
/** * public API * * Diese Funktion wird mittels PHP-PI in der HTML-Seite eingebunden * und erzeugt das (im Adminmodus editierbare) Image-Element. * * @param string $sN der Name des Bildes * @param boolean $bG gibt an, ob der Inhalt dieses Elements für alle Seiten gleich ist * @param string $sA zusätzliche Attribute für das <img> Element, z.B. 'class="photo" id="p1"' * @param string $sU URL zu der das Bild verlinken soll * @param string $sT Ziel-Frame, in dem $sURL aufgerufen werden soll * @param int $iW max Breite des Bildes (0 = kein Limit in der Breite) * @param int $iH max Höhe des Bildes (0 = kein Limit in der Höhe) * @param boolean $bThumb ist das Bild ein Vorschaubild? (default = false) * @param int $iTW max Breite des Vorschaubildes * @param int $iTH max Höhe des Vorschaubildes */ function WYImageElement($sN, $bG, $sA, $sU, $sT, $iW = 0, $iH = 0, $bThumb = false, $iTW = 0, $iTH = 0) { $aAtts = array(); $aKV = array(); $sPair = ""; parent::WYElement($sN, $bG); $this->sEditorPageName = "image.php"; $this->iEditorWidth = 500; $this->iEditorHeight = 280; $this->sEditButtonCSSClass = "WebYepImageEditButton"; $this->setVersion(WY_IMAGE_VERSION); if (!isset($this->dContent[WY_DK_IMAGEFILENAME])) { $this->dContent[WY_DK_IMAGEFILENAME] = ""; } if (!isset($this->dContent[WY_DK_THUMBNAIL_FILENAME])) { $this->dContent[WY_DK_THUMBNAIL_FILENAME] = ""; } if (!isset($this->dContent[WY_DK_URL])) { $this->dContent[WY_DK_URL] = ""; } if (!isset($this->dContent[WY_DK_ALTTEXT])) { $this->dContent[WY_DK_ALTTEXT] = ""; } $this->sAttributes = trim($sA); $this->iImageWidth = $iW; $this->iImageHeight = $iH; $this->iThumbWidth = $iTW; $this->iThumbHeight = $iTH; if ($bThumb && $this->iThumbWidth != 0 || !$bThumb && $this->iImageWidth != 0) { // remove width and height from attributes string $this->sAttributes = preg_replace('/width *= *"?[0-9]"?/', "", $this->sAttributes); $this->sAttributes = preg_replace('/height *= *"?[0-9]"?/', "", $this->sAttributes); $this->sAttributes = preg_replace('/ +/', " ", $this->sAttributes); } if ($this->dContent[WY_DK_ALTTEXT]) { $this->sAttributes = preg_replace('/alt *= *"[^"]*"/', "", $this->sAttributes); } $this->bIsThumb = $bThumb; $this->sURL = $sU; $this->sTarget = $sT; }