function Syntax() { global $CMS_CONF; global $USER_SYNTAX; global $activ_plugins; global $deactiv_plugins; // Regulärer Audruck zur überprüfung von Links // überprüfung auf Validität >> protokoll :// (username:password@) [(sub.)server.tld|ip-adresse] (:port) (subdirs|files) // protokoll (https?|t?ftps?|gopher|telnets?|mms|imaps?|irc|pop3s?|rdp|smb|smtps?|sql|ssh):\/\/ // username:password@ (\w)+\:(\w)+\@ // (sub.)server.tld ((\w)+\.)?(\w)+\.[a-zA-Z]{2,4} // ip-adresse (ipv4) ([\d]{1,3}\.){3}[\d]{1,3} // port \:[\d]{1,5} // subdirs|files (\w)+ $this->LINK_REGEX = "/^(https?|t?ftps?|gopher|telnets?|mms|imaps?|irc|pop3s?|rdp|smb|smtps?|sql|ssh|svn)\\:\\/\\/((\\w)+\\:(\\w)+\\@)?[((\\w)+\\.)?(\\w)+\\.[a-zA-Z]{2,4}|([\\d]{1,3}\\.){3}[\\d]{1,3}](\\:[\\d]{1,5})?((\\w)+)?\$/"; if (!isset($GLOBALS['syntax_anchor_counter'])) { $GLOBALS['syntax_anchor_counter'] = 1; } if (!isset($GLOBALS['syntax_anchor_ueber'])) { $GLOBALS['syntax_anchor_ueber'] = array(); } if (!isset($GLOBALS['syntax_anchor_absatz'])) { $GLOBALS['syntax_anchor_absatz'] = array(); } $syntax_elemente = get_class_methods($this); $syntax_array = array(); foreach ($syntax_elemente as $element) { if (substr($element, 0, strlen("syntax_")) == "syntax_") { $syntax_array[] = substr($element, strlen("syntax_")); } } $this->syntax_user = $USER_SYNTAX->toArray(); foreach ($this->syntax_user as $user => $inhalt) { $syntax_array[] = $user; } # Damit zuerst z.B. nach links und dann nach link gesucht wird sonst wird links als link gefunden rsort($syntax_array); $syntax_such = "/\\[(" . implode("=|", $syntax_array) . "=|" . implode("|", $syntax_array) . ")([^\\[\\]\\{\\}]*)\\|([^\\[\\]\\{\\}]*)\\]/Um"; $syntax_such_rest = "/\\[(" . implode("=|", $syntax_array) . "=|" . implode("|", $syntax_array) . ")([^\\|]*)\\|(.*)\\]/Ums"; # Achtung es muss ---- für horizontale line angehängt werden $syntax_such_ohne = "/\\[(" . implode("|", $syntax_array) . "|----)\\]/Um"; $this->activ_plugins = $activ_plugins; $this->deactiv_plugins = $deactiv_plugins; $plugin = array_merge($this->activ_plugins, $this->deactiv_plugins); # Das gleiche hier mit Plugins siehe rsort weiter oben rsort($plugin); $this->placeholder = array(); foreach (makePlatzhalter(true) as $value) { $tmp = substr($value, 1, -1); # Wens ein Plugin gibt was so heist wie der Platzhalter benutzen wir das Plugin if (!in_array($tmp, $this->activ_plugins)) { $this->placeholder[] = $tmp; } # damit der Platzhalter wieder funktioniert müssen wir in aus $this->deactiv_plugins löschen if (in_array($tmp, $this->deactiv_plugins)) { if (false !== ($key = array_search($tmp, $this->deactiv_plugins))) { } unset($this->deactiv_plugins[$key]); } } rsort($this->placeholder); unset($tmp_place); $plugin_such = "/\\{(" . implode("|", $plugin) . ")\\|([^\\[\\]\\{\\}]*)\\}/Um"; $plugin_such_rest = "/\\{(" . implode("|", $plugin) . ")\\|(.*)\\}/Ums"; $plugin_such_ohne = "/\\{(" . implode("|", $plugin) . ")\\}/Um"; $this->PLACE_SEARCH = "/\\{(" . implode("|", $this->placeholder) . ")\\}/Um"; $this->SYNTAX_SEARCH = $syntax_such; $this->SYNTAX_SEARCH_REST = $syntax_such_rest; $this->SYNTAX_SEARCH_OHNE = $syntax_such_ohne; $this->PLUGIN_SEARCH = $plugin_such; $this->PLUGIN_SEARCH_REST = $plugin_such_rest; $this->PLUGIN_SEARCH_OHNE = $plugin_such_ohne; $this->script_search = array(); $this->script_replace = array(); $this->jquery_search = array(); $this->jquery_replace = array(); $this->pluginself['placeholder'] = array(); $this->pluginself['replace'] = array(); }
function returnPlatzhalterSelectbox() { global $specialchars; global $activ_plugins; $all = false; if (ACTION == "template" or ACTION == "config") { $all = true; } $selectbox = '<select name="platzhalter" class="overviewselect" title="' . getLanguageValue("toolbar_platzhalter", true) . '">'; if (ACTION == "config") { $selectbox .= '<option title="' . getLanguageValue("toolbar_platzhalter_VALUE", true) . '" value="{VALUE}">{VALUE}</option>'; $selectbox .= '<option title="' . getLanguageValue("toolbar_platzhalter_DESCRIPTION", true) . '" value="{DESCRIPTION}">{DESCRIPTION}</option>'; } foreach (makePlatzhalter($all) as $value) { $language = str_replace(array('{', '}'), '', $value); if (in_array($language, $activ_plugins)) { continue; } $selectbox .= '<option title="' . getLanguageValue("toolbar_platzhalter_" . $language, true) . '" value="' . $value . '">' . $value . '</option>'; } $selectbox .= '</select>'; return $selectbox; }
if (!defined('IS_ADMIN') or !IS_ADMIN) { die; } global $activ_plugins, $deactiv_plugins; $var_PluginsActiv = ''; if (isset($activ_plugins) and count($activ_plugins) > 0) { rsort($activ_plugins); $var_PluginsActiv = 'var moziloPluginsActiv = "' . implode('|', $activ_plugins) . '";'; } $var_PluginsDeactiv = ''; if (isset($deactiv_plugins) and count($deactiv_plugins) > 0) { rsort($deactiv_plugins); $var_PluginsDeactiv = 'var moziloPluginsDeactiv = "' . implode('|', $deactiv_plugins) . '";'; } $moziloPlace = makePlatzhalter(true); foreach ($moziloPlace as $key => $value) { $value = substr($value, 1, -1); if (in_array($value, $activ_plugins)) { unset($moziloPlace[$key]); continue; } $moziloPlace[$key] = $value; } if (count($moziloPlace) > 0) { rsort($moziloPlace); $var_Place = 'var moziloPlace = "' . implode('|', $moziloPlace) . '|VALUE|DESCRIPTION";'; } else { $var_Place = 'var moziloPlace = "VALUE|DESCRIPTION";'; } $var_UserSyntax = '';