function getPluginContent($param) { // erst prüfen, ob bei der Initialisierung ein Fehler aufgetreten ist if ($this->error == null) { return $this->getContent(replaceFileMarker($param)); } else { return $this->error; } }
function getContent($value) { global $CatPage, $specialchars; if ($value == "plugin_first") { if (getRequestValue('action', 'get') and getRequestValue('action', 'get') == "sitemap") { if (!defined("ACTION_CONTENT")) { define("ACTION_CONTENT", false); } global $pagecontent; $pagecontent = "{MenuSubsMobile|sitemap_content}"; } return; } global $syntax; $syntax->insert_in_head('<script type="text/javascript" src="' . $this->PLUGIN_SELF_URL . 'menusubsmobile.js"></script>'); if ($this->settings->get("menusubs_2") != "no_menusubs_2" and $CatPage->exists_CatPage(replaceFileMarker($this->settings->get("menusubs_2"), false), false)) { global $specialchars; $this->menu2 = $specialchars->replaceSpecialChars(replaceFileMarker($this->settings->get("menusubs_2"), false), false); } if ($value === false) { return $this->getMenuCat(); } if ($value === "main") { return $this->getMenuCat(true); } if ($value === "detail") { if (strpos(CAT_REQUEST, "%2F") > 1) { $tmp_cat = explode("%2F", CAT_REQUEST); return $this->getMenuPage($tmp_cat[0], false, false, true); } else { return $this->getMenuPage(CAT_REQUEST, false, false, true); } } if ($this->menu2 and $value === "menusubs_2") { return $this->getMenuPage($this->menu2, false, true); } if ($value === "sitemap_content") { return $this->getSitemapCat(); } if ($value === "breadcrumb") { $this->breadcrumb_delimiter = "»"; if ($this->settings->get("breadcrumb_delimiter")) { $this->breadcrumb_delimiter = $this->settings->get("breadcrumb_delimiter"); } return $this->getBreadcrumb(); } return NULL; }
function getContent($value) { global $CatPage; if ($value == "plugin_first" and getRequestValue('action', 'get') and getRequestValue('action', 'get') == "sitemap") { if (!defined("ACTION_CONTENT")) { define("ACTION_CONTENT", false); } global $pagecontent; $pagecontent = "{MenuSubs|sitemap_content}"; return; } if ($this->settings->get("menusubs_2") != "no_menusubs_2" and $CatPage->exists_CatPage(replaceFileMarker($this->settings->get("menusubs_2"), false), false)) { global $specialchars; $this->menu2 = $specialchars->replaceSpecialChars(replaceFileMarker($this->settings->get("menusubs_2"), false), false); } if ($value === false) { return $this->getMenuCat(); } if ($value === "main") { return $this->getMenuCat(true); } if ($value === "detail") { if (strpos(CAT_REQUEST, "%2F") > 1) { $tmp_cat = explode("%2F", CAT_REQUEST); return $this->getMenuPage($tmp_cat[0]); } else { return $this->getMenuPage(CAT_REQUEST); } } if ($this->menu2 and $value === "menusubs_2") { return $this->getMenuPage($this->menu2, false, true); } if ($value === "sitemap_content") { return $this->getSitemapCat(); } if ($value === "breadcrumb") { $this->breadcrumb_delimiter = "»"; if ($this->settings->get("breadcrumb_delimiter")) { $this->breadcrumb_delimiter = $this->settings->get("breadcrumb_delimiter"); } return $this->getBreadcrumb(); } return NULL; }
function syntax_bild($desciption, $value, $syntax = "bild") { // Bild aus dem Dateiverzeichnis oder externes Bild global $specialchars; global $language; // Bildunterschrift merken, wenn vorhanden $subtitle = ""; if (!empty($desciption)) { $subtitle = $desciption; } if (strip_tags($subtitle) == $subtitle) { $subtitle = $specialchars->rebuildSpecialChars($subtitle, true, true); } $imgsrc = false; $value = $specialchars->getHtmlEntityDecode($value); // Bei externen Bildern: $value NICHT nach ":" aufsplitten! if (preg_match($this->LINK_REGEX, $value)) { $imgsrc = $value; } else { global $CatPage; global $CMS_CONF; list($cat, $datei) = $CatPage->split_CatPage_fromSyntax($value, true); if (!$CatPage->exists_File($cat, $datei)) { $cat_text = $specialchars->rebuildSpecialChars($cat, true, true); $datei_text = $specialchars->rebuildSpecialChars($datei, true, true); return $this->createDeadlink($datei_text, $language->getLanguageValue("tooltip_image_error_2", $datei_text, $cat_text)); } $imgsrc = $CatPage->get_srcFile($cat, $datei); } // Nun aber das Bild ersetzen! if ($imgsrc) { $alt = $specialchars->rebuildSpecialChars(replaceFileMarker($value, false), true, true); $cssclass = ""; if ($syntax == "bild") { $cssclass = "contentimage"; } if ($syntax == "bildlinks") { $cssclass = "leftcontentimage"; } elseif ($syntax == "bildrechts") { $cssclass = "rightcontentimage"; } // ohne Untertitel if ($subtitle == "") { // normales Bild: ohne <span> rundrum if ($syntax == "bild") { return '<img src="' . $imgsrc . '" alt="' . $language->getLanguageHtml("alttext_image_1", $alt) . '" class="' . $cssclass . '" />'; } else { return '<span class="' . $cssclass . '"><img src="' . $imgsrc . '" alt="' . $language->getLanguageHtml("alttext_image_1", $alt) . '" class="' . $cssclass . '" /></span>'; } } else { return '<span class="' . $cssclass . '"><img src="' . $imgsrc . '" alt="' . $language->getLanguageHtml("alttext_image_1", $alt) . '" class="' . $cssclass . '" /><br /><span class="imagesubtitle">' . $subtitle . '</span></span>'; } } }
function split_CatPage_fromSyntax($syntax_catpage, $file = false) { $syntax_catpage = str_replace('-html_amp~', '&', $syntax_catpage); $syntax_catpage = replaceFileMarker($syntax_catpage, false); $syntax_catpage = $this->get_AsKeyName($syntax_catpage, true); $syntax_catpage = str_replace(":", "%3A", $syntax_catpage); $valuearray = explode("%3A", $syntax_catpage); # wenn cat:page/file oder in cat : enthalten ist if (count($valuearray) > 0) { for ($i = 1; $i < count($valuearray) + 1; $i++) { $cat = implode("%3A", array_slice($valuearray, 0, $i)); $page = implode("%3A", array_slice($valuearray, $i)); if ($file === true) { if ($this->exists_File($cat, $page)) { return array($cat, $page); } } else { if ($this->exists_CatPage($cat, $page)) { return array($cat, $page); } elseif (strlen($page) == 0 and $this->exists_CatPage($cat, false)) { return array($cat, false); } } } } # cat wurde nicht gefunden dann ist cat die CAT_REQUEST if (defined('CAT_REQUEST')) { if ($file === false and $this->exists_CatPage(CAT_REQUEST, $syntax_catpage)) { return array(CAT_REQUEST, $syntax_catpage); } elseif ($file === true and $this->exists_File(CAT_REQUEST, $syntax_catpage)) { return array(CAT_REQUEST, $syntax_catpage); } } return array(false, false); }