1
0
Fork 0

Release version 1.0.0

Dieser Commit ist enthalten in:
o.pinke 2019-12-28 17:11:03 +01:00
Ursprung 7d1f043bed
Commit d098573903
18 geänderte Dateien mit 312 neuen und 287 gelöschten Zeilen

Datei anzeigen

@ -32,10 +32,10 @@
</frames>
<nav_sub>
<nav area="mod_rewrite" level="0" navm="extra">cl-mod-rewrite/xml/;navigation/extra/mod_rewrite/main</nav>
<nav area="mod_rewrite" level="1" navm="0">cl-mod-rewrite/xml/;navigation/extra/mod_rewrite/settings</nav>
<nav area="mod_rewrite_expert" level="1" navm="0">cl-mod-rewrite/xml/;navigation/extra/mod_rewrite/expert</nav>
<nav area="mod_rewrite_test" level="1" navm="0">cl-mod-rewrite/xml/;navigation/extra/mod_rewrite/test</nav>
<nav area="mod_rewrite" level="0" navm="extra">cl-mod-rewrite/xml/;navigation/extras/mod_rewrite/main</nav>
<nav area="mod_rewrite" level="1" navm="0">cl-mod-rewrite/xml/;navigation/extras/mod_rewrite/settings</nav>
<nav area="mod_rewrite_expert" level="1" navm="0">cl-mod-rewrite/xml/;navigation/extras/mod_rewrite/expert</nav>
<nav area="mod_rewrite_test" level="1" navm="0">cl-mod-rewrite/xml/;navigation/extras/mod_rewrite/test</nav>
</nav_sub>
</conlite>
</plugin>

Datei anzeigen

@ -496,7 +496,7 @@ class ModRewrite extends ModRewriteBase {
}
/**
* Build a recursiv path for mod_rewrite rule like server directories
* Build a recursiv path for cl-mod-rewrite rule like server directories
* (dir1/dir2/dir3)
*
* @param int $iCatId Latest category id
@ -826,7 +826,7 @@ class ModRewrite extends ModRewriteBase {
$htmlPath = $clientPath;
$aComp = parse_url($htmlPath);
// check if path matches to defined rootdir from mod_rewrite conf
// check if path matches to defined rootdir from cl-mod-rewrite conf
if (isset($aComp['path']) && $aComp['path'] !== parent::getConfig('rootdir')) {
// replace not matching path agaings configured one
// this will replace e. g. "http://host/cms/" against "http://host/"

Datei anzeigen

@ -55,7 +55,7 @@ abstract class ModRewriteBase {
}
/**
* Returns configuration of mod rewrite, content of gobal $cfg['mod_rewrite']
* Returns configuration of mod rewrite, content of gobal $cfg['cl-mod-rewrite']
*
* @param string $key Name of configuration key
* @param mixed $default Default value to return as a fallback
@ -65,23 +65,23 @@ abstract class ModRewriteBase {
public static function getConfig($key = null, $default = null) {
global $cfg;
if ($key == null) {
return $cfg['mod_rewrite'];
return $cfg['cl-mod-rewrite'];
} elseif ((string) $key !== '') {
return (isset($cfg['mod_rewrite'][$key])) ? $cfg['mod_rewrite'][$key] : $default;
return (isset($cfg['cl-mod-rewrite'][$key])) ? $cfg['cl-mod-rewrite'][$key] : $default;
} else {
return $default;
}
}
/**
* Sets the configuration of mod rewrite, content of gobal $cfg['mod_rewrite']
* Sets the configuration of mod rewrite, content of gobal $cfg['cl-mod-rewrite']
*
* @param string $key Name of configuration key
* @param mixed $value The value to set
*/
public static function setConfig($key, $value) {
global $cfg;
$cfg['mod_rewrite'][$key] = $value;
$cfg['cl-mod-rewrite'][$key] = $value;
}
}

Datei anzeigen

@ -50,115 +50,115 @@ class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
$request = (count($_POST) > 0) ? $_POST : $_GET;
mr_requestCleanup($request);
// use mod_rewrite
// use cl-mod-rewrite
if (mr_arrayValue($request, 'use') == 1) {
$this->_oView->use_chk = ' checked="checked"';
$aMR['mod_rewrite']['use'] = 1;
$aMR['cl-mod-rewrite']['use'] = 1;
} else {
$this->_oView->use_chk = '';
$aMR['mod_rewrite']['use'] = 0;
$aMR['cl-mod-rewrite']['use'] = 0;
}
// root dir
if (mr_arrayValue($request, 'rootdir', '') !== '') {
if (!preg_match('/^[a-zA-Z0-9\-_\/\.]*$/', $request['rootdir'])) {
$sMsg = i18n("The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\-_\/\.]", "mod_rewrite");
$sMsg = i18n("The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\-_\/\.]", "cl-mod-rewrite");
$this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!is_dir($_SERVER['DOCUMENT_ROOT'] . $request['rootdir'])) {
if (mr_arrayValue($request, 'checkrootdir') == 1) {
// root dir check is enabled, this results in error
$sMsg = i18n("The specified directory '%s' does not exists", "mod_rewrite");
$sMsg = i18n("The specified directory '%s' does not exists", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $_SERVER['DOCUMENT_ROOT'] . $request['rootdir']);
$this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} else {
// root dir check ist disabled, take over the setting and
// output a warning.
$sMsg = i18n("The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends DOCUMENT_ROOT. However, the setting will be taken over because of disabled check.", "mod_rewrite");
$sMsg = i18n("The specified directory '%s' does not exists in DOCUMENT_ROOT '%s'. This could happen, if clients DOCUMENT_ROOT differs from CONTENIDO backends DOCUMENT_ROOT. However, the setting will be taken over because of disabled check.", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $request['rootdir'], $_SERVER['DOCUMENT_ROOT']);
$this->_oView->rootdir_error = $this->_notifyBox('warning', $sMsg);
}
}
$this->_oView->rootdir = conHtmlentities($request['rootdir']);
$aMR['mod_rewrite']['rootdir'] = $request['rootdir'];
$aMR['cl-mod-rewrite']['rootdir'] = $request['rootdir'];
}
// root dir check
if (mr_arrayValue($request, 'checkrootdir') == 1) {
$this->_oView->checkrootdir_chk = ' checked="checked"';
$aMR['mod_rewrite']['checkrootdir'] = 1;
$aMR['cl-mod-rewrite']['checkrootdir'] = 1;
} else {
$this->_oView->checkrootdir_chk = '';
$aMR['mod_rewrite']['checkrootdir'] = 0;
$aMR['cl-mod-rewrite']['checkrootdir'] = 0;
}
// start from root
if (mr_arrayValue($request, 'startfromroot') == 1) {
$this->_oView->startfromroot_chk = ' checked="checked"';
$aMR['mod_rewrite']['startfromroot'] = 1;
$aMR['cl-mod-rewrite']['startfromroot'] = 1;
} else {
$this->_oView->startfromroot_chk = '';
$aMR['mod_rewrite']['startfromroot'] = 0;
$aMR['cl-mod-rewrite']['startfromroot'] = 0;
}
// prevent duplicated content
if (mr_arrayValue($request, 'prevent_duplicated_content') == 1) {
$this->_oView->prevent_duplicated_content_chk = ' checked="checked"';
$aMR['mod_rewrite']['prevent_duplicated_content'] = 1;
$aMR['cl-mod-rewrite']['prevent_duplicated_content'] = 1;
} else {
$this->_oView->prevent_duplicated_content_chk = '';
$aMR['mod_rewrite']['prevent_duplicated_content'] = 0;
$aMR['cl-mod-rewrite']['prevent_duplicated_content'] = 0;
}
// language settings
if (mr_arrayValue($request, 'use_language') == 1) {
$this->_oView->use_language_chk = ' checked="checked"';
$this->_oView->use_language_name_disabled = '';
$aMR['mod_rewrite']['use_language'] = 1;
$aMR['cl-mod-rewrite']['use_language'] = 1;
if (mr_arrayValue($request, 'use_language_name') == 1) {
$this->_oView->use_language_name_chk = ' checked="checked"';
$aMR['mod_rewrite']['use_language_name'] = 1;
$aMR['cl-mod-rewrite']['use_language_name'] = 1;
} else {
$this->_oView->use_language_name_chk = '';
$aMR['mod_rewrite']['use_language_name'] = 0;
$aMR['cl-mod-rewrite']['use_language_name'] = 0;
}
} else {
$this->_oView->use_language_chk = '';
$this->_oView->use_language_name_chk = '';
$this->_oView->use_language_name_disabled = ' disabled="disabled"';
$aMR['mod_rewrite']['use_language'] = 0;
$aMR['mod_rewrite']['use_language_name'] = 0;
$aMR['cl-mod-rewrite']['use_language'] = 0;
$aMR['cl-mod-rewrite']['use_language_name'] = 0;
}
// client settings
if (mr_arrayValue($request, 'use_client') == 1) {
$this->_oView->use_client_chk = ' checked="checked"';
$this->_oView->use_client_name_disabled = '';
$aMR['mod_rewrite']['use_client'] = 1;
$aMR['cl-mod-rewrite']['use_client'] = 1;
if (mr_arrayValue($request, 'use_client_name') == 1) {
$this->_oView->use_client_name_chk = ' checked="checked"';
$aMR['mod_rewrite']['use_client_name'] = 1;
$aMR['cl-mod-rewrite']['use_client_name'] = 1;
} else {
$this->_oView->use_client_name_chk = '';
$aMR['mod_rewrite']['use_client_name'] = 0;
$aMR['cl-mod-rewrite']['use_client_name'] = 0;
}
} else {
$this->_oView->use_client_chk = '';
$this->_oView->use_client_name_chk = '';
$this->_oView->use_client_name_disabled = ' disabled="disabled"';
$aMR['mod_rewrite']['use_client'] = 0;
$aMR['mod_rewrite']['use_client_name'] = 0;
$aMR['cl-mod-rewrite']['use_client'] = 0;
$aMR['cl-mod-rewrite']['use_client_name'] = 0;
}
// use lowercase uri
if (mr_arrayValue($request, 'use_lowercase_uri') == 1) {
$this->_oView->use_lowercase_uri_chk = ' checked="checked"';
$aMR['mod_rewrite']['use_lowercase_uri'] = 1;
$aMR['cl-mod-rewrite']['use_lowercase_uri'] = 1;
} else {
$this->_oView->use_lowercase_uri_chk = '';
$aMR['mod_rewrite']['use_lowercase_uri'] = 0;
$aMR['cl-mod-rewrite']['use_lowercase_uri'] = 0;
}
$this->_oView->category_separator_attrib = '';
@ -179,144 +179,144 @@ class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
// category seperator
if ($categorySeperator == '') {
$sMsg = i18n("Please specify separator (%s) for category", "mod_rewrite");
$sMsg = i18n("Please specify separator (%s) for category", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $separatorInfo);
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!preg_match($separatorPattern, $categorySeperator)) {
$sMsg = i18n("Invalid separator for category, allowed one of following characters: %s", "mod_rewrite");
$sMsg = i18n("Invalid separator for category, allowed one of following characters: %s", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $separatorInfo);
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// category word seperator
} elseif ($categoryWordSeperator == '') {
$sMsg = i18n("Please specify separator (%s) for category words", "mod_rewrite");
$sMsg = i18n("Please specify separator (%s) for category words", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!preg_match($wordSeparatorPattern, $categoryWordSeperator)) {
$sMsg = i18n("Invalid separator for category words, allowed one of following characters: %s", "mod_rewrite");
$sMsg = i18n("Invalid separator for category words, allowed one of following characters: %s", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// article seperator
} elseif ($articleSeperator == '') {
$sMsg = i18n("Please specify separator (%s) for article", "mod_rewrite");
$sMsg = i18n("Please specify separator (%s) for article", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $separatorInfo);
$this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!preg_match($separatorPattern, $articleSeperator)) {
$sMsg = i18n("Invalid separator for article, allowed is one of following characters: %s", "mod_rewrite");
$sMsg = i18n("Invalid separator for article, allowed is one of following characters: %s", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $separatorInfo);
$this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// article word seperator
} elseif ($articleWordSeperator == '') {
$sMsg = i18n("Please specify separator (%s) for article words", "mod_rewrite");
$sMsg = i18n("Please specify separator (%s) for article words", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif (!preg_match($wordSeparatorPattern, $articleWordSeperator)) {
$sMsg = i18n("Invalid separator for article words, allowed is one of following characters: %s", "mod_rewrite");
$sMsg = i18n("Invalid separator for article words, allowed is one of following characters: %s", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// category_seperator - category_word_seperator
} elseif ($categorySeperator == $categoryWordSeperator) {
$sMsg = i18n("Separator for category and category words must not be identical", "mod_rewrite");
$sMsg = i18n("Separator for category and category words must not be identical", "cl-mod-rewrite");
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// category_seperator - article_word_seperator
} elseif ($categorySeperator == $articleWordSeperator) {
$sMsg = i18n("Separator for category and article words must not be identical", "mod_rewrite");
$sMsg = i18n("Separator for category and article words must not be identical", "cl-mod-rewrite");
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
// article_seperator - article_word_seperator
} elseif ($articleSeperator == $articleWordSeperator) {
$sMsg = i18n("Separator for category-article and article words must not be identical", "mod_rewrite");
$sMsg = i18n("Separator for category-article and article words must not be identical", "cl-mod-rewrite");
$this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true;
}
$this->_oView->category_separator = conHtmlentities($categorySeperator);
$aMR['mod_rewrite']['category_seperator'] = $categorySeperator;
$aMR['cl-mod-rewrite']['category_seperator'] = $categorySeperator;
$this->_oView->category_word_separator = conHtmlentities($categoryWordSeperator);
$aMR['mod_rewrite']['category_word_seperator'] = $categoryWordSeperator;
$aMR['cl-mod-rewrite']['category_word_seperator'] = $categoryWordSeperator;
$this->_oView->article_separator = conHtmlentities($articleSeperator);
$aMR['mod_rewrite']['article_seperator'] = $articleSeperator;
$aMR['cl-mod-rewrite']['article_seperator'] = $articleSeperator;
$this->_oView->article_word_separator = conHtmlentities($articleWordSeperator);
$aMR['mod_rewrite']['article_word_seperator'] = $articleWordSeperator;
$aMR['cl-mod-rewrite']['article_word_seperator'] = $articleWordSeperator;
// file extension
if (mr_arrayValue($request, 'file_extension', '') !== '') {
if (!preg_match('/^\.([a-zA-Z0-9\-_\/])*$/', $request['file_extension'])) {
$sMsg = i18n("The file extension has a invalid format, allowed are the chars \.([a-zA-Z0-9\-_\/])", "mod_rewrite");
$sMsg = i18n("The file extension has a invalid format, allowed are the chars \.([a-zA-Z0-9\-_\/])", "cl-mod-rewrite");
$this->_oView->file_extension_error = $this->_notifyBox('error', $sMsg);
$bError = true;
}
$this->_oView->file_extension = conHtmlentities($request['file_extension']);
$aMR['mod_rewrite']['file_extension'] = $request['file_extension'];
$aMR['cl-mod-rewrite']['file_extension'] = $request['file_extension'];
} else {
$this->_oView->file_extension = '.html';
$aMR['mod_rewrite']['file_extension'] = '.html';
$aMR['cl-mod-rewrite']['file_extension'] = '.html';
}
// category resolve min percentage
if (isset($request['category_resolve_min_percentage'])) {
if (!is_numeric($request['category_resolve_min_percentage'])) {
$sMsg = i18n("Value has to be numeric.", "mod_rewrite");
$sMsg = i18n("Value has to be numeric.", "cl-mod-rewrite");
$this->_oView->category_resolve_min_percentage_error = $this->_notifyBox('error', $sMsg);
$bError = true;
} elseif ($request['category_resolve_min_percentage'] < 0 || $request['category_resolve_min_percentage'] > 100) {
$sMsg = i18n("Value has to be between 0 an 100.", "mod_rewrite");
$sMsg = i18n("Value has to be between 0 an 100.", "cl-mod-rewrite");
$this->_oView->category_resolve_min_percentage_error = $this->_notifyBox('error', $sMsg);
$bError = true;
}
$this->_oView->category_resolve_min_percentage = $request['category_resolve_min_percentage'];
$aMR['mod_rewrite']['category_resolve_min_percentage'] = $request['category_resolve_min_percentage'];
$aMR['cl-mod-rewrite']['category_resolve_min_percentage'] = $request['category_resolve_min_percentage'];
} else {
$this->_oView->category_resolve_min_percentage = '75';
$aMR['mod_rewrite']['category_resolve_min_percentage'] = '75';
$aMR['cl-mod-rewrite']['category_resolve_min_percentage'] = '75';
}
// add start article name to url
if (mr_arrayValue($request, 'add_startart_name_to_url') == 1) {
$this->_oView->add_startart_name_to_url_chk = ' checked="checked"';
$aMR['mod_rewrite']['add_startart_name_to_url'] = 1;
$aMR['cl-mod-rewrite']['add_startart_name_to_url'] = 1;
if (mr_arrayValue($request, 'add_startart_name_to_url', '') !== '') {
if (!preg_match('/^[a-zA-Z0-9\-_\/\.]*$/', $request['default_startart_name'])) {
$sMsg = i18n("The article name has a invalid format, allowed are the chars /^[a-zA-Z0-9\-_\/\.]*$/", "mod_rewrite");
$sMsg = i18n("The article name has a invalid format, allowed are the chars /^[a-zA-Z0-9\-_\/\.]*$/", "cl-mod-rewrite");
$this->_oView->add_startart_name_to_url_error = $this->_notifyBox('error', $sMsg);
$bError = true;
}
$this->_oView->default_startart_name = conHtmlentities($request['default_startart_name']);
$aMR['mod_rewrite']['default_startart_name'] = $request['default_startart_name'];
$aMR['cl-mod-rewrite']['default_startart_name'] = $request['default_startart_name'];
} else {
$this->_oView->default_startart_name = '';
$aMR['mod_rewrite']['default_startart_name'] = '';
$aMR['cl-mod-rewrite']['default_startart_name'] = '';
}
} else {
$this->_oView->add_startart_name_to_url_chk = '';
$aMR['mod_rewrite']['add_startart_name_to_url'] = 0;
$aMR['cl-mod-rewrite']['add_startart_name_to_url'] = 0;
$this->_oView->default_startart_name = '';
$aMR['mod_rewrite']['default_startart_name'] = '';
$aMR['cl-mod-rewrite']['default_startart_name'] = '';
}
// rewrite urls at
if (mr_arrayValue($request, 'rewrite_urls_at') == 'congeneratecode') {
$this->_oView->rewrite_urls_at_congeneratecode_chk = ' checked="checked"';
$this->_oView->rewrite_urls_at_front_content_output_chk = '';
$aMR['mod_rewrite']['rewrite_urls_at_congeneratecode'] = 1;
$aMR['mod_rewrite']['rewrite_urls_at_front_content_output'] = 0;
$aMR['cl-mod-rewrite']['rewrite_urls_at_congeneratecode'] = 1;
$aMR['cl-mod-rewrite']['rewrite_urls_at_front_content_output'] = 0;
} else {
$this->_oView->rewrite_urls_at_congeneratecode_chk = '';
$this->_oView->rewrite_urls_at_front_content_output_chk = ' checked="checked"';
$aMR['mod_rewrite']['rewrite_urls_at_congeneratecode'] = 0;
$aMR['mod_rewrite']['rewrite_urls_at_front_content_output'] = 1;
$aMR['cl-mod-rewrite']['rewrite_urls_at_congeneratecode'] = 0;
$aMR['cl-mod-rewrite']['rewrite_urls_at_front_content_output'] = 1;
}
// routing
@ -336,23 +336,23 @@ class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
$aRouting[$routingDef[0]] = $routingDef[1];
}
$this->_oView->rewrite_routing = conHtmlentities($request['rewrite_routing']);
$aMR['mod_rewrite']['routing'] = $aRouting;
$aMR['cl-mod-rewrite']['routing'] = $aRouting;
} else {
$this->_oView->rewrite_routing = '';
$aMR['mod_rewrite']['routing'] = array();
$aMR['cl-mod-rewrite']['routing'] = array();
}
// redirect invalid article to errorsite
if (isset($request['redirect_invalid_article_to_errorsite'])) {
$this->_oView->redirect_invalid_article_to_errorsite_chk = ' checked="checked"';
$aMR['mod_rewrite']['redirect_invalid_article_to_errorsite'] = 1;
$aMR['cl-mod-rewrite']['redirect_invalid_article_to_errorsite'] = 1;
} else {
$this->_oView->redirect_invalid_article_to_errorsite_chk = '';
$aMR['mod_rewrite']['redirect_invalid_article_to_errorsite'] = 0;
$aMR['cl-mod-rewrite']['redirect_invalid_article_to_errorsite'] = 0;
}
if ($bError) {
$sMsg = i18n("Please check your input", "mod_rewrite");
$sMsg = i18n("Please check your input", "cl-mod-rewrite");
$this->_oView->content_before .= $this->_notifyBox('error', $sMsg);
return;
}
@ -360,23 +360,23 @@ class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
if ($bDebug == true) {
echo $this->_notifyBox('info', 'Debug');
echo '<pre class="example">';
print_r($aMR['mod_rewrite']);
print_r($aMR['cl-mod-rewrite']);
echo '</pre>';
$sMsg = i18n("Configuration has <b>not</b> been saved, because of enabled debugging", "mod_rewrite");
$sMsg = i18n("Configuration has <b>not</b> been saved, because of enabled debugging", "cl-mod-rewrite");
echo $this->_notifyBox('info', $sMsg);
return;
}
$bSeparatorModified = $this->_separatorModified($aMR['mod_rewrite']);
$bSeparatorModified = $this->_separatorModified($aMR['cl-mod-rewrite']);
if (mr_setConfiguration($this->_client, $aMR)) {
$sMsg = i18n("Configuration has been saved", "mod_rewrite");
$sMsg = i18n("Configuration has been saved", "cl-mod-rewrite");
if ($bSeparatorModified) {
mr_loadConfiguration($this->_client, true);
}
$this->_oView->content_before .= $this->_notifyBox('info', $sMsg);
} else {
$sMsg = i18n("Configuration could not saved. Please check write permissions for %s ", "mod_rewrite");
$sMsg = i18n("Configuration could not saved. Please check write permissions for %s ", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, $options['key']);
$this->_oView->content_before .= $this->_notifyBox('error', $sMsg);
}
@ -409,7 +409,7 @@ class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
protected function _doChecks() {
// Check for not supported '$cfg["is_start_compatible"] = true;' mode
if (!empty($this->_cfg['is_start_compatible']) && true === $this->_cfg['is_start_compatible']) {
$sMsg = i18n("Your Contenido installation runs with the setting 'is_start_compatible'. This plugin will not work properly in this mode.<br />Please check following topic in Contenido forum to change this:<br /><br /><a href='http://forum.contenido.org/viewtopic.php?t=32530' class='blue' target='_blank'>is_start_compatible auf neue Version umstellen</a>", "mod_rewrite");
$sMsg = i18n("Your Contenido installation runs with the setting 'is_start_compatible'. This plugin will not work properly in this mode.<br />Please check following topic in Contenido forum to change this:<br /><br /><a href='http://forum.contenido.org/viewtopic.php?t=32530' class='blue' target='_blank'>is_start_compatible auf neue Version umstellen</a>", "cl-mod-rewrite");
$this->_oView->content_before .= $this->_notifyBox('warning', $sMsg);
}
@ -417,7 +417,7 @@ class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
$db = new DB_Contenido();
$sql = "SELECT idcatlang FROM " . $this->_cfg['tab']['cat_lang'] . " WHERE urlpath = ''";
if ($db->query($sql) && $db->next_record()) {
$sMsg = i18n("It seems as if some categories don't have a set 'urlpath' entry in the database. Please reset empty aliases in %sFunctions%s area.", "mod_rewrite");
$sMsg = i18n("It seems as if some categories don't have a set 'urlpath' entry in the database. Please reset empty aliases in %sFunctions%s area.", "cl-mod-rewrite");
$sMsg = sprintf($sMsg, '<a href="main.php?area=mod_rewrite_expert&frame=4&contenido=' . $this->_oView->sessid . '&idclient=' . $this->_client . '" onclick="parent.right_top.sub.clicked(parent.right_top.document.getElementById(\'c_1\').firstChild);">', '</a>');
$this->_oView->content_before .= $this->_notifyBox('warning', $sMsg);
}

Datei anzeigen

@ -45,7 +45,7 @@ class ModRewrite_ContentExpertController extends ModRewrite_ControllerAbstract {
public function init() {
$this->_oView->content_before = '';
$pluginPath = $this->_cfg['path']['contenido'] . $this->_cfg['path']['plugins'] . 'mod_rewrite/';
$pluginPath = $this->_cfg['path']['contenido'] . $this->_cfg['path']['plugins'] . 'cl-mod-rewrite/';
$this->_htaccessRestrictive = $pluginPath . 'files/htaccess_restrictive.txt';
$this->_htaccessSimple = $pluginPath . 'files/htaccess_simple.txt';
}

Datei anzeigen

@ -18,7 +18,7 @@ if (!defined('CON_FRAMEWORK')) {
}
/**
* Abstract controller for all concrete mod_rewrite controller implementations.
* Abstract controller for all concrete cl-mod-rewrite controller implementations.
*
* @author Murat Purc <murat@purc.de>
* @package plugin
@ -104,7 +104,7 @@ abstract class ModRewrite_ControllerAbstract {
$this->_oView->frame = $this->_frame;
$this->_oView->contenido = $this->_contenido;
$this->_oView->sessid = $sess->id;
$this->_oView->lng_more_informations = i18n("More informations", "mod_rewrite");
$this->_oView->lng_more_informations = i18n("More informations", "cl-mod-rewrite");
$this->init();
}

Datei anzeigen

@ -31,56 +31,56 @@ if (!defined('CON_FRAMEWORK')) {
global $cfg;
// Use advanced mod_rewrites ( 1 = yes, 0 = none )
$cfg['mod_rewrite']['use'] = 0;
$cfg['cl-mod-rewrite']['use'] = 0;
// Path to the htaccess file with trailling slash from domain-root!
$cfg['mod_rewrite']['rootdir'] = '/';
$cfg['cl-mod-rewrite']['rootdir'] = '/';
// Check path to the htaccess file ( 1 = yes, 0 = none )
$cfg['mod_rewrite']['checkrootdir'] = 1;
$cfg['cl-mod-rewrite']['checkrootdir'] = 1;
// Start TreeLocation from Root Tree (set to 1) or get location from first category (set to 0)
$cfg['mod_rewrite']['startfromroot'] = 0;
$cfg['cl-mod-rewrite']['startfromroot'] = 0;
// Prevent Duplicated Content, if startfromroot is enabled ( 1 = yes, 0 = none )
$cfg['mod_rewrite']['prevent_duplicated_content'] = 0;
$cfg['cl-mod-rewrite']['prevent_duplicated_content'] = 0;
// is multilanguage? ( 1 = yes, 0 = none )
$cfg['mod_rewrite']['use_language'] = 0;
$cfg['cl-mod-rewrite']['use_language'] = 0;
// use language name in url? ( 1 = yes, 0 = none )
$cfg['mod_rewrite']['use_language_name'] = 0;
$cfg['cl-mod-rewrite']['use_language_name'] = 0;
// is multiclient in only one directory? ( 1 = yes, 0 = none )
$cfg['mod_rewrite']['use_client'] = 0;
$cfg['cl-mod-rewrite']['use_client'] = 0;
// use client name in url? ( 1 = yes, 0 = none )
$cfg['mod_rewrite']['use_client_name'] = 0;
$cfg['cl-mod-rewrite']['use_client_name'] = 0;
// use lowercase url? ( 1 = yes, 0 = none )
$cfg['mod_rewrite']['use_lowercase_uri'] = 1;
$cfg['cl-mod-rewrite']['use_lowercase_uri'] = 1;
// file extension for article links
$cfg['mod_rewrite']['file_extension'] = '.html';
$cfg['cl-mod-rewrite']['file_extension'] = '.html';
// The percentage if the category name have to match with database names.
$cfg['mod_rewrite']['category_resolve_min_percentage'] = '75';
$cfg['cl-mod-rewrite']['category_resolve_min_percentage'] = '75';
// Add start article name to url (1 = yes, 0 = none)
$cfg['mod_rewrite']['add_startart_name_to_url'] = 1;
$cfg['cl-mod-rewrite']['add_startart_name_to_url'] = 1;
// Default start article name to use, depends on active add_startart_name_to_url
$cfg['mod_rewrite']['default_startart_name'] = 'index';
$cfg['cl-mod-rewrite']['default_startart_name'] = 'index';
// Rewrite urls on generating the code for the page. If active, the responsibility will be
// outsourced to moduleoutputs and you have to adapt the moduleoutputs manually. Each output of
// internal article/category links must be processed by using $sess->url. (1 = yes, 0 = none)
$cfg['mod_rewrite']['rewrite_urls_at_congeneratecode'] = 0;
$cfg['cl-mod-rewrite']['rewrite_urls_at_congeneratecode'] = 0;
// Rewrite urls on output of htmlcode at front_content.php. Is the old way, and doesn't require
// adapting of moduleoutputs. On the other hand usage of this way will be slower than rewriting
// option above. (1 = yes, 0 = none)
$cfg['mod_rewrite']['rewrite_urls_at_front_content_output'] = 1;
$cfg['cl-mod-rewrite']['rewrite_urls_at_front_content_output'] = 1;
// Following five settings write urls like this one:
@ -89,26 +89,26 @@ $cfg['mod_rewrite']['rewrite_urls_at_front_content_output'] = 1;
// backend.
// NOTE: category_seperator and article_seperator must contain different character.
// Separator for categories
$cfg['mod_rewrite']['category_seperator'] = '/';
$cfg['cl-mod-rewrite']['category_seperator'] = '/';
// Separator between category and article
$cfg['mod_rewrite']['article_seperator'] = '/';
$cfg['cl-mod-rewrite']['article_seperator'] = '/';
// Word seperator in category names
$cfg['mod_rewrite']['category_word_seperator'] = '-';
$cfg['cl-mod-rewrite']['category_word_seperator'] = '-';
// Word seperator in article names
$cfg['mod_rewrite']['article_word_seperator'] = '-';
$cfg['cl-mod-rewrite']['article_word_seperator'] = '-';
// Routing settings for incomming urls. Here you can define routing rules as follows:
// $cfg['mod_rewrite']['routing'] = array(
// $cfg['cl-mod-rewrite']['routing'] = array(
// '/a_incomming/url/foobar.html' => '/new_url/foobar.html', # route /a_incomming/url/foobar.html to /new_url/foobar.html
// '/cms/' => '/' # route /cms/ to / (doc root of client)
// );
$cfg['mod_rewrite']['routing'] = array();
$cfg['cl-mod-rewrite']['routing'] = array();
// Redirect invalid articles to errorpage (1 = yes, 0 = none)
$cfg['mod_rewrite']['redirect_invalid_article_to_errorsite'] = 0;
$cfg['cl-mod-rewrite']['redirect_invalid_article_to_errorsite'] = 0;

Datei anzeigen

@ -52,25 +52,25 @@ if (isset($client) && (int) $client > 0) {
// include necessary sources
cInclude('classes', 'Debug/DebuggerFactory.class.php');
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_controller_abstract.php');
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_content_controller.php');
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_contentexpert_controller.php');
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_contenttest_controller.php');
plugin_include('mod_rewrite', 'classes/class.modrewritebase.php');
plugin_include('mod_rewrite', 'classes/class.modrewrite.php');
plugin_include('mod_rewrite', 'classes/class.modrewritecontroller.php');
plugin_include('mod_rewrite', 'classes/class.modrewritedebugger.php');
plugin_include('mod_rewrite', 'classes/class.modrewritetest.php');
plugin_include('mod_rewrite', 'classes/class.modrewriteurlstack.php');
plugin_include('mod_rewrite', 'classes/class.modrewriteurlutil.php');
plugin_include('mod_rewrite', 'includes/functions.mod_rewrite.php');
plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_controller_abstract.php');
plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_content_controller.php');
plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_contentexpert_controller.php');
plugin_include('cl-mod-rewrite', 'classes/controller/class.modrewrite_contenttest_controller.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewritebase.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewrite.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewritecontroller.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewritedebugger.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewritetest.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewriteurlstack.php');
plugin_include('cl-mod-rewrite', 'classes/class.modrewriteurlutil.php');
plugin_include('cl-mod-rewrite', 'includes/functions.mod_rewrite.php');
global $lngAct;
$lngAct['mod_rewrite']['mod_rewrite'] = i18n("Advanced Mod Rewrite", "mod_rewrite");
$lngAct['mod_rewrite']['mod_rewrite_expert'] = i18n("Advanced Mod Rewrite functions", "mod_rewrite");
$lngAct['mod_rewrite']['mod_rewrite_test'] = i18n("Advanced Mod Rewrite test", "mod_rewrite");
$lngAct['cl-mod-rewrite']['mod_rewrite'] = i18n("Advanced Mod Rewrite", "cl-mod-rewrite");
$lngAct['cl-mod-rewrite']['mod_rewrite_expert'] = i18n("Advanced Mod Rewrite functions", "cl-mod-rewrite");
$lngAct['cl-mod-rewrite']['mod_rewrite_test'] = i18n("Advanced Mod Rewrite test", "cl-mod-rewrite");
// set debug configuration

Datei anzeigen

@ -1,4 +1,5 @@
<?php
/**
* Mod Rewrite front_content.php controller. Does some preprocessing jobs, tries
* to set following variables, depending on mod rewrite configuration and if
@ -13,7 +14,7 @@
* @package plugin
* @subpackage Mod Rewrite
* @version SVN Revision $Rev: 128 $
* @id $Id: functions.mod_rewrite.php 128 2019-07-03 11:58:28Z oldperl $:
* @id $Id: functions.cl-mod-rewrite.php 128 2019-07-03 11:58:28Z oldperl $:
* @author Stefan Seifarth / stese
* @author Murat Purc <murat@purc.de>
* @copyright www.polycoder.de
@ -22,16 +23,14 @@
* @link http://www.4fb.de
* @link http://www.contenido.org
*/
if (!defined('CON_FRAMEWORK')) {
die('Illegal call');
}
cInclude('classes', 'contenido/class.articlelanguage.php');
/**
* Processes mod_rewrite related job for created new tree.
* Processes cl-mod-rewrite related job for created new tree.
*
* Will be called by chain 'Contenido.Action.str_newtree.AfterCall'.
*
@ -54,7 +53,7 @@ function mr_strNewTree(array $data) {
}
/**
* Processes mod_rewrite related job for created new category.
* Processes cl-mod-rewrite related job for created new category.
*
* Will be called by chain 'Contenido.Action.str_newcat.AfterCall'.
*
@ -77,7 +76,7 @@ function mr_strNewCategory(array $data) {
}
/**
* Processes mod_rewrite related job for renamed category
* Processes cl-mod-rewrite related job for renamed category
* 2010-02-01: and now all existing subcategories and modify their paths too...
* 2010-02-01: max 50 recursion level
*
@ -130,7 +129,7 @@ function mr_strRenameCategory(array $data) {
}
/**
* Processes mod_rewrite related job after moving a category up.
* Processes cl-mod-rewrite related job after moving a category up.
*
* Will be called by chain 'Contenido.Action.str_moveupcat.AfterCall'.
*
@ -164,7 +163,7 @@ function mr_strMoveUpCategory($idcat) {
}
/**
* Processes mod_rewrite related job after moving a category down.
* Processes cl-mod-rewrite related job after moving a category down.
*
* Will be called by chain 'Contenido.Action.str_movedowncat.AfterCall'.
*
@ -197,7 +196,7 @@ function mr_strMovedownCategory($idcat) {
}
/**
* Processes mod_rewrite related job after moving a category subtree.
* Processes cl-mod-rewrite related job after moving a category subtree.
*
* Will be called by chain 'Contenido.Action.str_movesubtree.AfterCall'.
*
@ -239,7 +238,7 @@ function mr_strMoveSubtree(array $data) {
}
/**
* Processes mod_rewrite related job after copying a category subtree.
* Processes cl-mod-rewrite related job after copying a category subtree.
*
* Will be called by chain 'Contenido.Category.strCopyCategory'.
*
@ -267,7 +266,7 @@ function mr_strCopyCategory(array $data) {
}
/**
* Processes mod_rewrite related job during structure synchronisation process,
* Processes cl-mod-rewrite related job during structure synchronisation process,
* sets the urlpath of current category.
*
* Will be called by chain 'Contenido.Category.strSyncCategory_Loop'.
@ -282,7 +281,7 @@ function mr_strSyncCategory(array $data) {
}
/**
* Processes mod_rewrite related job for saved articles (new or modified article).
* Processes cl-mod-rewrite related job for saved articles (new or modified article).
*
* Will be called by chain 'Contenido.Action.con_saveart.AfterCall'.
*
@ -322,7 +321,7 @@ function mr_conSaveArticle(array $data) {
}
/**
* Processes mod_rewrite related job for articles beeing moved.
* Processes cl-mod-rewrite related job for articles beeing moved.
*
* Will be called by chain 'Contenido.Article.conMoveArticles_Loop'.
*
@ -350,7 +349,7 @@ function mr_conMoveArticles($data) {
}
/**
* Processes mod_rewrite related job for duplicated articles.
* Processes cl-mod-rewrite related job for duplicated articles.
*
* Will be called by chain 'Contenido.Article.conCopyArtLang_AfterInsert'.
*
@ -377,7 +376,7 @@ function mr_conCopyArtLang($data) {
}
/**
* Processes mod_rewrite related job for synchronized articles.
* Processes cl-mod-rewrite related job for synchronized articles.
*
* Will be called by chain 'Contenido.Article.conSyncArticle_AfterInsert'.
*
@ -465,7 +464,7 @@ function mr_buildNewUrl($url) {
* Replaces existing ancors inside passed code, while rebuilding the urls.
*
* Will be called by chain 'Contenido.Content.conGenerateCode' or
* 'Contenido.Frontend.HTMLCodeOutput' depening on mod_rewrite settings.
* 'Contenido.Frontend.HTMLCodeOutput' depening on cl-mod-rewrite settings.
*
* @param string $code Code to prepare
* @return string New code
@ -481,9 +480,9 @@ function mr_buildGeneratedCode($code) {
// anchor hack
$code = preg_replace_callback(
"/<a([^>]*)href\s*=\s*[\"|\'][\/]#(.?|.+?)[\"|\']([^>]*)>/i",
create_function('$matches', 'return ModRewrite::rewriteHtmlAnchor($matches);'),
$code
"/<a([^>]*)href\s*=\s*[\"|\'][\/]#(.?|.+?)[\"|\']([^>]*)>/i",
create_function('$matches', 'return ModRewrite::rewriteHtmlAnchor($matches);'),
$code
);
// remove tinymce single quote entities:
@ -495,9 +494,9 @@ function mr_buildGeneratedCode($code) {
// IE hack with wrong base href interpretation
$code = preg_replace_callback(
"/([\"|\'|=])upload\/(.?|.+?)([\"|\'|>])/i",
create_function('$matches', 'return stripslashes($matches[1]' . $sBaseUri . ' . "upload/" . $matches[2] . $matches[3]);'),
$code
"/([\"|\'|=])upload\/(.?|.+?)([\"|\'|>])/i",
create_function('$matches', 'return stripslashes($matches[1]' . $sBaseUri . ' . "upload/" . $matches[2] . $matches[3]);'),
$code
);
// define some preparations to replace /front_content.php & ./front_content.php
@ -529,9 +528,9 @@ function mr_buildGeneratedCode($code) {
$code = str_replace('"front_content.php"', '"' . mr_buildNewUrl('front_content.php') . '"', $code);
$code = str_replace("'front_content.php'", "'" . mr_buildNewUrl('front_content.php') . "'", $code);
$code = preg_replace_callback(
"/([\"|\'|=])front_content\.php(.?|.+?)([\"|\'|>])/i",
create_function('$aMatches', 'return $aMatches[1] . mr_buildNewUrl("front_content.php" . $aMatches[2]) . $aMatches[3];'),
$code
"/([\"|\'|=])front_content\.php(.?|.+?)([\"|\'|>])/i",
create_function('$aMatches', 'return $aMatches[1] . mr_buildNewUrl("front_content.php" . $aMatches[2]) . $aMatches[3];'),
$code
);
ModRewriteDebugger::add($code, 'mr_buildGeneratedCode() out');
@ -540,9 +539,9 @@ function mr_buildGeneratedCode($code) {
} else {
// anchor hack for non modrewrite websites
$code = preg_replace_callback(
"/<a([^>]*)href\s*=\s*[\"|\'][\/]#(.?|.+?)[\"|\']([^>]*)>/i",
create_function('$matches', 'return ModRewrite::contenidoHtmlAnchor($matches, $GLOBALS["is_XHTML"]);'),
$code
"/<a([^>]*)href\s*=\s*[\"|\'][\/]#(.?|.+?)[\"|\']([^>]*)>/i",
create_function('$matches', 'return ModRewrite::contenidoHtmlAnchor($matches, $GLOBALS["is_XHTML"]);'),
$code
);
}
@ -590,7 +589,7 @@ function mr_setClientLanguageId($client) {
* Loads Advanced Mod Rewrite configuration for passed client using serialized
* file containing the settings.
*
* File is placed in /contenido/mod_rewrite/includes/and is named like
* File is placed in /contenido/cl-mod-rewrite/includes/and is named like
* config.mod_rewrite_{client_id}.php.
*
* @param int $clientId Id of client
@ -615,16 +614,22 @@ function mr_loadConfiguration($clientId, $forceReload = false) {
$cfg = array_merge($cfg, $mrConfig);
} else {
// couldn't load configuration, set defaults
include_once($cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/includes/config.mod_rewrite_default.php');
include_once($cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/includes/config.mod_rewrite_default.php');
}
$aLoaded[$clientId] = true;
}
function mr_getConfigurationFilePath($clientId) {
$clientConfig = cRegistry::getClientConfig((int) $clientId);
$fePath = $clientConfig['path']['frontend'];
return $fePath . 'data/config/' . CON_ENVIRONMENT . '/config.mod_rewrite.php';
}
/**
* Returns the mod rewrite configuration array of an client.
*
* File is placed in /contenido/mod_rewrite/includes/and is named like
* File is placed in /contenido/cl-mod-rewrite/includes/and is named like
* config.mod_rewrite_{client_id}.php.
*
* @param int $clientId Id of client
@ -633,12 +638,31 @@ function mr_loadConfiguration($clientId, $forceReload = false) {
function mr_getConfiguration($clientId) {
global $cfg;
$file = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/includes/config.mod_rewrite_' . $clientId . '.php';
$clientId = (int) $clientId;
$file = mr_getConfigurationFilePath($clientId);
if (!is_file($file) || !is_readable($file)) {
$backendPath = cRegistry::getBackendPath();
$file = $cfg['path']['config'] . 'config.mod_rewrite_' . $clientId . '.php';
}
if (!is_file($file) || !is_readable($file)) {
$backendPath = cRegistry::getBackendPath();
$file = $backendPath . $cfg['path']['plugins'] . 'cl-mod-rewrite/includes/config.mod_rewrite_' . $clientId . '.php';
}
if (!is_file($file) || !is_readable($file)) {
return null;
}
if ($content = file_get_contents($file)) {
return unserialize($content);
$content = unserialize($content);
if (array_key_exists("mod_rewrite", $content)) {
$content['cl-mod-rewrite'] = $content['mod_rewrite'];
unset($content['mod_rewrite']);
}
return $content;
} else {
return null;
}
@ -647,7 +671,7 @@ function mr_getConfiguration($clientId) {
/**
* Saves the mod rewrite configuration array of an client.
*
* File is placed in /contenido/mod_rewrite/includes/and is named like
* File is placed in /contenido/cl-mod-rewrite/includes/and is named like
* config.mod_rewrite_{client_id}.php.
*
* @param int $clientId Id of client
@ -657,7 +681,7 @@ function mr_getConfiguration($clientId) {
function mr_setConfiguration($clientId, array $config) {
global $cfg;
$file = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/includes/config.mod_rewrite_' . $clientId . '.php';
$file = $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/includes/config.mod_rewrite_' . $clientId . '.php';
$result = file_put_contents($file, serialize($config));
return ($result) ? true : false;
}
@ -673,10 +697,10 @@ function mr_setConfiguration($clientId, array $config) {
function mr_runFrontendController() {
$iStartTime = getmicrotime();
plugin_include('mod_rewrite', 'includes/config.plugin.php');
plugin_include('cl-mod-rewrite', 'includes/config.plugin.php');
if (ModRewrite::isEnabled() == true) {
plugin_include('mod_rewrite', 'includes/front_content_controller.php');
plugin_include('cl-mod-rewrite', 'includes/front_content_controller.php');
$totalTime = sprintf('%.4f', (getmicrotime() - $iStartTime));
ModRewriteDebugger::add($totalTime, 'mr_runFrontendController() total time');
@ -891,8 +915,7 @@ function mr_header($header) {
*/
function mr_debugOutput($print = true) {
global $DB_Contenido_QueryCache;
if (isset($DB_Contenido_QueryCache) && is_array($DB_Contenido_QueryCache) &&
count($DB_Contenido_QueryCache) > 0) {
if (isset($DB_Contenido_QueryCache) && is_array($DB_Contenido_QueryCache) && count($DB_Contenido_QueryCache) > 0) {
ModRewriteDebugger::add($DB_Contenido_QueryCache, 'sql statements');
// calculate total time consumption of queries

Datei anzeigen

@ -1,6 +1,6 @@
<?php
/**
* Plugin mod_rewrite backend include file to administer settings (in content frame)
* Plugin cl-mod-rewrite backend include file to administer settings (in content frame)
*
* @package plugin
* @subpackage Mod Rewrite
@ -174,117 +174,117 @@ $oView->rewrite_routing = $data;
$oView->redirect_invalid_article_to_errorsite_chk = ($aMrCfg['redirect_invalid_article_to_errorsite'] == 1) ? ' checked="checked"' : '';
$oView->lng_version = i18n("Version", "mod_rewrite");
$oView->lng_author = i18n("Author", "mod_rewrite");
$oView->lng_mail_to_author = i18n("E-Mail to author", "mod_rewrite");
$oView->lng_pluginpage = i18n("Plugin page", "mod_rewrite");
$oView->lng_visit_pluginpage = i18n("Visit plugin page", "mod_rewrite");
$oView->lng_opens_in_new_window = i18n("opens page in new window", "mod_rewrite");
$oView->lng_contenido_forum = i18n("CONTENIDO forum", "mod_rewrite");
$oView->lng_pluginthread_in_contenido_forum = i18n("Plugin thread in CONTENIDO forum", "mod_rewrite");
$oView->lng_plugin_settings = i18n("Plugin settings", "mod_rewrite");
$oView->lng_note = i18n("Note", "mod_rewrite");
$oView->lng_version = i18n("Version", "cl-mod-rewrite");
$oView->lng_author = i18n("Author", "cl-mod-rewrite");
$oView->lng_mail_to_author = i18n("E-Mail to author", "cl-mod-rewrite");
$oView->lng_pluginpage = i18n("Plugin page", "cl-mod-rewrite");
$oView->lng_visit_pluginpage = i18n("Visit plugin page", "cl-mod-rewrite");
$oView->lng_opens_in_new_window = i18n("opens page in new window", "cl-mod-rewrite");
$oView->lng_contenido_forum = i18n("CONTENIDO forum", "cl-mod-rewrite");
$oView->lng_pluginthread_in_contenido_forum = i18n("Plugin thread in CONTENIDO forum", "cl-mod-rewrite");
$oView->lng_plugin_settings = i18n("Plugin settings", "cl-mod-rewrite");
$oView->lng_note = i18n("Note", "cl-mod-rewrite");
// @todo copy htacccess check into ModRewrite_ContentController->_doChecks()
$sMsg = i18n("The .htaccess file could not found either in CONTENIDO installation directory nor in client directory.<br>It should set up in %sFunctions%s area, if needed.", "mod_rewrite");
$sMsg = i18n("The .htaccess file could not found either in CONTENIDO installation directory nor in client directory.<br>It should set up in %sFunctions%s area, if needed.", "cl-mod-rewrite");
$oView->lng_msg_no_htaccess_found = sprintf($sMsg, '<a href="main.php?area=mod_rewrite_expert&frame=4&contenido=' . $oView->sessid . '&idclient=' . $client . '" onclick="parent.right_top.sub.clicked(parent.right_top.document.getElementById(\'c_1\').firstChild);">', '</a>');
$sMsg = i18n("Found", "mod_rewrite");
$sMsg = i18n("Found", "cl-mod-rewrite");
$oView->lng_msg_no_emptyaliases_found = sprintf($sMsg, '<a href="main.php?area=mod_rewrite_expert&frame=4&contenido=' . $oView->sessid . '&idclient=' . $client . '" onclick="parent.right_top.sub.clicked(parent.right_top.document.getElementById(\'c_1\').firstChild);">', '</a>');
$oView->lng_enable_amr = i18n("Enable Advanced Mod Rewrite", "mod_rewrite");
$oView->lng_enable_amr = i18n("Enable Advanced Mod Rewrite", "cl-mod-rewrite");
$oView->lng_msg_enable_amr_info = i18n("Disabling of plugin does not result in disabling mod rewrite module of the web server - This means,<br> all defined rules in the .htaccess are still active and could create unwanted side effects.<br><br>Apache mod rewrite could be enabled/disabled by setting the RewriteEngine directive.<br>Any defined rewrite rules could remain in the .htaccess and they will not processed,<br>if the mod rewrite module is disabled", "mod_rewrite");
$oView->lng_msg_enable_amr_info = i18n("Disabling of plugin does not result in disabling mod rewrite module of the web server - This means,<br> all defined rules in the .htaccess are still active and could create unwanted side effects.<br><br>Apache mod rewrite could be enabled/disabled by setting the RewriteEngine directive.<br>Any defined rewrite rules could remain in the .htaccess and they will not processed,<br>if the mod rewrite module is disabled", "cl-mod-rewrite");
$oView->lng_example = i18n("Example", "mod_rewrite");
$oView->lng_example = i18n("Example", "cl-mod-rewrite");
$oView->lng_msg_enable_amr_info_example = i18n("# enable apache mod rewrite module\nRewriteEngine on\n\n# disable apache mod rewrite module\nRewriteEngine off", "mod_rewrite");
$oView->lng_msg_enable_amr_info_example = i18n("# enable apache mod rewrite module\nRewriteEngine on\n\n# disable apache mod rewrite module\nRewriteEngine off", "cl-mod-rewrite");
$oView->lng_rootdir = i18n("Path to .htaccess from DocumentRoot", "mod_rewrite");
$oView->lng_rootdir_info = i18n("Type '/' if the .htaccess file lies inside the wwwroot (DocumentRoot) folder.<br>Type the path to the subfolder fromm wwwroot, if CONTENIDO is installed in a subfolder within the wwwroot<br>(e. g. http://domain/mycontenido -&gt; path = '/mycontenido/')", "mod_rewrite");
$oView->lng_rootdir = i18n("Path to .htaccess from DocumentRoot", "cl-mod-rewrite");
$oView->lng_rootdir_info = i18n("Type '/' if the .htaccess file lies inside the wwwroot (DocumentRoot) folder.<br>Type the path to the subfolder fromm wwwroot, if CONTENIDO is installed in a subfolder within the wwwroot<br>(e. g. http://domain/mycontenido -&gt; path = '/mycontenido/')", "cl-mod-rewrite");
$oView->lng_checkrootdir = i18n("Check path to .htaccess", "mod_rewrite");
$oView->lng_checkrootdir_info = i18n("The path will be checked, if this option is enabled.<br>But this could result in an error in some cases, even if the specified path is valid and<br>clients DocumentRoot differs from CONTENIDO backend DocumentRoot.", "mod_rewrite");
$oView->lng_checkrootdir = i18n("Check path to .htaccess", "cl-mod-rewrite");
$oView->lng_checkrootdir_info = i18n("The path will be checked, if this option is enabled.<br>But this could result in an error in some cases, even if the specified path is valid and<br>clients DocumentRoot differs from CONTENIDO backend DocumentRoot.", "cl-mod-rewrite");
$oView->lng_startfromroot = i18n("Should the name of root category be displayed in the URL?", "mod_rewrite");
$oView->lng_startfromroot_lbl = i18n("Start from root category", "mod_rewrite");
$oView->lng_startfromroot_info = i18n("If enabled, the name of the root category (e. g. 'Mainnavigation' in a CONTENIDO default installation), will be preceded to the URL.", "mod_rewrite");
$oView->lng_startfromroot = i18n("Should the name of root category be displayed in the URL?", "cl-mod-rewrite");
$oView->lng_startfromroot_lbl = i18n("Start from root category", "cl-mod-rewrite");
$oView->lng_startfromroot_info = i18n("If enabled, the name of the root category (e. g. 'Mainnavigation' in a CONTENIDO default installation), will be preceded to the URL.", "cl-mod-rewrite");
$oView->lng_use_client = i18n("Are several clients maintained in one directory?", "mod_rewrite");
$oView->lng_use_client_lbl = i18n("Prepend client to the URL", "mod_rewrite");
$oView->lng_use_client_name_lbl = i18n("Use client name instead of the id", "mod_rewrite");
$oView->lng_use_client = i18n("Are several clients maintained in one directory?", "cl-mod-rewrite");
$oView->lng_use_client_lbl = i18n("Prepend client to the URL", "cl-mod-rewrite");
$oView->lng_use_client_name_lbl = i18n("Use client name instead of the id", "cl-mod-rewrite");
$oView->lng_use_language = i18n("Should the language appear in the URL (required for multi language websites)?", "mod_rewrite");
$oView->lng_use_language_lbl = i18n("Prepend language to the URL", "mod_rewrite");
$oView->lng_use_language_name_lbl = i18n("Use language name instead of the id", "mod_rewrite");
$oView->lng_use_language = i18n("Should the language appear in the URL (required for multi language websites)?", "cl-mod-rewrite");
$oView->lng_use_language_lbl = i18n("Prepend language to the URL", "cl-mod-rewrite");
$oView->lng_use_language_name_lbl = i18n("Use language name instead of the id", "cl-mod-rewrite");
$oView->lng_userdefined_separators_header = i18n("Configure your own separators with following 4 settings<br>to control generated URLs to your own taste", "mod_rewrite");
$oView->lng_userdefined_separators_example = i18n("www.domain.com/category1-category2.articlename.html\nwww.domain.com/category1/category2-articlename.html\nwww.domain.com/category.name1~category2~articlename.html\nwww.domain.com/category_name1-category2-articlename.foo", "mod_rewrite");
$oView->lng_userdefined_separators_example_a = i18n("Category separator has to be different from category-word separator", "mod_rewrite");
$oView->lng_userdefined_separators_example_a_example = i18n("# Example: Category separator (/) and category-word separator (_)\ncategory_one/category_two/articlename.html", "mod_rewrite");
$oView->lng_userdefined_separators_example_b = i18n("Category separator has to be different from article-word separator", "mod_rewrite");
$oView->lng_userdefined_separators_example_b_example = i18n("# Example: Category separator (/) and article-word separator (-)\ncategory_one/category_two/article-description.html", "mod_rewrite");
$oView->lng_userdefined_separators_example_c = i18n("Category-article separator has to be different from article-word separator", "mod_rewrite");
$oView->lng_userdefined_separators_example_c_example = i18n("# Example: Category-article separator (/) and article-word separator (-)\ncategory_one/category_two/article-description.html", "mod_rewrite");
$oView->lng_userdefined_separators_header = i18n("Configure your own separators with following 4 settings<br>to control generated URLs to your own taste", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example = i18n("www.domain.com/category1-category2.articlename.html\nwww.domain.com/category1/category2-articlename.html\nwww.domain.com/category.name1~category2~articlename.html\nwww.domain.com/category_name1-category2-articlename.foo", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_a = i18n("Category separator has to be different from category-word separator", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_a_example = i18n("# Example: Category separator (/) and category-word separator (_)\ncategory_one/category_two/articlename.html", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_b = i18n("Category separator has to be different from article-word separator", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_b_example = i18n("# Example: Category separator (/) and article-word separator (-)\ncategory_one/category_two/article-description.html", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_c = i18n("Category-article separator has to be different from article-word separator", "cl-mod-rewrite");
$oView->lng_userdefined_separators_example_c_example = i18n("# Example: Category-article separator (/) and article-word separator (-)\ncategory_one/category_two/article-description.html", "cl-mod-rewrite");
$oView->lng_category_separator = i18n("Category separator (delemiter between single categories)", "mod_rewrite");
$oView->lng_catart_separator_info = sprintf(i18n("(possible values: %s)", "mod_rewrite"), $aSeparator['info']);
$oView->lng_word_separator_info = sprintf(i18n("(possible values: %s)", "mod_rewrite"), $aWordSeparator['info']);
$oView->lng_category_word_separator = i18n("Category-word separator (delemiter between category words)", "mod_rewrite");
$oView->lng_article_separator = i18n("Category-article separator (delemiter between category-block and article)", "mod_rewrite");
$oView->lng_article_word_separator = i18n("Article-word separator (delemiter between article words)", "mod_rewrite");
$oView->lng_category_separator = i18n("Category separator (delemiter between single categories)", "cl-mod-rewrite");
$oView->lng_catart_separator_info = sprintf(i18n("(possible values: %s)", "cl-mod-rewrite"), $aSeparator['info']);
$oView->lng_word_separator_info = sprintf(i18n("(possible values: %s)", "cl-mod-rewrite"), $aWordSeparator['info']);
$oView->lng_category_word_separator = i18n("Category-word separator (delemiter between category words)", "cl-mod-rewrite");
$oView->lng_article_separator = i18n("Category-article separator (delemiter between category-block and article)", "cl-mod-rewrite");
$oView->lng_article_word_separator = i18n("Article-word separator (delemiter between article words)", "cl-mod-rewrite");
$oView->lng_add_startart_name_to_url = i18n("Append article name to URLs", "mod_rewrite");
$oView->lng_add_startart_name_to_url_lbl = i18n("Append article name always to URLs (even at URLs to categories)", "mod_rewrite");
$oView->lng_default_startart_name = i18n("Default article name without extension", "mod_rewrite");
$oView->lng_default_startart_name_info = i18n("e. g. 'index' for index.ext<br>In case of selected 'Append article name always to URLs' option and a empty field,<br>the name of the start article will be used", "mod_rewrite");
$oView->lng_add_startart_name_to_url = i18n("Append article name to URLs", "cl-mod-rewrite");
$oView->lng_add_startart_name_to_url_lbl = i18n("Append article name always to URLs (even at URLs to categories)", "cl-mod-rewrite");
$oView->lng_default_startart_name = i18n("Default article name without extension", "cl-mod-rewrite");
$oView->lng_default_startart_name_info = i18n("e. g. 'index' for index.ext<br>In case of selected 'Append article name always to URLs' option and a empty field,<br>the name of the start article will be used", "cl-mod-rewrite");
$oView->lng_file_extension = i18n("File extension at the end of the URL", "mod_rewrite");
$oView->lng_file_extension_info = i18n("Specification of file extension with a preceded dot<br>e.g. '.html' for http://host/foo/bar.html", "mod_rewrite");
$oView->lng_file_extension_info2 = i18n("It's strongly recommended to specify a extension here,<br>if the option 'Append article name always to URLs' was not selected.<br><br>Otherwise URLs to categories and articles would have the same format<br>which may result in unresolvable categories/articles in some cases.", "mod_rewrite");
$oView->lng_file_extension_info3 = i18n("It's necessary to specify a file extension at the moment, due do existing issues, which are not solved until yet. An not defined extension may result in invalid article detection in some cases.", "mod_rewrite");
$oView->lng_file_extension = i18n("File extension at the end of the URL", "cl-mod-rewrite");
$oView->lng_file_extension_info = i18n("Specification of file extension with a preceded dot<br>e.g. '.html' for http://host/foo/bar.html", "cl-mod-rewrite");
$oView->lng_file_extension_info2 = i18n("It's strongly recommended to specify a extension here,<br>if the option 'Append article name always to URLs' was not selected.<br><br>Otherwise URLs to categories and articles would have the same format<br>which may result in unresolvable categories/articles in some cases.", "cl-mod-rewrite");
$oView->lng_file_extension_info3 = i18n("It's necessary to specify a file extension at the moment, due do existing issues, which are not solved until yet. An not defined extension may result in invalid article detection in some cases.", "cl-mod-rewrite");
$oView->lng_use_lowercase_uri = i18n("Should the URLs be written in lower case?", "mod_rewrite");
$oView->lng_use_lowercase_uri_lbl = i18n("URLs in lower case", "mod_rewrite");
$oView->lng_use_lowercase_uri = i18n("Should the URLs be written in lower case?", "cl-mod-rewrite");
$oView->lng_use_lowercase_uri_lbl = i18n("URLs in lower case", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content = i18n("Duplicated content", "mod_rewrite");
$oView->lng_prevent_duplicated_content_lbl = i18n("Prevent duplicated content", "mod_rewrite");
$oView->lng_prevent_duplicated_content = i18n("Duplicated content", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content_lbl = i18n("Prevent duplicated content", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content_info = i18n("Depending on configuration, pages could be found thru different URLs.<br>Enabling of this option prevents this. Examples for duplicated content", "mod_rewrite");
$oView->lng_prevent_duplicated_content_info2 = i18n("Name of the root category in the URL: Feasible is /maincategory/subcategory/ and /subcategory/\nLanguage in the URL: Feasible is /german/category/ and /1/category/\nClient in the URL: Feasible is /client/category/ und /1/category/", "mod_rewrite");
$oView->lng_prevent_duplicated_content_info = i18n("Depending on configuration, pages could be found thru different URLs.<br>Enabling of this option prevents this. Examples for duplicated content", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content_info2 = i18n("Name of the root category in the URL: Feasible is /maincategory/subcategory/ and /subcategory/\nLanguage in the URL: Feasible is /german/category/ and /1/category/\nClient in the URL: Feasible is /client/category/ und /1/category/", "cl-mod-rewrite");
$oView->lng_prevent_duplicated_content_info2 = '<li>' . str_replace("\n", '</li><li>', $oView->lng_prevent_duplicated_content_info2) . '</li>';
$oView->lng_category_resolve_min_percentage = i18n("Percentage for similar category paths in URLs", "mod_rewrite");
$oView->lng_category_resolve_min_percentage_info = i18n("This setting refers only to the category path of a URL. If AMR is configured<br>to prepend e. g. the root category, language and/or client to the URL,<br>the specified percentage will not applied to those parts of the URL.<br>An incoming URL will be cleaned from those values and the remaining path (urlpath of the category)<br>will be checked against similarities.", "mod_rewrite");
$oView->lng_category_resolve_min_percentage_example = i18n("100 = exact match with no tolerance\n85 = paths with little errors will match to similar ones\n0 = matching will work even for total wrong paths", "mod_rewrite");
$oView->lng_category_resolve_min_percentage = i18n("Percentage for similar category paths in URLs", "cl-mod-rewrite");
$oView->lng_category_resolve_min_percentage_info = i18n("This setting refers only to the category path of a URL. If AMR is configured<br>to prepend e. g. the root category, language and/or client to the URL,<br>the specified percentage will not applied to those parts of the URL.<br>An incoming URL will be cleaned from those values and the remaining path (urlpath of the category)<br>will be checked against similarities.", "cl-mod-rewrite");
$oView->lng_category_resolve_min_percentage_example = i18n("100 = exact match with no tolerance\n85 = paths with little errors will match to similar ones\n0 = matching will work even for total wrong paths", "cl-mod-rewrite");
$oView->lng_redirect_invalid_article_to_errorsite = i18n("Redirect in case of invalid articles", "mod_rewrite");
$oView->lng_redirect_invalid_article_to_errorsite_lbl = i18n("Redirect to error page in case of invaid articles", "mod_rewrite");
$oView->lng_redirect_invalid_article_to_errorsite_info = i18n("The start page will be displayed if this option is not enabled", "mod_rewrite");
$oView->lng_redirect_invalid_article_to_errorsite = i18n("Redirect in case of invalid articles", "cl-mod-rewrite");
$oView->lng_redirect_invalid_article_to_errorsite_lbl = i18n("Redirect to error page in case of invaid articles", "cl-mod-rewrite");
$oView->lng_redirect_invalid_article_to_errorsite_info = i18n("The start page will be displayed if this option is not enabled", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at = i18n("Moment of URL generation", "mod_rewrite");
$oView->lng_rewrite_urls_at_front_content_output_lbl = i18n("a.) During the output of HTML code of the page", "mod_rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info = i18n("Clean-URLs will be generated during page output. Modules/Plugins are able to generate URLs to frontend<br>as usual as in previous CONTENIDO versions using a format like 'front_content.php?idcat=1&amp;idart=2'.<br>The URLs will be replaced by the plugin to Clean-URLs before sending the HTML output.", "mod_rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info2 = i18n("Differences to variant b.)", "mod_rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info3 = i18n("Still compatible to old modules/plugins, since no changes in codes are required\nAll occurring URLs in HTML code, even those set by wysiwyg, will be switched to Clean-URLs\nAll URLs will usually be collected and converted to Clean-URLs at once.<br>Doing it this way reduces the amount of executed database significantly.", "mod_rewrite");
$oView->lng_rewrite_urls_at = i18n("Moment of URL generation", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_lbl = i18n("a.) During the output of HTML code of the page", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info = i18n("Clean-URLs will be generated during page output. Modules/Plugins are able to generate URLs to frontend<br>as usual as in previous CONTENIDO versions using a format like 'front_content.php?idcat=1&amp;idart=2'.<br>The URLs will be replaced by the plugin to Clean-URLs before sending the HTML output.", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info2 = i18n("Differences to variant b.)", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info3 = i18n("Still compatible to old modules/plugins, since no changes in codes are required\nAll occurring URLs in HTML code, even those set by wysiwyg, will be switched to Clean-URLs\nAll URLs will usually be collected and converted to Clean-URLs at once.<br>Doing it this way reduces the amount of executed database significantly.", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_front_content_output_info3 = '<li>' . str_replace("\n", '</li><li>', $oView->rewrite_urls_at_front_content_output_info3) . '</li>';
$oView->lng_rewrite_urls_at_congeneratecode_lbl = i18n("b.) In modules or plugins", "mod_rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info = i18n("By using this option, all Clean-URLs will be generated directly in module or plugins.<br>This means, all areas in modules/plugins, who generate internal URLs to categories/articles, have to be adapted manually.<br>All Clean-URLs have to be generated by using following function:", "mod_rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_example = i18n("# structure of a normal url\n\$url = 'front_content.php?idart=123&amp;lang=2&amp;client=1';\n\n# creation of a url by using the CONTENIDOs Url-Builder (since 4.8.9),\n# wich expects the parameter as a assoziative array\n\$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n\$newUrl = Contenido_Url::getInstance()->build(\$params);", "mod_rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info2 = i18n("Differences to variant a.)", "mod_rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info3 = i18n("The default way to generate URLs to fronend pages\nEach URL in modules/plugins has to be generated by UriBuilder\nEach generated Clean-Url requires a database query", "mod_rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_lbl = i18n("b.) In modules or plugins", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info = i18n("By using this option, all Clean-URLs will be generated directly in module or plugins.<br>This means, all areas in modules/plugins, who generate internal URLs to categories/articles, have to be adapted manually.<br>All Clean-URLs have to be generated by using following function:", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_example = i18n("# structure of a normal url\n\$url = 'front_content.php?idart=123&amp;lang=2&amp;client=1';\n\n# creation of a url by using the CONTENIDOs Url-Builder (since 4.8.9),\n# wich expects the parameter as a assoziative array\n\$params = array('idart'=>123, 'lang'=>2, 'client'=>1);\n\$newUrl = Contenido_Url::getInstance()->build(\$params);", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info2 = i18n("Differences to variant a.)", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info3 = i18n("The default way to generate URLs to fronend pages\nEach URL in modules/plugins has to be generated by UriBuilder\nEach generated Clean-Url requires a database query", "cl-mod-rewrite");
$oView->lng_rewrite_urls_at_congeneratecode_info3 = '<li>' . str_replace("\n", '</li><li>', $oView->lng_rewrite_urls_at_congeneratecode_info3) . '</li>';
$oView->lng_rewrite_routing = i18n("Routing", "mod_rewrite");
$oView->lng_rewrite_routing_info = i18n("Routing definitions for incoming URLs", "mod_rewrite");
$oView->lng_rewrite_routing_info2 = i18n("Type one routing definition per line as follows:", "mod_rewrite");
$oView->lng_rewrite_routing_example = i18n("# {incoming_url}>>>{new_url}\n/incoming_url/name.html>>>new_url/new_name.html\n\n# route a specific incoming url to a new page\n/campaign/20_percent_on_everything_except_animal_food.html>>>front_content.php?idcat=23\n\n# route request to wwwroot to a specific page\n/>>>front_content.php?idart=16", "mod_rewrite");
$oView->lng_rewrite_routing_info3 = i18n("The routing does not sends a HTTP header redirection to the destination URL, the redirection will happen internally by<br>replacing the detected incoming URL against the new destination URL (overwriting of article- categoryid)\nIncoming URLs can point to non existing resources (category/article), but the desttination URLs should point<br>to valid CONTENIDO articles/categories\nDestination URLs should point to real URLs to categories/articles,<br>e. g.front_content.php?idcat=23 or front_content.php?idart=34\nThe language id should attached to the URL in multi language sites<br>e. g. front_content.php?idcat=23&amp;lang=1\nThe client id should attached to the URL in multi client sites sharing the same folder<br>e. g. front_content.php?idcat=23&amp;client=2\nThe destination URL should not start with '/' or './' (wrong: /front_content.php, correct: front_content.php)", "mod_rewrite");
$oView->lng_rewrite_routing = i18n("Routing", "cl-mod-rewrite");
$oView->lng_rewrite_routing_info = i18n("Routing definitions for incoming URLs", "cl-mod-rewrite");
$oView->lng_rewrite_routing_info2 = i18n("Type one routing definition per line as follows:", "cl-mod-rewrite");
$oView->lng_rewrite_routing_example = i18n("# {incoming_url}>>>{new_url}\n/incoming_url/name.html>>>new_url/new_name.html\n\n# route a specific incoming url to a new page\n/campaign/20_percent_on_everything_except_animal_food.html>>>front_content.php?idcat=23\n\n# route request to wwwroot to a specific page\n/>>>front_content.php?idart=16", "cl-mod-rewrite");
$oView->lng_rewrite_routing_info3 = i18n("The routing does not sends a HTTP header redirection to the destination URL, the redirection will happen internally by<br>replacing the detected incoming URL against the new destination URL (overwriting of article- categoryid)\nIncoming URLs can point to non existing resources (category/article), but the desttination URLs should point<br>to valid CONTENIDO articles/categories\nDestination URLs should point to real URLs to categories/articles,<br>e. g.front_content.php?idcat=23 or front_content.php?idart=34\nThe language id should attached to the URL in multi language sites<br>e. g. front_content.php?idcat=23&amp;lang=1\nThe client id should attached to the URL in multi client sites sharing the same folder<br>e. g. front_content.php?idcat=23&amp;client=2\nThe destination URL should not start with '/' or './' (wrong: /front_content.php, correct: front_content.php)", "cl-mod-rewrite");
$oView->lng_rewrite_routing_info3 = '<li>' . str_replace("\n", '</li><li>', $oView->lng_rewrite_routing_info3) . '</li>';
$oView->lng_discard_changes = i18n("Discard changes", "mod_rewrite");
$oView->lng_save_changes = i18n("Save changes", "mod_rewrite");
$oView->lng_discard_changes = i18n("Discard changes", "cl-mod-rewrite");
$oView->lng_save_changes = i18n("Save changes", "cl-mod-rewrite");
################################################################################
@ -307,6 +307,6 @@ if ($action == 'index') {
##### Output
$oMrController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/content.html'
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/templates/content.html'
);

Datei anzeigen

@ -1,6 +1,6 @@
<?php
/**
* Plugin mod_rewrite backend include file to administer expert (in content frame)
* Plugin cl-mod-rewrite backend include file to administer expert (in content frame)
*
* @package plugin
* @subpackage Mod Rewrite
@ -58,37 +58,37 @@ $oView->content_after = '';
$oMrController->setProperty('htaccessInfo', $aHtaccessInfo);
// view language variables
$oView->lng_plugin_functions = i18n("Plugin functions", "mod_rewrite");
$oView->lng_plugin_functions = i18n("Plugin functions", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type = i18n("Copy/Download .htaccess template", "mod_rewrite");
$oView->lng_copy_htaccess_type_lbl = i18n("Select .htaccess template", "mod_rewrite");
$oView->lng_copy_htaccess_type1 = i18n("Restrictive .htaccess", "mod_rewrite");
$oView->lng_copy_htaccess_type2 = i18n("Simple .htaccess", "mod_rewrite");
$oView->lng_copy_htaccess_type_info1 = i18n("Contains rules with restrictive settings.<br>All requests pointing to extension avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov, <br>mp3, pdf, png, ppt, rar, txt, wav, wmv, xml, zip, will be excluded vom rewriting.<br>Remaining requests will be rewritten to front_content.php,<br>except requests to 'contenido/', 'setup/', 'cms/upload', 'cms/front_content.php', etc.<br>Each resource, which has to be excluded from rewriting must be specified explicitly.", "mod_rewrite");
$oView->lng_copy_htaccess_type = i18n("Copy/Download .htaccess template", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type_lbl = i18n("Select .htaccess template", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type1 = i18n("Restrictive .htaccess", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type2 = i18n("Simple .htaccess", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type_info1 = i18n("Contains rules with restrictive settings.<br>All requests pointing to extension avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov, <br>mp3, pdf, png, ppt, rar, txt, wav, wmv, xml, zip, will be excluded vom rewriting.<br>Remaining requests will be rewritten to front_content.php,<br>except requests to 'contenido/', 'setup/', 'cms/upload', 'cms/front_content.php', etc.<br>Each resource, which has to be excluded from rewriting must be specified explicitly.", "cl-mod-rewrite");
$oView->lng_copy_htaccess_type_info2 = i18n("Contains a simple collection of rules. Each requests pointing to valid symlinks, folders or<br>files, will be excluded from rewriting. Remaining requests will be rewritten to front_content.php", "mod_rewrite");
$oView->lng_copy_htaccess_type_info2 = i18n("Contains a simple collection of rules. Each requests pointing to valid symlinks, folders or<br>files, will be excluded from rewriting. Remaining requests will be rewritten to front_content.php", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to = i18n("and copy to", "mod_rewrite");
$oView->lng_copy_htaccess_to_contenido = i18n("CONTENIDO installation directory", "mod_rewrite");
$oView->lng_copy_htaccess_to_contenido_info = i18n("Copy the selected .htaccess template into CONTENIDO installation directory<br><br>&nbsp;&nbsp;&nbsp;&nbsp;{CONTENIDO_FULL_PATH}.<br><br>This is the recommended option for a CONTENIDO installation with one or more clients<br>who are running on the same domain.", "mod_rewrite");
$oView->lng_copy_htaccess_to = i18n("and copy to", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_contenido = i18n("CONTENIDO installation directory", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_contenido_info = i18n("Copy the selected .htaccess template into CONTENIDO installation directory<br><br>&nbsp;&nbsp;&nbsp;&nbsp;{CONTENIDO_FULL_PATH}.<br><br>This is the recommended option for a CONTENIDO installation with one or more clients<br>who are running on the same domain.", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_contenido_info = str_replace('{CONTENIDO_FULL_PATH}', $oView->contenido_full_path, $oView->lng_copy_htaccess_to_contenido_info);
$oView->lng_copy_htaccess_to_client = i18n("client directory", "mod_rewrite");
$oView->lng_copy_htaccess_to_client_info = i18n("Copy the selected .htaccess template into client's directory<br><br>&nbsp;&nbsp;&nbsp;&nbsp;{CLIENT_FULL_PATH}.<br><br>This is the recommended option for a multiple client system<br>where each client has it's own domain/subdomain", "mod_rewrite");
$oView->lng_copy_htaccess_to_client = i18n("client directory", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_client_info = i18n("Copy the selected .htaccess template into client's directory<br><br>&nbsp;&nbsp;&nbsp;&nbsp;{CLIENT_FULL_PATH}.<br><br>This is the recommended option for a multiple client system<br>where each client has it's own domain/subdomain", "cl-mod-rewrite");
$oView->lng_copy_htaccess_to_client_info = str_replace('{CLIENT_FULL_PATH}', $oView->client_full_path, $oView->lng_copy_htaccess_to_client_info);
$oView->lng_or = i18n("or", "mod_rewrite");
$oView->lng_download = i18n("Download", "mod_rewrite");
$oView->lng_download_info = i18n("Download selected .htaccess template to copy it to the destination folder<br>or to take over the settings manually.", "mod_rewrite");
$oView->lng_or = i18n("or", "cl-mod-rewrite");
$oView->lng_download = i18n("Download", "cl-mod-rewrite");
$oView->lng_download_info = i18n("Download selected .htaccess template to copy it to the destination folder<br>or to take over the settings manually.", "cl-mod-rewrite");
$oView->lng_resetaliases = i18n("Reset category-/ and article aliases", "mod_rewrite");
$oView->lng_resetempty_link = i18n("Reset only empty aliases", "mod_rewrite");
$oView->lng_resetempty_info = i18n("Only empty aliases will be reset, existing aliases, e. g. manually set aliases, will not be changed.", "mod_rewrite");
$oView->lng_resetall_link = i18n("Reset all aliases", "mod_rewrite");
$oView->lng_resetall_info = i18n("Reset all category-/article aliases. Existing aliases will be overwritten.", "mod_rewrite");
$oView->lng_note = i18n("Note", "mod_rewrite");
$oView->lng_resetaliases_note = i18n("This process could require some time depending on amount of categories/articles.<br>The aliases will not contain the configured plugin separators, but the CONTENIDO default separators '/' und '-', e. g. '/category-word/article-word'.<br>Execution of this function ma be helpful to prepare all or empty aliases for the usage by the plugin.", "mod_rewrite");
$oView->lng_resetaliases = i18n("Reset category-/ and article aliases", "cl-mod-rewrite");
$oView->lng_resetempty_link = i18n("Reset only empty aliases", "cl-mod-rewrite");
$oView->lng_resetempty_info = i18n("Only empty aliases will be reset, existing aliases, e. g. manually set aliases, will not be changed.", "cl-mod-rewrite");
$oView->lng_resetall_link = i18n("Reset all aliases", "cl-mod-rewrite");
$oView->lng_resetall_info = i18n("Reset all category-/article aliases. Existing aliases will be overwritten.", "cl-mod-rewrite");
$oView->lng_note = i18n("Note", "cl-mod-rewrite");
$oView->lng_resetaliases_note = i18n("This process could require some time depending on amount of categories/articles.<br>The aliases will not contain the configured plugin separators, but the CONTENIDO default separators '/' und '-', e. g. '/category-word/article-word'.<br>Execution of this function ma be helpful to prepare all or empty aliases for the usage by the plugin.", "cl-mod-rewrite");
$oView->lng_discard_changes = i18n("Discard changes", "mod_rewrite");
$oView->lng_save_changes = i18n("Save changes", "mod_rewrite");
$oView->lng_discard_changes = i18n("Discard changes", "cl-mod-rewrite");
$oView->lng_save_changes = i18n("Save changes", "cl-mod-rewrite");
################################################################################
@ -114,6 +114,6 @@ if ($action == 'index') {
##### Output
$oMrController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/contentexpert.html'
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/templates/contentexpert.html'
);

Datei anzeigen

@ -52,14 +52,14 @@ $oMrTestController = new ModRewrite_ContentTestController();
// view language variables
$oView = $oMrTestController->getView();
$oView->lng_form_info = i18n("Define options to genereate the URLs by using the form below and run the test.", "mod_rewrite");
$oView->lng_form_label = i18n("Parameter to use", "mod_rewrite");
$oView->lng_maxitems_lbl = i18n("Number of URLs to generate", "mod_rewrite");
$oView->lng_run_test = i18n("Run test", "mod_rewrite");
$oView->lng_form_info = i18n("Define options to genereate the URLs by using the form below and run the test.", "cl-mod-rewrite");
$oView->lng_form_label = i18n("Parameter to use", "cl-mod-rewrite");
$oView->lng_maxitems_lbl = i18n("Number of URLs to generate", "cl-mod-rewrite");
$oView->lng_run_test = i18n("Run test", "cl-mod-rewrite");
$oView->lng_result_item_tpl = i18n("{pref}<strong>{name}</strong><br>{pref}Builder in: {url_in}<br>{pref}Builder out: {url_out}<br>{pref}<span style='color:{color}'>Resolved URL: {url_res}</span><br>{pref}Resolver err: {err}<br>{pref}Resolved data: {data}", "mod_rewrite");
$oView->lng_result_item_tpl = i18n("{pref}<strong>{name}</strong><br>{pref}Builder in: {url_in}<br>{pref}Builder out: {url_out}<br>{pref}<span style='color:{color}'>Resolved URL: {url_res}</span><br>{pref}Resolver err: {err}<br>{pref}Resolved data: {data}", "cl-mod-rewrite");
$oView->lng_result_message_tpl = i18n("Duration of test run: {time} seconds.<br>Number of processed URLs: {num_urls}<br><span style='color:green'>Successful resolved: {num_success}</span><br><span style='color:red'>Errors during resolving: {num_fail}</span></strong>", "mod_rewrite");
$oView->lng_result_message_tpl = i18n("Duration of test run: {time} seconds.<br>Number of processed URLs: {num_urls}<br><span style='color:green'>Successful resolved: {num_success}</span><br><span style='color:red'>Errors during resolving: {num_fail}</span></strong>", "cl-mod-rewrite");
################################################################################
@ -79,5 +79,5 @@ $oView->content .= mr_debugOutput(false);
##### Output
$oMrTestController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/contenttest.html'
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'cl-mod-rewrite/templates/contenttest.html'
);

Datei anzeigen

@ -6,11 +6,11 @@
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="plugins/mod_rewrite/external/aToolTip/js/atooltip.jquery.js"></script>
<script type="text/javascript" src="plugins/mod_rewrite/scripts/mod_rewrite.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.jquery.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/scripts/mod_rewrite.js"></script>
<link rel="stylesheet" type="text/css" href="styles/contenido.css">
<link rel="stylesheet" type="text/css" href="plugins/mod_rewrite/external/aToolTip/css/atooltip.css">
<link rel="stylesheet" type="text/css" href="plugins/mod_rewrite/styles/styles.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/external/aToolTip/css/atooltip.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/styles/styles.css">
<script type="text/javascript"><!--
// session-id
var sid = "{SESSID}";
@ -26,6 +26,7 @@
<body class="mrPlugin">
<div class="headerBox">
<!--
<div class="pluginInfo">
<div><span class="blockLeft">Plugin Advanced Mod Rewrite</span>
<a href="#" id="pluginInfoDetails-link" class="main i-link infoButton" title=""></a><div class="clear"></div></div>
@ -37,6 +38,7 @@
</ul>
</div>
</div>
-->
</div>
{CONTENT_BEFORE}

Datei anzeigen

@ -11,9 +11,9 @@
// session-id
var sid = "{SESSID}";
// --></script>
<style type="text/css"><!--
<style type="text/css">
img {border:none;}
// --></style>
</style>
</head>
<body>

Datei anzeigen

@ -6,11 +6,11 @@
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="plugins/mod_rewrite/scripts/mod_rewrite.js"></script>
<script type="text/javascript" src="plugins/mod_rewrite/external/aToolTip/js/atooltip.jquery.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/scripts/mod_rewrite.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/external/aToolTip/js/atooltip.jquery.js"></script>
<link rel="stylesheet" type="text/css" href="styles/contenido.css">
<link rel="stylesheet" type="text/css" href="plugins/mod_rewrite/external/aToolTip/css/atooltip.css">
<link rel="stylesheet" type="text/css" href="plugins/mod_rewrite/styles/styles.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/external/aToolTip/css/atooltip.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/styles/styles.css">
<script type="text/javascript"><!--
// session-id
var sid = "{SESSID}";

Datei anzeigen

@ -6,9 +6,9 @@
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="plugins/mod_rewrite/scripts/mod_rewrite.js"></script>
<script type="text/javascript" src="plugins/cl-mod-rewrite/scripts/mod_rewrite.js"></script>
<link rel="stylesheet" type="text/css" href="styles/contenido.css">
<link rel="stylesheet" type="text/css" href="plugins/mod_rewrite/styles/styles.css">
<link rel="stylesheet" type="text/css" href="plugins/cl-mod-rewrite/styles/styles.css">
<script type="text/javascript"><!--
// session-id
var sid = "{SESSID}";