update amr to version from latest contenido 4.8

Dieser Commit ist enthalten in:
oldperl 2017-07-16 11:42:13 +00:00
Ursprung d19abbaa0d
Commit 520f406556
40 geänderte Dateien mit 7928 neuen und 8221 gelöschten Zeilen

Datei anzeigen

@ -1,99 +1,87 @@
<?php <?php
/** /**
* Project: * AMR base Mod Rewrite class
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Includes base mod rewrite class. * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 /**
* * Abstract base mod rewrite class.
* {@internal *
* created 2008-09-24 * Provides some common features such as common debugging, globals/configuration
* * access for childs.
* $Id: class.modrewritebase.php 2 2011-07-20 12:00:48Z oldperl $: *
* }} * @author Murat Purc <murat@purc.de>
* * @package plugin
*/ * @subpackage Mod Rewrite
*/
abstract class ModRewriteBase {
defined('CON_FRAMEWORK') or die('Illegal call');
/**
* Initialization, is to call at least once by an child.
/** * @deprecated
* Abstract base mod rewrite class. */
* protected static function initialize() {
* Provides some common features such as common debugging, globals/configuration }
* access for childs.
* /**
* @author Murat Purc <murat@purc.de> * Returns enabled state of mod rewrite plugin
* @package Contenido Backend plugins *
* @subpackage ModRewrite * @return bool
*/ */
abstract class ModRewriteBase public static function isEnabled() {
{ return (self::getConfig('use', 0) == 1) ? true : false;
}
/**
* Returns enabled state of mod rewrite plugin /**
* * Sets the enabled state of mod rewrite plugin
* @return bool *
*/ * @param bool $bEnabled
public static function isEnabled() */
{ public static function setEnabled($bEnabled) {
return (self::getConfig('use', 0) == 1) ? true : false; self::setConfig('use', (bool) $bEnabled);
} }
/** /**
* Sets the enabled state of mod rewrite plugin * Returns configuration of mod rewrite, content of gobal $cfg['mod_rewrite']
* *
* @pparam bool $bEnabled * @param string $key Name of configuration key
*/ * @param mixed $default Default value to return as a fallback
public static function setEnabled($bEnabled) * @return mixed Desired value mr configuration, either the full configuration
{ * or one of the desired subpart
self::setConfig('use', (bool) $bEnabled); */
} public static function getConfig($key = null, $default = null) {
global $cfg;
if ($key == null) {
/** return $cfg['mod_rewrite'];
* Returns configuration of mod rewrite, content of gobal $cfg['mod_rewrite'] } elseif ((string) $key !== '') {
* return (isset($cfg['mod_rewrite'][$key])) ? $cfg['mod_rewrite'][$key] : $default;
* @param string $key Name of configuration key } else {
* @return mixed Desired value mr configuration, either the full configuration return $default;
* or one of the desired subpart }
*/ }
public static function getConfig($key=null, $default=null)
{ /**
global $cfg; * Sets the configuration of mod rewrite, content of gobal $cfg['mod_rewrite']
if ($key == null) { *
return $cfg['mod_rewrite']; * @param string $key Name of configuration key
} elseif ((string) $key !== '') { * @param mixed $value The value to set
return (isset($cfg['mod_rewrite'][$key])) ? $cfg['mod_rewrite'][$key] : $default; */
} else { public static function setConfig($key, $value) {
return $default; global $cfg;
} $cfg['mod_rewrite'][$key] = $value;
} }
/** }
* Sets the configuration of mod rewrite, content of gobal $cfg['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;
}
}

Datei anzeigen

@ -1,74 +1,88 @@
<?php <?php
/** /**
* Project: * AMR debugger class
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Plugin mod rewrite debugger class * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 /**
* * Mod rewrite debugger class.
* {@internal *
* created 2011-04-11 * @author Murat Purc <murat@purc.de>
* * @package plugin
* $Id: class.modrewritedebugger.php 2 2011-07-20 12:00:48Z oldperl $: * @subpackage Mod Rewrite
* }} */
* class ModRewriteDebugger {
*/
/**
* Flag to enable debugger
defined('CON_FRAMEWORK') or die('Illegal call'); * @var bool
*/
protected static $_bEnabled = false;
class ModRewriteDebugger
{ /**
protected static $_bEnabled = false; * Enable debugger setter.
* @param bool $bEnabled
*/
public static function setEnabled($bEnabled) public static function setEnabled($bEnabled) {
{ self::$_bEnabled = (bool) $bEnabled;
self::$_bEnabled = (bool) $bEnabled; }
}
/**
public static function add($mVar, $sLabel = '') * Adds variable to debugger.
{ * Wrapper for <code>DebuggerFactory::getDebugger('visible_adv')</code>.
if (!self::$_bEnabled) { *
return; * @param mixed $mVar The variable to dump
} * @param string $sLabel Describtion for passed $mVar
$oDebugger = DebuggerFactory::getDebugger('visible_adv'); */
$oDebugger->add($mVar, $sLabel); public static function add($mVar, $sLabel = '') {
} if (!self::$_bEnabled) {
return;
public static function getAll() }
{ DebuggerFactory::getDebugger('visible_adv')->add($mVar, $sLabel);
if (!self::$_bEnabled) { }
return '';
} /**
$oDebugger = DebuggerFactory::getDebugger('visible_adv'); * Returns output of all added variables to debug.
ob_start(); * @return string
$oDebugger->showAll(); */
$sOutput = ob_get_contents(); public static function getAll() {
ob_end_clean(); if (!self::$_bEnabled) {
return $sOutput; return '';
} }
public static function log($mVar, $sLabel = '') ob_start();
{ DebuggerFactory::getDebugger('visible_adv')->showAll();
if (!self::$_bEnabled) { $output = ob_get_contents();
return; ob_end_clean();
} return $output;
$oDebugger = DebuggerFactory::getDebugger('file'); }
$oDebugger->show($mVar, $sLabel);
} /**
} * Logs variable to debugger.
* Wrapper for <code>cDebug::getDebugger(cDebug::DEBUGGER_FILE)</code>.
*
* @param mixed $mVar The variable to log the contents
* @param string $sLabel Describtion for passed $mVar
*/
public static function log($mVar, $sLabel = '') {
if (!self::$_bEnabled) {
return;
}
DebuggerFactory::getDebugger('file')->show($mVar, $sLabel);
}
}

Datei anzeigen

@ -1,325 +1,300 @@
<?php <?php
/** /**
* Project: * AMR test class
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Advanced Mod Rewrite test class. * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 /**
* * Mod rewrite test class.
* {@internal *
* created 2008-05-xx * @author Murat Purc <murat@purc.de>
* * @package plugin
* $Id: class.modrewritetest.php 306 2014-03-13 23:03:26Z oldperl $: * @subpackage Mod Rewrite
* }} */
* class ModRewriteTest {
*/
/**
* Global $cfg array
defined('CON_FRAMEWORK') or die('Illegal call'); * @var array
*/
protected $_aCfg;
class ModRewriteTest
{ /**
* Global $cfg['tab'] array
/** * @var array
* @var array Global $cfg array */
*/ protected $_aCfgTab;
protected $_aCfg;
/**
/** * Max items to process
* @var array Global $cfg['tab'] array * @var int
*/ */
protected $_aCfgTab; protected $_iMaxItems;
/**
/** * Actual resolved url
* @var int Max items to process * @var string
*/ */
protected $_iMaxItems; protected $_sResolvedUrl;
/** /**
* @var string Actual resolved url * Routing found flag
*/ * @var bool
protected $_sResolvedUrl; */
protected $_bRoutingFound = false;
/** /**
* @var bool Routing found flag * Constuctor
*/ * @param int $maxItems Max items (urls to articles/categories) to process
protected $_bRoutingFound = false; */
public function __construct($maxItems) {
global $cfg;
/** $this->_aCfg = & $cfg;
* Constuctor $this->_aCfgTab = & $cfg['tab'];
*/ $this->_iMaxItems = $maxItems;
public function __construct($maxItems) }
{
global $cfg; /**
$this->_aCfg = & $cfg; * Returns resolved URL
$this->_aCfgTab = & $cfg['tab']; *
$this->_iMaxItems = $maxItems; * @return bool Resolved URL
} */
public function getResolvedUrl() {
return $this->_sResolvedUrl;
/** }
* Returns resolved URL
* /**
* @return bool Resolved URL * Returns flagz about found routing
*/ *
public function getResolvedUrl() * @return bool
{ */
return $this->_sResolvedUrl; public function getRoutingFoundState() {
} return $this->_bRoutingFound;
}
/** /**
* Returns flagz about found routing * Fetchs full structure of the installation (categories and articles) and returns it back.
* *
* @return bool * @param int $idclient Client id
*/ * @param int $idlang Language id
public function getRoutingFoundState() * @return array Full structure as follows
{ * <code>
return $this->_bRoutingFound; * $arr[idcat] = Category dataset
} * $arr[idcat]['articles'][idart] = Article dataset
* </code>
*/
/** public function fetchFullStructure($idclient = null, $idlang = null) {
* Fetchs full structure of the installation (categories and articles) and returns it back. global $client, $lang;
*
* @param int $idclient Client id $db = new DB_Contenido();
* @param int $idlang Language id $db2 = new DB_Contenido();
* @return array Full structure as follows
* <code> if (!$idclient || (int) $idclient == 0) {
* $arr[idcat] = Category dataset $idclient = $client;
* $arr[idcat]['articles'][idart] = Article dataset }
* </code> if (!$idlang || (int) $idlang == 0) {
*/ $idlang = $lang;
public function fetchFullStructure($idclient = null, $idlang = null) }
{
global $client, $lang; $aTab = $this->_aCfgTab;
$db = new DB_ConLite(); $aStruct = array();
$db2 = new DB_ConLite();
$sql = "SELECT
if (!$idclient || (int) $idclient == 0) { *
$idclient = $client; FROM
} " . $aTab['cat_tree'] . " AS a,
if (!$idlang || (int) $idlang == 0) { " . $aTab['cat_lang'] . " AS b,
$idlang = $lang; " . $aTab['cat'] . " AS c
} WHERE
a.idcat = b.idcat AND
$aTab = $this->_aCfgTab; c.idcat = a.idcat AND
c.idclient = '" . $idclient . "' AND
$aStruct = array(); b.idlang = '" . $idlang . "'
ORDER BY
$sql = "SELECT a.idtree";
*
FROM $db->query($sql);
" . $aTab['cat_tree'] . " AS a,
" . $aTab['cat_lang'] . " AS b, $counter = 0;
" . $aTab['cat'] . " AS c
WHERE while ($db->next_record()) {
a.idcat = b.idcat AND
c.idcat = a.idcat AND if (++$counter == $this->_iMaxItems) {
c.idclient = '".$idclient."' AND break; // break this loop
b.idlang = '".$idlang."' }
ORDER BY
a.idtree"; $idcat = $db->f('idcat');
$aStruct[$idcat] = $db->Record;
$db->query($sql); $aStruct[$idcat]['articles'] = array();
$loop = false; $sql2 = "SELECT
$counter = 0; *
FROM
while ($db->next_record()) { " . $aTab['cat_art'] . " AS a,
" . $aTab['art'] . " AS b,
if (++$counter == $this->_iMaxItems) { " . $aTab['art_lang'] . " AS c
break; // break this loop WHERE
} a.idcat = '" . $idcat . "' AND
b.idart = a.idart AND
$idcat = $db->f('idcat'); c.idart = a.idart AND
$aStruct[$idcat] = $db->Record; c.idlang = '" . $idlang . "' AND
$aStruct[$idcat]['articles'] = array(); b.idclient = '" . $idclient . "'
ORDER BY
if ($this->_aCfg['is_start_compatible'] == true) { c.title ASC";
$compStatement = ' a.is_start DESC, ';
} else { $db2->query($sql2);
$compStatement = '';
} while ($db2->next_record()) {
$idart = $db2->f('idart');
$sql2 = "SELECT $aStruct[$idcat]['articles'][$idart] = $db2->Record;
* if (++$counter == $this->_iMaxItems) {
FROM break 2; // break this and also superior loop
".$aTab['cat_art']." AS a, }
".$aTab['art']." AS b, }
".$aTab['art_lang']." AS c }
WHERE
a.idcat = '".$idcat."' AND return $aStruct;
b.idart = a.idart AND }
c.idart = a.idart AND
c.idlang = '".$idlang."' AND /**
b.idclient = '".$idclient."' * Creates an URL using passed data.
ORDER BY *
" . $compStatement . " * The result is used to generate seo urls...
c.title ASC"; *
* @param array $arr Assoziative array with some data as follows:
$db2->query($sql2); * <code>
* $arr['idcat']
while ($db2->next_record()) { * $arr['idart']
$idart = $db2->f('idart'); * $arr['idcatart']
$aStruct[$idcat]['articles'][$idart] = $db2->Record; * $arr['idartlang']
if (++$counter == $this->_iMaxItems) { * </code>
break 2; // break this and also superior loop * @param string $type Either 'c' or 'a' (category or article). If set to
} * 'c' only the parameter idcat will be added to the URL
} */
} public function composeURL($arr, $type) {
$type = ($type == 'a') ? 'a' : 'c';
return $aStruct;
} $param = array();
if ($type == 'c') {
/** $param[] = 'idcat=' . $arr['idcat'];
* Creates an URL using passed data. } else {
* if (mr_getRequest('idart')) {
* The result is used to generate seo urls... $param[] = 'idart=' . $arr['idart'];
* }
* @param array $arr Assoziative array with some data as follows: if (mr_getRequest('idcat')) {
* <code> $param[] = 'idcat=' . $arr['idcat'];
* $arr['idcat'] }
* $arr['idart'] if (mr_getRequest('idcatart')) {
* $arr['idcatart'] $param[] = 'idcatart=' . $arr['idcatart'];
* $arr['idartlang'] }
* </code> if (mr_getRequest('idartlang')) {
* @param string $type Either 'c' or 'a' (category or article). If set to $param[] = 'idartlang=' . $arr['idartlang'];
* 'c' only the parameter idcat will be added to the URL }
*/ }
public function composeURL($arr, $type) $param[] = 'foo=bar';
{ return 'front_content.php?' . implode('&amp;', $param);
$type = ($type == 'a') ? 'a' : 'c'; }
$param = array(); /**
* Resolves variables of an page (idcat, idart, idclient, idlang, etc.) by
if ($type == 'c') { * processing passed url using ModRewriteController
$param[] = 'idcat=' . $arr['idcat']; *
} else { * @param string $url Url to resolve
if (mr_getRequest('idart')) { * @return array Assoziative array with resolved data
$param[] = 'idart=' . $arr['idart']; */
} public function resolveUrl($url) {
if (mr_getRequest('idcat')) { // some globals to reset
$param[] = 'idcat=' . $arr['idcat']; $aGlobs = array(
} 'mr_preprocessedPageError', 'idart', 'idcat'
if (mr_getRequest('idcatart')) { );
$param[] = 'idcatart=' . $arr['idcatart']; foreach ($aGlobs as $p => $k) {
} if (isset($GLOBALS[$k])) {
if (mr_getRequest('idartlang')) { unset($GLOBALS[$k]);
$param[] = 'idartlang=' . $arr['idartlang']; }
} }
}
$param[] = 'foo=bar'; $aReturn = array();
return 'front_content.php?' . implode('&amp;', $param);
} // create an mod rewrite controller instance and execute processing
$oMRController = new ModRewriteController($url);
$oMRController->execute();
/**
* Resolves variables of an page (idcat, idart, idclient, idlang, etc.) by if ($oMRController->errorOccured()) {
* processing passed url using ModRewriteController
* // an error occured (idcat and or idart couldn't catched by controller)
* @param string $url Url to resolve $aReturn['mr_preprocessedPageError'] = 1;
* @return array Assoziative array with resolved data $aReturn['error'] = $oMRController->getError();
*/
public function resolveUrl($url) $this->_sResolvedUrl = '';
{ $this->_bRoutingFound = false;
// some globals to reset } else {
$aGlobs = array(
'mr_preprocessedPageError', 'idart', 'idcat' // set some global variables
);
foreach ($aGlobs as $p => $k) { $this->_sResolvedUrl = $oMRController->getResolvedUrl();
if (isset($GLOBALS[$k])) { unset($GLOBALS[$k]); } $this->_bRoutingFound = $oMRController->getRoutingFoundState();
}
if ($oMRController->getClient()) {
$aReturn = array(); $aReturn['client'] = $oMRController->getClient();
}
// create an mod rewrite controller instance and execute processing
$oMRController = new ModRewriteController($url); if ($oMRController->getChangeClient()) {
$oMRController->execute(); $aReturn['changeclient'] = $oMRController->getChangeClient();
}
if ($oMRController->errorOccured()) {
if ($oMRController->getLang()) {
// an error occured (idcat and or idart couldn't catched by controller) $aReturn['lang'] = $oMRController->getLang();
$aReturn['mr_preprocessedPageError'] = 1; }
$this->_sResolvedUrl = ''; if ($oMRController->getChangeLang()) {
$this->_bRoutingFound = false; $aReturn['changelang'] = $oMRController->getChangeLang();
}
} else {
if ($oMRController->getIdArt()) {
// set some global variables $aReturn['idart'] = $oMRController->getIdArt();
}
$this->_sResolvedUrl = $oMRController->getResolvedUrl();
$this->_bRoutingFound = $oMRController->getRoutingFoundState(); if ($oMRController->getIdCat()) {
$aReturn['idcat'] = $oMRController->getIdCat();
if ($oMRController->getClient()) { }
$aReturn['client'] = $oMRController->getClient();
} if ($oMRController->getPath()) {
$aReturn['path'] = $oMRController->getPath();
if ($oMRController->getChangeClient()) { }
$aReturn['changeclient'] = $oMRController->getChangeClient(); }
}
return $aReturn;
if ($oMRController->getLang()) { }
$aReturn['lang'] = $oMRController->getLang();
} /**
* Creates a readable string from passed resolved data array.
if ($oMRController->getChangeLang()) { *
$aReturn['changelang'] = $oMRController->getChangeLang(); * @param array Assoziative array with resolved data
} * @return string Readable resolved data
*/
if ($oMRController->getIdArt()) { public function getReadableResolvedData(array $data) {
$aReturn['idart'] = $oMRController->getIdArt(); // compose resolved string
} $ret = '';
foreach ($data as $k => $v) {
if ($oMRController->getIdCat()) { $ret .= $k . '=' . $v . '; ';
$aReturn['idcat'] = $oMRController->getIdCat(); }
} $ret = substr($ret, 0, strlen($ret) - 2);
return $ret;
if ($oMRController->getPath()) { }
$aReturn['path'] = $oMRController->getPath();
} }
}
return $aReturn;
}
/**
* Creates a readable string from passed resolved data array.
*
* @param array Assoziative array with resolved data
* @return string Readable resolved data
*/
public function getReadableResolvedData(array $data)
{
// compose resolved string
$ret = '';
foreach ($data as $k => $v) {
$ret .= $k . '=' . $v . '; ';
}
$ret = substr($ret, 0, strlen($ret)-2);
return $ret;
}
}

Datei anzeigen

@ -1,343 +1,314 @@
<?php <?php
/** /**
* Project: * AMR url stack class
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Includes mod rewrite url stack class. * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 /**
* * Mod rewrite url stack class. Provides features to collect urls and to get the
* {@internal * pretty path and names of categories/articles at one go.
* created 2008-09-10 *
* * Main goal of this class is to collect urls and to get the urlpath and urlname
* $Id: class.modrewriteurlstack.php 306 2014-03-13 23:03:26Z oldperl $: * of the related categories/articles at one go. This will reduce the queries
* }} * against the database.
* * Therefore the full advantage will be taken by rewriting the urls at codeoutput
*/ * in front_content.php, where you will be able to collect all urls at once...
*
* Usage:
defined('CON_FRAMEWORK') or die('Illegal call'); * <code>
* // get the instance
* $oMRUrlStack = ModRewriteUrlStack::getInstance();
/** *
* Mod rewrite url stack class. Provides features to collect urls and to get the * // add several urls to fill the stack
* pretty path and names of categories/articles at one go. * $oMRUrlStack->add('front_content.php?idcat=123');
* * $oMRUrlStack->add('front_content.php?idart=321');
* Main goal of this class is to collect urls and to get the urlpath and urlname * $oMRUrlStack->add('front_content.php?idcatart=213');
* of the related categories/articles at one go. This will reduce the queries * $oMRUrlStack->add('front_content.php?idcatlang=213');
* against the database. * $oMRUrlStack->add('front_content.php?idartlang=312');
* Therefore the full advantage will be taken by rewriting the urls at codeoutput *
* in front_content.php, where you will be able to collect all urls at once... * // now the first call will get the pretty path and names from database at one go
* * $aPrettyParts = $oMRUrlStack->getPrettyUrlParts('front_content.php?idcat=123');
* Usage: * echo $aPrettyParts['urlpath']; // something like 'Main-category-name/Category-name/Another-category-name/'
* <code> * echo $aPrettyParts['urlname']; // something like 'Name-of-an-article'
* // get the instance * </code>
* $oMRUrlStack = ModRewriteUrlStack::getInstance(); *
* * @author Murat Purc <murat@purc.de>
* // add several urls to fill the stack * @package plugin
* $oMRUrlStack->add('front_content.php?idcat=123'); * @subpackage Mod Rewrite
* $oMRUrlStack->add('front_content.php?idart=321'); */
* $oMRUrlStack->add('front_content.php?idcatart=213'); class ModRewriteUrlStack {
* $oMRUrlStack->add('front_content.php?idcatlang=213');
* $oMRUrlStack->add('front_content.php?idartlang=312'); /**
* * Self instance
* // now the first call will get the pretty path and names from database at one go *
* $aPrettyParts = $oMRUrlStack->getPrettyUrlParts('front_content.php?idcat=123'); * @var ModRewriteUrlStack
* echo $aPrettyParts['urlpath']; // something like 'Main-category-name/Category-name/Another-category-name/' */
* echo $aPrettyParts['urlname']; // something like 'Name-of-an-article' private static $_instance;
* </code>
* /**
* @author Murat Purc <murat@purc.de> * Database object
* @package Contenido Backend plugins *
* @subpackage ModRewrite * @var DB_Contenido
*/ */
class ModRewriteUrlStack private $_oDb;
{
/**
/** * Array for urls
* Self instance *
* * @var array
* @var ModRewriteUrlStack */
*/ private $_aUrls = array();
private static $_instance;
/**
/** * Url stack array
* Database object *
* * @var array
* @var DB_ConLite */
*/ private $_aStack = array();
private $_oDb;
/**
/** * CONTENIDO related parameter array
* Array for urls *
* * @var array
* @var array */
*/ private $_aConParams = array(
private $_aUrls = array(); 'idcat' => 1, 'idart' => 1, 'lang' => 1, 'idcatlang' => 1, 'idcatart' => 1, 'idartlang' => 1
);
/**
* Url stack array /**
* * Database tables array
* @var array *
*/ * @var array
private $_aStack = array(); */
private $_aTab;
/**
* Contenido related parameter array /**
* * Language id
* @var array *
*/ * @var int
private $_aConParams = array( */
'idcat' => 1, 'idart' => 1, 'lang' => 1, 'idcatlang' => 1, 'idcatart' => 1, 'idartlang' => 1 private $_idLang;
);
/**
/** * Constructor, sets some properties.
* Database tables array */
* private function __construct() {
* @var array global $cfg, $lang;
*/ $this->_oDb = new DB_Contenido();
private $_aTab; $this->_aTab = $cfg['tab'];
$this->_idLang = $lang;
/** }
* Language id
* /**
* @var int * Returns a instance of ModRewriteUrlStack (singleton implementation)
*/ *
private $_idLang; * @return ModRewriteUrlStack
*/
public static function getInstance() {
/** if (self::$_instance == null) {
* Constructor, sets some properties. self::$_instance = new ModRewriteUrlStack();
*/ }
private function __construct() return self::$_instance;
{ }
global $cfg, $lang;
$this->_oDb = new DB_ConLite(); /**
$this->_aTab = $cfg['tab']; * Adds an url to the stack
$this->_idLang = $lang; *
} * @param string Url, like front_content.php?idcat=123...
*/
public function add($url) {
/** $url = ModRewrite::urlPreClean($url);
* Returns a instance of ModRewriteUrlStack (singleton implementation) if (isset($this->_aUrls[$url])) {
* return;
* @return ModRewriteUrlStack }
*/
public static function getInstance() $aUrl = $this->_extractUrl($url);
{
if (self::$_instance == null) { // cleanup parameter
self::$_instance = new ModRewriteUrlStack(); foreach ($aUrl['params'] as $p => $v) {
} if (!isset($this->_aConParams[$p])) {
return self::$_instance; unset($aUrl['params'][$p]);
} } else {
$aUrl['params'][$p] = (int) $v;
}
/** }
* Adds an url to the stack
* // add language id, if not available
* @param string Url, like front_content.php?idcat=123... if ((int) mr_arrayValue($aUrl['params'], 'lang') == 0) {
*/ $aUrl['params']['lang'] = $this->_idLang;
public function add($url) }
{
$url = ModRewrite::urlPreClean($url); $sStackId = $this->_makeStackId($aUrl['params']);
if (isset($this->_aUrls[$url])) { $this->_aUrls[$url] = $sStackId;
return; $this->_aStack[$sStackId] = array('params' => $aUrl['params']);
} }
$aUrl = $this->_extractUrl($url); /**
* Returns the pretty urlparts (only category path an article name) of the
// cleanup parameter * desired url.
foreach ($aUrl['params'] as $p => $v) { *
if (!isset($this->_aConParams[$p])) { * @param string Url, like front_content.php?idcat=123...
unset($aUrl['params'][$p]); * @return array Assoziative array like
} else { * <code>
$aUrl['params'][$p] = (int) $v; * $arr['urlpath']
} * $arr['urlname']
} * </code>
*/
// add language id, if not available public function getPrettyUrlParts($url) {
if ((int) mr_arrayValue($aUrl['params'], 'lang') == 0) { $url = ModRewrite::urlPreClean($url);
$aUrl['params']['lang'] = $this->_idLang; if (!isset($this->_aUrls[$url])) {
} $this->add($url);
}
$sStackId = $this->_makeStackId($aUrl['params']);
$this->_aUrls[$url] = $sStackId; $sStackId = $this->_aUrls[$url];
$this->_aStack[$sStackId] = array('params' => $aUrl['params']); if (!isset($this->_aStack[$sStackId]['urlpath'])) {
} $this->_chunkSetPrettyUrlParts();
}
$aPretty = array(
/** 'urlpath' => $this->_aStack[$sStackId]['urlpath'],
* Returns the pretty urlparts (only category path an article name) of the 'urlname' => $this->_aStack[$sStackId]['urlname']
* desired url. );
* return $aPretty;
* @param string Url, like front_content.php?idcat=123... }
* @return array Assoziative array like
* <code> /**
* $arr['urlpath'] * Extracts passed url using parse_urla and adds also the 'params' array to it
* $arr['urlname'] *
* </code> * @param string Url, like front_content.php?idcat=123...
*/ * @return array Components containing result of parse_url with additional
public function getPrettyUrlParts($url) * 'params' array
{ */
$url = ModRewrite::urlPreClean($url); private function _extractUrl($url) {
if (!isset($this->_aUrls[$url])) { $aUrl = @parse_url($url);
$this->add($url); if (isset($aUrl['query'])) {
} $aUrl['query'] = str_replace('&amp;', '&', $aUrl['query']);
parse_str($aUrl['query'], $aUrl['params']);
$sStackId = $this->_aUrls[$url]; }
if (!isset($this->_aStack[$sStackId]['urlpath'])) { if (!isset($aUrl['params']) && !is_array($aUrl['params'])) {
$this->_chunkSetPrettyUrlParts(); $aUrl['params'] = array();
} }
$aPretty = array( return $aUrl;
'urlpath' => $this->_aStack[$sStackId]['urlpath'], }
'urlname' => $this->_aStack[$sStackId]['urlname']
); /**
return $aPretty; * Extracts article or category related parameter from passed params array
} * and generates an identifier.
*
* @param array $aParams Parameter array
/** * @return string Composed stack id
* Extracts passed url using parse_urla and adds also the 'params' array to it */
* private function _makeStackId(array $aParams) {
* @param string Url, like front_content.php?idcat=123... # idcatart
* @return array Components containing result of parse_url with additional if ((int) mr_arrayValue($aParams, 'idart') > 0) {
* 'params' array $sStackId = 'idart_' . $aParams['idart'] . '_lang_' . $aParams['lang'];
*/ } elseif ((int) mr_arrayValue($aParams, 'idartlang') > 0) {
private function _extractUrl($url) $sStackId = 'idartlang_' . $aParams['idartlang'];
{ } elseif ((int) mr_arrayValue($aParams, 'idcatart') > 0) {
$aUrl = @parse_url($url); $sStackId = 'idcatart_' . $aParams['idcatart'] . '_lang_' . $aParams['lang'];
if (isset($aUrl['query'])) { } elseif ((int) mr_arrayValue($aParams, 'idcat') > 0) {
$aUrl['query'] = str_replace('&amp;', '&', $aUrl['query']); $sStackId = 'idcat_' . $aParams['idcat'] . '_lang_' . $aParams['lang'];
parse_str($aUrl['query'], $aUrl['params']); } elseif ((int) mr_arrayValue($aParams, 'idcatlang') > 0) {
} $sStackId = 'idcatlang_' . $aParams['idcatlang'];
if (!isset($aUrl['params']) && !is_array($aUrl['params'])) { } else {
$aUrl['params'] = array(); $sStackId = 'lang_' . $aParams['lang'];
} }
return $aUrl; return $sStackId;
} }
/**
/** * Main function to get the urlparts of urls.
* Extracts article or category related parameter from passed params array *
* and generates an identifier. * Composes the query by looping thru stored but non processed urls, executes
* * the query and adds the (urlpath and urlname) result to the stack.
* @param array $aParams Parameter array */
* @return string Composed stack id private function _chunkSetPrettyUrlParts() {
*/ // collect stack parameter to get urlpath and urlname
private function _makeStackId(array $aParams) $aStack = array();
{ foreach ($this->_aStack as $stackId => $item) {
# idcatart if (!isset($item['urlpath'])) {
if ((int) mr_arrayValue($aParams, 'idart') > 0) { // pretty url is to create
$sStackId = 'idart_' . $aParams['idart'] . '_lang_' . $aParams['lang']; $aStack[$stackId] = $item;
} elseif ((int) mr_arrayValue($aParams, 'idartlang') > 0) { }
$sStackId = 'idartlang_' . $aParams['idartlang']; }
} elseif ((int) mr_arrayValue($aParams, 'idcatart') > 0) {
$sStackId = 'idcatart_' . $aParams['idcatart'] . '_lang_' . $aParams['lang']; // now, it's time to compose the where clause of the query
} elseif ((int) mr_arrayValue($aParams, 'idcat') > 0) { $sWhere = '';
$sStackId = 'idcat_' . $aParams['idcat'] . '_lang_' . $aParams['lang']; foreach ($aStack as $stackId => $item) {
} elseif ((int) mr_arrayValue($aParams, 'idcatlang') > 0) { $aP = $item['params'];
$sStackId = 'idcatlang_' . $aParams['idcatlang']; if ((int) mr_arrayValue($aP, 'idart') > 0) {
} else { $sWhere .= '(al.idart = ' . $aP['idart'] . ' AND al.idlang = ' . $aP['lang'] . ') OR ';
$sStackId = 'lang_' . $aParams['lang']; } elseif ((int) mr_arrayValue($aP, 'idartlang') > 0) {
} $sWhere .= '(al.idartlang = ' . $aP['idartlang'] . ') OR ';
return $sStackId; } elseif ((int) mr_arrayValue($aP, 'idcat') > 0) {
} $sWhere .= '(cl.idcat = ' . $aP['idcat'] . ' AND cl.idlang = ' . $aP['lang'] . ' AND cl.startidartlang = al.idartlang) OR ';
} elseif ((int) mr_arrayValue($aP, 'idcatart') > 0) {
$sWhere .= '(ca.idcatart = ' . $aP['idcatart'] . ' AND ca.idart = al.idart AND al.idlang = ' . $aP['lang'] . ') OR ';
/** } elseif ((int) mr_arrayValue($aP, 'idcatlang') > 0) {
* Main function to get the urlparts of urls. $sWhere .= '(cl.idcatlang = ' . $aP['idcatlang'] . ' AND cl.startidartlang = al.idartlang) OR ';
* }
* Composes the query by looping thru stored but non processed urls, executes }
* the query and adds the (urlpath and urlname) result to the stack. if ($sWhere == '') {
*/ return;
private function _chunkSetPrettyUrlParts() }
{ $sWhere = substr($sWhere, 0, -4);
// collect stack parameter to get urlpath and urlname $sWhere = str_replace(' OR ', " OR \n", $sWhere);
$aStack = array();
foreach ($this->_aStack as $stackId => $item) { // compose query and execute it
if (!isset($item['urlpath'])) { $sql = <<<SQL
// pretty url is to create SELECT
$aStack[$stackId] = $item; al.idartlang, al.idart, al.idlang as lang, al.urlname, cl.idcatlang, cl.idcat,
} cl.urlpath, ca.idcatart
} FROM
{$this->_aTab['art_lang']} AS al, {$this->_aTab['cat_lang']} AS cl, {$this->_aTab['cat_art']} AS ca
// now, it's time to compose the where clause of the query WHERE
$sWhere = ''; al.idart = ca.idart AND
foreach ($aStack as $stackId => $item) { ca.idcat = cl.idcat AND
$aP = $item['params']; al.idlang = cl.idlang AND
if ((int) mr_arrayValue($aP, 'idart') > 0) { ( $sWhere )
$sWhere .= '(al.idart = ' . $aP['idart'] . ' AND al.idlang = ' . $aP['lang'] . ') OR '; SQL;
} elseif ((int) mr_arrayValue($aP, 'idartlang') > 0) { ModRewriteDebugger::add($sql, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $sql');
$sWhere .= '(al.idartlang = ' . $aP['idartlang'] . ') OR ';
} elseif ((int) mr_arrayValue($aP, 'idcat') > 0) { $aNewStack = array();
$sWhere .= '(cl.idcat = ' . $aP['idcat'] . ' AND cl.idlang = ' . $aP['lang'] . ' AND cl.startidartlang = al.idartlang) OR ';
} elseif ((int) mr_arrayValue($aP, 'idcatart') > 0) { // create array of fields, which are to reduce step by step from record set below
$sWhere .= '(ca.idcatart = ' . $aP['idcatart'] . ' AND ca.idart = al.idart AND al.idlang = ' . $aP['lang'] . ') OR '; $aFields = array('', 'idart', 'idartlang', 'idcatart', 'idcat');
} elseif ((int) mr_arrayValue($aP, 'idcatlang') > 0) {
$sWhere .= '(cl.idcatlang = ' . $aP['idcatlang'] . ' AND cl.startidartlang = al.idartlang) OR '; $this->_oDb->query($sql);
} while ($this->_oDb->next_record()) {
} $aRS = $this->_oDb->Record;
if ($sWhere == '') {
return; // loop thru fields array
} foreach ($aFields as $field) {
$sWhere = substr($sWhere, 0, -4); if (isset($aRS[$field])) {
$sWhere = str_replace(' OR ', " OR \n", $sWhere); // reduce existing field
unset($aRS[$field]);
// compose query and execute it }
$sql = <<<SQL $rsStackID = $this->_makeStackId($aRS);
SELECT if (isset($aStack[$rsStackID])) {
al.idartlang, al.idart, al.idlang as lang, al.urlname, cl.idcatlang, cl.idcat, // matching stack entry found, add urlpath and urlname to the new stack
cl.urlpath, ca.idcatart $aNewStack[$rsStackID]['urlpath'] = $aRS['urlpath'];
FROM $aNewStack[$rsStackID]['urlname'] = $aRS['urlname'];
{$this->_aTab['art_lang']} AS al, {$this->_aTab['cat_lang']} AS cl, {$this->_aTab['cat_art']} AS ca break;
WHERE }
al.idart = ca.idart AND }
ca.idcat = cl.idcat AND }
al.idlang = cl.idlang AND ModRewriteDebugger::add($aNewStack, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $aNewStack');
( $sWhere )
SQL; // merge stack data
ModRewriteDebugger::add($sql, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $sql'); $this->_aStack = array_merge($this->_aStack, $aNewStack);
}
$aNewStack = array();
}
// create array of fields, which are to reduce step by step from record set below
$aFields = array('', 'idart', 'idartlang', 'idcatart', 'idcat');
$this->_oDb->query($sql);
while ($this->_oDb->next_record()) {
$aRS = $this->_oDb->Record;
// loop thru fields array
foreach ($aFields as $field) {
if (isset($aRS[$field])) {
// reduce existing field
unset($aRS[$field]);
}
$rsStackID = $this->_makeStackId($aRS);
if (isset($aStack[$rsStackID])) {
// matching stack entry found, add urlpath and urlname to the new stack
$aNewStack[$rsStackID]['urlpath'] = $aRS['urlpath'];
$aNewStack[$rsStackID]['urlname'] = $aRS['urlname'];
break;
}
}
}
ModRewriteDebugger::add($aNewStack, 'ModRewriteUrlStack->_chunkSetPrettyUrlParts() $aNewStack');
// merge stack data
$this->_aStack = array_merge($this->_aStack, $aNewStack);
}
}

Datei anzeigen

@ -1,342 +1,306 @@
<?php <?php
/** /**
* Project: * AMR url utility class
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Includes Mod Rewrite url utility class. * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 /**
* * Mod Rewrite url utility class. Handles convertion of Urls from CONTENIDO core
* {@internal * based url composition pattern to AMR (Advanced Mod Rewrite) url composition
* created 2008-05-xx * pattern and vice versa.
* *
* $Id: class.modrewriteurlutil.php 2 2011-07-20 12:00:48Z oldperl $: * @author Murat Purc <murat@purc.de>
* }} * @package plugin
* * @subpackage Mod Rewrite
*/ */
class ModRewriteUrlUtil extends ModRewriteBase {
defined('CON_FRAMEWORK') or die('Illegal call'); /**
* Self instance (singleton implementation)
* @var ModRewriteUrlUtil
/** */
* Mod Rewrite url utility class. Handles convertion of Urls from contenido core private static $_instance;
* based url composition pattern to AMR (Advanced Mod Rewrite) url composition
* pattern and vice versa. /**
* * CONTENIDO category word separator
* @author Murat Purc <murat@purc.de> * @var string
* @package Contenido Backend plugins */
* @subpackage ModRewrite private $_catWordSep = '-';
*/
class ModRewriteUrlUtil extends ModRewriteBase /**
{ * AMR category word separator
* @var string
/** */
* Self instance (singleton implementation) private $_mrCatWordSep;
* @var ModRewriteUrlUtil
*/ /**
private static $_instance; * CONTENIDO category separator
* @var string
/** */
* Contenido category word separator private $_catSep = '/';
* @var string
*/ /**
private $_catWordSep = '-'; * AMR category separator
* @var string
/** */
* AMR category word separator private $_mrCatSep;
* @var string
*/ /**
private $_mrCatWordSep; * CONTENIDO article separator
* @var string
/** */
* Contenido category separator private $_artSep = '/';
* @var string
*/ /**
private $_catSep = '/'; * AMR article separator
* @var string
/** */
* AMR category separator private $_mrArtSep;
* @var string
*/ /**
private $_mrCatSep; * CONTENIDO article word separator
* @var string
/** */
* Contenido article separator private $_artWordSep = '-';
* @var string
*/ /**
private $_artSep = '/'; * AMR article word separator
* @var string
/** */
* AMR article separator private $_mrArtWordSep;
* @var string
*/ /**
private $_mrArtSep; * AMR extension used for articlenames (e. g. .html)
* @var string
/** */
* Contenido article word separator private $_mrExt;
* @var string
*/ /**
private $_artWordSep = '-'; * Constructor, sets some AMR configuration related properties
*/
/** private function __construct() {
* AMR article word separator $aCfg = parent::getConfig();
* @var string $this->_mrCatWordSep = $aCfg['category_word_seperator'];
*/ $this->_mrCatSep = $aCfg['category_seperator'];
private $_mrArtWordSep; $this->_mrArtSep = $aCfg['article_seperator'];
$this->_mrArtWordSep = $aCfg['article_word_seperator'];
/** $this->_mrExt = $aCfg['file_extension'];
* AMR extension used for articlenames (e. g. .html) }
* @var string
*/ /**
private $_mrExt; * Prevent cloning
*/
private function __clone() {
/**
* Constructor, sets some AMR configuration related properties }
*/
private function __construct() /**
{ * Returns self instance (singleton pattern)
$aCfg = parent::getConfig(); * @return ModRewriteUrlUtil
$this->_mrCatWordSep = $aCfg['category_word_seperator']; */
$this->_mrCatSep = $aCfg['category_seperator']; public static function getInstance() {
$this->_mrArtSep = $aCfg['article_seperator']; if (self::$_instance == null) {
$this->_mrArtWordSep = $aCfg['article_word_seperator']; self::$_instance = new ModRewriteUrlUtil();
$this->_mrExt = $aCfg['file_extension']; }
} return self::$_instance;
}
private function __clone()
{ /**
} * Converts passed AMR url path to CONTENIDO url path.
*
/** * @param string $urlPath AMR url path
* Returns self instance (singleton pattern) * @return string CONTENIDO url path
* @return ModRewriteUrlUtil */
*/ public function toContenidoUrlPath($urlPath) {
public static function getInstance() $newUrlPath = $this->_toUrlPath(
{ $urlPath, $this->_mrCatSep, $this->_catSep, $this->_mrCatWordSep, $this->_catWordSep, $this->_mrArtSep, $this->_artSep
if (self::$_instance == null) { );
self::$_instance = new ModRewriteUrlUtil(); return $newUrlPath;
} }
return self::$_instance;
} /**
* Converts passed CONTENIDO url path to AMR url path.
*
/** * @param string $urlPath CONTENIDO url path
* Converts passed AMR url path to Contenido url path. * @return string AMR url path
* */
* @param string $urlPath AMR url path public function toModRewriteUrlPath($urlPath) {
* @return string Contenido url path $newUrlPath = $this->_toUrlPath(
*/ $urlPath, $this->_catSep, $this->_mrCatSep, $this->_catWordSep, $this->_mrCatWordSep, $this->_artSep, $this->_mrArtSep
public function toContenidoUrlPath($urlPath) );
{ return $newUrlPath;
$newUrlPath = $this->_toUrlPath( }
$urlPath, $this->_mrCatSep, $this->_catSep, $this->_mrCatWordSep, $this->_catWordSep,
$this->_mrArtSep, $this->_artSep /**
); * Converts passed url path to a another url path (CONTENIDO to AMR and vice versa).
return $newUrlPath; *
} * @param string $urlPath Source url path
* @param string $fromCatSep Source category seperator
/** * @param string $toCatSep Destination category seperator
* Converts passed Contenido url path to AMR url path. * @param string $fromCatWordSep Source category word seperator
* * @param string $toCatWordSep Destination category word seperator
* @param string $urlPath Contenido url path * @param string $fromArtSep Source article seperator
* @return string AMR url path * @param string $toArtSep Destination article seperator
*/ * @return string Destination url path
public function toModRewriteUrlPath($urlPath) */
{ private function _toUrlPath($urlPath, $fromCatSep, $toCatSep, $fromCatWordSep, $toCatWordSep, $fromArtSep, $toArtSep) {
$newUrlPath = $this->_toUrlPath( if ((string) $urlPath == '') {
$urlPath, $this->_catSep, $this->_mrCatSep, $this->_catWordSep, $this->_mrCatWordSep, return $urlPath;
$this->_artSep, $this->_mrArtSep }
);
return $newUrlPath; if (substr($urlPath, -1) == $fromArtSep) {
} $urlPath = substr($urlPath, 0, -1) . '{TAS}';
}
/** // pre replace category word seperator and category seperator
* Converts passed url path to a another url path (Contenido to AMR and vice versa). $urlPath = str_replace($fromCatWordSep, '{CWS}', $urlPath);
* $urlPath = str_replace($fromCatSep, '{CS}', $urlPath);
* @param string $urlPath Source url path
* @param string $fromCatSep Source category seperator // replace category word seperator
* @param string $toCatSep Destination category seperator $urlPath = str_replace('{CWS}', $toCatWordSep, $urlPath);
* @param string $fromCatWordSep Source category word seperator $urlPath = str_replace('{CS}', $toCatSep, $urlPath);
* @param string $toCatWordSep Destination category word seperator
* @param string $fromArtSep Source article seperator $urlPath = str_replace('{TAS}', $toArtSep, $urlPath);
* @param string $toArtSep Destination article seperator
* @return string Destination url path return $urlPath;
*/ }
private function _toUrlPath($urlPath, $fromCatSep, $toCatSep, $fromCatWordSep, $toCatWordSep,
$fromArtSep, $toArtSep) /**
{ * Converts passed AMR url name to CONTENIDO url name.
if ((string) $urlPath == '') { *
return $urlPath; * @param string $urlName AMR url name
} * @return string CONTENIDO url name
*/
if (substr($urlPath, -1) == $fromArtSep) { public function toContenidoUrlName($urlName) {
$urlPath = substr($urlPath, 0, -1) . '{TAS}'; $newUrlName = $this->_toUrlName($urlName, $this->_mrArtWordSep, $this->_artWordSep);
} return $newUrlName;
}
// pre replace category word seperator and category seperator
$urlPath = str_replace($fromCatWordSep, '{CWS}', $urlPath); /**
$urlPath = str_replace($fromCatSep, '{CS}', $urlPath); * Converts passed CONTENIDO url name to AMR url name.
*
// replace category word seperator * @param string $urlName CONTENIDO url name
$urlPath = str_replace('{CWS}', $toCatWordSep, $urlPath); * @return string AMR url name
$urlPath = str_replace('{CS}', $toCatSep, $urlPath); */
public function toModRewriteUrlName($urlName) {
$urlPath = str_replace('{TAS}', $toArtSep, $urlPath); $newUrlName = $this->_toUrlName($urlName, $this->_artWordSep, $this->_mrArtWordSep);
return $newUrlName;
return $urlPath; }
}
/**
* Converts passed url name to a another url name (CONTENIDO to AMR and vice versa).
/** *
* Converts passed AMR url name to Contenido url name. * @param string $urlName Source url name
* * @param string $fromArtWordSep Source article word seperator
* @param string $urlName AMR url name * @param string $toArtWordSep Destination article word seperator
* @return string Contenido url name * @return string Destination url name
*/ */
public function toContenidoUrlName($urlName) private function _toUrlName($urlName, $fromArtWordSep, $toArtWordSep) {
{ if ((string) $urlName == '') {
$newUrlName = $this->_toUrlName($urlName, $this->_mrArtWordSep, $this->_artWordSep); return $urlName;
return $newUrlName; }
}
$urlName = str_replace($this->_mrExt, '{EXT}', $urlName);
/** // replace article word seperator
* Converts passed Contenido url name to AMR url name. $urlName = str_replace($fromArtWordSep, $toArtWordSep, $urlName);
*
* @param string $urlName Contenido url name $urlName = str_replace('{EXT}', $this->_mrExt, $urlName);
* @return string AMR url name
*/ return $urlName;
public function toModRewriteUrlName($urlName) }
{
$newUrlName = $this->_toUrlName($urlName, $this->_artWordSep, $this->_mrArtWordSep); /**
return $newUrlName; * Converts passed AMR url to CONTENIDO url.
} *
* @param string $url AMR url
* @return string CONTENIDO url
/** */
* Converts passed url name to a another url name (Contenido to AMR and vice versa). public function toContenidoUrl($url) {
* if (strpos($url, $this->_mrExt) === false) {
* @param string $urlName Source url name $newUrl = $this->toContenidoUrlPath($url);
* @param string $fromArtWordSep Source article word seperator } else {
* @param string $toArtWordSep Destination article word seperator // replace category word and article word seperator
* @return string Destination url name $path = substr($url, 0, strrpos($url, $this->_mrArtSep) + 1);
*/ $name = substr($url, strrpos($url, $this->_mrArtSep) + 1);
private function _toUrlName($urlName, $fromArtWordSep, $toArtWordSep) $newUrl = $this->toContenidoUrlPath($path) . $this->toContenidoUrlName($name);
{ }
if ((string) $urlName == '') { return $newUrl;
return $urlName; }
}
/**
$urlName = str_replace($this->_mrExt, '{EXT}', $urlName); * Converts passed AMR url to CONTENIDO url.
*
// replace article word seperator * @param string $url AMR url
$urlName = str_replace($fromArtWordSep, $toArtWordSep, $urlName); * @return string CONTENIDO url
*/
$urlName = str_replace('{EXT}', $this->_mrExt, $urlName); public function toModRewriteUrl($url) {
if (strpos($url, $this->_mrExt) === false) {
return $urlName; $newUrl = $this->toModRewriteUrlPath($url);
} } else {
// replace category word and article word seperator
$path = substr($url, 0, strrpos($url, $this->_artSep) + 1);
/** $name = substr($url, strrpos($url, $this->_artSep) + 1);
* Converts passed AMR url to Contenido url. $newUrl = $this->toModRewriteUrlPath($path) . $this->toModRewriteUrlName($name);
* }
* @param string $url AMR url return $newUrl;
* @return string Contenido url }
*/
public function toContenidoUrl($url) /**
{ * Converts passed url to a another url (CONTENIDO to AMR and vice versa).
if (strpos($url, $this->_mrExt) === false) { *
$newUrl = $this->toContenidoUrlPath($url); * @param string $url Source url
} else { * @param string $fromCatSep Source category seperator
// replace category word and article word seperator * @param string $toCatSep Destination category seperator
$path = substr($url, 0, strrpos($url, $this->_mrArtSep) + 1); * @param string $fromCatWordSep Source category word seperator
$name = substr($url, strrpos($url, $this->_mrArtSep) + 1); * @param string $toCatWordSep Destination category word seperator
$newUrl = $this->toContenidoUrlPath($path) . $this->toContenidoUrlName($name); * @param string $fromArtSep Source article seperator
} * @param string $toArtSep Destination article seperator
return $newUrl; * @param string $fromArtWordSep Source article word seperator
} * @param string $toArtWordSep Destination article word seperator
* @return string Destination url
*
/** * @deprecated No more used, is to delete
* Converts passed AMR url to Contenido url. */
* private function _toUrl($url, $fromCatSep, $toCatSep, $fromCatWordSep, $toCatWordSep, $fromArtSep, $toArtSep, $fromArtWordSep, $toArtWordSep) {
* @param string $url AMR url if ((string) $url == '') {
* @return string Contenido url return $url;
*/ }
public function toModRewriteUrl($url)
{ $url = str_replace($this->_mrExt, '{EXT}', $url);
if (strpos($url, $this->_mrExt) === false) {
$newUrl = $this->toModRewriteUrlPath($url); // replace category seperator
} else { $url = str_replace($fromCatSep, $toCatSep, $url);
// replace category word and article word seperator
$path = substr($url, 0, strrpos($url, $this->_artSep) + 1); // replace article seperator
$name = substr($url, strrpos($url, $this->_artSep) + 1); $url = str_replace($fromArtSep, $toArtSep, $url);
$newUrl = $this->toModRewriteUrlPath($path) . $this->toModRewriteUrlName($name);
} $url = str_replace('{EXT}', $this->_mrExt, $url);
return $newUrl;
} if (strpos($url, $this->_mrExt) === false) {
// no articlename, replace category word seperator
$url = str_replace($fromCatWordSep, $toCatWordSep, $url);
/** } else {
* Converts passed url to a another url (Contenido to AMR and vice versa). // replace category word and article word seperator
* $path = str_replace($fromCatWordSep, $toCatWordSep, substr($url, 0, strrpos($url, $toArtSep) + 1));
* @param string $urlPath Source url path $file = str_replace($fromArtWordSep, $toArtWordSep, substr($url, strrpos($url, $toArtSep) + 1));
* @param string $fromCatSep Source category seperator $url = $path . $file;
* @param string $toCatSep Destination category seperator }
* @param string $fromCatWordSep Source category word seperator
* @param string $toCatWordSep Destination category word seperator return $url;
* @param string $fromArtSep Source article seperator }
* @param string $toArtSep Destination article seperator
* @param string $fromArtWordSep Source article word seperator
* @param string $toArtWordSep Destination article word seperator
* @return string Destination url
*
* @deprecated No more used, is to delete
*/
private function _toUrl($url, $fromCatSep, $toCatSep, $fromCatWordSep, $toCatWordSep,
$fromArtSep, $toArtSep, $fromArtWordSep, $toArtWordSep)
{
if ((string) $url == '') {
return $url;
}
$url = str_replace($this->_mrExt, '{EXT}', $url);
// replace category seperator
$url = str_replace($fromCatSep, $toCatSep, $url);
// replace article seperator
$url = str_replace($fromArtSep, $toArtSep, $url);
$url = str_replace('{EXT}', $this->_mrExt, $url);
if (strpos($url, $this->_mrExt) === false) {
// no articlename, replace category word seperator
$url = str_replace($fromCatWordSep, $toCatWordSep, $url);
} else {
// replace category word and article word seperator
$path = str_replace($fromCatWordSep, $toCatWordSep, substr($url, 0, strrpos($url, $toArtSep) + 1));
$file = str_replace($fromArtWordSep, $toArtWordSep, substr($url, strrpos($url, $toArtSep) + 1));
$url = $path . $file;
}
return $url;
}
} }

Datei anzeigen

@ -1,407 +1,426 @@
<?php <?php
/** /**
* Project: * AMR Content controller class
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Content controller * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15
* /**
* {@internal * Content controller for general settings.
* created 2011-04-11 *
* * @author Murat Purc <murat@purc.de>
* $Id: class.modrewrite_content_controller.php 312 2014-06-18 11:01:08Z oldperl $: * @package plugin
* }} * @subpackage Mod Rewrite
* */
*/ class ModRewrite_ContentController extends ModRewrite_ControllerAbstract {
/**
defined('CON_FRAMEWORK') or die('Illegal call'); * Index action
*/
public function indexAction() {
plugin_include( // donut
'mod_rewrite', 'classes/controller/class.modrewrite_controller_abstract.php' $this->_doChecks();
); }
/**
class ModRewrite_ContentController extends ModRewrite_ControllerAbstract * Save settings action
{ */
public function saveAction() {
public function indexAction() $bDebug = $this->getProperty('bDebug');
{ $aSeparator = $this->getProperty('aSeparator');
// donut $aWordSeparator = $this->getProperty('aWordSeparator');
} $routingSeparator = $this->getProperty('routingSeparator');
public function saveAction() $bError = false;
{ $aMR = array();
$bDebug = $this->getProperty('bDebug');
$aSeparator = $this->getProperty('aSeparator'); $request = (count($_POST) > 0) ? $_POST : $_GET;
$aWordSeparator = $this->getProperty('aWordSeparator'); mr_requestCleanup($request);
$routingSeparator = $this->getProperty('routingSeparator');
// use mod_rewrite
$bError = false; if (mr_arrayValue($request, 'use') == 1) {
$aMR = array(); $this->_oView->use_chk = ' checked="checked"';
$aMR['mod_rewrite']['use'] = 1;
$request = (count($_POST) > 0) ? $_POST : $_GET; } else {
mr_requestCleanup($request); $this->_oView->use_chk = '';
$aMR['mod_rewrite']['use'] = 0;
// use mod_rewrite }
if (mr_arrayValue($request, 'use') == 1) {
$this->_oView->use_chk = ' checked="checked"'; // root dir
$aMR['mod_rewrite']['use'] = 1; if (mr_arrayValue($request, 'rootdir', '') !== '') {
} else { if (!preg_match('/^[a-zA-Z0-9\-_\/\.]*$/', $request['rootdir'])) {
$this->_oView->use_chk = ''; $sMsg = i18n("The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\-_\/\.]", "mod_rewrite");
$aMR['mod_rewrite']['use'] = 0; $this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg);
} $bError = true;
} elseif (!is_dir($_SERVER['DOCUMENT_ROOT'] . $request['rootdir'])) {
// root dir
if (mr_arrayValue($request, 'rootdir', '') !== '') { if (mr_arrayValue($request, 'checkrootdir') == 1) {
if (!preg_match('/^[a-zA-Z0-9\-_\/\.]*$/', $request['rootdir'])) { // root dir check is enabled, this results in error
$sMsg = i18n('The root directory has a invalid format, alowed are the chars [a-zA-Z0-9\-_\/\.]', 'mod_rewrite'); $sMsg = i18n("The specified directory '%s' does not exists", "mod_rewrite");
$this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg); $sMsg = sprintf($sMsg, $_SERVER['DOCUMENT_ROOT'] . $request['rootdir']);
$bError = true; $this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg);
} elseif (!is_dir($_SERVER['DOCUMENT_ROOT'] . $request['rootdir'])) { $bError = true;
} else {
if (mr_arrayValue($request, 'checkrootdir') == 1) { // root dir check ist disabled, take over the setting and
// root dir check is enabled, this results in error // output a warning.
$sMsg = i18n('The specified directory "%s" does not exists', '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.", "mod_rewrite");
$sMsg = sprintf($sMsg, $_SERVER['DOCUMENT_ROOT'] . $request['rootdir']); $sMsg = sprintf($sMsg, $request['rootdir'], $_SERVER['DOCUMENT_ROOT']);
$this->_oView->rootdir_error = $this->_notifyBox('error', $sMsg); $this->_oView->rootdir_error = $this->_notifyBox('warning', $sMsg);
$bError = true; }
} else { }
// root dir check ist disabled, take over the setting and $this->_oView->rootdir = conHtmlentities($request['rootdir']);
// output a warning. $aMR['mod_rewrite']['rootdir'] = $request['rootdir'];
$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 = sprintf($sMsg, $request['rootdir'], $_SERVER['DOCUMENT_ROOT']);
$this->_oView->rootdir_error = $this->_notifyBox('warning', $sMsg); // root dir check
} if (mr_arrayValue($request, 'checkrootdir') == 1) {
} $this->_oView->checkrootdir_chk = ' checked="checked"';
$this->_oView->rootdir = clHtmlEntities($request['rootdir']); $aMR['mod_rewrite']['checkrootdir'] = 1;
$aMR['mod_rewrite']['rootdir'] = $request['rootdir']; } else {
} $this->_oView->checkrootdir_chk = '';
$aMR['mod_rewrite']['checkrootdir'] = 0;
// root dir check }
if (mr_arrayValue($request, 'checkrootdir') == 1) {
$this->_oView->checkrootdir_chk = ' checked="checked"'; // start from root
$aMR['mod_rewrite']['checkrootdir'] = 1; if (mr_arrayValue($request, 'startfromroot') == 1) {
} else { $this->_oView->startfromroot_chk = ' checked="checked"';
$this->_oView->checkrootdir_chk = ''; $aMR['mod_rewrite']['startfromroot'] = 1;
$aMR['mod_rewrite']['checkrootdir'] = 0; } else {
} $this->_oView->startfromroot_chk = '';
$aMR['mod_rewrite']['startfromroot'] = 0;
// start from root }
if (mr_arrayValue($request, 'startfromroot') == 1) {
$this->_oView->startfromroot_chk = ' checked="checked"'; // prevent duplicated content
$aMR['mod_rewrite']['startfromroot'] = 1; if (mr_arrayValue($request, 'prevent_duplicated_content') == 1) {
} else { $this->_oView->prevent_duplicated_content_chk = ' checked="checked"';
$this->_oView->startfromroot_chk = ''; $aMR['mod_rewrite']['prevent_duplicated_content'] = 1;
$aMR['mod_rewrite']['startfromroot'] = 0; } else {
} $this->_oView->prevent_duplicated_content_chk = '';
$aMR['mod_rewrite']['prevent_duplicated_content'] = 0;
// prevent duplicated content }
if (mr_arrayValue($request, 'prevent_duplicated_content') == 1) {
$this->_oView->prevent_duplicated_content_chk = ' checked="checked"'; // language settings
$aMR['mod_rewrite']['prevent_duplicated_content'] = 1; if (mr_arrayValue($request, 'use_language') == 1) {
} else { $this->_oView->use_language_chk = ' checked="checked"';
$this->_oView->prevent_duplicated_content_chk = ''; $this->_oView->use_language_name_disabled = '';
$aMR['mod_rewrite']['prevent_duplicated_content'] = 0; $aMR['mod_rewrite']['use_language'] = 1;
} if (mr_arrayValue($request, 'use_language_name') == 1) {
$this->_oView->use_language_name_chk = ' checked="checked"';
// language settings $aMR['mod_rewrite']['use_language_name'] = 1;
if (mr_arrayValue($request, 'use_language') == 1) { } else {
$this->_oView->use_language_chk = ' checked="checked"'; $this->_oView->use_language_name_chk = '';
$this->_oView->use_language_name_disabled = ''; $aMR['mod_rewrite']['use_language_name'] = 0;
$aMR['mod_rewrite']['use_language'] = 1; }
if (mr_arrayValue($request, 'use_language_name') == 1) { } else {
$this->_oView->use_language_name_chk = ' checked="checked"'; $this->_oView->use_language_chk = '';
$aMR['mod_rewrite']['use_language_name'] = 1; $this->_oView->use_language_name_chk = '';
} else { $this->_oView->use_language_name_disabled = ' disabled="disabled"';
$this->_oView->use_language_name_chk = ''; $aMR['mod_rewrite']['use_language'] = 0;
$aMR['mod_rewrite']['use_language_name'] = 0; $aMR['mod_rewrite']['use_language_name'] = 0;
} }
} else {
$this->_oView->use_language_chk = ''; // client settings
$this->_oView->use_language_name_chk = ''; if (mr_arrayValue($request, 'use_client') == 1) {
$this->_oView->use_language_name_disabled = ' disabled="disabled"'; $this->_oView->use_client_chk = ' checked="checked"';
$aMR['mod_rewrite']['use_language'] = 0; $this->_oView->use_client_name_disabled = '';
$aMR['mod_rewrite']['use_language_name'] = 0; $aMR['mod_rewrite']['use_client'] = 1;
} if (mr_arrayValue($request, 'use_client_name') == 1) {
$this->_oView->use_client_name_chk = ' checked="checked"';
// client settings $aMR['mod_rewrite']['use_client_name'] = 1;
if (mr_arrayValue($request, 'use_client') == 1) { } else {
$this->_oView->use_client_chk = ' checked="checked"'; $this->_oView->use_client_name_chk = '';
$this->_oView->use_client_name_disabled = ''; $aMR['mod_rewrite']['use_client_name'] = 0;
$aMR['mod_rewrite']['use_client'] = 1; }
if (mr_arrayValue($request, 'use_client_name') == 1) { } else {
$this->_oView->use_client_name_chk = ' checked="checked"'; $this->_oView->use_client_chk = '';
$aMR['mod_rewrite']['use_client_name'] = 1; $this->_oView->use_client_name_chk = '';
} else { $this->_oView->use_client_name_disabled = ' disabled="disabled"';
$this->_oView->use_client_name_chk = ''; $aMR['mod_rewrite']['use_client'] = 0;
$aMR['mod_rewrite']['use_client_name'] = 0; $aMR['mod_rewrite']['use_client_name'] = 0;
} }
} else {
$this->_oView->use_client_chk = ''; // use lowercase uri
$this->_oView->use_client_name_chk = ''; if (mr_arrayValue($request, 'use_lowercase_uri') == 1) {
$this->_oView->use_client_name_disabled = ' disabled="disabled"'; $this->_oView->use_lowercase_uri_chk = ' checked="checked"';
$aMR['mod_rewrite']['use_client'] = 0; $aMR['mod_rewrite']['use_lowercase_uri'] = 1;
$aMR['mod_rewrite']['use_client_name'] = 0; } else {
} $this->_oView->use_lowercase_uri_chk = '';
$aMR['mod_rewrite']['use_lowercase_uri'] = 0;
// use lowercase uri }
if (mr_arrayValue($request, 'use_lowercase_uri') == 1) {
$this->_oView->use_lowercase_uri_chk = ' checked="checked"'; $this->_oView->category_separator_attrib = '';
$aMR['mod_rewrite']['use_lowercase_uri'] = 1; $this->_oView->category_word_separator_attrib = '';
} else { $this->_oView->article_separator_attrib = '';
$this->_oView->use_lowercase_uri_chk = ''; $this->_oView->article_word_separator_attrib = '';
$aMR['mod_rewrite']['use_lowercase_uri'] = 0;
} $separatorPattern = $aSeparator['pattern'];
$separatorInfo = $aSeparator['info'];
$this->_oView->category_separator_attrib = '';
$this->_oView->category_word_separator_attrib = ''; $wordSeparatorPattern = $aSeparator['pattern'];
$this->_oView->article_separator_attrib = ''; $wordSeparatorInfo = $aSeparator['info'];
$this->_oView->article_word_separator_attrib = '';
$categorySeperator = mr_arrayValue($request, 'category_seperator', '');
$separatorPattern = $aSeparator['pattern']; $categoryWordSeperator = mr_arrayValue($request, 'category_word_seperator', '');
$separatorInfo = $aSeparator['info']; $articleSeperator = mr_arrayValue($request, 'article_seperator', '');
$articleWordSeperator = mr_arrayValue($request, 'article_word_seperator', '');
$wordSeparatorPattern = $aSeparator['pattern'];
$wordSeparatorInfo = $aSeparator['info']; // category seperator
if ($categorySeperator == '') {
$categorySeperator = mr_arrayValue($request, 'category_seperator', ''); $sMsg = i18n("Please specify separator (%s) for category", "mod_rewrite");
$categoryWordSeperator = mr_arrayValue($request, 'category_word_seperator', ''); $sMsg = sprintf($sMsg, $separatorInfo);
$articleSeperator = mr_arrayValue($request, 'article_seperator', ''); $this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$articleWordSeperator = mr_arrayValue($request, 'article_word_seperator', ''); $bError = true;
} elseif (!preg_match($separatorPattern, $categorySeperator)) {
// category seperator $sMsg = i18n("Invalid separator for category, allowed one of following characters: %s", "mod_rewrite");
if ($categorySeperator == '') { $sMsg = sprintf($sMsg, $separatorInfo);
$sMsg = i18n('Please specify separator (%s) for category', 'mod_rewrite'); $this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$sMsg = sprintf($sMsg, $separatorInfo); $bError = true;
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true; // category word seperator
} elseif (!preg_match($separatorPattern, $categorySeperator)) { } elseif ($categoryWordSeperator == '') {
$sMsg = i18n('Invalid separator for category, allowed one of following characters: %s', 'mod_rewrite'); $sMsg = i18n("Please specify separator (%s) for category words", "mod_rewrite");
$sMsg = sprintf($sMsg, $separatorInfo); $sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg); $this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true; $bError = true;
} elseif (!preg_match($wordSeparatorPattern, $categoryWordSeperator)) {
// category word seperator $sMsg = i18n("Invalid separator for category words, allowed one of following characters: %s", "mod_rewrite");
} elseif ($categoryWordSeperator == '') { $sMsg = sprintf($sMsg, $wordSeparatorInfo);
$sMsg = i18n('Please specify separator (%s) for category words', 'mod_rewrite'); $this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg);
$sMsg = sprintf($sMsg, $wordSeparatorInfo); $bError = true;
$this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true; // article seperator
} elseif (!preg_match($wordSeparatorPattern, $categoryWordSeperator)) { } elseif ($articleSeperator == '') {
$sMsg = i18n('Invalid separator for category words, allowed one of following characters: %s', 'mod_rewrite'); $sMsg = i18n("Please specify separator (%s) for article", "mod_rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo); $sMsg = sprintf($sMsg, $separatorInfo);
$this->_oView->category_word_separator_error = $this->_notifyBox('error', $sMsg); $this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true; $bError = true;
} elseif (!preg_match($separatorPattern, $articleSeperator)) {
// article seperator $sMsg = i18n("Invalid separator for article, allowed is one of following characters: %s", "mod_rewrite");
} elseif ($articleSeperator == '') { $sMsg = sprintf($sMsg, $separatorInfo);
$sMsg = i18n('Please specify separator (%s) for article', 'mod_rewrite'); $this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$sMsg = sprintf($sMsg, $separatorInfo); $bError = true;
$this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true; // article word seperator
} elseif (!preg_match($separatorPattern, $articleSeperator)) { } elseif ($articleWordSeperator == '') {
$sMsg = i18n('Invalid separator for article, allowed is one of following characters: %s', 'mod_rewrite'); $sMsg = i18n("Please specify separator (%s) for article words", "mod_rewrite");
$sMsg = sprintf($sMsg, $separatorInfo); $sMsg = sprintf($sMsg, $wordSeparatorInfo);
$this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg); $this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true; $bError = true;
} elseif (!preg_match($wordSeparatorPattern, $articleWordSeperator)) {
// article word seperator $sMsg = i18n("Invalid separator for article words, allowed is one of following characters: %s", "mod_rewrite");
} elseif ($articleWordSeperator == '') { $sMsg = sprintf($sMsg, $wordSeparatorInfo);
$sMsg = i18n('Please specify separator (%s) for article words', 'mod_rewrite'); $this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg);
$sMsg = sprintf($sMsg, $wordSeparatorInfo); $bError = true;
$this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg);
$bError = true; // category_seperator - category_word_seperator
} elseif (!preg_match($wordSeparatorPattern, $articleWordSeperator)) { } elseif ($categorySeperator == $categoryWordSeperator) {
$sMsg = i18n('Invalid separator for article words, allowed is one of following characters: %s', 'mod_rewrite'); $sMsg = i18n("Separator for category and category words must not be identical", "mod_rewrite");
$sMsg = sprintf($sMsg, $wordSeparatorInfo); $this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$this->_oView->article_word_separator_error = $this->_notifyBox('error', $sMsg); $bError = true;
$bError = true; // category_seperator - article_word_seperator
} elseif ($categorySeperator == $articleWordSeperator) {
// category_seperator - category_word_seperator $sMsg = i18n("Separator for category and article words must not be identical", "mod_rewrite");
} elseif ($categorySeperator == $categoryWordSeperator) { $this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg);
$sMsg = i18n('Separator for category and category words must not be identical', 'mod_rewrite'); $bError = true;
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg); // article_seperator - article_word_seperator
$bError = true; } elseif ($articleSeperator == $articleWordSeperator) {
// category_seperator - article_word_seperator $sMsg = i18n("Separator for category-article and article words must not be identical", "mod_rewrite");
} elseif ($categorySeperator == $articleWordSeperator) { $this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg);
$sMsg = i18n('Separator for category and article words must not be identical', 'mod_rewrite'); $bError = true;
$this->_oView->category_separator_error = $this->_notifyBox('error', $sMsg); }
$bError = true;
// article_seperator - article_word_seperator $this->_oView->category_separator = conHtmlentities($categorySeperator);
} elseif ($articleSeperator == $articleWordSeperator) { $aMR['mod_rewrite']['category_seperator'] = $categorySeperator;
$sMsg = i18n('Separator for category-article and article words must not be identical', 'mod_rewrite'); $this->_oView->category_word_separator = conHtmlentities($categoryWordSeperator);
$this->_oView->article_separator_error = $this->_notifyBox('error', $sMsg); $aMR['mod_rewrite']['category_word_seperator'] = $categoryWordSeperator;
$bError = true; $this->_oView->article_separator = conHtmlentities($articleSeperator);
} $aMR['mod_rewrite']['article_seperator'] = $articleSeperator;
$this->_oView->article_word_separator = conHtmlentities($articleWordSeperator);
$this->_oView->category_separator = clHtmlEntities($categorySeperator); $aMR['mod_rewrite']['article_word_seperator'] = $articleWordSeperator;
$aMR['mod_rewrite']['category_seperator'] = $categorySeperator;
$this->_oView->category_word_separator = clHtmlEntities($categoryWordSeperator); // file extension
$aMR['mod_rewrite']['category_word_seperator'] = $categoryWordSeperator; if (mr_arrayValue($request, 'file_extension', '') !== '') {
$this->_oView->article_separator = clHtmlEntities($articleSeperator); if (!preg_match('/^\.([a-zA-Z0-9\-_\/])*$/', $request['file_extension'])) {
$aMR['mod_rewrite']['article_seperator'] = $articleSeperator; $sMsg = i18n("The file extension has a invalid format, allowed are the chars \.([a-zA-Z0-9\-_\/])", "mod_rewrite");
$this->_oView->article_word_separator = clHtmlEntities($articleWordSeperator); $this->_oView->file_extension_error = $this->_notifyBox('error', $sMsg);
$aMR['mod_rewrite']['article_word_seperator'] = $articleWordSeperator; $bError = true;
}
// file extension $this->_oView->file_extension = conHtmlentities($request['file_extension']);
if (mr_arrayValue($request, 'file_extension', '') !== '') { $aMR['mod_rewrite']['file_extension'] = $request['file_extension'];
if (!preg_match('/^\.([a-zA-Z0-9\-_\/])*$/', $request['file_extension'])) { } else {
$sMsg = i18n('The file extension has a invalid format, allowed are the chars \.([a-zA-Z0-9\-_\/])', 'mod_rewrite'); $this->_oView->file_extension = '.html';
$this->_oView->file_extension_error = $this->_notifyBox('error', $sMsg); $aMR['mod_rewrite']['file_extension'] = '.html';
$bError = true; }
}
$this->_oView->file_extension = clHtmlEntities($request['file_extension']); // category resolve min percentage
$aMR['mod_rewrite']['file_extension'] = $request['file_extension']; if (isset($request['category_resolve_min_percentage'])) {
} else { if (!is_numeric($request['category_resolve_min_percentage'])) {
$this->_oView->file_extension = '.html'; $sMsg = i18n("Value has to be numeric.", "mod_rewrite");
$aMR['mod_rewrite']['file_extension'] = '.html'; $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) {
// category resolve min percentage $sMsg = i18n("Value has to be between 0 an 100.", "mod_rewrite");
if (isset($request['category_resolve_min_percentage'])) { $this->_oView->category_resolve_min_percentage_error = $this->_notifyBox('error', $sMsg);
if (!is_numeric($request['category_resolve_min_percentage'])) { $bError = true;
$sMsg = i18n('Value has to be numeric.', 'mod_rewrite'); }
$this->_oView->category_resolve_min_percentage_error = $this->_notifyBox('error', $sMsg); $this->_oView->category_resolve_min_percentage = $request['category_resolve_min_percentage'];
$bError = true; $aMR['mod_rewrite']['category_resolve_min_percentage'] = $request['category_resolve_min_percentage'];
} elseif ($request['category_resolve_min_percentage'] < 0 || $request['category_resolve_min_percentage'] > 100) { } else {
$sMsg = i18n('Value has to be between 0 an 100.', 'mod_rewrite'); $this->_oView->category_resolve_min_percentage = '75';
$this->_oView->category_resolve_min_percentage_error = $this->_notifyBox('error', $sMsg); $aMR['mod_rewrite']['category_resolve_min_percentage'] = '75';
$bError = true; }
}
$this->_oView->category_resolve_min_percentage = $request['category_resolve_min_percentage']; // add start article name to url
$aMR['mod_rewrite']['category_resolve_min_percentage'] = $request['category_resolve_min_percentage']; if (mr_arrayValue($request, 'add_startart_name_to_url') == 1) {
} else { $this->_oView->add_startart_name_to_url_chk = ' checked="checked"';
$this->_oView->category_resolve_min_percentage = '75'; $aMR['mod_rewrite']['add_startart_name_to_url'] = 1;
$aMR['mod_rewrite']['category_resolve_min_percentage'] = '75'; 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");
// add start article name to url $this->_oView->add_startart_name_to_url_error = $this->_notifyBox('error', $sMsg);
if (mr_arrayValue($request, 'add_startart_name_to_url') == 1) { $bError = true;
$this->_oView->add_startart_name_to_url_chk = ' checked="checked"'; }
$aMR['mod_rewrite']['add_startart_name_to_url'] = 1; $this->_oView->default_startart_name = conHtmlentities($request['default_startart_name']);
if (mr_arrayValue($request, 'add_startart_name_to_url', '') !== '') { $aMR['mod_rewrite']['default_startart_name'] = $request['default_startart_name'];
if (!preg_match('/^[a-zA-Z0-9\-_\/\.]*$/', $request['default_startart_name'])) { } else {
$sMsg = i18n('The article name has a invalid format, allowed are the chars /^[a-zA-Z0-9\-_\/\.]*$/', 'mod_rewrite'); $this->_oView->default_startart_name = '';
$this->_oView->add_startart_name_to_url_error = $this->_notifyBox('error', $sMsg); $aMR['mod_rewrite']['default_startart_name'] = '';
$bError = true; }
} } else {
$this->_oView->default_startart_name = clHtmlEntities($request['default_startart_name']); $this->_oView->add_startart_name_to_url_chk = '';
$aMR['mod_rewrite']['default_startart_name'] = $request['default_startart_name']; $aMR['mod_rewrite']['add_startart_name_to_url'] = 0;
} else { $this->_oView->default_startart_name = '';
$this->_oView->default_startart_name = ''; $aMR['mod_rewrite']['default_startart_name'] = '';
$aMR['mod_rewrite']['default_startart_name'] = ''; }
}
} else { // rewrite urls at
$this->_oView->add_startart_name_to_url_chk = ''; if (mr_arrayValue($request, 'rewrite_urls_at') == 'congeneratecode') {
$aMR['mod_rewrite']['add_startart_name_to_url'] = 0; $this->_oView->rewrite_urls_at_congeneratecode_chk = ' checked="checked"';
$this->_oView->default_startart_name = ''; $this->_oView->rewrite_urls_at_front_content_output_chk = '';
$aMR['mod_rewrite']['default_startart_name'] = ''; $aMR['mod_rewrite']['rewrite_urls_at_congeneratecode'] = 1;
} $aMR['mod_rewrite']['rewrite_urls_at_front_content_output'] = 0;
} else {
// rewrite urls at $this->_oView->rewrite_urls_at_congeneratecode_chk = '';
if (mr_arrayValue($request, 'rewrite_urls_at') == 'congeneratecode') { $this->_oView->rewrite_urls_at_front_content_output_chk = ' checked="checked"';
$this->_oView->rewrite_urls_at_congeneratecode_chk = ' checked="checked"'; $aMR['mod_rewrite']['rewrite_urls_at_congeneratecode'] = 0;
$this->_oView->rewrite_urls_at_front_content_output_chk = ''; $aMR['mod_rewrite']['rewrite_urls_at_front_content_output'] = 1;
$aMR['mod_rewrite']['rewrite_urls_at_congeneratecode'] = 1; }
$aMR['mod_rewrite']['rewrite_urls_at_front_content_output'] = 0;
} else { // routing
$this->_oView->rewrite_urls_at_congeneratecode_chk = ''; if (isset($request['rewrite_routing'])) {
$this->_oView->rewrite_urls_at_front_content_output_chk = ' checked="checked"'; $aRouting = array();
$aMR['mod_rewrite']['rewrite_urls_at_congeneratecode'] = 0; $items = explode("\n", $request['rewrite_routing']);
$aMR['mod_rewrite']['rewrite_urls_at_front_content_output'] = 1; foreach ($items as $p => $v) {
} $routingDef = explode($routingSeparator, $v);
if (count($routingDef) !== 2) {
// routing continue;
if (isset($request['rewrite_routing'])) { }
$aRouting = array(); $routingDef[0] = trim($routingDef[0]);
$items = explode("\n", $request['rewrite_routing']); $routingDef[1] = trim($routingDef[1]);
foreach ($items as $p => $v) { if ($routingDef[0] == '') {
$routingDef = explode($routingSeparator, $v); continue;
if (count($routingDef) !== 2) { }
continue; $aRouting[$routingDef[0]] = $routingDef[1];
} }
$routingDef[0] = trim($routingDef[0]); $this->_oView->rewrite_routing = conHtmlentities($request['rewrite_routing']);
$routingDef[1] = trim($routingDef[1]); $aMR['mod_rewrite']['routing'] = $aRouting;
if ($routingDef[0] == '') { } else {
continue; $this->_oView->rewrite_routing = '';
} $aMR['mod_rewrite']['routing'] = array();
$aRouting[$routingDef[0]] = $routingDef[1]; }
}
$this->_oView->rewrite_routing = clHtmlEntities($request['rewrite_routing']); // redirect invalid article to errorsite
$aMR['mod_rewrite']['routing'] = $aRouting; if (isset($request['redirect_invalid_article_to_errorsite'])) {
} else { $this->_oView->redirect_invalid_article_to_errorsite_chk = ' checked="checked"';
$this->_oView->rewrite_routing = ''; $aMR['mod_rewrite']['redirect_invalid_article_to_errorsite'] = 1;
$aMR['mod_rewrite']['routing'] = array(); } else {
} $this->_oView->redirect_invalid_article_to_errorsite_chk = '';
$aMR['mod_rewrite']['redirect_invalid_article_to_errorsite'] = 0;
// redirect invalid article to errorsite }
if (isset($request['redirect_invalid_article_to_errorsite'])) {
$this->_oView->redirect_invalid_article_to_errorsite_chk = ' checked="checked"'; if ($bError) {
$aMR['mod_rewrite']['redirect_invalid_article_to_errorsite'] = 1; $sMsg = i18n("Please check your input", "mod_rewrite");
} else { $this->_oView->content_before .= $this->_notifyBox('error', $sMsg);
$this->_oView->redirect_invalid_article_to_errorsite_chk = ''; return;
$aMR['mod_rewrite']['redirect_invalid_article_to_errorsite'] = 0; }
}
if ($bDebug == true) {
if ($bError) { echo $this->_notifyBox('info', 'Debug');
$sMsg = i18n('Please check your input', 'mod_rewrite'); echo '<pre class="example">';
$this->_oView->content_before = $this->_notifyBox('error', $sMsg); print_r($aMR['mod_rewrite']);
return; echo '</pre>';
} $sMsg = i18n("Configuration has <b>not</b> been saved, because of enabled debugging", "mod_rewrite");
echo $this->_notifyBox('info', $sMsg);
if ($bDebug == true) { return;
echo $this->_notifyBox('info', 'Debug'); }
echo '<pre class="example">';print_r($aMR['mod_rewrite']);echo '</pre>';
$sMsg = i18n('Configuration has <b>not</b> been saved, because of enabled debugging', 'mod_rewrite'); $bSeparatorModified = $this->_separatorModified($aMR['mod_rewrite']);
echo $this->_notifyBox('info', $sMsg);
return; if (mr_setConfiguration($this->_client, $aMR)) {
} $sMsg = i18n("Configuration has been saved", "mod_rewrite");
if ($bSeparatorModified) {
$bSeparatorModified = $this->_separatorModified($aMR['mod_rewrite']); mr_loadConfiguration($this->_client, true);
}
if (mr_setConfiguration($this->_client, $aMR)) { $this->_oView->content_before .= $this->_notifyBox('info', $sMsg);
$sMsg = 'Configuration has been saved'; } else {
if ($bSeparatorModified) { $sMsg = i18n("Configuration could not saved. Please check write permissions for %s ", "mod_rewrite");
mr_loadConfiguration($this->_client, true); $sMsg = sprintf($sMsg, $options['key']);
} $this->_oView->content_before .= $this->_notifyBox('error', $sMsg);
$this->_oView->content_before = $this->_notifyBox('info', $sMsg); }
} else { }
$sMsg = i18n('Configuration could not saved. Please check write permissions for %s ', 'mod_rewrite');
$sMsg = sprintf($sMsg, $options['key']); /**
$this->_oView->content_before = $this->_notifyBox('error', $sMsg); * Checks, if any sseparators setting is modified or not
} * @param array $aNewCfg New configuration send by requests.
} * @return bool
*/
protected function _separatorModified($aNewCfg) {
protected function _separatorModified($aNewCfg) $aCfg = ModRewrite::getConfig();
{
$aCfg = ModRewrite::getConfig(); if ($aCfg['category_seperator'] != $aNewCfg['category_seperator']) {
return true;
if ($aCfg['category_seperator'] != $aNewCfg['category_seperator']) { } elseif ($aCfg['category_word_seperator'] != $aNewCfg['category_word_seperator']) {
return true; return true;
} elseif ($aCfg['category_word_seperator'] != $aNewCfg['category_word_seperator']) { } elseif ($aCfg['article_seperator'] != $aNewCfg['article_seperator']) {
return true; return true;
} elseif ($aCfg['article_seperator'] != $aNewCfg['article_seperator']) { } elseif ($aCfg['article_word_seperator'] != $aNewCfg['article_word_seperator']) {
return true; return true;
} elseif ($aCfg['article_word_seperator'] != $aNewCfg['article_word_seperator']) { }
return true; return false;
} }
return false;
} /**
* Does some checks like 'is_start_compatible' check.
} * Adds notifications, if something will went wrong...
*/
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");
$this->_oView->content_before .= $this->_notifyBox('warning', $sMsg);
}
// Check for empty urlpath entries in cat_lang table
$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 = 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

@ -1,137 +1,143 @@
<?php <?php
/** /**
* Project: * AMR Content expert controller class
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Content expert controller * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15
* /**
* {@internal * Content expert controller for expert settings/actions.
* created 2011-04-11 *
* * @author Murat Purc <murat@purc.de>
* $Id: class.modrewrite_contentexpert_controller.php 209 2013-01-24 12:31:00Z oldperl $: * @package plugin
* }} * @subpackage Mod Rewrite
* */
*/ class ModRewrite_ContentExpertController extends ModRewrite_ControllerAbstract {
/**
defined('CON_FRAMEWORK') or die('Illegal call'); * Path to restrictive htaccess file
* @var string
*/
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_controller_abstract.php'); protected $_htaccessRestrictive = '';
/**
class ModRewrite_ContentExpertController extends ModRewrite_ControllerAbstract * Path to simple htaccess file
{ * @var string
protected $_htaccessRestrictive = ''; */
protected $_htaccessSimple = ''; protected $_htaccessSimple = '';
public function init() /**
{ * Initializer method, sets the paths to htaccess files
$this->_oView->content_before = ''; */
public function init() {
$pluginPath = $this->_cfg['path']['contenido'] . $this->_cfg['path']['plugins'] . 'mod_rewrite/'; $this->_oView->content_before = '';
$this->_htaccessRestrictive = $pluginPath . 'files/htaccess_restrictive.txt';
$this->_htaccessSimple = $pluginPath . 'files/htaccess_simple.txt'; $pluginPath = $this->_cfg['path']['contenido'] . $this->_cfg['path']['plugins'] . 'mod_rewrite/';
} $this->_htaccessRestrictive = $pluginPath . 'files/htaccess_restrictive.txt';
$this->_htaccessSimple = $pluginPath . 'files/htaccess_simple.txt';
/** }
* Execute index action
*/ /**
public function indexAction() * Index action
{ */
} public function indexAction() {
}
public function copyHtaccessAction()
{ /**
$type = $this->_getParam('htaccesstype'); * Copy htaccess action
$copy = $this->_getParam('copy'); */
public function copyHtaccessAction() {
if ($type != 'restrictive' && $type != 'simple') { $type = $this->_getParam('htaccesstype');
return; $copy = $this->_getParam('copy');
} elseif ($copy != 'contenido' && $copy != 'cms') {
return; if ($type != 'restrictive' && $type != 'simple') {
} return;
} elseif ($copy != 'contenido' && $copy != 'cms') {
$aInfo = $this->getProperty('htaccessInfo'); return;
}
if ($aInfo['has_htaccess']) {
$this->_oView->content_before = $this->_notifyBox(Contenido_Notification::LEVEL_WARNING, 'Die .htaccess existiert bereits im Contenido-/ oder Mandantenverzeichnis, daher wird es nicht kopiert'); $aInfo = $this->getProperty('htaccessInfo');
return;
} if ($aInfo['has_htaccess']) {
$this->_oView->content_before = $this->_notifyBox('info', 'Die .htaccess existiert bereits im Contenido-/ oder Mandantenverzeichnis, daher wird es nicht kopiert');
if ($type == 'restrictive') { return;
$source = $this->_htaccessRestrictive; }
} else {
$source = $this->_htaccessSimple; if ($type == 'restrictive') {
} $source = $this->_htaccessRestrictive;
} else {
if ($copy == 'contenido') { $source = $this->_htaccessSimple;
$dest = $aInfo['contenido_full_path'] . '.htaccess'; }
} else {
$dest = $aInfo['client_full_path'] . '.htaccess'; if ($copy == 'contenido') {
} $dest = $aInfo['contenido_full_path'] . '.htaccess';
} else {
if (!$result = @copy($source, $dest)) { $dest = $aInfo['client_full_path'] . '.htaccess';
$this->_oView->content_before = $this->_notifyBox(Contenido_Notification::LEVEL_WARNING, 'Die .htaccess konnte nicht von ' . $source . ' nach ' . $dest . ' kopiert werden!'); }
return;
} if (!$result = @copy($source, $dest)) {
$this->_oView->content_before = $this->_notifyBox('info', 'Die .htaccess konnte nicht von ' . $source . ' nach ' . $dest . ' kopiert werden!');
$msg = 'Die .htaccess wurde erfolgreich nach ' . str_replace('.htaccess', '', $dest) . ' kopiert'; return;
$this->_oView->content_before = $this->_notifyBox(Contenido_Notification::LEVEL_INFO, $msg); }
}
$msg = 'Die .htaccess wurde erfolgreich nach ' . str_replace('.htaccess', '', $dest) . ' kopiert';
$this->_oView->content_before = $this->_notifyBox('info', $msg);
public function downloadHtaccessAction() }
{
$type = $this->_getParam('htaccesstype'); /**
* Download htaccess action
if ($type != 'restrictive' && $type != 'simple') { */
return; public function downloadHtaccessAction() {
} $type = $this->_getParam('htaccesstype');
if ($type == 'restrictive') { if ($type != 'restrictive' && $type != 'simple') {
$source = $this->_htaccessRestrictive; return;
} else { }
$source = $this->_htaccessSimple;
} if ($type == 'restrictive') {
$source = $this->_htaccessRestrictive;
$this->_oView->content = file_get_contents($source); } else {
$source = $this->_htaccessSimple;
header('Content-Type: text/plain'); }
header('Etag: ' . md5(mt_rand()));
header('Content-Disposition: attachment; filename="' . $type . '.htaccess"'); $this->_oView->content = file_get_contents($source);
$this->render('{CONTENT}');
} header('Content-Type: text/plain');
header('Etag: ' . md5(mt_rand()));
header('Content-Disposition: attachment; filename="' . $type . '.htaccess"');
public function resetAction() $this->render('{CONTENT}');
{ }
// recreate all aliases
ModRewrite::recreateAliases(false); /**
$this->_oView->content_before = $this->_notifyBox('info', 'Alle Aliase wurden zur&uuml;ckgesetzt'); * Reset aliases action
} */
public function resetAction() {
// recreate all aliases
public function resetEmptyAction() ModRewrite::recreateAliases(false);
{ $this->_oView->content_before = $this->_notifyBox('info', 'Alle Aliase wurden zur&uuml;ckgesetzt');
// recreate only empty aliases }
ModRewrite::recreateAliases(true);
$this->_oView->content_before = $this->_notifyBox('info', 'Nur leere Aliase wurden zur&uuml;ckgesetzt'); /**
} * Reset only empty aliases action
*/
} public function resetEmptyAction() {
// recreate only empty aliases
ModRewrite::recreateAliases(true);
$this->_oView->content_before = $this->_notifyBox('info', 'Nur leere Aliase wurden zur&uuml;ckgesetzt');
}
}

Datei anzeigen

@ -1,161 +1,176 @@
<?php <?php
/** /**
* Project: * AMR test controller
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Content test controller * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15
* /**
* {@internal * Content controller to run tests.
* created 2011-04-11 *
* * @author Murat Purc <murat@purc.de>
* $Id: class.modrewrite_contenttest_controller.php 2 2011-07-20 12:00:48Z oldperl $: * @package plugin
* }} * @subpackage Mod Rewrite
* */
*/ class ModRewrite_ContentTestController extends ModRewrite_ControllerAbstract {
/**
defined('CON_FRAMEWORK') or die('Illegal call'); * Number of max items to process
* @var int
*/
plugin_include('mod_rewrite', 'classes/class.modrewritetest.php'); protected $_iMaxItems = 0;
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_controller_abstract.php');
/**
* Initializer method, sets some view variables
class ModRewrite_ContentTestController extends ModRewrite_ControllerAbstract */
{ public function init() {
protected $_iMaxItems = 0; $this->_oView->content = '';
$this->_oView->form_idart_chk = ($this->_getParam('idart')) ? ' checked="checked"' : '';
public function init() $this->_oView->form_idcat_chk = ($this->_getParam('idcat')) ? ' checked="checked"' : '';
{ $this->_oView->form_idcatart_chk = ($this->_getParam('idcatart')) ? ' checked="checked"' : '';
$this->_oView->content = ''; $this->_oView->form_idartlang_chk = ($this->_getParam('idartlang')) ? ' checked="checked"' : '';
$this->_oView->form_idart_chk = ($this->_getParam('idart')) ? ' checked="checked"' : ''; $this->_oView->form_maxitems = (int) $this->_getParam('maxitems', 200);
$this->_oView->form_idcat_chk = ($this->_getParam('idcat')) ? ' checked="checked"' : ''; $this->_iMaxItems = $this->_oView->form_maxitems;
$this->_oView->form_idcatart_chk = ($this->_getParam('idcatart')) ? ' checked="checked"' : ''; }
$this->_oView->form_idartlang_chk = ($this->_getParam('idartlang')) ? ' checked="checked"' : '';
$this->_oView->form_maxitems = (int) $this->_getParam('maxitems', 200); /**
$this->_iMaxItems = $this->_oView->form_maxitems; * Index action
} */
public function indexAction() {
/** $this->_oView->content = '';
* Execute index action }
*/
public function indexAction() /**
{ * Test action
$this->_oView->content = ''; */
public function testAction() {
} $this->_oView->content = '';
/** // Array for testcases
* Execute test action $aTests = array();
*/
public function testAction() // Instance of mr test
{ $oMRTest = new ModRewriteTest($this->_iMaxItems);
$this->_oView->content = '';
$startTime = getmicrotime();
// Array for testcases
$aTests = array(); // Fetch complete CONTENIDO page structure
$aStruct = $oMRTest->fetchFullStructure();
// Instance of mr test ModRewriteDebugger::add($aStruct, 'mr_test.php $aStruct');
$oMRTest = new ModRewriteTest($this->_iMaxItems);
// Loop through the structure and compose testcases
$startTime = getmicrotime(); foreach ($aStruct as $idcat => $aCat) {
// category
// Fetch complete Contenido page structure $aTests[] = array(
$aStruct = $oMRTest->fetchFullStructure(); 'url' => $oMRTest->composeURL($aCat, 'c'),
ModRewriteDebugger::add($aStruct, 'mr_test.php $aStruct'); 'level' => $aCat['level'],
'name' => $aCat['name']
// Loop through the structure and compose testcases );
foreach ($aStruct as $idcat => $aCat) {
// category foreach ($aCat['articles'] as $idart => $aArt) {
$aTests[] = array( // articles
'url' => $oMRTest->composeURL($aCat, 'c'), $aTests[] = array(
'level' => $aCat['level'], 'url' => $oMRTest->composeURL($aArt, 'a'),
'name' => $aCat['name'] 'level' => $aCat['level'],
); 'name' => $aCat['name'] . ' :: ' . $aArt['title']
);
foreach ($aCat['articles'] as $idart => $aArt) { }
// articles }
$aTests[] = array(
'url' => $oMRTest->composeURL($aArt, 'a'), // compose content
'level' => $aCat['level'], $this->_oView->content = '<pre>';
'name' => $aCat['name'] . ' :: ' . $aArt['title']
); $oMRUrlStack = ModRewriteUrlStack::getInstance();
}
} // first loop to add urls to mr url stack
foreach ($aTests as $p => $v) {
// compose content $oMRUrlStack->add($v['url']);
$this->_oView->content = '<pre>'; }
$oMRUrlStack = ModRewriteUrlStack::getInstance(); $successCounter = 0;
$failCounter = 0;
// first loop to add urls to mr url stack
foreach ($aTests as $p => $v) { // second loop to do the rest
$oMRUrlStack->add($v['url']); foreach ($aTests as $p => $v) {
} $url = mr_buildNewUrl($v['url']);
$arr = $oMRTest->resolveUrl($url);
$successCounter = 0; $error = '';
$failCounter = 0; $resUrl = $oMRTest->getResolvedUrl();
$color = 'green';
// second loop to do the rest
foreach ($aTests as $p => $v) { if ($url !== $resUrl) {
$url = mr_buildNewUrl($v['url']); if ($oMRTest->getRoutingFoundState()) {
$arr = $oMRTest->resolveUrl($url); $successCounter++;
$resUrl = $oMRTest->getResolvedUrl(); $resUrl = 'route to -&gt; ' . $resUrl;
$color = 'green'; } else {
$color = 'red';
if ($url !== $resUrl) { $failCounter++;
if ($oMRTest->getRoutingFoundState()) { }
$successCounter++; } else {
$resUrl = 'route to -&gt; ' . $resUrl; $successCounter++;
} else { }
$color = 'red';
$failCounter++; // @todo: translate
} if (isset($arr['error'])) {
} else { switch ($arr['error']) {
$successCounter++; case ModRewriteController::ERROR_CLIENT:
} $error = 'client';
break;
$pref = str_repeat(' ', $v['level']); case ModRewriteController::ERROR_LANGUAGE:
$error = 'language';
// render resolve information for current item break;
$itemTpl = $this->_oView->lng_result_item_tpl; case ModRewriteController::ERROR_CATEGORY:
$itemTpl = str_replace('{pref}', $pref, $itemTpl); $error = 'category';
$itemTpl = str_replace('{name}', $v['name'], $itemTpl); break;
$itemTpl = str_replace('{url_in}', $v['url'], $itemTpl); case ModRewriteController::ERROR_ARTICLE:
$itemTpl = str_replace('{url_out}', $url, $itemTpl); $error = 'article';
$itemTpl = str_replace('{color}', $color, $itemTpl); break;
$itemTpl = str_replace('{url_res}', $resUrl, $itemTpl); case ModRewriteController::ERROR_POST_VALIDATION:
$itemTpl = str_replace('{data}', $oMRTest->getReadableResolvedData($arr), $itemTpl); $error = 'validation';
break;
$this->_oView->content .= "\n" . $itemTpl . "\n"; }
} }
$this->_oView->content .= '</pre>';
$pref = str_repeat(' ', $v['level']);
$totalTime = sprintf('%.4f', (getmicrotime() - $startTime));
// render resolve information for current item
// render information about current test $itemTpl = $this->_oView->lng_result_item_tpl;
$msg = $this->_oView->lng_result_message_tpl; $itemTpl = str_replace('{pref}', $pref, $itemTpl);
$msg = str_replace('{time}', $totalTime, $msg); $itemTpl = str_replace('{name}', $v['name'], $itemTpl);
$msg = str_replace('{num_urls}', ($successCounter + $failCounter), $msg); $itemTpl = str_replace('{url_in}', $v['url'], $itemTpl);
$msg = str_replace('{num_success}', $successCounter, $msg); $itemTpl = str_replace('{url_out}', $url, $itemTpl);
$msg = str_replace('{num_fail}', $failCounter, $msg); $itemTpl = str_replace('{color}', $color, $itemTpl);
$itemTpl = str_replace('{url_res}', $resUrl, $itemTpl);
$this->_oView->content = $msg . $this->_oView->content; $itemTpl = str_replace('{err}', $error, $itemTpl);
$itemTpl = str_replace('{data}', $oMRTest->getReadableResolvedData($arr), $itemTpl);
}
$this->_oView->content .= "\n" . $itemTpl . "\n";
} }
$this->_oView->content .= '</pre>';
$totalTime = sprintf('%.4f', (getmicrotime() - $startTime));
// render information about current test
$msg = $this->_oView->lng_result_message_tpl;
$msg = str_replace('{time}', $totalTime, $msg);
$msg = str_replace('{num_urls}', ($successCounter + $failCounter), $msg);
$msg = str_replace('{num_success}', $successCounter, $msg);
$msg = str_replace('{num_fail}', $failCounter, $msg);
$this->_oView->content = $msg . $this->_oView->content;
}
}

Datei anzeigen

@ -1,148 +1,226 @@
<?php <?php
/** /**
* Project: * AMR abstract controller class
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Abstract controller * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 /**
* * Abstract controller for all concrete mod_rewrite controller implementations.
* {@internal *
* created 2011-04-11 * @author Murat Purc <murat@purc.de>
* * @package plugin
* $Id: class.modrewrite_controller_abstract.php 2 2011-07-20 12:00:48Z oldperl $: * @subpackage Mod Rewrite
* }} */
* abstract class ModRewrite_ControllerAbstract {
*/
/**
* View object, holds all view variables
defined('CON_FRAMEWORK') or die('Illegal call'); * @var stdClass
*/
protected $_oView;
abstract class ModRewrite_ControllerAbstract
{ /**
* Global CONTENIDO $cfg variable
protected $_oView; * @var array
*/
protected $_cfg; protected $_cfg;
protected $_client; /**
* Global CONTENIDO $client variable (client id)
protected $_area; * @var int
*/
protected $_action; protected $_client;
protected $_frame; /**
* Global CONTENIDO $area variable (area name/id)
protected $_contenido; * @var int|string
*/
protected $_template = null; protected $_area;
protected $_properties = array(); /**
* Global CONTENIDO $action variable (send by request)
protected $_debug = false; * @var string
*/
public function __construct() protected $_action;
{
global $cfg, $client, $area, $action, $frame, $contenido, $sess; /**
* Global CONTENIDO $frame variable (current frame in backend)
$this->_oView = new stdClass(); * @var int
$this->_cfg = $cfg; */
$this->_area = $area; protected $_frame;
$this->_action = $action;
$this->_frame = $frame; /**
$this->_client = $client; * Global CONTENIDO $contenido variable (session id)
$this->_contenido = $contenido; * @var string
*/
$this->_oView->area = $this->_area; protected $_contenido;
$this->_oView->frame = $this->_frame;
$this->_oView->contenido = $this->_contenido; /**
$this->_oView->sessid = $sess->id; * Template file or template string to render
$this->_oView->lng_more_informations = i18n('More informations', 'mod_rewrite'); * @var string
*/
$this->init(); protected $_template = null;
}
/**
public function init() * Additional properties list
{ * @var array
} */
protected $_properties = array();
public function setView($oView)
{ /**
if (is_object($oView)) { * Debug flag
$this->_oView = $oView; * @var bool
} */
} protected $_debug = false;
public function getView() /**
{ * Constructor, sets some properties by assigning global variables to them.
return $this->_oView; */
} public function __construct() {
global $cfg, $client, $area, $action, $frame, $contenido, $sess;
public function setProperty($key, $value)
{ $this->_oView = new stdClass();
$this->_properties[$key] = $value; $this->_cfg = $cfg;
} $this->_area = $area;
$this->_action = $action;
public function getProperty($key, $default = null) $this->_frame = $frame;
{ $this->_client = $client;
return (isset($this->_properties[$key])) ? $this->_properties[$key] : $default; $this->_contenido = $contenido;
}
$this->_oView->area = $this->_area;
public function setTemplate($sTemplate) $this->_oView->frame = $this->_frame;
{ $this->_oView->contenido = $this->_contenido;
$this->_template = $sTemplate; $this->_oView->sessid = $sess->id;
} $this->_oView->lng_more_informations = i18n("More informations", "mod_rewrite");
public function getTemplate() $this->init();
{ }
return $this->_template;
} /**
* Initializer method, could be overwritten by childs.
public function render($template = null) * This method will be invoked in constructor of ModRewrite_ControllerAbstract.
{ */
if ($template == null) { public function init() {
$template = $this->_template;
} }
if ($template == null) { /**
throw new Exception('Missing template to render.'); * View property setter.
} * @param object $oView
*/
$oTpl = new Template(); public function setView($oView) {
foreach ($this->_oView as $k => $v) { if (is_object($oView)) {
$oTpl->set('s', strtoupper($k), $v); $this->_oView = $oView;
} }
$oTpl->generate($template, 0, 0); }
}
/**
protected function _getParam($key, $default = null) * View property getter.
{ * @return object
if (isset($_GET[$key])) { */
return $_GET[$key]; public function getView() {
} elseif (isset($_POST[$key])) { return $this->_oView;
return $_POST[$key]; }
} else {
return $default; /**
} * Property setter.
} * @param string $key
* @param mixed $value
protected function _notifyBox($type, $msg) */
{ public function setProperty($key, $value) {
global $notification; $this->_properties[$key] = $value;
return $notification->returnNotification($type, $msg) . '<br>'; }
}
/**
} * Property getter.
* @param string $key
* @param mixed $default
* @return mixed
*/
public function getProperty($key, $default = null) {
return (isset($this->_properties[$key])) ? $this->_properties[$key] : $default;
}
/**
* Template setter.
* @param string $sTemplate Either full path and name of template file or a template string.
*/
public function setTemplate($sTemplate) {
$this->_template = $sTemplate;
}
/**
* Template getter.
* @return string
*/
public function getTemplate() {
return $this->_template;
}
/**
* Renders template by replacing all view variables in template.
* @param string Either full path and name of template file or a template string.
* If not passed, previous set template will be used.
* @throws Exception if no template is set
* @return string
*/
public function render($template = null) {
if ($template == null) {
$template = $this->_template;
}
if ($template == null) {
throw new Exception('Missing template to render.');
}
$oTpl = new Template();
foreach ($this->_oView as $k => $v) {
$oTpl->set('s', strtoupper($k), $v);
}
$oTpl->generate($template, 0, 0);
}
/**
* Returns parameter from request, the order is:
* - Return from $_GET, if found
* - Return from $_POST, if found
*
* @param string $key
* @param mixed $default The default value
* @return mixed
*/
protected function _getParam($key, $default = null) {
if (isset($_GET[$key])) {
return $_GET[$key];
} elseif (isset($_POST[$key])) {
return $_POST[$key];
} else {
return $default;
}
}
/**
* Returns rendered notification markup by using global $notification variable.
* @param string $type One of cGuiNotification::LEVEL_* constants
* @param string $msg The message to display
* @return string
*/
protected function _notifyBox($type, $msg) {
global $notification;
return $notification->returnNotification($type, $msg) . '<br>';
}
}

Datei anzeigen

@ -1,43 +1,43 @@
/* /*
Node structure Node structure
-------------- --------------
.aToolTip .aToolTip
.aToolTipInner .aToolTipInner
.aToolTipContent .aToolTipContent
.aToolTipCloseBtn .aToolTipCloseBtn
*/ */
.aToolTip { margin:2px 0 0 2px; } .aToolTip { margin:2px 0 0 2px; }
.aToolTipInner { .aToolTipInner {
border-left:1px solid #b3b3b3; border-left:1px solid #b3b3b3;
border-top:1px solid #666; border-top:1px solid #666;
border-right:2px solid #b3b3b3; border-right:2px solid #b3b3b3;
border-bottom:2px solid #b3b3b3; border-bottom:2px solid #b3b3b3;
background:#f1f1f1; background:#f1f1f1;
color:#000; color:#000;
margin:0; margin:0;
padding:4px 12px 6px 24px; padding:4px 12px 6px 24px;
margin:-2px 0 0 -2px; margin:-2px 0 0 -2px;
} }
.aToolTipInner .aToolTipContent { .aToolTipInner .aToolTipContent {
position:relative; position:relative;
margin:0; margin:0;
padding:0; padding:0;
} }
a.aToolTipCloseBtn { a.aToolTipCloseBtn {
display:block; display:block;
height:16px; height:16px;
width:16px; width:16px;
background:url(../images/infoBtn.gif) no-repeat; background:url(../images/infoBtn.gif) no-repeat;
text-indent:-9999px; text-indent:-9999px;
outline:none; outline:none;
position:absolute; position:absolute;
top:1px; top:1px;
left:1px; left:1px;
margin:1px 2px 2px 1px; margin:1px 2px 2px 1px;
padding:0px; padding:0px;
} }

Datei anzeigen

@ -1,174 +1,174 @@
/* Eric Meyer's Reset Reloaded */ /* Eric Meyer's Reset Reloaded */
/* http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */ /* http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ */
html, body, div, span, applet, object, iframe, html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, a, abbr, acronym, address, big, cite, code,del, dfn, em, h1, h2, h3, h4, h5, h6, p, blockquote, a, abbr, acronym, address, big, cite, code,del, dfn, em,
font, img, ins, kbd, q, s, samp,small, strike, strong, sub, font, img, ins, kbd, q, s, samp,small, strike, strong, sub,
sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li, sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,table, caption, tbody, tfoot, fieldset, form, label, legend,table, caption, tbody, tfoot,
thead, tr, th, td { thead, tr, th, td {
margin: 0; margin: 0;
padding: 0; padding: 0;
border: 0; border: 0;
outline: 0; outline: 0;
font-size: 100%; font-size: 100%;
vertical-align: baseline; vertical-align: baseline;
background: transparent; background: transparent;
} }
ol, ul {list-style: none;} ol, ul {list-style: none;}
blockquote, q {quotes: none;} blockquote, q {quotes: none;}
table {border-collapse: collapse;border-spacing: 0;} table {border-collapse: collapse;border-spacing: 0;}
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;} .clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
/* IE6 */ /* IE6 */
* html .clearfix {height: 1%;} * html .clearfix {height: 1%;}
/* IE7 */ /* IE7 */
*:first-child+html .clearfix {min-height: 1px;} *:first-child+html .clearfix {min-height: 1px;}
body { body {
background: #282828 url(../images/bg.png) repeat-x; background: #282828 url(../images/bg.png) repeat-x;
color: #999999; color: #999999;
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
font-family: Arial, helvetica; font-family: Arial, helvetica;
} }
a, a,
a:link, a:link,
a:visited { a:visited {
color: #FEC92C; color: #FEC92C;
text-decoration: none; text-decoration: none;
} }
a:hover, a:hover,
a:active, a:active,
a:focus { a:focus {
text-decoration: underline; text-decoration: underline;
} }
a.exampleTip { a.exampleTip {
color: #FEC92C; color: #FEC92C;
} }
a.exampleTip:hover{ a.exampleTip:hover{
text-decoration: underline; text-decoration: underline;
} }
.section { .section {
text-align: left; text-align: left;
padding-bottom: 18px; padding-bottom: 18px;
border-bottom: 1px solid #333; border-bottom: 1px solid #333;
margin-bottom: 18px; margin-bottom: 18px;
} }
p { p {
margin: 0 0 18px; margin: 0 0 18px;
} }
h2 { h2 {
color: #fff; color: #fff;
font-size: 22px; font-size: 22px;
line-height: 24px; line-height: 24px;
margin: 0 0 24px; margin: 0 0 24px;
padding: 0; padding: 0;
font-weight: normal; font-weight: normal;
} }
h3{ h3{
color: #ddd; color: #ddd;
font-size: 14px; font-size: 14px;
line-height: 18px; line-height: 18px;
margin: 0 0 18px; margin: 0 0 18px;
} }
h1.logo { h1.logo {
display: block; display: block;
height: 80px; height: 80px;
width: 260px; width: 260px;
margin: 40px auto 0; margin: 40px auto 0;
} }
h1.logo a{ h1.logo a{
display: block; display: block;
height: 80px; height: 80px;
width: 260px; width: 260px;
text-indent: -9999px; text-indent: -9999px;
background: url(../images/logo.png) no-repeat; background: url(../images/logo.png) no-repeat;
} }
ul.demos { ul.demos {
list-style-type: none; list-style-type: none;
} }
ul.demos li{ ul.demos li{
margin: 0 0 10px 0; margin: 0 0 10px 0;
} }
.primaryWrapper { .primaryWrapper {
margin: 0 auto; margin: 0 auto;
width: 960px; width: 960px;
text-align: center; text-align: center;
} }
.branding{ .branding{
text-align: center; text-align: center;
display: block; display: block;
height: 120px; height: 120px;
} }
.ctaBtns {border: none; text-align: center;} .ctaBtns {border: none; text-align: center;}
.ctaBtns p { .ctaBtns p {
width: 263px; width: 263px;
margin: 0 auto; margin: 0 auto;
} }
.ctaBtns a{ .ctaBtns a{
display: block; display: block;
height: 37px; height: 37px;
width: 122px; width: 122px;
text-indent: -9999px; text-indent: -9999px;
} }
a.dloadBtn { a.dloadBtn {
background: url(../images/dload-btn.png) no-repeat top left; background: url(../images/dload-btn.png) no-repeat top left;
float: left; float: left;
margin-right: 18px; margin-right: 18px;
} }
a.demoBtn { a.demoBtn {
background: url(../images/demo-btn.png) no-repeat top left; background: url(../images/demo-btn.png) no-repeat top left;
float: left; float: left;
} }
a.dloadBtn:hover, a.dloadBtn:hover,
a.demoBtn:hover { a.demoBtn:hover {
background-position: bottom left; background-position: bottom left;
} }
.usage p { .usage p {
margin-bottom: 2px; margin-bottom: 2px;
} }
ul.quickFacts { ul.quickFacts {
list-style-position: inside; list-style-position: inside;
list-style-type: disc; list-style-type: disc;
} }
p.license, p.license,
p.copyright { p.copyright {
font-size: 11px; font-size: 11px;
} }

Datei anzeigen

@ -1,81 +1,81 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>aToolTip Demos</title> <title>aToolTip Demos</title>
<!-- CSS --> <!-- CSS -->
<link type="text/css" href="css/style.css" rel="stylesheet" media="screen" /> <link type="text/css" href="css/style.css" rel="stylesheet" media="screen">
<!-- aToolTip css --> <!-- aToolTip css -->
<link type="text/css" href="css/atooltip.css" rel="stylesheet" media="screen" /> <link type="text/css" href="css/atooltip.css" rel="stylesheet" media="screen">
<!-- Scripts --> <!-- Scripts -->
<script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.min.js"></script>
<!-- aToolTip js --> <!-- aToolTip js -->
<script type="text/javascript" src="js/atooltip.min.jquery.js"></script> <script type="text/javascript" src="js/atooltip.min.jquery.js"></script>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$('a.normalTip').aToolTip(); $('a.normalTip').aToolTip();
$('a.fixedTip').aToolTip({ $('a.fixedTip').aToolTip({
fixed: true fixed: true
}); });
$('a.clickTip').aToolTip({ $('a.clickTip').aToolTip({
clickIt: true, clickIt: true,
tipContent: 'Hello I am aToolTip with content from the "tipContent" param' tipContent: 'Hello I am aToolTip with content from the "tipContent" param'
}); });
}); });
</script> </script>
</head> </head>
<body> <body>
<div class="primaryWrapper"> <div class="primaryWrapper">
<div class="branding"> <div class="branding">
<h1 class="logo"><a href="#">aToolTip</a></h1> <h1 class="logo"><a href="#">aToolTip</a></h1>
</div> </div>
<!-- DEMOS --> <!-- DEMOS -->
<div class="section" id="demos"> <div class="section" id="demos">
<h2>Demos</h2> <h2>Demos</h2>
<ul class="demos"> <ul class="demos">
<li><a href="#" class="normalTip exampleTip" title="Hello, I am aToolTip">Normal Tooltip</a> - This is a normal tooltip with default settings.</li> <li><a href="#" class="normalTip exampleTip" title="Hello, I am aToolTip">Normal Tooltip</a> - This is a normal tooltip with default settings.</li>
<li><a href="#" class="fixedTip exampleTip" title="Hello, I am aToolTip">Fixed Tooltip</a> - This is a fixed tooltip that doesnt follow the mouse.</li> <li><a href="#" class="fixedTip exampleTip" title="Hello, I am aToolTip">Fixed Tooltip</a> - This is a fixed tooltip that doesnt follow the mouse.</li>
<li><a href="#" class="clickTip exampleTip" >On Click Tooltip</a> - This is a click activated tooltip with content passed in from 'tipContent' param</li> <li><a href="#" class="clickTip exampleTip" >On Click Tooltip</a> - This is a click activated tooltip with content passed in from 'tipContent' param</li>
</ul> </ul>
</div> </div>
<!-- END DEMOS --> <!-- END DEMOS -->
<p class="copyright"> <p class="copyright">
Copyright &copy; 2009 Ara Abcarians. aToolTip was built for use with <a href="http://jquery.com">jQuery</a> by <a href="http://ara-abcarians.com/"> Ara Abcarians.</a> Copyright &copy; 2009 Ara Abcarians. aToolTip was built for use with <a href="http://jquery.com">jQuery</a> by <a href="http://ara-abcarians.com/"> Ara Abcarians.</a>
</p> </p>
<p class="license"> <p class="license">
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>. <a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"></a><br>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.
</p> </p>
</div> <!-- /primaryWrapper --> </div> <!-- /primaryWrapper -->
</body> </body>
</html> </html>

Datei anzeigen

@ -1,118 +1,118 @@
/* /*
jQuery Version: jQuery 1.3.2 jQuery Version: jQuery 1.3.2
Plugin Name: aToolTip V 1.0 Plugin Name: aToolTip V 1.0
Plugin by: Ara Abcarians: http://ara-abcarians.com Plugin by: Ara Abcarians: http://ara-abcarians.com
License: aToolTip is licensed under a Creative Commons Attribution 3.0 Unported License License: aToolTip is licensed under a Creative Commons Attribution 3.0 Unported License
Read more about this license at --> http://creativecommons.org/licenses/by/3.0/ Read more about this license at --> http://creativecommons.org/licenses/by/3.0/
Modified: Murat Purc <murat@purc>, 2010-01-28: Position clickable tooltip on right side, Modified: Murat Purc <murat@purc>, 2010-01-28: Position clickable tooltip on right side,
remove previous opened tooltip remove previous opened tooltip
Creates following node: Creates following node:
----------------------- -----------------------
<div class="aToolTip"> <div class="aToolTip">
<div class="aToolTipInner"> <div class="aToolTipInner">
<p class="aToolTipContent"></p> <p class="aToolTipContent"></p>
Content Content
<a alt="close" href="#" class="aToolTipCloseBtn">close</a> <a alt="close" href="#" class="aToolTipCloseBtn">close</a>
</div> </div>
</div> </div>
*/ */
(function($) { (function($) {
$.fn.aToolTip = function(options) { $.fn.aToolTip = function(options) {
// setup default settings // setup default settings
var defaults = { var defaults = {
clickIt: false, clickIt: false,
closeTipBtn: 'aToolTipCloseBtn', closeTipBtn: 'aToolTipCloseBtn',
fixed: false, fixed: false,
inSpeed: 400, inSpeed: 400,
outSpeed: 100, outSpeed: 100,
tipContent: '', tipContent: '',
toolTipClass: 'aToolTip', toolTipClass: 'aToolTip',
xOffset: 0, xOffset: 0,
yOffset: 0 yOffset: 0
}, },
// This makes it so the users custom options overrides the default ones // This makes it so the users custom options overrides the default ones
settings = $.extend({}, defaults, options); settings = $.extend({}, defaults, options);
return this.each(function() { return this.each(function() {
var obj = $(this); var obj = $(this);
// Decide weather to use a title attr as the tooltip content // Decide weather to use a title attr as the tooltip content
if (obj.attr('title') && !settings.tipContent) { if (obj.attr('title') && !settings.tipContent) {
// set the tooltip content/text to be the obj title attribute // set the tooltip content/text to be the obj title attribute
var tipContent = obj.attr('title'); var tipContent = obj.attr('title');
} else { } else {
// if no title attribute set it to the tipContent option in settings // if no title attribute set it to the tipContent option in settings
var tipContent = settings.tipContent; var tipContent = settings.tipContent;
} }
// check if obj has a title attribute and if click feature is off // check if obj has a title attribute and if click feature is off
if(tipContent && !settings.clickIt){ if(tipContent && !settings.clickIt){
// Activate on hover // Activate on hover
obj.hover(function(el){ obj.hover(function(el){
obj.attr({title: ''}); obj.attr({title: ''});
$('body').append("<div class='"+ settings.toolTipClass +"'><div class='"+ settings.toolTipClass +"Inner'><p class='aToolTipContent'>"+ tipContent +"</p></div></div>"); $('body').append("<div class='"+ settings.toolTipClass +"'><div class='"+ settings.toolTipClass +"Inner'><p class='aToolTipContent'>"+ tipContent +"</p></div></div>");
$('.' + settings.toolTipClass).css({ $('.' + settings.toolTipClass).css({
position: 'absolute', position: 'absolute',
display: 'none', display: 'none',
zIndex: '50000', zIndex: '50000',
top: (obj.offset().top - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset) + 'px', top: (obj.offset().top - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset) + 'px',
left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px' left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px'
}) })
.stop().fadeIn(settings.inSpeed); .stop().fadeIn(settings.inSpeed);
}, },
function(){ function(){
// Fade out // Fade out
$('.' + settings.toolTipClass).stop().fadeOut(settings.outSpeed, function(){$(this).remove();}); $('.' + settings.toolTipClass).stop().fadeOut(settings.outSpeed, function(){$(this).remove();});
}); });
} }
// Follow mouse if fixed is false and click is false // Follow mouse if fixed is false and click is false
if(!settings.fixed && !settings.clickIt){ if(!settings.fixed && !settings.clickIt){
obj.mousemove(function(el){ obj.mousemove(function(el){
$('.' + settings.toolTipClass).css({ $('.' + settings.toolTipClass).css({
top: (el.pageY - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset), top: (el.pageY - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset),
left: (el.pageX + settings.xOffset) left: (el.pageX + settings.xOffset)
}) })
}); });
} }
// check if click feature is enabled // check if click feature is enabled
if(tipContent && settings.clickIt){ if(tipContent && settings.clickIt){
// Activate on click // Activate on click
obj.click(function(el){ obj.click(function(el){
if (!settings.tipContent) { if (!settings.tipContent) {
obj.attr({title: ''}); obj.attr({title: ''});
} }
// $('.' + settings.toolTipClass).remove(); // $('.' + settings.toolTipClass).remove();
$('.' + settings.toolTipClass).stop().fadeOut(settings.outSpeed, function(){$(this).remove();}); $('.' + settings.toolTipClass).stop().fadeOut(settings.outSpeed, function(){$(this).remove();});
$('body').append("<div class='"+ settings.toolTipClass +"'><div class='"+ settings.toolTipClass +"Inner'><p class='aToolTipContent'>"+ tipContent +"</p><a class='"+ settings.closeTipBtn +"' href='#' alt='close'>close</a></div></div>"); $('body').append("<div class='"+ settings.toolTipClass +"'><div class='"+ settings.toolTipClass +"Inner'><p class='aToolTipContent'>"+ tipContent +"</p><a class='"+ settings.closeTipBtn +"' href='#' alt='close'>close</a></div></div>");
$('.' + settings.toolTipClass).css({ $('.' + settings.toolTipClass).css({
position: 'absolute', position: 'absolute',
display: 'none', display: 'none',
zIndex: '50000', zIndex: '50000',
// top: (obj.offset().top - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset) + 'px', // top: (obj.offset().top - $('.' + settings.toolTipClass).outerHeight() - settings.yOffset) + 'px',
// left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px' // left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px'
top: (obj.offset().top - settings.yOffset) + 'px', top: (obj.offset().top - settings.yOffset) + 'px',
left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px' left: (obj.offset().left + obj.outerWidth() + settings.xOffset) + 'px'
}) })
.fadeIn(settings.inSpeed); .fadeIn(settings.inSpeed);
// Click to close tooltip // Click to close tooltip
$('.' + settings.closeTipBtn).click(function(){ $('.' + settings.closeTipBtn).click(function(){
$('.' + settings.toolTipClass).fadeOut(settings.outSpeed, function(){$(this).remove();}); $('.' + settings.toolTipClass).fadeOut(settings.outSpeed, function(){$(this).remove();});
return false; return false;
}); });
return false; return false;
}); });
} }
}); // END: return this }); // END: return this
// returns the jQuery object to allow for chainability. // returns the jQuery object to allow for chainability.
return this; return this;
}; };
})(jQuery); })(jQuery);

Datei anzeigen

@ -1,2 +1,2 @@
/*Plugin by: Ara Abcarians: http://ara-abcarians.com License: http://creativecommons.org/licenses/by/3.0/ */ /*Plugin by: Ara Abcarians: http://ara-abcarians.com License: http://creativecommons.org/licenses/by/3.0/ */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(2($){$.O.w=2(d){8 e={9:f,q:\'P\',x:f,r:Q,s:R,y:\'\',1:\'w\',g:5,h:5},0=$.S({},e,d);i 3.T(2(){8 b=$(3);j(b.k(\'l\')){8 c=b.k(\'l\')}U{8 c=0.y}j(c&&!0.9){b.V(2(a){b.k({l:\'\'});$(\'z\').t("<m 4=\'"+0.1+"\'><p 4=\'A\'>"+c+"</p></m>");$(\'.\'+0.1).u({B:\'C\',D:\'E\',F:\'G\',6:(b.n().6-$(\'.\'+0.1).v()-0.h)+\'o\',7:(b.n().7+b.H()+0.g)+\'o\'}).I().J(0.r)},2(){$(\'.\'+0.1).I().K(0.s,2(){$(3).L()})})}j(!0.x&&!0.9){b.W(2(a){$(\'.\'+0.1).u({6:(a.X-$(\'.\'+0.1).v()-0.h),7:(a.Y+0.g)})})}j(c&&0.9){b.M(2(a){b.k({l:\'\'});$(\'z\').t("<m 4=\'"+0.1+"\'><p 4=\'A\'>"+c+"</p></m>");$(\'.\'+0.1).t("<a 4=\'"+0.q+"\' Z=\'#\' 10=\'N\'>N</a>");$(\'.\'+0.1).u({B:\'C\',D:\'E\',F:\'G\',6:(b.n().6-$(\'.\'+0.1).v()-0.h)+\'o\',7:(b.n().7+b.H()+0.g)+\'o\'}).J(0.r);$(\'.\'+0.q).M(2(){$(\'.\'+0.1).K(0.s,2(){$(3).L()});i f});i f})}});i 3}})(11);',62,64,'settings|toolTipClass|function|this|class||top|left|var|clickIt||||||false|xOffset|yOffset|return|if|attr|title|div|offset|px||closeTipBtn|inSpeed|outSpeed|append|css|outerHeight|aToolTip|fixed|tipContent|body|aToolTipContent|position|absolute|display|none|zIndex|50000|outerWidth|stop|fadeIn|fadeOut|remove|click|close|fn|aToolTipCloseBtn|400|100|extend|each|else|hover|mousemove|pageY|pageX|href|alt|jQuery'.split('|'),0,{})) eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(2($){$.O.w=2(d){8 e={9:f,q:\'P\',x:f,r:Q,s:R,y:\'\',1:\'w\',g:5,h:5},0=$.S({},e,d);i 3.T(2(){8 b=$(3);j(b.k(\'l\')){8 c=b.k(\'l\')}U{8 c=0.y}j(c&&!0.9){b.V(2(a){b.k({l:\'\'});$(\'z\').t("<m 4=\'"+0.1+"\'><p 4=\'A\'>"+c+"</p></m>");$(\'.\'+0.1).u({B:\'C\',D:\'E\',F:\'G\',6:(b.n().6-$(\'.\'+0.1).v()-0.h)+\'o\',7:(b.n().7+b.H()+0.g)+\'o\'}).I().J(0.r)},2(){$(\'.\'+0.1).I().K(0.s,2(){$(3).L()})})}j(!0.x&&!0.9){b.W(2(a){$(\'.\'+0.1).u({6:(a.X-$(\'.\'+0.1).v()-0.h),7:(a.Y+0.g)})})}j(c&&0.9){b.M(2(a){b.k({l:\'\'});$(\'z\').t("<m 4=\'"+0.1+"\'><p 4=\'A\'>"+c+"</p></m>");$(\'.\'+0.1).t("<a 4=\'"+0.q+"\' Z=\'#\' 10=\'N\'>N</a>");$(\'.\'+0.1).u({B:\'C\',D:\'E\',F:\'G\',6:(b.n().6-$(\'.\'+0.1).v()-0.h)+\'o\',7:(b.n().7+b.H()+0.g)+\'o\'}).J(0.r);$(\'.\'+0.q).M(2(){$(\'.\'+0.1).K(0.s,2(){$(3).L()});i f});i f})}});i 3}})(11);',62,64,'settings|toolTipClass|function|this|class||top|left|var|clickIt||||||false|xOffset|yOffset|return|if|attr|title|div|offset|px||closeTipBtn|inSpeed|outSpeed|append|css|outerHeight|aToolTip|fixed|tipContent|body|aToolTipContent|position|absolute|display|none|zIndex|50000|outerWidth|stop|fadeIn|fadeOut|remove|click|close|fn|aToolTipCloseBtn|400|100|extend|each|else|hover|mousemove|pageY|pageX|href|alt|jQuery'.split('|'),0,{}))

Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist

Datei anzeigen

@ -1,71 +1,69 @@
################################################################################ ################################################################################
# Contenido AMR plugin restrictive rewrite rules set. # CONTENIDO AMR plugin restrictive rewrite rules set.
# #
# Contains strict rules, each rewrite exclusion must be set manually. # Contains strict rules, each rewrite exclusion must be set manually.
# - Exclude requests to directories usage/, contenido/, setup/, cms/upload/ # - Exclude requests to directories usage/, contenido/, setup/, cms/upload/
# - Exclude requests to cms/front_content.php # - Exclude requests to cms/front_content.php
# - Pass thru requests to common ressources (pictures, movies, js, css, pdf) # - Pass thru requests to common ressources (pictures, movies, js, css, pdf)
# #
# @version 0.0.1 # @version 0.0.1
# @author Murat Purc <murat@purc.de> # @author Murat Purc <murat@purc.de>
# @copyright four for business AG <www.4fb.de> # @copyright four for business AG <www.4fb.de>
# @license http://www.contenido.org/license/LIZENZ.txt # @license http://www.contenido.org/license/LIZENZ.txt
# @link http://www.4fb.de # @link http://www.4fb.de
# @link http://www.contenido.org # @link http://www.contenido.org
# @since file available since Contenido release 4.8.15 #
# # $Id: htaccess_restrictive.txt 3503 2012-10-19 19:49:39Z xmurrix $
# $Id: htaccess_restrictive.txt 447 2016-07-08 14:04:12Z oldperl $ ################################################################################
################################################################################
# Enable following lines to run PHP5 on 1und1.de (1and1.com)
# Enable following lines to run PHP5 on 1und1.de (1and1.com) #AddType x-mapp-php5 .php
#AddType x-mapp-php5 .php #AddHandler x-mapp-php5 .php
#AddHandler x-mapp-php5 .php
<IfModule mod_rewrite.c>
<IfModule mod_rewrite.c>
# Enable rewrite engine
# Enable rewrite engine RewriteEngine on
RewriteEngine on
# Specify a base URL-path for the rules
# Specify a base URL-path for the rules RewriteBase /cms
RewriteBase /cms
# Catch some common exploits in query string to get rid of them.
# Catch some common exploits in query string to get rid of them. # NOTE: Conditions to prevent protocols (ftp, http[s]) in query string could
# NOTE: Conditions to prevent protocols (ftp, http[s]) in query string could # be a disadvantage in some cases.
# be a disadvantage in some cases. RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR] RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR] RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR] RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR]
RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR] RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC]
RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC] RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana
RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana
# Exclude some files and directories from rewriting
# Exclude some files and directories from rewriting RewriteRule ^usage/.*$ - [L]
RewriteRule ^usage/.*$ - [L] RewriteRule ^conlite/.*$ - [L]
RewriteRule ^conlite/.*$ - [L] RewriteRule ^setup/.*$ - [L]
RewriteRule ^setup/.*$ - [L] RewriteRule ^cms/upload/.*$ - [L]
RewriteRule ^cms/upload/.*$ - [L] RewriteRule ^cms/test/.*$ - [L]
RewriteRule ^cms/test/.*$ - [L] RewriteRule ^cms/front_content.php.*$ - [L]
RewriteRule ^cms/front_content.php.*$ - [L]
# Exclude common extensions from rewriting and pass remaining requests to
# One RewriteRule to rule them all. # front_content.php.
# Exclude common extensions from rewriting and pass remaining requests to RewriteRule !\.(avi|css|doc|flv|gif|gzip|ico|jpeg|jpg|js|mov|mp3|pdf|png|ppt|rar|swf|txt|wav|wmv|xml|zip)$ front_content.php [NC,QSA,L]
# front_content.php.
RewriteRule !\.(avi|css|doc|flv|gif|gzip|ico|jpeg|jpg|js|mov|mp3|pdf|png|ppt|rar|txt|wav|wmv|xml|zip)$ front_content.php [NC,QSA,L] </IfModule>
</IfModule>
# Some rules to compress files.
# NOTE: Following settings are not mod rewrite specific, but enabling mod_deflate
# Some rules to compress files. # for some file types can help to reduce bandwith.
# NOTE: Following settings are not mod rewrite specific, but enabling mod_deflate <IfModule mod_deflate.c>
# for some file types can help to reduce bandwith. <FilesMatch "\.(js|css|html|htm|php|xml)$">
<IfModule mod_deflate.c> SetOutputFilter DEFLATE
<FilesMatch "\.(js|css|html|htm|php|xml)$"> </FilesMatch>
SetOutputFilter DEFLATE </IfModule>
</FilesMatch>
</IfModule>

Datei anzeigen

@ -1,69 +1,69 @@
################################################################################ ################################################################################
# Contenido AMR plugin simple rewrite rules set. # CONTENIDO AMR plugin simple rewrite rules set.
# #
# Contains few easy to handle rewrite rules. # Contains few easy to handle rewrite rules.
# #
# @version 0.0.1 # @version 0.0.1
# @author Murat Purc <murat@purc.de> # @author Murat Purc <murat@purc.de>
# @copyright four for business AG <www.4fb.de> # @copyright four for business AG <www.4fb.de>
# @license http://www.contenido.org/license/LIZENZ.txt # @license http://www.contenido.org/license/LIZENZ.txt
# @link http://www.4fb.de # @link http://www.4fb.de
# @link http://www.contenido.org # @link http://www.contenido.org
# @since file available since Contenido release 4.8.15 #
# # $Id: htaccess_simple.txt 3503 2012-10-19 19:49:39Z xmurrix $
# $Id: htaccess_simple.txt 2 2011-07-20 12:00:48Z oldperl $ ################################################################################
################################################################################
# Enable following lines to run PHP5 on 1und1.de (1and1.com)
# Enable following lines to run PHP5 on 1und1.de (1and1.com) #AddType x-mapp-php5 .php
#AddType x-mapp-php5 .php #AddHandler x-mapp-php5 .php
#AddHandler x-mapp-php5 .php
<IfModule mod_rewrite.c>
<IfModule mod_rewrite.c>
# Enable rewrite engine
# Enable rewrite engine RewriteEngine on
RewriteEngine on
# Specify a base URL-path for the rules
# Specify a base URL-path for the rules RewriteBase /cms
RewriteBase /cms
# Catch some common exploits in query string to get rid of them
# Catch some common exploits in query string to get rid of them # NOTE: Conditions to prevent protocols (ftp, http[s]) in query string could
# NOTE: Conditions to prevent protocols (ftp, http[s]) in query string could # be a disadvantage in some cases
# be a disadvantage in some cases RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} contenido_path=.*$ [NC,OR] RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} cfg\[path\]=.*$ [NC,OR] RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR]
RewriteCond %{QUERY_STRING} _PHPLIB\[libdir\]=.*$ [NC,OR] RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR] RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR]
RewriteCond %{QUERY_STRING} ftp://.*$ [NC,OR] RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC]
RewriteCond %{QUERY_STRING} http[s]*://.*$ [NC] RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana
RewriteRule ^.* - [F,L] # all matching conditions from above will end in nirvana
# Rewrite request to root to front_content.php
# Rewrite request to root to front_content.php RewriteRule ^$ front_content.php [QSA,L]
RewriteRule ^$ front_content.php [QSA,L]
# Exclude following request from rewriting
# Exclude following request from rewriting # tests for favicon.ico, valid symlinks (-s), not empty files (-l) and folders (-d)
# tests for valid symlinks (-s), not empty files (-l) and folders (-d) RewriteCond %{REQUEST_URI} ^/favicon.ico$ [OR]
RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ - [NC,L]
# Pass other requests to front_content.php # Pass other requests to front_content.php
RewriteRule ^.*$ front_content.php [QSA,NC,L] RewriteRule ^.*$ front_content.php [QSA,NC,L]
</IfModule> </IfModule>
# Some rules to compress files. # Some rules to compress files.
# NOTE: Following settings are not mod rewrite specific, but enabling mod_deflate # NOTE: Following settings are not mod rewrite specific, but enabling mod_deflate
# for some file types can help to reduce bandwith. # for some file types can help to reduce bandwith.
<IfModule mod_deflate.c> <IfModule mod_deflate.c>
<FilesMatch "\.(js|css|html|htm|php|xml)$"> <FilesMatch "\.(js|css|html|htm|php|xml)$">
SetOutputFilter DEFLATE SetOutputFilter DEFLATE
</FilesMatch> </FilesMatch>
</IfModule> </IfModule>

Datei anzeigen

@ -1,128 +1,114 @@
<?php <?php
/** /**
* Project: * Plugin Advanced Mod Rewrite default settings. This file will be included if
* Contenido Content Management System * mod rewrite settings of an client couldn't loaded.
* *
* Description: * Containing settings are taken over from CONTENIDO-4.6.15mr setup installer
* Plugin Advanced Mod Rewrite default settings. This file will be included if * template beeing made originally by stese.
* mod rewrite settings of an client couldn't loaded. *
* * NOTE:
* Containing settings are taken over from contenido-4.6.15mr setup installer * Changes in these Advanced Mod Rewrite settings will affect all clients, as long
* template beeing made originally by stese. * as they don't have their own configuration.
* * PHP needs write permissions to the folder, where this file resides. Mod Rewrite
* NOTE: * configuration files will be created in this folder.
* Changes in these Advanced Mod Rewrite settings will affect all clients, as long *
* as they don't have their own configuration. * @package plugin
* PHP needs write permissions to the folder, where this file resides. Mod Rewrite * @subpackage Mod Rewrite
* configuration files will be created in this folder. * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15
* global $cfg;
* {@internal
* created 2008-05-xx // Use advanced mod_rewrites ( 1 = yes, 0 = none )
* $cfg['mod_rewrite']['use'] = 0;
* $Id: config.mod_rewrite_default.php 2 2011-07-20 12:00:48Z oldperl $:
* }} // Path to the htaccess file with trailling slash from domain-root!
* $cfg['mod_rewrite']['rootdir'] = '/';
*/
// Check path to the htaccess file ( 1 = yes, 0 = none )
$cfg['mod_rewrite']['checkrootdir'] = 1;
defined('CON_FRAMEWORK') or die('Illegal call');
// Start TreeLocation from Root Tree (set to 1) or get location from first category (set to 0)
$cfg['mod_rewrite']['startfromroot'] = 0;
global $cfg;
// Prevent Duplicated Content, if startfromroot is enabled ( 1 = yes, 0 = none )
// Use advanced mod_rewrites ( 1 = yes, 0 = none ) $cfg['mod_rewrite']['prevent_duplicated_content'] = 0;
$cfg['mod_rewrite']['use'] = 0;
// is multilanguage? ( 1 = yes, 0 = none )
// Path to the htaccess file with trailling slash from domain-root! $cfg['mod_rewrite']['use_language'] = 0;
$cfg['mod_rewrite']['rootdir'] = '/';
// use language name in url? ( 1 = yes, 0 = none )
// Check path to the htaccess file ( 1 = yes, 0 = none ) $cfg['mod_rewrite']['use_language_name'] = 0;
$cfg['mod_rewrite']['checkrootdir'] = 1;
// is multiclient in only one directory? ( 1 = yes, 0 = none )
// Start TreeLocation from Root Tree (set to 1) or get location from first category (set to 0) $cfg['mod_rewrite']['use_client'] = 0;
$cfg['mod_rewrite']['startfromroot'] = 0;
// use client name in url? ( 1 = yes, 0 = none )
// Prevent Duplicated Content, if startfromroot is enabled ( 1 = yes, 0 = none ) $cfg['mod_rewrite']['use_client_name'] = 0;
$cfg['mod_rewrite']['prevent_duplicated_content'] = 0;
// use lowercase url? ( 1 = yes, 0 = none )
// is multilanguage? ( 1 = yes, 0 = none ) $cfg['mod_rewrite']['use_lowercase_uri'] = 1;
$cfg['mod_rewrite']['use_language'] = 0;
// file extension for article links
// use language name in url? ( 1 = yes, 0 = none ) $cfg['mod_rewrite']['file_extension'] = '.html';
$cfg['mod_rewrite']['use_language_name'] = 0;
// The percentage if the category name have to match with database names.
// is multiclient in only one directory? ( 1 = yes, 0 = none ) $cfg['mod_rewrite']['category_resolve_min_percentage'] = '75';
$cfg['mod_rewrite']['use_client'] = 0;
// Add start article name to url (1 = yes, 0 = none)
// use client name in url? ( 1 = yes, 0 = none ) $cfg['mod_rewrite']['add_startart_name_to_url'] = 1;
$cfg['mod_rewrite']['use_client_name'] = 0;
// Default start article name to use, depends on active add_startart_name_to_url
// use lowercase url? ( 1 = yes, 0 = none ) $cfg['mod_rewrite']['default_startart_name'] = 'index';
$cfg['mod_rewrite']['use_lowercase_uri'] = 1;
// Rewrite urls on generating the code for the page. If active, the responsibility will be
// file extension for article links // outsourced to moduleoutputs and you have to adapt the moduleoutputs manually. Each output of
$cfg['mod_rewrite']['file_extension'] = '.html'; // internal article/category links must be processed by using $sess->url. (1 = yes, 0 = none)
$cfg['mod_rewrite']['rewrite_urls_at_congeneratecode'] = 0;
// The percentage if the category name have to match with database names.
$cfg['mod_rewrite']['category_resolve_min_percentage'] = '75'; // 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
// Add start article name to url (1 = yes, 0 = none) // option above. (1 = yes, 0 = none)
$cfg['mod_rewrite']['add_startart_name_to_url'] = 1; $cfg['mod_rewrite']['rewrite_urls_at_front_content_output'] = 1;
// Default start article name to use, depends on active add_startart_name_to_url
$cfg['mod_rewrite']['default_startart_name'] = 'index'; // Following five settings write urls like this one:
// www.domain.de/category1-category2.articlename.html
// Rewrite urls on generating the code for the page. If active, the responsibility will be // Changes of these settings causes a reset of all aliases, see Advanced Mod Rewrite settings in
// outsourced to moduleoutputs and you have to adapt the moduleoutputs manually. Each output of // backend.
// internal article/category links must be processed by using $sess->url. (1 = yes, 0 = none) // NOTE: category_seperator and article_seperator must contain different character.
$cfg['mod_rewrite']['rewrite_urls_at_congeneratecode'] = 0; // Separator for categories
$cfg['mod_rewrite']['category_seperator'] = '/';
// 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 // Separator between category and article
// option above. (1 = yes, 0 = none) $cfg['mod_rewrite']['article_seperator'] = '/';
$cfg['mod_rewrite']['rewrite_urls_at_front_content_output'] = 1;
// Word seperator in category names
$cfg['mod_rewrite']['category_word_seperator'] = '-';
// Following five settings write urls like this one:
// www.domain.de/category1-category2.articlename.html // Word seperator in article names
// Changes of these settings causes a reset of all aliases, see Advanced Mod Rewrite settings in $cfg['mod_rewrite']['article_word_seperator'] = '-';
// backend.
// NOTE: category_seperator and article_seperator must contain different character.
// Routing settings for incomming urls. Here you can define routing rules as follows:
// Separator for categories // $cfg['mod_rewrite']['routing'] = array(
$cfg['mod_rewrite']['category_seperator'] = '/'; // '/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)
// Separator between category and article // );
$cfg['mod_rewrite']['article_seperator'] = '/'; $cfg['mod_rewrite']['routing'] = array();
// Word seperator in category names
$cfg['mod_rewrite']['category_word_seperator'] = '-'; // Redirect invalid articles to errorpage (1 = yes, 0 = none)
$cfg['mod_rewrite']['redirect_invalid_article_to_errorsite'] = 0;
// Word seperator in article names
$cfg['mod_rewrite']['article_word_seperator'] = '-';
// Routing settings for incomming urls. Here you can define routing rules as follows:
// $cfg['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();
// Redirect invalid articles to errorpage (1 = yes, 0 = none)
$cfg['mod_rewrite']['redirect_invalid_article_to_errorsite'] = 0;

Datei anzeigen

@ -1,178 +1,167 @@
<?php <?php
/** /**
* Project: * Plugin Advanced Mod Rewrite initialization file.
* Contenido Content Management System *
* * This file will be included by CONTENIDO plugin loader routine, and the content
* Description: * of this file ensures that the AMR Plugin will be initialized correctly.
* Plugin Advanced Mod Rewrite initialization file. *
* * @package plugin
* This file will be included by Contenido plugin loader routine, and the content * @subpackage Mod Rewrite
* of this file ensures that the AMR Plugin will be initialized correctly. * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 global $_cecRegistry, $cfg, $contenido, $area, $client, $load_client;
*
* {@internal ####################################################################################################
* created 2008-05-xx /**
* * Chain Contenido.Frontend.CreateURL
* $Id: config.plugin.php 275 2013-09-11 12:49:00Z oldperl $: * This chain is called inside some scripts (front_content.php) to create urls.
* }} *
* * @todo: Is added to provide downwards compatibility for the amr plugin.
*/ * There is no need for this chain since CONTENIDO 4.8.9 contains its own Url building feature.
* @deprecated
*
defined('CON_FRAMEWORK') or die('Illegal call'); * Parameters & order:
* string URL including parameter value pairs
*
#################################################################################################### * Returns:
/** * string Returns modified URL
* Chain Contenido.Frontend.CreateURL */
* This chain is called inside some scripts (front_content.php) to create urls. $_cecRegistry->registerChain("Contenido.Frontend.CreateURL", "string");
* ####################################################################################################
* @todo: Is added to provide downwards compatibility for the amr plugin. // initialize client id
* There is no need for this chain since Contenido 4.8.9 contains its own Url building feature. if (isset($client) && (int) $client > 0) {
* @deprecated $clientId = (int) $client;
* } elseif (isset($load_client) && (int) $load_client > 0) {
* Parameters & order: $clientId = (int) $load_client;
* string URL including parameter value pairs } else {
* $clientId = '';
* Returns: }
* string Returns modified URL
*/
$_cecRegistry->registerChain("Contenido.Frontend.CreateURL", "string"); // include necessary sources
#################################################################################################### cInclude('classes', 'Debug/DebuggerFactory.class.php');
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_controller_abstract.php');
global $cfg, $contenido, $mr_statics; plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_content_controller.php');
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_contentexpert_controller.php');
// used for caching plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_contenttest_controller.php');
$mr_statics = array(); plugin_include('mod_rewrite', 'classes/class.modrewritebase.php');
plugin_include('mod_rewrite', 'classes/class.modrewrite.php');
// initialize client id plugin_include('mod_rewrite', 'classes/class.modrewritecontroller.php');
if (isset($client) && (int) $client > 0) { plugin_include('mod_rewrite', 'classes/class.modrewritedebugger.php');
$clientId = (int) $client; plugin_include('mod_rewrite', 'classes/class.modrewritetest.php');
} elseif (isset($load_client) && (int) $load_client > 0) { plugin_include('mod_rewrite', 'classes/class.modrewriteurlstack.php');
$clientId = (int) $load_client; plugin_include('mod_rewrite', 'classes/class.modrewriteurlutil.php');
} else { plugin_include('mod_rewrite', 'includes/functions.mod_rewrite.php');
$clientId = '';
}
global $lngAct;
// include necessary sources $lngAct['mod_rewrite']['mod_rewrite'] = i18n("Advanced Mod Rewrite", "mod_rewrite");
plugin_include('mod_rewrite', 'classes/class.modrewritedebugger.php'); $lngAct['mod_rewrite']['mod_rewrite_expert'] = i18n("Advanced Mod Rewrite functions", "mod_rewrite");
plugin_include('mod_rewrite', 'classes/class.modrewritebase.php'); $lngAct['mod_rewrite']['mod_rewrite_test'] = i18n("Advanced Mod Rewrite test", "mod_rewrite");
plugin_include('mod_rewrite', 'classes/class.modrewrite.php');
plugin_include('mod_rewrite', 'classes/class.modrewritecontroller.php');
plugin_include('mod_rewrite', 'classes/class.modrewriteurlstack.php'); // set debug configuration
plugin_include('mod_rewrite', 'classes/class.modrewriteurlutil.php'); if (isset($contenido)) {
plugin_include('mod_rewrite', 'includes/functions.mod_rewrite.php'); ModRewriteDebugger::setEnabled(true);
} else {
ModRewriteDebugger::setEnabled(false);
// set debug configuration }
if (isset($contenido)) {
ModRewriteDebugger::setEnabled(true); // initialize mr plugin
} else { ModRewrite::initialize($clientId);
ModRewriteDebugger::setEnabled(false);
} if (ModRewrite::isEnabled()) {
// initialize mr plugin $aMrCfg = ModRewrite::getConfig();
ModRewrite::initialize($clientId);
$_cecRegistry = cApiCecRegistry::getInstance();
if (ModRewrite::isEnabled()) {
// Add new tree function to CONTENIDO Extension Chainer
$aMrCfg = ModRewrite::getConfig(); $_cecRegistry->addChainFunction('Contenido.Action.str_newtree.AfterCall', 'mr_strNewTree');
$_cecRegistry = cApiCECRegistry::getInstance(); // Add move subtree function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_movesubtree.AfterCall', 'mr_strMoveSubtree');
// Add new tree function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_newtree.AfterCall', 'mr_strNewTree'); // Add new category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_newcat.AfterCall', 'mr_strNewCategory');
// Add move subtree function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_movesubtree.AfterCall', 'mr_strMoveSubtree'); // Add rename category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_renamecat.AfterCall', 'mr_strRenameCategory');
// Add new category function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_newcat.AfterCall', 'mr_strNewCategory'); // Add move up category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_moveupcat.AfterCall', 'mr_strMoveUpCategory');
// Add rename category function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_renamecat.AfterCall', 'mr_strRenameCategory'); // Add move down category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_movedowncat.AfterCall', 'mr_strMovedownCategory');
// Add move up category function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_moveupcat.AfterCall', 'mr_strMoveUpCategory'); // Add copy category function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Category.strCopyCategory', 'mr_strCopyCategory');
// Add move down category function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.str_movedowncat.AfterCall', 'mr_strMovedownCategory'); // Add category sync function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Category.strSyncCategory_Loop', 'mr_strSyncCategory');
// Add copy category function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Category.strCopyCategory', 'mr_strCopyCategory'); // Add save article (new and existing category) function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.con_saveart.AfterCall', 'mr_conSaveArticle');
// Add category sync function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Category.strSyncCategory_Loop', 'mr_strSyncCategory'); // Add move article function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Article.conMoveArticles_Loop', 'mr_conMoveArticles');
// Add save article (new and existing category) function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Action.con_saveart.AfterCall', 'mr_conSaveArticle'); // Add duplicate article function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Article.conCopyArtLang_AfterInsert', 'mr_conCopyArtLang');
// Add move article function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Article.conMoveArticles_Loop', 'mr_conMoveArticles'); // Add sync article function to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Article.conSyncArticle_AfterInsert', 'mr_conSyncArticle');
// Add duplicate article function to Contenido Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Article.conCopyArtLang_AfterInsert', 'mr_conCopyArtLang'); if (!isset($contenido)) {
// we are not in backend, add cec functions for rewriting
// Add sync article function to Contenido Extension Chainer // Add mr related function for hook "after plugins loaded" to CONTENIDO Extension Chainer
$_cecRegistry->addChainFunction('Contenido.Article.conSyncArticle_AfterInsert', 'mr_conSyncArticle'); $_cecRegistry->addChainFunction('Contenido.Frontend.AfterLoadPlugins', 'mr_runFrontendController');
if (!isset($contenido)) { // Add url rewriting function to CONTENIDO Extension Chainer
// we are not in backend, add cec functions for rewriting // @todo: no more need since CONTENIDO 4.8.9 provides central Url building,
// but it is still available because of downwards compatibility
// Add mr related function for hook "after plugins loaded" to Contenido Extension Chainer // @deprecated
$_cecRegistry->addChainFunction('Contenido.Frontend.AfterLoadPlugins', 'mr_runFrontendController'); $_cecRegistry->addChainFunction('Contenido.Frontend.CreateURL', 'mr_buildNewUrl');
// Add url rewriting function to Contenido Extension Chainer // overwrite url builder configuration with own url builder
// @todo: no more need since Contenido 4.8.9 provides central Url building, $cfg['url_builder']['name'] = 'MR';
// but it is still available because of downwards compatibility $cfg['config'] = array();
// @deprecated cInclude('classes', 'Url/Contenido_Url.class.php');
$_cecRegistry->addChainFunction('Contenido.Frontend.CreateURL', 'mr_buildNewUrl'); cInclude('classes', 'UrlBuilder/Contenido_UrlBuilderConfig.class.php');
Contenido_UrlBuilderConfig::setConfig($cfg['url_builder']);
// overwrite url builder configuration with own url builder
$cfg['url_builder']['name'] = 'MR'; if ($aMrCfg['rewrite_urls_at_congeneratecode'] == 1) {
$cfg['config'] = array(); // Add url rewriting at code generation to CONTENIDO Extension Chainer
Contenido_UrlBuilderConfig::setConfig($cfg['url_builder']); $_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode', 'mr_buildGeneratedCode');
} elseif ($aMrCfg['rewrite_urls_at_front_content_output'] == 1) {
if ($aMrCfg['rewrite_urls_at_congeneratecode'] == 1) { // Add url rewriting at html output to CONTENIDO Extension Chainer
// Add url rewriting at code generation to Contenido Extension Chainer $_cecRegistry->addChainFunction('Contenido.Frontend.HTMLCodeOutput', 'mr_buildGeneratedCode');
$_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode', 'mr_buildGeneratedCode'); } else {
} elseif ($aMrCfg['rewrite_urls_at_front_content_output'] == 1) { // Fallback solution: Add url rewriting at code generation to CONTENIDO Extension Chainer
// Add url rewriting at html output to Contenido Extension Chainer $_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode', 'mr_buildGeneratedCode');
$_cecRegistry->addChainFunction('Contenido.Frontend.HTMLCodeOutput', 'mr_buildGeneratedCode'); }
} else { }
// Fallback solution: Add url rewriting at code generation to Contenido Extension Chainer }
$_cecRegistry->addChainFunction('Contenido.Content.conGenerateCode', 'mr_buildGeneratedCode');
} if (isset($contenido) && isset($area) && $area == 'mod_rewrite_test') {
} // configure url builder to enable it on test page
$cfg['url_builder']['name'] = 'MR';
} $cfg['config'] = array();
Contenido_UrlBuilderConfig::setConfig($cfg['url_builder']);
if (isset($contenido) && isset($area) && $area == 'mod_rewrite_test') { ModRewrite::setEnabled(true);
// configure url builder to enable it on test page }
$cfg['url_builder']['name'] = 'MR';
$cfg['config'] = array(); unset($clientId, $options);
Contenido_UrlBuilderConfig::setConfig($cfg['url_builder']);
ModRewrite::setEnabled(true);
}
unset($clientId, $options);
// administration > users > area translations
global $lngAct, $_cecRegistry;
$lngAct['mod_rewrite']['mod_rewrite'] = i18n("MR-Options", "mod_rewrite");
$lngAct['mod_rewrite']['mod_rewrite_expert'] = i18n("Expert Options", "mod_rewrite");
$lngAct['mod_rewrite']['mod_rewrite_test'] = i18n("MR Test Area", "mod_rewrite");

Datei anzeigen

@ -1,115 +1,102 @@
<?php <?php
/** /**
* Project: * Mod Rewrite front_content.php controller. Does some preprocessing jobs, tries
* Contenido Content Management System * to set following variables, depending on mod rewrite configuration and if
* * request part exists:
* Description: * - $client
* Mod Rewrite front_content.php controller. Does some preprocessing jobs, tries * - $changeclient
* to set following variables, depending on mod rewrite configuration and if * - $lang
* request part exists: * - $changelang
* - $client * - $idart
* - $changeclient * - $idcat
* - $lang *
* - $changelang * @package plugin
* - $idart * @subpackage Mod Rewrite
* - $idcat * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15
* global $client, $changeclient, $cfgClient, $lang, $changelang, $idart, $idcat, $path, $mr_preprocessedPageError;
* {@internal
* created 2008-05-xx ModRewriteDebugger::add(ModRewrite::getConfig(), 'front_content_controller.php mod rewrite config');
*
* $Id: front_content_controller.php 220 2013-02-14 08:40:43Z Mansveld $:
* }} // create an mod rewrite controller instance and execute processing
* $oMRController = new ModRewriteController($_SERVER['REQUEST_URI']);
*/ $oMRController->execute();
if ($oMRController->errorOccured()) {
defined('CON_FRAMEWORK') or die('Illegal call');
// an error occured (idcat and or idart couldn't catched by controller)
global $client, $changeclient, $cfgClient, $lang, $changelang, $idart, $idcat, $path; $iRedirToErrPage = ModRewrite::getConfig('redirect_invalid_article_to_errorsite', 0);
// try to redirect to errorpage if desired
ModRewriteDebugger::add(ModRewrite::getConfig(), 'front_content_controller.php mod rewrite config'); if ($iRedirToErrPage == 1 && (int) $client > 0 && (int) $lang > 0) {
global $errsite_idcat, $errsite_idart;
// create an mod rewrite controller instance and execute processing if ($cfgClient['set'] != 'set') {
$oMRController = new ModRewriteController($_SERVER['REQUEST_URI']); rereadClients();
$oMRController->execute(); }
if ($oMRController->errorOccured()) { // errorpage
$aParams = array(
// an error occured (idcat and or idart couldn't catched by controller) 'client' => $client, 'idcat' => $errsite_idcat[$client], 'idart' => $errsite_idart[$client],
'lang' => $lang, 'error' => '1'
$iRedirToErrPage = ModRewrite::getConfig('redirect_invalid_article_to_errorsite', 0); );
// try to redirect to errorpage if desired $errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams);
if ($iRedirToErrPage == 1 && (int) $client > 0 && (int) $lang > 0) { mr_header($errsite);
global $errsite_idcat, $errsite_idart; exit();
}
if ($cfgClient['set'] != 'set') { } else {
rereadClients();
} // set some global variables
// errorpage if ($oMRController->getClient()) {
$aParams = array( $client = $oMRController->getClient();
'client' => $client, 'idcat' => $errsite_idcat[$client], 'idart' => $errsite_idart[$client], }
'lang' => $lang, 'error'=> '1'
); if ($oMRController->getChangeClient()) {
$errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams); $changeclient = $oMRController->getChangeClient();
header("HTTP/1.0 404 Not found"); }
mr_header($errsite);
exit(); if ($oMRController->getLang()) {
} $lang = $oMRController->getLang();
}
} else {
if ($oMRController->getChangeLang()) {
// set some global variables $changelang = $oMRController->getChangeLang();
}
if ($oMRController->getClient()) {
$client = $oMRController->getClient(); if ($oMRController->getIdArt()) {
} $idart = $oMRController->getIdArt();
}
if ($oMRController->getChangeClient()) {
$changeclient = $oMRController->getChangeClient(); if ($oMRController->getIdCat()) {
} $idcat = $oMRController->getIdCat();
}
if ($oMRController->getLang()) {
$lang = $oMRController->getLang(); if ($oMRController->getPath()) {
} $path = $oMRController->getPath();
}
if ($oMRController->getChangeLang()) { }
$changelang = $oMRController->getChangeLang();
} // some debugs
ModRewriteDebugger::add($mr_preprocessedPageError, 'mr $mr_preprocessedPageError', __FILE__);
if ($oMRController->getIdArt()) { if ($oMRController->getError()) {
$idart = $oMRController->getIdArt(); ModRewriteDebugger::add($oMRController->getError(), 'mr error', __FILE__);
} }
ModRewriteDebugger::add($idart, 'mr $idart', __FILE__);
if ($oMRController->getIdCat()) { ModRewriteDebugger::add($idcat, 'mr $idcat', __FILE__);
$idcat = $oMRController->getIdCat(); ModRewriteDebugger::add($lang, 'mr $lang', __FILE__);
} ModRewriteDebugger::add($client, 'mr $client', __FILE__);
if ($oMRController->getPath()) {
$path = $oMRController->getPath();
}
}
// some debugs
ModRewriteDebugger::add($mr_preprocessedPageError, 'mr $mr_preprocessedPageError', __FILE__);
ModRewriteDebugger::add($idart, 'mr $idart', __FILE__);
ModRewriteDebugger::add($idcat, 'mr $idcat', __FILE__);
ModRewriteDebugger::add($lang, 'mr $lang', __FILE__);
ModRewriteDebugger::add($client, 'mr $client', __FILE__);

Datei anzeigen

@ -1,324 +1,312 @@
<?php <?php
/** /**
* Project: * Plugin mod_rewrite backend include file to administer settings (in content frame)
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Plugin mod_rewrite backend include file to administer settings (in content frame) * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 global $client, $cfg;
*
* {@internal ################################################################################
* created 2008-04-22 ##### Initialization
* modified 2011-05-17 Murat Purc, added check for available client id
* if ((int) $client <= 0) {
* $Id: include.mod_rewrite_content.php 2 2011-07-20 12:00:48Z oldperl $: // if there is no client selected, display empty page
* }} $oPage = new cPage;
* $oPage->render();
*/ return;
}
defined('CON_FRAMEWORK') or die('Illegal call');
$action = (isset($_REQUEST['mr_action'])) ? $_REQUEST['mr_action'] : 'index';
$bDebug = false;
################################################################################
##### Initialization
################################################################################
if ((int) $client <= 0) { ##### Some variables
// if there is no client selected, display empty page
$oPage = new cPage();
$sMsg = $notification->returnNotification( $oMrController = new ModRewrite_ContentController();
Contenido_Notification::LEVEL_ERROR, i18n("No Client selected")
); $aMrCfg = ModRewrite::getConfig();
$oPage->setContent($sMsg);
$oPage->render(); // downwards compatibility to previous plugin versions
return; if (mr_arrayValue($aMrCfg, 'category_seperator', '') == '') {
} $aMrCfg['category_seperator'] = '/';
}
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_content_controller.php'); if (mr_arrayValue($aMrCfg, 'category_word_seperator', '') == '') {
$aMrCfg['category_word_seperator'] = '-';
$action = (isset($_REQUEST['mr_action'])) ? $_REQUEST['mr_action'] : 'index'; }
$bDebug = false; if (mr_arrayValue($aMrCfg, 'article_seperator', '') == '') {
$aMrCfg['article_seperator'] = '/';
}
################################################################################ if (mr_arrayValue($aMrCfg, 'article_word_seperator', '') == '') {
##### Some variables $aMrCfg['article_word_seperator'] = '-';
}
$oMrController = new ModRewrite_ContentController(); // some settings
$aSeparator = array(
$aMrCfg = ModRewrite::getConfig(); 'pattern' => '/^[\/\-_\.\$~]{1}$/',
'info' => '<span style="font-family:courier;font-weight:bold;">/ - . _ ~</span>'
// downwards compatibility to previous plugin versions );
if (mr_arrayValue($aMrCfg, 'category_seperator', '') == '') { $aWordSeparator = array(
$aMrCfg['category_seperator'] = '/'; 'pattern' => '/^[\-_\.\$~]{1}$/',
} 'info' => '<span style="font-family:courier;font-weight:bold;">- . _ ~</span>'
if (mr_arrayValue($aMrCfg, 'category_word_seperator', '') == '') { );
$aMrCfg['category_word_seperator'] = '-';
} $routingSeparator = '>>>';
if (mr_arrayValue($aMrCfg, 'article_seperator', '') == '') {
$aMrCfg['article_seperator'] = '/';
} $oMrController->setProperty('bDebug', $bDebug);
if (mr_arrayValue($aMrCfg, 'article_word_seperator', '') == '') { $oMrController->setProperty('aSeparator', $aSeparator);
$aMrCfg['article_word_seperator'] = '-'; $oMrController->setProperty('aWordSeparator', $aWordSeparator);
} $oMrController->setProperty('routingSeparator', $routingSeparator);
// some settings // define basic data contents (used for template)
$aSeparator = array( $oView = $oMrController->getView();
'pattern' => '/^[\/\-_\.\$~]{1}$/', $oView->content_before = '';
'info' => '<span style="font-family:courier;font-weight:bold;">/ - . _ ~</span>' $oView->idclient = $client;
); $oView->use_chk = (ModRewrite::isEnabled()) ? ' checked="checked"' : '';
$aWordSeparator = array( $oView->header_notes_css = 'display:none;';
'pattern' => '/^[\-_\.\$~]{1}$/',
'info' => '<span style="font-family:courier;font-weight:bold;">- . _ ~</span>' // mr copy .htaccess
); // @todo copy htacccess check into ModRewrite_ContentController->_doChecks()
$aHtaccessInfo = ModRewrite::getHtaccessInfo();
$routingSeparator = '>>>'; if ($aHtaccessInfo['has_htaccess']) {
$oView->htaccess_info_css = 'display:none;';
} else {
$oMrController->setProperty('bDebug', $bDebug); $oView->header_notes_css = 'display:table-row;';
$oMrController->setProperty('aSeparator', $aSeparator); $oView->htaccess_info_css = 'display:block;';
$oMrController->setProperty('aWordSeparator', $aWordSeparator); }
$oMrController->setProperty('routingSeparator', $routingSeparator);
// empty aliases
// define basic data contents (used for template) $iEmptyArticleAliases = ModRewrite::getEmptyArticlesAliases();
$oView = $oMrController->getView(); $iEmptyCategoryAliases = ModRewrite::getEmptyCategoriesAliases();
$oView->content_before = ''; if ($iEmptyArticleAliases > 0 || $iEmptyCategoryAliases > 0) {
$oView->idclient = $client; $oView->header_notes_css = 'display:table-row;';
$oView->use_chk = (ModRewrite::isEnabled()) ? ' checked="checked"' : ''; $oView->emptyaliases_info_css = 'display:block;';
} else {
// mr copy .htaccess $oView->emptyaliases_info_css = 'display:none;';
$aHtaccessInfo = ModRewrite::getHtaccessInfo(); }
if ($aHtaccessInfo['has_htaccess']) { // mr root dir
$oView->htaccess_info_css = 'display:none;'; $oView->rootdir = $aMrCfg['rootdir'];
} else { $oView->rootdir_error = '';
$oView->htaccess_info_css = 'display:table-row;';
} // mr check root dir
$oView->checkrootdir_chk = ($aMrCfg['checkrootdir'] == 1) ? ' checked="checked"' : '';
// mr root dir
$oView->rootdir = $aMrCfg['rootdir']; // mr start from root
$oView->rootdir_error = ''; $oView->startfromroot_chk = ($aMrCfg['startfromroot'] == 1) ? ' checked="checked"' : '';
// mr check root dir // mr prevent duplicated content
$oView->checkrootdir_chk = ($aMrCfg['checkrootdir'] == 1) ? ' checked="checked"' : ''; $oView->prevent_duplicated_content_chk = ($aMrCfg['prevent_duplicated_content'] == 1) ? ' checked="checked"' : '';
// mr start from root // mr language usage
$oView->startfromroot_chk = ($aMrCfg['startfromroot'] == 1) ? ' checked="checked"' : ''; $oView->use_language_chk = ($aMrCfg['use_language'] == 1) ? ' checked="checked"' : '';
$oView->use_language_name_chk = ($aMrCfg['use_language_name'] == 1) ? ' checked="checked"' : '';
// mr prevent duplicated content $oView->use_language_name_disabled = ($aMrCfg['use_language'] == 1) ? '' : ' disabled="disabled"';
$oView->prevent_duplicated_content_chk = ($aMrCfg['prevent_duplicated_content'] == 1) ? ' checked="checked"' : '';
// mr client usage
// mr language usage $oView->use_client_chk = ($aMrCfg['use_client'] == 1) ? ' checked="checked"' : '';
$oView->use_language_chk = ($aMrCfg['use_language'] == 1) ? ' checked="checked"' : ''; $oView->use_client_name_chk = ($aMrCfg['use_client_name'] == 1) ? ' checked="checked"' : '';
$oView->use_language_name_chk = ($aMrCfg['use_language_name'] == 1) ? ' checked="checked"' : ''; $oView->use_client_name_disabled = ($aMrCfg['use_client'] == 1) ? '' : ' disabled="disabled"';
$oView->use_language_name_disabled = ($aMrCfg['use_language'] == 1) ? '' : ' disabled="disabled"';
// mr lowecase uri
// mr client usage $oView->use_lowercase_uri_chk = ($aMrCfg['use_lowercase_uri'] == 1) ? ' checked="checked"' : '';
$oView->use_client_chk = ($aMrCfg['use_client'] == 1) ? ' checked="checked"' : '';
$oView->use_client_name_chk = ($aMrCfg['use_client_name'] == 1) ? ' checked="checked"' : ''; // mr category/category word separator
$oView->use_client_name_disabled = ($aMrCfg['use_client'] == 1) ? '' : ' disabled="disabled"'; $oView->category_separator = $aMrCfg['category_seperator'];
$oView->category_separator_attrib = '';
// mr lowecase uri $oView->category_word_separator = $aMrCfg['category_word_seperator'];
$oView->use_lowercase_uri_chk = ($aMrCfg['use_lowercase_uri'] == 1) ? ' checked="checked"' : ''; $oView->category_word_separator_attrib = '';
$oView->category_separator_error = '';
// mr category/category word separator $oView->category_word_separator_error = '';
$oView->category_separator = $aMrCfg['category_seperator'];
$oView->category_separator_attrib = ''; // mr article/article word separator
$oView->category_word_separator = $aMrCfg['category_word_seperator']; $oView->article_separator = $aMrCfg['article_seperator'];
$oView->category_word_separator_attrib = ''; $oView->article_separator_attrib = '';
$oView->category_separator_error = ''; $oView->article_word_separator = $aMrCfg['article_word_seperator'];
$oView->category_word_separator_error = ''; $oView->article_word_separator_attrib = '';
$oView->article_separator_error = '';
// mr article/article word separator $oView->article_word_separator_error = '';
$oView->article_separator = $aMrCfg['article_seperator'];
$oView->article_separator_attrib = ''; // mr file extension
$oView->article_word_separator = $aMrCfg['article_word_seperator']; $oView->file_extension = $aMrCfg['file_extension'];
$oView->article_word_separator_attrib = ''; $oView->file_extension_error = '';
$oView->article_separator_error = '';
$oView->article_word_separator_error = ''; // mr category name resolve percentage
$oView->category_resolve_min_percentage = $aMrCfg['category_resolve_min_percentage'];
// mr file extension $oView->category_resolve_min_percentage_error = '';
$oView->file_extension = $aMrCfg['file_extension'];
$oView->file_extension_error = ''; // mr add start article name to url
$oView->add_startart_name_to_url_chk = ($aMrCfg['add_startart_name_to_url'] == 1) ? ' checked="checked"' : '';
// mr category name resolve percentage $oView->add_startart_name_to_url_error = '';
$oView->category_resolve_min_percentage = $aMrCfg['category_resolve_min_percentage']; $oView->default_startart_name = $aMrCfg['default_startart_name'];
$oView->category_resolve_min_percentage_error = '';
// mr rewrite urls at
// mr add start article name to url $oView->rewrite_urls_at_congeneratecode_chk = ($aMrCfg['rewrite_urls_at_congeneratecode'] == 1) ? ' checked="checked"' : '';
$oView->add_startart_name_to_url_chk = ($aMrCfg['add_startart_name_to_url'] == 1) ? ' checked="checked"' : ''; $oView->rewrite_urls_at_front_content_output_chk = ($aMrCfg['rewrite_urls_at_front_content_output'] == 1) ? ' checked="checked"' : '';
$oView->add_startart_name_to_url_error = ''; $oView->content_after = '';
$oView->default_startart_name = $aMrCfg['default_startart_name'];
// mr rewrite routing
// mr rewrite urls at $data = '';
$oView->rewrite_urls_at_congeneratecode_chk = ($aMrCfg['rewrite_urls_at_congeneratecode'] == 1) ? ' checked="checked"' : ''; if (is_array($aMrCfg['routing'])) {
$oView->rewrite_urls_at_front_content_output_chk = ($aMrCfg['rewrite_urls_at_front_content_output'] == 1) ? ' checked="checked"' : ''; foreach ($aMrCfg['routing'] as $uri => $route) {
$oView->content_after = ''; $data .= $uri . $routingSeparator . $route . "\n";
}
// mr rewrite routing }
$data = ''; $oView->rewrite_routing = $data;
if (is_array($aMrCfg['routing'])) {
foreach ($aMrCfg['routing'] as $uri => $route){ // mr redirect invalid article
$data .= $uri . $routingSeparator . $route . "\n"; $oView->redirect_invalid_article_to_errorsite_chk = ($aMrCfg['redirect_invalid_article_to_errorsite'] == 1) ? ' checked="checked"' : '';
}
}
$oView->rewrite_routing = $data; $oView->lng_version = i18n("Version", "mod_rewrite");
$oView->lng_author = i18n("Author", "mod_rewrite");
// mr redirect invalid article $oView->lng_mail_to_author = i18n("E-Mail to author", "mod_rewrite");
$oView->redirect_invalid_article_to_errorsite_chk = ($aMrCfg['redirect_invalid_article_to_errorsite'] == 1) ? ' checked="checked"' : ''; $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_version = i18n('Version', 'mod_rewrite'); $oView->lng_contenido_forum = i18n("CONTENIDO forum", "mod_rewrite");
$oView->lng_author = i18n('Author', 'mod_rewrite'); $oView->lng_pluginthread_in_contenido_forum = i18n("Plugin thread in CONTENIDO forum", "mod_rewrite");
$oView->lng_mail_to_author = i18n('E-Mail to author', 'mod_rewrite'); $oView->lng_plugin_settings = i18n("Plugin settings", "mod_rewrite");
$oView->lng_pluginpage = i18n('Plugin page', 'mod_rewrite'); $oView->lng_note = i18n("Note", "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'); // @todo copy htacccess check into ModRewrite_ContentController->_doChecks()
$oView->lng_contenido_forum = i18n('Contenido forum', '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.", "mod_rewrite");
$oView->lng_pluginthread_in_contenido_forum = i18n('Plugin thread in Contenido forum', '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>');
$oView->lng_plugin_settings = i18n('Plugin settings', 'mod_rewrite');
$oView->lng_note = i18n('Note', 'mod_rewrite'); $sMsg = i18n("Found", "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>');
$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');
$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>'); $oView->lng_enable_amr = i18n("Enable Advanced Mod Rewrite", "mod_rewrite");
$oView->lng_enable_amr = i18n('Enable Advanced Mod Rewrite', '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', 'mod_rewrite'); $oView->lng_example = i18n("Example", "mod_rewrite");
$oView->lng_example = i18n('Example', '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", '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', '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_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', '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_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 = i18n('Should the name of root category be displayed in the URL?', '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_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_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 = i18n('Are several clients maintained in one directory?', 'mod_rewrite'); $oView->lng_use_client_name_lbl = i18n("Use client name instead of the id", "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_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 = i18n('Should the language appear in the URL (required for multi language websites)?', 'mod_rewrite'); $oView->lng_use_language_name_lbl = i18n("Use language name instead of the id", "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_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_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_a = i18n("Category separator has to be different from category-word separator", "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_example = i18n("# Example: Category separator (/) and category-word separator (_)\ncategory_one/category_two/articlename.html", "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_b = i18n("Category separator has to be different from article-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_example = i18n("# Example: Category separator (/) and article-word separator (-)\ncategory_one/category_two/article-description.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_c = i18n("Category-article 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_example = i18n("# Example: Category-article 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_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_category_separator = i18n('Category separator (delemiter between single categories)', 'mod_rewrite'); $oView->lng_word_separator_info = sprintf(i18n("(possible values: %s)", "mod_rewrite"), $aWordSeparator['info']);
$oView->lng_catart_separator_info = sprintf(i18n('(possible values: %s)', 'mod_rewrite'), $aSeparator['info']); $oView->lng_category_word_separator = i18n("Category-word separator (delemiter between category words)", "mod_rewrite");
$oView->lng_word_separator_info = sprintf(i18n('(possible values: %s)', 'mod_rewrite'), $aWordSeparator['info']); $oView->lng_article_separator = i18n("Category-article separator (delemiter between category-block and article)", "mod_rewrite");
$oView->lng_category_word_separator = i18n('Category-word separator (delemiter between category words)', 'mod_rewrite'); $oView->lng_article_word_separator = i18n("Article-word separator (delemiter between article 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_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_add_startart_name_to_url = i18n('Append article name to URLs', 'mod_rewrite'); $oView->lng_default_startart_name = i18n("Default article name without extension", "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_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_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_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 = i18n('File extension at the end of the URL', '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_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_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_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_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?', 'mod_rewrite');
$oView->lng_use_lowercase_uri_lbl = i18n('URLs in lower case', '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', 'mod_rewrite');
$oView->lng_prevent_duplicated_content_lbl = i18n('Prevent duplicated content', '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', 'mod_rewrite'); $oView->lng_prevent_duplicated_content_info2 = '<li>' . str_replace("\n", '</li><li>', $oView->lng_prevent_duplicated_content_info2) . '</li>';
$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_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 = i18n('Percentage for similar category paths in URLs', '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_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 />A 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_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 = i18n('Redirect in case of invalid 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_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_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 = i18n('Moment of URL generation', '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_lbl = i18n('a.) During the output of HTML code of the page', '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_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_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_front_content_output_info2 = i18n('Differences to variant b.)', '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_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_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_lbl = i18n('b.) In modules or plugins', '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_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_info2 = i18n("Differences to variant a.)", "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_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_info2 = i18n('Differences to variant a.)', '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_urls_at_congeneratecode_info3 = i18n("The default way to generate URLs to fronend pages\nEach URL in modules/plugins has to be generated by UrlBuilder\nEach generated Clean-Url requires a database query", '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 = i18n('Routing', 'mod_rewrite'); $oView->lng_rewrite_routing_info2 = i18n("Type one routing definition per line as follows:", "mod_rewrite");
$oView->lng_rewrite_routing_info = i18n('Routing definitions for incoming URLs', '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_info2 = i18n('Type one routing definition per line as follows:', '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_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 = '<li>' . str_replace("\n", '</li><li>', $oView->lng_rewrite_routing_info3) . '</li>';
$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_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', 'mod_rewrite');
$oView->lng_save_changes = i18n('Save changes', 'mod_rewrite');
################################################################################
##### Action processing
################################################################################
##### Action processing if ($action == 'index') {
$oMrController->indexAction();
if ($action == 'index') { } elseif ($action == 'save') {
$oMrController->saveAction();
$oMrController->indexAction(); } elseif ($action == 'reset') {
$oMrController->resetAction();
} elseif ($action == 'save') { } elseif ($action == 'resetempty') {
$oMrController->resetEmptyAction();
$oMrController->saveAction(); } else {
$oMrController->indexAction();
} elseif ($action == 'reset') { }
$oMrController->resetAction();
################################################################################
} elseif ($action == 'resetempty') { ##### Output
$oMrController->resetEmptyAction(); $oMrController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/content.html'
} else { );
$oMrController->indexAction();
}
################################################################################
##### Output
$oMrController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/content.html'
);

Datei anzeigen

@ -0,0 +1,18 @@
<?php
/**
* Plugin mod_rewrite backend include file (in content-top frame)
*
* @date 22.04.2008
* @author Murat Purc
* @copyright © Murat Purc 2008
* @package Contenido
* @subpackage ModRewrite
*/
defined('CON_FRAMEWORK') or die('Illegal call');
$tpl = new Template();
$tpl->generate(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/content_top.html', 0, 0
);

Datei anzeigen

@ -1,169 +1,119 @@
<?php <?php
/** /**
* Project: * Plugin mod_rewrite backend include file to administer expert (in content frame)
* Contenido Content Management System *
* * @package plugin
* Description: * @subpackage Mod Rewrite
* Plugin mod_rewrite backend include file to administer expert (in content frame) * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 global $client, $cfg;
*
* {@internal ################################################################################
* created 2011-04-11 ##### Initialization
* modified 2011-05-17 Murat Purc, added check for available client id
* if ((int) $client <= 0) {
* $Id: include.mod_rewrite_contentexpert.php 2 2011-07-20 12:00:48Z oldperl $: // if there is no client selected, display empty page
* }} $oPage = new cPage;
* $oPage->render();
*/ return;
}
defined('CON_FRAMEWORK') or die('Illegal call'); $action = (isset($_REQUEST['mr_action'])) ? $_REQUEST['mr_action'] : 'index';
$debug = false;
################################################################################
##### Initialization ################################################################################
##### Some variables
if ((int) $client <= 0) {
// if there is no client selected, display empty page
$oPage = new cPage(); $oMrController = new ModRewrite_ContentExpertController();
$sMsg = $notification->returnNotification(
Contenido_Notification::LEVEL_ERROR, i18n("No Client selected") $aMrCfg = ModRewrite::getConfig();
);
$oPage->setContent($sMsg); $aHtaccessInfo = ModRewrite::getHtaccessInfo();
$oPage->render();
return; // define basic data contents (used for template)
} $oView = $oMrController->getView();
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_contentexpert_controller.php'); // view variables
$oView->copy_htaccess_css = 'display:table-row;';
$action = (isset($_REQUEST['mr_action'])) ? $_REQUEST['mr_action'] : 'index'; $oView->copy_htaccess_error = '';
$debug = false; $oView->copy_htaccess_contenido_chk = ' checked="checked"';
$oView->copy_htaccess_cms_chk = '';
$oView->contenido_full_path = $aHtaccessInfo['contenido_full_path'];
################################################################################ $oView->client_full_path = $aHtaccessInfo['client_full_path'];
##### Some variables $oView->content_after = '';
$oMrController->setProperty('htaccessInfo', $aHtaccessInfo);
$oMrController = new ModRewrite_ContentExpertController();
// view language variables
$aMrCfg = ModRewrite::getConfig(); $oView->lng_plugin_functions = i18n("Plugin functions", "mod_rewrite");
$aHtaccessInfo = ModRewrite::getHtaccessInfo(); $oView->lng_copy_htaccess_type = i18n("Copy/Download .htaccess template", "mod_rewrite");
$oView->lng_copy_htaccess_type_lbl = i18n("Select .htaccess template", "mod_rewrite");
// define basic data contents (used for template) $oView->lng_copy_htaccess_type1 = i18n("Restrictive .htaccess", "mod_rewrite");
$oView = $oMrController->getView(); $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");
// view variables
$oView->copy_htaccess_css = 'display:table-row;'; $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->copy_htaccess_error = '';
$oView->copy_htaccess_contenido_chk = ' checked="checked"'; $oView->lng_copy_htaccess_to = i18n("and copy to", "mod_rewrite");
$oView->copy_htaccess_cms_chk = ''; $oView->lng_copy_htaccess_to_contenido = i18n("CONTENIDO installation directory", "mod_rewrite");
$oView->contenido_full_path = $aHtaccessInfo['contenido_full_path']; $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->client_full_path = $aHtaccessInfo['client_full_path']; $oView->lng_copy_htaccess_to_contenido_info = str_replace('{CONTENIDO_FULL_PATH}', $oView->contenido_full_path, $oView->lng_copy_htaccess_to_contenido_info);
$oView->content_after = ''; $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");
$oMrController->setProperty('htaccessInfo', $aHtaccessInfo); $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");
// view language variables $oView->lng_download = i18n("Download", "mod_rewrite");
$oView->lng_plugin_functions = i18n('Plugin functions', '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_copy_htaccess_type = i18n('Copy/Download .htaccess template', 'mod_rewrite'); $oView->lng_resetaliases = i18n("Reset category-/ and article aliases", "mod_rewrite");
$oView->lng_copy_htaccess_type_lbl = i18n('Select .htaccess template', 'mod_rewrite'); $oView->lng_resetempty_link = i18n("Reset only empty aliases", "mod_rewrite");
$oView->lng_copy_htaccess_type1 = i18n('Restrictive .htaccess', '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_copy_htaccess_type2 = i18n('Simple .htaccess', 'mod_rewrite'); $oView->lng_resetall_link = i18n("Reset all aliases", "mod_rewrite");
$oView->lng_copy_htaccess_type_info1 = i18n('Contains rules with restrictive settings.<br /> $oView->lng_resetall_info = i18n("Reset all category-/article aliases. Existing aliases will be overwritten.", "mod_rewrite");
All requests pointing to extension avi, css, doc, flv, gif, gzip, ico, jpeg, jpg, js, mov, <br /> $oView->lng_note = i18n("Note", "mod_rewrite");
mp3, pdf, png, ppt, rar, txt, wav, wmv, xml, zip, will be excluded vom rewriting.<br /> $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");
Remaining requests will be rewritten to front_content.php,<br />
except requests to \'contenido/\', \'setup/\', \'cms/upload\', \'cms/front_content.php\', etc.<br /> $oView->lng_discard_changes = i18n("Discard changes", "mod_rewrite");
Each resource, which has to be excluded from rewriting must be specified explicitly.', 'mod_rewrite'); $oView->lng_save_changes = i18n("Save changes", "mod_rewrite");
$oView->lng_copy_htaccess_type_info2 = i18n('Contains a sipmle 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'); ################################################################################
##### Action processing
$oView->lng_copy_htaccess_to = i18n('and copy to', 'mod_rewrite');
$oView->lng_copy_htaccess_to_contenido = i18n('Contenido installation directory', 'mod_rewrite'); if ($action == 'index') {
$oView->lng_copy_htaccess_to_contenido_info = i18n('Copy the selected .htaccess template into Contenido installation directory<br /> $oMrController->indexAction();
<br /> } elseif ($action == 'copyhtaccess') {
&nbsp;&nbsp;&nbsp;&nbsp;{CONTENIDO_FULL_PATH}.<br /> $oMrController->copyHtaccessAction();
<br /> } elseif ($action == 'downloadhtaccess') {
This is the recommended option for a Contenido installation with one or more clients<br /> $oMrController->downloadHtaccessAction();
who are running on the same domain.', 'mod_rewrite'); exit();
$oView->lng_copy_htaccess_to_contenido_info = str_replace('{CONTENIDO_FULL_PATH}', $oView->contenido_full_path, $oView->lng_copy_htaccess_to_contenido_info); } elseif ($action == 'reset') {
$oView->lng_copy_htaccess_to_client = i18n('client directory', 'mod_rewrite'); $oMrController->resetAction();
$oView->lng_copy_htaccess_to_client_info = i18n('Copy the selected .htaccess template into client\'s directory<br /> } elseif ($action == 'resetempty') {
<br /> $oMrController->resetEmptyAction();
&nbsp;&nbsp;&nbsp;&nbsp;{CLIENT_FULL_PATH}.<br /> } else {
<br /> $oMrController->indexAction();
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_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'); ##### Output
$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'); $oMrController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/contentexpert.html'
$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_discard_changes = i18n('Discard changes', 'mod_rewrite');
$oView->lng_save_changes = i18n('Save changes', 'mod_rewrite');
################################################################################
##### Action processing
if ($action == 'index') {
$oMrController->indexAction();
} elseif ($action == 'copyhtaccess') {
$oMrController->copyHtaccessAction();
} elseif ($action == 'downloadhtaccess') {
$oMrController->downloadHtaccessAction();
exit();
} elseif ($action == 'reset') {
$oMrController->resetAction();
} elseif ($action == 'resetempty') {
$oMrController->resetEmptyAction();
} else {
$oMrController->indexAction();
}
################################################################################
##### Output
$oMrController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/contentexpert.html'
);

Datei anzeigen

@ -1,108 +1,83 @@
<?php <?php
/** /**
* Project: * Testscript for Advanced Mod Rewrite Plugin.
* Contenido Content Management System *
* * The goal of this testscript is to provide an easy way for a variance comparison
* Description: * of created SEO URLs against their resolved parts.
* Testscript for Advanced Mod Rewrite Plugin. *
* * This testscript fetches the full category and article structure of actual
* The goal of this testscript is to provide an easy way for a variance comparison * CONTENIDO installation, creates the SEO URLs for each existing category/article
* of created SEO URLs against their resolved parts. * and resolves the generated URLs.
* *
* This testscript fetches the full category and article structure of actual * @package plugin
* Contenido installation, creates the SEO URLs for each existing category/article * @subpackage Mod Rewrite
* and resolves the generated URLs. * @version SVN Revision $Rev:$
* * @id $Id$:
* Requirements: * @author Murat Purc <murat@purc.de>
* @con_php_req 5.0 * @copyright four for business AG <www.4fb.de>
* * @license http://www.contenido.org/license/LIZENZ.txt
* * @link http://www.4fb.de
* @package Contenido Backend plugins * @link http://www.contenido.org
* @version 0.1 */
* @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> if (!defined('CON_FRAMEWORK')) {
* @license http://www.contenido.org/license/LIZENZ.txt die('Illegal call');
* @link http://www.4fb.de }
* @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 global $client, $cfg;
*
* {@internal
* created 2011-04-11 ################################################################################
* modified 2011-05-17 Murat Purc, added check for available client id ##### Initialization
*
* $Id: include.mod_rewrite_contenttest.php 2 2011-07-20 12:00:48Z oldperl $: if ((int) $client <= 0) {
* }} // if there is no client selected, display empty page
* $oPage = new cPage;
*/ $oPage->render();
return;
}
defined('CON_FRAMEWORK') or die('Illegal call');
################################################################################
################################################################################ ##### Processing
##### Initialization
$mrTestNoOptionSelected = false;
if ((int) $client <= 0) { if (!mr_getRequest('idart') && !mr_getRequest('idcat') && !mr_getRequest('idcatart') && !mr_getRequest('idartlang')) {
// if there is no client selected, display empty page $mrTestNoOptionSelected = true;
$oPage = new cPage(); }
$sMsg = $notification->returnNotification(
Contenido_Notification::LEVEL_ERROR, i18n("No Client selected")
); $oMrTestController = new ModRewrite_ContentTestController();
$oPage->setContent($sMsg);
$oPage->render();
return; // 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");
plugin_include('mod_rewrite', 'classes/controller/class.modrewrite_contenttest_controller.php'); $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");
################################################################################
##### Processing $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");
$mrTestNoOptionSelected = false; $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");
if (!mr_getRequest('idart') && !mr_getRequest('idcat') && !mr_getRequest('idcatart') && !mr_getRequest('idartlang')) {
$mrTestNoOptionSelected = true;
} ################################################################################
##### Action processing
$oMrTestController = new ModRewrite_ContentTestController(); if ($mrTestNoOptionSelected) {
$oMrTestController->indexAction();
} else {
// view language variables $oMrTestController->testAction();
$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 = $oMrTestController->getView();
$oView->lng_maxitems_lbl = i18n('Number of URLs to generate', 'mod_rewrite'); $oView->content .= mr_debugOutput(false);
$oView->lng_run_test = i18n('Run test', 'mod_rewrite');
$oView->lng_result_item_tpl = i18n('{pref}<strong>{name}</strong> ################################################################################
{pref}Builder in: {url_in} ##### Output
{pref}Builder out: {url_out}
{pref}<span style="color:{color}">Resolved URL: {url_res}</span> $oMrTestController->render(
{pref}Resolved data: {data}', 'mod_rewrite'); $cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/contenttest.html'
);
$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');
################################################################################
##### Action processing
if ($mrTestNoOptionSelected) {
$oMrTestController->indexAction();
} else {
$oMrTestController->testAction();
}
$oView = $oMrTestController->getView();
$oView->content .= mr_debugOutput(false);
################################################################################
##### Output
$oMrTestController->render(
$cfg['path']['contenido'] . $cfg['path']['plugins'] . 'mod_rewrite/templates/contenttest.html'
);

Datei anzeigen

@ -1,22 +1,24 @@
./classes/class.modrewriteurlutil.php ./includes/include.mod_rewrite_content.php
./classes/class.modrewriteurlstack.php ./includes/include.mod_rewrite_contenttest.php
./classes/class.modrewritecontroller.php ./includes/functions.mod_rewrite.php
./classes/class.modrewritedebugger.php ./includes/include.mod_rewrite_contentexpert.php
./classes/class.modrewrite.php ./includes/front_content_controller.php
./includes/config.mod_rewrite_default.php
./includes/include.mod_rewrite_content_top.php
./includes/config.plugin.php
./external/aToolTip/demos.html
./templates/content.html
./templates/contenttest.html
./templates/content_top.html
./templates/contentexpert.html
./classes/controller/class.modrewrite_contenttest_controller.php
./classes/controller/class.modrewrite_contentexpert_controller.php
./classes/controller/class.modrewrite_controller_abstract.php ./classes/controller/class.modrewrite_controller_abstract.php
./classes/controller/class.modrewrite_content_controller.php ./classes/controller/class.modrewrite_content_controller.php
./classes/controller/class.modrewrite_contentexpert_controller.php ./classes/class.modrewritedebugger.php
./classes/controller/class.modrewrite_contenttest_controller.php
./classes/class.modrewritebase.php
./classes/class.modrewritetest.php ./classes/class.modrewritetest.php
./external/aToolTip/demos.html ./classes/class.modrewrite.php
./templates/contenttest.html ./classes/class.modrewriteurlstack.php
./templates/contentexpert.html ./classes/class.modrewritebase.php
./templates/content.html ./classes/class.modrewritecontroller.php
./includes/functions.mod_rewrite.php ./classes/class.modrewriteurlutil.php
./includes/include.mod_rewrite_content.php
./includes/config.mod_rewrite_default.php
./includes/include.mod_rewrite_contenttest.php
./includes/config.plugin.php
./includes/front_content_controller.php
./includes/include.mod_rewrite_contentexpert.php

Datei anzeigen

@ -1,294 +0,0 @@
Advanced Mod Rewrite Plugin für Contenido >= 4.8.15
################################################################################
TOC (Table of contents)
- BESCHREIBUNG
- CHANGELOG
- BEKANNTE BUGS
- FEATURES
- VORAUSSETZUNGEN
- INSTALLATION
- FAQ
- ADVANCED MOD REWRITE THEMEN IM CONTENIDO FORUM
- SCHLUSSBEMERKUNG
################################################################################
BESCHREIBUNG
Das Plugin Advanced Mod Rewrite ist eine Erweiterung für das Contenido-CMS zur Generierung von
alternativen URLs.
Normalerweise werden die URLs zu Seiten einer auf ein CMS (z. B. Contenido) basierenden
Webpräsenz nach dem Muster "/index.php?page=12&amp;language=de" generiert, also in Form von
dynamischen URLs. Eine Möglichkeit solche dynamische URLs zu Webseiten, deren Inhalt in der Regel
aus Datenbanken kommen, gegen statische URLs wie z. B. "/de/page-name.html" umzustellen, gibt es in
Kombination mit dem Apache mod_rewrite-Modul. Dabei werden die URLs zu den Seiten als sogenannte
"Clean URLs" ausgegeben, Requests zur der gewünschten Ressource werden vom Webserver nach
definierten Regeln verarbeitet und intern an die Webanwendung weitergeleitet.
Solche statische URLs können aufgrund der Keyworddichte (die Ressource beschreibende Wörter in der
URL) vorteilhaft für Suchmaschinen sein und User können sich die URLs einfacher merken.
Bei einer Contenido-Installation lassen sich solche URLs mit dem Advanced Mod Rewrite Plugin
generieren, URLs zu Frontendseiten, wie z. B. "/cms/front_content.php?idart=12&amp;lang=1" werden
vom Plugin als statische URLs wie "/de/page-name.html" ausgegeben. Diverse Einstellungen zum
Ausgabeformat der URLs lassen sich im Contenido-Backend konfigurieren.
Das Plugin Advanced Mod Rewrite basiert auf die geniale Erweiterung Advanced Mod Rewrite für
Contenido, welches als Bundle von stese bis zur Contenido Version 4.6.15 entwickelt und betreut
wurde.
Wichtiger Aspekt bei der Umsetzung war die Implementierung als Plugin mit so wenig wie möglichen
Eingriffen in den Contenido Core (trotzdem ging es nicht ohne einige Anpassungen an bestimmten
Sourcen).
Daher enthält das Archiv einige überarbeitete Contenido Sourcen, die eventuell nicht auf dem
neuesten Stand sein können.
################################################################################
CHANGELOG
2011-04-11 Advanced Mod Rewrite Plugin integration into the Contenido core
################################################################################
BEKANNTE BUGS
Urls sollten unbedingt eine Endung wie z. B. '.html' bekommen, da ansonsten die Erkennungsroutine den
Artikel aus der ankommenden URL nicht ermitteln kann.
Wenn der Clean-URL die Sprache oder der Mandant vorangestellt wird, funktioniert die Fehlererkennung
unter Unständen nicht richtig, d. h. es gibt keine Weiterleitung zur Fehlerseite, sofern dies im
Plugin eingestellt wurde.
################################################################################
FEATURES
- Erstellung Suchmaschinenoptimierter URLs, Contenido interne URLs wie
/front_content.php?idcat=12&idart=34 werden z. B. als /kategoriename/artikelname.html umschrieben
- Unterstützung mehrerer Sprachen
- Unterstützung mehrerer Mandanten im gleichen Verzeichnis
- Umschreiben der URLs entweder bei der Ausgabe des HTML Codes oder beim Generieren des Codes der
Seiten
- Routing von URLs (Umleiten eingehender URLs auf andere Ziel-URLs)
################################################################################
VORAUSSETZUNGEN
- Alle Voraussetzungen von Contenido 4.8.x gelten auch für das Plugin
- PHP ab Version 5.1 (Das Plugin war bis Version 0.3.3 PHP 4.4.x kompatibel)
- Apache HTTP Server 2 mit Mod Rewrite
################################################################################
INSTALLATION
Das Plugin kann im Contenido Setupprocess installiert werden.
################################################################################
WICHTIGES ZUM INHALT
ALLGEMEIN
=========
.htaccess:
----------
Die Konfiguration des Apache, in der das mod_rewrite-Modul aktiviert und mit diversen Anweisungen
konfiguriert wird. Die Einstellungen bewirken, dass ankommende Anfragen wie z. B.
/kategorie/artikel.html an die front_content.php im Mandantenverzeichnis weitergeleitet werden.
Die .htaccess liegt nicht im Contenido Installationsverzeichnis vor, es muss entweder dorthin
kopiert oder eine vorhanene .htaccess Datei angepasst werden.
Als Vorlage existieren folgende 2 Versionen der .htaccess:
htaccess_restrictive.txt:
Enthält Regeln mit restriktiveren Einstellungen.
Alle Anfragen, die auf die Dateienendung js, ico, gif, jpg, jpeg, png, css, pdf gehen, werden vom
Umschreiben ausgeschlossen. Alle anderen Anfragen, werden an front_content.php umschrieben.
Ausgeschlossen davon sind 'contenido/', 'setup/', 'cms/upload', 'cms/front_content.php', usw.
Jede neue Ressource, die vom Umschreiben ausgeschlossen werden soll, muss explizit definiert werden.
htaccess_simple.txt:
Enthält eine einfachere Sammlung an Regeln. Alle Anfragen, die auf gültige symlinks, Verzeichnisse oder
Dateien gehen, werden vom Umschreiben ausgeschlossen. Restliche Anfragen werden an front_content.php
umschrieben.
contenido/plugins/mod_rewrite/*:
--------------------------------
Die Sourcen des Plugins.
contenido/classes/UrlBuilder/Contenido_UrlBuilder_MR.class.php:
---------------------------------------------------------------
UrlBuilder Klasse des Plugins (seit Version 0.4.0), zum Generieren der URLs anhand der Pluginkonfiguration.
Verwendet die in den Contenido Core implementierte UrlBuilder-Funktionalität und erweitert diesen um die
pluginspezifischen Features.
################################################################################
FAQ
Der Plugininstaller lässt sich nicht aufrufen, wie kann ich dennoch das Plugin installieren?
--------------------------------------------------------------------------------------------
Normalerweise wird der Plugininstaller mit folgender URL aufgerufen:
http://localhost/contenido/plugins/mod_rewrite/install.php
("http://localhost/" ist eventuell gegen anderen virtual Host oder Domainnamen ersetzen)
Es erscheint das Anmeldeformular zum Backend, über den man sich am System anmelden kann. Nach
erfolgreicher Anmeldung wird man normalerweise zum Plugininstaller weitergeleitet.
Manchmal kann es vorkommen, dass die Weiterleitung nach der Anmeldung nicht klappt und man nicht den
Plugininstaller aufrufen kann.
Um dennoch den Installer aufzurufen, reicht es aus, der URL die aktuell gültige Contenido Session ID
anzuhängen, z. B. /contenido/plugins/mod_rewrite/install.php?contenido={my_session_id}.
Wie teste ich, ob mod_rewrite am Server richtig konfiguriert ist?
-----------------------------------------------------------------
Obwohl mod_rewrite am Server installiert ist, kommt es manchmal vor, dass es nicht funktioniert.
Das kann einfach getestet werden, erstelle eine .htaccess im Rootverzeichnis und schreibe folgendes
rein:
[code]
RewriteEngine on
RewriteRule ^ http://www.contenido.org [R,L]
[/code]
Nach Eingabe der URL in die Adresszeile des Browsers, sollte auf www.contenido.org weitergeleitet
werden.
Wenn nicht, dann kann eines der folgenden Punkte der Grund dafür sein:
Das mod_rewrite Modul ist nicht geladen, das ist in der httpd.conf zu setzen
[code]
LoadModule rewrite_module modules/mod_rewrite.so
[/code]
Die Direktive "AllowOverride" ist nicht korrekt gesetzt. Damit die Angaben in der .htaccess auch
benützt werden können, muss für das betreffende Verzeichnis die Direktive "AllowOverride" in der
httpd.conf angegeben werden:
[code]
# Beispielkonfiguration
<Directory "/var/www/mywebproject">
AllowOverride FileInfo
</Directory>
[/code]
Wie richte ich Advanced Mod Rewrite für eine Contenidoinstallation in einem Unterverzeichnis ein?
-------------------------------------------------------------------------------------------------
Als Beispiel gehen wir davon aus, dass Contenido im Verzeichnis /mypage/ unterhalb vom Webroot
installiert wurde und das Mandantenverzeichnis per default /mypage/cms/ ist.
In der Pluginkonfiguration (Backend) den Pfad zur .htaccess Datei (aus Sicht des Web-Browsers)
folgendermaßen anpassen:
[code]
/mypage/
[/code]
Die /mypage/.htaccess öffnen und die RewriteBase folgendermaßen anpassen:
[code]
RewriteBase /mypage/cms/
[/code]
Welche Einstellungen sind nötig, wenn das Mandantenverzeichnis das wwwroot ist?
-------------------------------------------------------------------------------
Normalerweise liegt das Mandantenverzeichnis innerhalb des wwwroot und ist über
http://domain.tld/cms/front_content.php erreichbar.
Manchmal ist es erwünscht, dass der Ordner /cms/ in der URL nicht sichbar sein soll, also
erreichbar über http://domain.tld/front_content.php.
In diesem Fall sind zwei Anpassungen nötig, damit Mod Rewrite korrekt funktioniert:
1. Die .htaccess Datei in das Verzeichnis /cms/ kopieren, da die Datei im wwwroot sein muss.
2. In der .htaccess die RewriteBase Option anpassen
# von
RewriteBase /cms
# auf
RewriteBase /
Wie kann ich das Verarbeiten bestimmter Seiten vom Plugin unterbinden?
----------------------------------------------------------------------
Wenn das Plugin so konfiguriert wurde, dass die URLs bei der Ausgabe des HTML Codes der Seite
angepasst werden, kann dieses Verhalten bei manchen Seiten unerwünscht sein. Das kann bei einer
Ausgabe der Fall sein, dessen Inhalt kein HTML ist (z. B. Dateidownload), dann macht es keinen Sinn,
die Ausgabe anzupassen.
Ab Contenido 4.8.8 gibt es eine neue Einstellung, mit der man unterbinden kann, dass die Ausgabe im
Frontend nicht in den Ausgabepuffer geschrieben wird. Ist dies für eine Seite definiert worden, wird
auch die Funktion vom Plugin, die die URLs anpasst, nicht ausgeführt.
Einstellen lässt sich das über Mandanteneinstellungen wie folgt:
[code]
Typ Name Wert
frontend.no_outputbuffer idart 12,14,40
[/code]
Inhalte der Artikel mit der id 12, 14 und 40 werden dann von der Ausgabepufferung ausgeschlossen.
Warum werden URLs trotz richtiger Vorraussetzungen nicht umschrieben?
---------------------------------------------------------------------
Ist die .htaccess und die Konfiguration des Plugins als Fehlerquelle auszuschließen und das Plugin
soll die URLs bei der Ausgabe der Seite umschreiben (Standardeinstellung), könnte ein vorzeitig
geleerter Ausgabepuffer der Grund sein.
In der front_content.php wird der HTML-Code in den Ausgabepuffer geschrieben, damit der Code vor der
endgültigen Ausgabe bearbeitet werden kann. Das Plugin fügt der Chain
"Contenido.Frontend.HTMLCodeOutput" eine eigene Funktion, die den Code aus dem Ausgabepuffer erhält,
um die darin URLs zu umschreiben.
Wird aber der Ausgabepuffer vorher geleert, z. B. durch Verwendung von ob_flush() in einem Modul,
wird der Code direkt an den Client rausgeschickt. Das hat den Effekt, dass in der front_content.php
kein Code mehr aus dem Ausgabepuffer zur Verfügung steht, der nicht weiterverarbeitet werden kann,
auch das Plugin kann dann keine URLs umschreiben.
Alle URLs zu Kategorien werden mit / oder /index.html umschrieben:
------------------------------------------------------------------
Ist Contenido mit der Konfiguration $cfg["is_start_compatible"] = true;
(siehe contenidoincludes/config.php) eingestellt, um die Startartikeldefinition in Kategorien
kompatibel zu älteren Contenido-Versionen halten, kann das Plugin die URLs zu Kategorien nicht
generieren, weil es diese Konfiguration nicht unterstützt.
Die einfachste Lösung ist, die Konfiguration $cfg["is_start_compatible"] auf false zu setzen und im
Backend in den vorhandenen Kategorien erneut die Startartikel zu setzen.
################################################################################
ADVANCED MOD REWRITE THEMEN IM CONTENIDO FORUM
Plugin Advanced Mod Rewrite für Contenido 4.8.x:
http://www.contenido.de/forum/viewtopic.php?t=21578
Original Advanced Mod Rewrite 4.6.23:
http://www.contenido.de/forum/viewtopic.php?t=18454
Original Advanced Mod Rewrite 4.6.15:
http://www.contenido.de/forum/viewtopic.php?t=11162
Advanced Mod Rewriting Contenido 4.4.4:
http://www.contenido.de/forum/viewtopic.php?t=6713
################################################################################
SCHLUSSBEMERKUNG
Benutzung des Plugins auf eigene Gefahr!
Murat Purc, murat@purc.de

Datei anzeigen

@ -1,87 +1,96 @@
/** /**
* Project: * Project:
* Contenido Content Management System * CONTENIDO Content Management System
* *
* Description: * Description:
* Plugin Advanced Mod Rewrite JavaScript functions. * Plugin Advanced Mod Rewrite JavaScript functions.
* *
* Requirements: * Requirements:
* @con_php_req 5.0 * @con_php_req 5.0
* *
* *
* @package Contenido Backend plugins * @package CONTENIDO Plugins
* @version 0.1 * @version 0.1
* @author Murat Purc <murat@purc.de> * @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> * @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt * @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de * @link http://www.4fb.de
* @link http://www.contenido.org * @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 * @since file available since CONTENIDO release 4.9.0
* *
* {@internal * {@internal
* created 2011-04-11 * created 2011-04-11
* *
* $Id: mod_rewrite.js 2 2011-07-20 12:00:48Z oldperl $: * $Id$:
* }} * }}
* *
*/ */
var mrPlugin = { var mrPlugin = {
lng: { lng: {
more_informations: "More informations" more_informations: "More informations"
}, },
toggle: function(id) { toggle: function(id) {
// do some animation ;-) // do some animation ;-)
$('#' + id).slideToggle("slow"); $('#' + id).slideToggle("slow");
}, },
showReadme: function() { showReadme: function() {
}, },
initializeSettingsPage: function() { initializeSettingsPage: function() {
$(document).ready(function() { $(document).ready(function() {
$("#mr_use_language").click(function() { $("#mr_use_language").change(function() {
$("#mr_use_language_name").attr("disabled", ($(this).attr("checked") ? "" : "disabled")); if (true == $(this).attr("checked")) {
}); $("#mr_use_language_name").removeAttr("disabled");
} else {
$("#mr_use_client").click(function() { $("#mr_use_language_name").attr("disabled", "disabled");
$("#mr_use_client_name").attr("disabled", ($(this).attr("checked") ? "" : "disabled")); }
}); });
$("#mr_add_startart_name_to_url").click(function() { $("#mr_use_client").change(function() {
$("#mr_default_startart_name").attr("disabled", ($(this).attr("checked") ? "" : "disabled")); if (true == $(this).attr("checked")) {
if ($(this).attr("checked")) { $("#mr_use_client_name").removeAttr("disabled");
$("#mr_default_startart_name").removeClass("disabled"); } else {
} else { $("#mr_use_client_name").attr("disabled", "disabled");
$("#mr_default_startart_name").addClass("disabled"); }
} });
});
$("#mr_add_startart_name_to_url").change(function() {
mrPlugin._initializeTooltip(); if (true == $(this).attr("checked")) {
}); $("#mr_default_startart_name").removeAttr("disabled")
}, .removeClass("disabled");
} else {
initializeExterpPage: function() { $("#mr_default_startart_name").attr("disabled", "disabled")
$(document).ready(function() { .addClass("disabled");
mrPlugin._initializeTooltip(); }
}); });
},
mrPlugin._initializeTooltip();
_initializeTooltip: function() { });
$(".mrPlugin a.i-link").each(function () { },
$(this).attr("href", "javascript:void(0);");
$(this).attr("title", mrPlugin.lng.more_informations); initializeExterpPage: function() {
var id = $(this).attr("id").substring(0, $(this).attr("id").indexOf("-link")); $(document).ready(function() {
$(this).aToolTip({ mrPlugin._initializeTooltip();
clickIt: true, });
xOffset: -20, },
yOffset: 4,
outSpeed: 250, _initializeTooltip: function() {
tipContent: $("#" + id).html() $(".mrPlugin a.i-link").each(function () {
}); $(this).attr("href", "javascript:void(0);");
}); $(this).attr("title", mrPlugin.lng.more_informations);
} var id = $(this).attr("id").substring(0, $(this).attr("id").indexOf("-link"));
}; $(this).aToolTip({
clickIt: true,
xOffset: -20,
yOffset: 4,
outSpeed: 250,
tipContent: $("#" + id).html()
});
});
}
};

Datei anzeigen

@ -1,100 +1,101 @@
/** /**
* Project: * Project:
* Contenido Content Management System * CONTENIDO Content Management System
* *
* Description: * Description:
* Plugin Advanced Mod Rewrite JavaScript functions. * Plugin Advanced Mod Rewrite JavaScript functions.
* *
* Requirements: * Requirements:
* @con_php_req 5.0 * @con_php_req 5.0
* *
* *
* @package Contenido Backend plugins * @package CONTENIDO Plugins
* @version 0.1 * @version 0.1
* @author Murat Purc <murat@purc.de> * @author Murat Purc <murat@purc.de>
* @copyright four for business AG <www.4fb.de> * @copyright four for business AG <www.4fb.de>
* @license http://www.contenido.org/license/LIZENZ.txt * @license http://www.contenido.org/license/LIZENZ.txt
* @link http://www.4fb.de * @link http://www.4fb.de
* @link http://www.contenido.org * @link http://www.contenido.org
* @since file available since Contenido release 4.8.15 * @since file available since CONTENIDO release 4.9.0
* *
* {@internal * {@internal
* created 2011-04-11 * created 2011-04-11
* *
* $Id: styles.css 2 2011-07-20 12:00:48Z oldperl $: * $Id$:
* }} * }}
* *
*/ */
/** /**
* mrPlugin main page * mrPlugin main page
* @section mrPlugin * @section mrPlugin
*/ */
body.mrPlugin {margin:10px;} body.mrPlugin {margin:10px;}
.mrPlugin a {color:#0060b1;} .mrPlugin a {color:#0060b1;}
.mrPlugin strong {font-weight:bold;} .mrPlugin strong {font-weight:bold;}
.mrPlugin img {border:none;} .mrPlugin img {border:none;}
.mrPlugin pre.example {padding:3px 5px; border:1px #000 dashed; width:60%; min-width:650px;} .mrPlugin pre.example {padding:3px 5px; border:1px #000 dashed; width:60%; min-width:650px;}
.mrPlugin li {padding-bottom:0.4em;} .mrPlugin li {padding-bottom:0.4em;}
.mrPlugin span.note {color:red;} .mrPlugin span.note {color:red;}
.mrPlugin input.disabled {background-color:#dadada;} .mrPlugin input.disabled {background-color:#dadada;}
.mrPlugin .altBg {background-color:#f1f1f1;} .mrPlugin .altBg {background-color:#f1f1f1;}
.mrPlugin .aToolTip ul {padding-left:1em;} .mrPlugin .aToolTip ul {padding-left:1em;}
.mrPlugin .clear {clear:both; font-size:0pt !important; height:0pt !important; line-height:0pt !important;} .mrPlugin .clear {clear:both; font-size:0pt !important; height:0pt !important; line-height:0pt !important;}
.mrPlugin .blockLeft {display:block; float:left;} .mrPlugin .blockLeft {display:block; float:left;}
.mrPlugin .blockRight {display:block; float:right;} .mrPlugin .blockRight {display:block; float:right;}
.mrPlugin .nodisplay {display:none;}
/* Header box */
.mrPlugin .headerBox {background-color:#e2e2e2; border:1px solid #b5b5b5; padding:6px; margin-bottom:10px;} /* Header box */
.mrPlugin .headerBox p {margin:0; padding:0;} .mrPlugin .headerBox {background-color:#e2e2e2; border:1px solid #b5b5b5; padding:6px; margin-bottom:10px;}
.mrPlugin .headerBox ul {margin-bottom:0;} .mrPlugin .headerBox p {margin:0; padding:0;}
.mrPlugin .headerBox ul {margin-bottom:0;}
/* Content table */
.mrPlugin table#contenttable {border:0; border-top:1px; border-left:1px; border-bottom:1px; border-color:#b3b3b3; border-style:solid;} /* Content table */
.mrPlugin table#contenttable th {font-weight:bold; text-align:left;} .mrPlugin table#contenttable {border:0; border-top:1px; border-left:1px; border-bottom:1px; border-color:#b3b3b3; border-style:solid;}
.mrPlugin table#contenttable tr {background-color:#fff;} .mrPlugin table#contenttable th {font-weight:bold; text-align:left;}
.mrPlugin th, .mrPlugin td {vertical-align:top;} .mrPlugin table#contenttable tr {background-color:#fff;}
.mrPlugin td.col-I {border:0; border-bottom:1px; border-right:1px; border-color:#b3b3b3; border-style:solid;} .mrPlugin th, .mrPlugin td {vertical-align:top;}
.mrPlugin td.col-II {border:0; border-bottom:1px; border-right:1px; border-color:#b3b3b3; border-style:solid;} .mrPlugin td.col-I {border:0; border-bottom:1px; border-right:1px; border-color:#b3b3b3; border-style:solid;}
.mrPlugin td.col-II {border:0; border-bottom:1px; border-right:1px; border-color:#b3b3b3; border-style:solid;}
.mrPlugin tr.marked td {background-color:#f2b7a1;}
.mrPlugin tr.marked td {background-color:#f2b7a1;}
/* Info button */
.mrPlugin a.infoButton, /* Info button */
.mrPlugin a.infoButton:hover {display:block; float:left; width:16px; height:16px; background:transparent url(../../../images/info.gif) no-repeat; margin:0 0 0 5px;} .mrPlugin a.infoButton,
.mrPlugin a.infoButton.v2, .mrPlugin a.infoButton:hover {display:block; float:left; width:16px; height:16px; background:transparent url(../../../images/info.gif) no-repeat; margin:0 0 0 5px;}
.mrPlugin a.infoButton:hover.v2 {margin-top:2px;} .mrPlugin a.infoButton.v2,
.mrPlugin a.infoButton:hover.v2 {margin-top:2px;}
/* Plugininfo layer */
.mrPlugin .pluginInfo {} /* Plugininfo layer */
.mrPlugin .pluginInfo p {font-weight:bold; margin:0; padding:0;} .mrPlugin .pluginInfo {}
.mrPlugin .pluginInfo ul {margin:0; padding:0; list-style-type:none;} .mrPlugin .pluginInfo p {font-weight:bold; margin:0; padding:0;}
.mrPlugin .pluginInfo li {margin:0; padding:0;} .mrPlugin .pluginInfo ul {margin:0; padding:0; list-style-type:none;}
.mrPlugin .pluginInfo li.first {margin-top:0.6em;} .mrPlugin .pluginInfo li {margin:0; padding:0;}
.mrPlugin .pluginInfo li.first {margin-top:0.6em;}
/**
* mrPlugin test page /**
* @section mrPluginTest * mrPlugin test page
*/ * @section mrPluginTest
*/
/** @extends body.mrPlugin */
body.mrPluginTest {} /** @extends body.mrPlugin */
body.mrPluginTest {}
.mrPluginTest .headerBox form {float:left; width:35%; background:#e2e2e2; margin:0; padding-top:10px;}
.mrPluginTest .headerBox fieldset {margin-bottom:10px;} .mrPluginTest .headerBox form {float:left; width:35%; background:#e2e2e2; margin:0; padding-top:10px;}
.mrPluginTest .headerBox fieldset p {margin:0;} .mrPluginTest .headerBox fieldset {margin-bottom:10px;}
.mrPluginTest .headerBox form .chk {width:24%; float:left;} .mrPluginTest .headerBox fieldset p {margin:0;}
.mrPluginTest a {font-family:monospace;} .mrPluginTest .headerBox form .chk {width:24%; float:left;}
.mrPluginTest a {font-family:monospace;}

Datei anzeigen

@ -1,366 +1,368 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html>
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<head> <title>mod_rewrite_content</title>
<title>mod_rewrite_content</title> <meta http-equiv="expires" content="0">
<meta http-equiv="expires" content="0" /> <meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" 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="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/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/mod_rewrite/scripts/mod_rewrite.js"></script> <link rel="stylesheet" type="text/css" href="styles/contenido.css">
<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/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/mod_rewrite/styles/styles.css" /> <script type="text/javascript"><!--
<script type="text/javascript"><!-- // session-id
// session-id var sid = "{SESSID}";
var sid = "{SESSID}";
// setup translation
// setup translation mrPlugin.lng.more_informations = "{LNG_MORE_INFORMATIONS}";
mrPlugin.lng.more_informations = "{LNG_MORE_INFORMATIONS}";
// initialize page
// initialize page mrPlugin.initializeSettingsPage();
mrPlugin.initializeSettingsPage(); // --></script>
// --></script> </head>
</head>
<body class="mrPlugin">
<body class="mrPlugin">
<div class="headerBox">
<div class="headerBox"> <div class="pluginInfo">
<div class="pluginInfo"> <div><span class="blockLeft">Plugin Advanced Mod Rewrite</span>
<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>
<a href="#" id="pluginInfoDetails-link" class="main i-link infoButton" title=""></a><div class="clear"></div></div> <div id="pluginInfoDetails" style="display:none;">
<div id="pluginInfoDetails" style="display:none;"> <ul class="list">
<ul class="list"> <li class="first"><strong>{LNG_AUTHOR}:</strong> Murat Purc, <a href="mailto:murat@purc.de" title="{LNG_MAIL_TO_AUTHOR}">murat@purc.de</a></li>
<li class="first"><strong>{LNG_AUTHOR}:</strong> Murat Purc, <a href="mailto:murat@purc.de" title="{LNG_MAIL_TO_AUTHOR}">murat@purc.de</a></li> <li><strong>{LNG_PLUGINPAGE}:</strong> <a href="http://www.purc.de/playground-coding-contenido_plugin_-_advanced_mod_rewrite-a.109.html" onclick="window.open(this.href); return false;" title="{LNG_VISIT_PLUGINPAGE} ({LNG_OPENS_IN_NEW_WINDOW})">{LNG_VISIT_PLUGINPAGE}</a></li>
<li><strong>{LNG_PLUGINPAGE}:</strong> <a href="http://www.purc.de/playground-coding-contenido_plugin_-_advanced_mod_rewrite-a.109.html" onclick="window.open(this.href); return false;" title="{LNG_VISIT_PLUGINPAGE} ({LNG_OPENS_IN_NEW_WINDOW})">{LNG_VISIT_PLUGINPAGE}</a></li> <li><strong>{LNG_CONTENIDO_FORUM}:</strong> <a href="http://forum.contenido.org/viewtopic.php?t=21578" onclick="window.open(this.href); return false;" title="{LNG_PLUGINTHREAD_IN_CONTENIDO_FORUM} ({LNG_OPENS_IN_NEW_WINDOW})">{LNG_PLUGINTHREAD_IN_CONTENIDO_FORUM}</a></li>
<li><strong>{LNG_CONTENIDO_FORUM}:</strong> <a href="http://forum.contenido.org/viewtopic.php?t=21578" onclick="window.open(this.href); return false;" title="{LNG_PLUGINTHREAD_IN_CONTENIDO_FORUM} ({LNG_OPENS_IN_NEW_WINDOW})">{LNG_PLUGINTHREAD_IN_CONTENIDO_FORUM}</a></li> </ul>
</ul> </div>
</div> </div>
</div> </div>
</div>
{CONTENT_BEFORE}
{CONTENT_BEFORE}
<form name="mr_configuration" id="mr_configuration" method="post" action="main.php">
<form name="mr_configuration" id="mr_configuration" method="post" action="main.php">
<input type="hidden" name="contenido" value="{SESSID}">
<input type="hidden" name="contenido" value="{SESSID}" /> <input type="hidden" name="area" value="{AREA}">
<input type="hidden" name="area" value="{AREA}" /> <input type="hidden" name="mr_action" value="save">
<input type="hidden" name="mr_action" value="save" /> <input type="hidden" name="frame" value="4">
<input type="hidden" name="frame" value="4" /> <input type="hidden" name="idclient" value="{IDCLIENT}">
<input type="hidden" name="idclient" value="{IDCLIENT}" />
<table id="contenttable" cellspacing="0" cellpadding="3" border="0">
<table id="contenttable" cellspacing="0" cellpadding="3" border="0"> <colgroup>
<colgroup> <col width="30%">
<col width="30%" /> <col width="70%">
<col width="70%" /> </colgroup>
</colgroup> <tr style="background-color:#e2e2e2;">
<tr style="background-color:#e2e2e2;"> <th colspan="2" class="text_medium col-I" style="border-top:1px;">{LNG_PLUGIN_SETTINGS}</th>
<th colspan="2" class="text_medium col-I" style="border-top:1px;">{LNG_PLUGIN_SETTINGS}</th> </tr>
</tr>
<!-- htaccess info / empty aliases -->
<!-- htaccess info --> <tr style="{HEADER_NOTES_CSS}" class="marked">
<tr style="{HTACCESS_INFO_CSS}" class="marked"> <td colspan="2" class="text_medium col-I" style="padding:13px 3px;">
<td colspan="2" class="text_medium col-I"> <strong>{LNG_NOTE}</strong><br>
<br /> <p style="{HTACCESS_INFO_CSS}">
<strong>{LNG_NOTE}</strong><br /> {LNG_MSG_NO_HTACCESS_FOUND}<br>
{LNG_MSG_NO_HTACCESS_FOUND}<br /> </p>
<br /> <p style="{EMPTYALIASES_INFO_CSS}">
</td> {LNG_MSG_NO_EMPTYALIASES_FOUND}<br>
</tr> </p>
</td>
<!-- enable/disable mod rewrite --> </tr>
<tr>
<td colspan="2" class="text_medium col-I"> <!-- enable/disable mod rewrite -->
<div class="blockLeft"> <tr>
<input type="checkbox" id="mr_use" name="use" value="1"{USE_CHK} /> <td colspan="2" class="text_medium col-I">
<label for="mr_use">{LNG_ENABLE_AMR}</label> <div class="blockLeft">
</div> <input type="checkbox" id="mr_use" name="use" value="1"{USE_CHK}>
<a href="#" id="enableInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div> <label for="mr_use">{LNG_ENABLE_AMR}</label>
<div id="enableInfo1" style="display:none"> </div>
<strong>{LNG_NOTE}</strong><br /> <a href="#" id="enableInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
{LNG_MSG_ENABLE_AMR_INFO}<br /> <div id="enableInfo1" style="display:none;">
<br /> <strong>{LNG_NOTE}</strong><br>
<strong>{LNG_EXAMPLE}:</strong> {LNG_MSG_ENABLE_AMR_INFO}<br>
<pre class="example">{LNG_MSG_ENABLE_AMR_INFO_EXAMPLE}</pre> <br>
</div> <strong>{LNG_EXAMPLE}:</strong>
</td> <pre class="example">{LNG_MSG_ENABLE_AMR_INFO_EXAMPLE}</pre>
</tr> </div>
</td>
<!-- root dir --> </tr>
<tr>
<td class="text_medium col-I">{LNG_ROOTDIR}</td> <!-- root dir -->
<td class="text_medium col-II" align="left"> <tr>
{ROOTDIR_ERROR} <td class="text_medium col-I">{LNG_ROOTDIR}</td>
<input class="text_medium blockLeft" type="text" name="rootdir" size="50" maxlength="64" value="{ROOTDIR}" /> <td class="text_medium col-II" align="left">
<a href="#" id="rootdirInfo1-link" title="" class="main i-link infoButton"></a><div class="clear"></div> {ROOTDIR_ERROR}
<div id="rootdirInfo1" style="display:none">{LNG_ROOTDIR_INFO}</div> <input class="text_medium blockLeft" type="text" name="rootdir" size="50" maxlength="64" value="{ROOTDIR}">
<br /> <a href="#" id="rootdirInfo1-link" title="" class="main i-link infoButton"></a><div class="clear"></div>
<div class="blockLeft"> <div id="rootdirInfo1" style="display:none;">{LNG_ROOTDIR_INFO}</div>
<input type="checkbox" id="mr_checkrootdir" name="checkrootdir" value="1"{CHECKROOTDIR_CHK} /> <br>
<label for="mr_checkrootdir">{LNG_CHECKROOTDIR}</label> <div class="blockLeft">
</div> <input type="checkbox" id="mr_checkrootdir" name="checkrootdir" value="1"{CHECKROOTDIR_CHK}>
<a href="#" id="rootdirInfo2-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div> <label for="mr_checkrootdir">{LNG_CHECKROOTDIR}</label>
<div id="rootdirInfo2" style="display:none">{LNG_CHECKROOTDIR_INFO}</div> </div>
</td> <a href="#" id="rootdirInfo2-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
</tr> <div id="rootdirInfo2" style="display:none;">{LNG_CHECKROOTDIR_INFO}</div>
</td>
<!-- start from root --> </tr>
<tr>
<td class="text_medium col-I">{LNG_STARTFROMROOT}</td> <!-- use client/use client name -->
<td class="text_medium col-II" align="left"> <tr>
<div class="blockLeft"> <td class="text_medium col-I">{LNG_USE_CLIENT}</td>
<input type="checkbox" id="mr_startfromroot" name="startfromroot" value="1"{STARTFROMROOT_CHK} /> <td class="text_medium col-II" align="left">
<label for="mr_startfromroot">{LNG_STARTFROMROOT_LBL}</label> <input type="checkbox" id="mr_use_client" name="use_client" value="1"{USE_CLIENT_CHK}>
</div> <label for="mr_use_client">{LNG_USE_CLIENT_LBL}</label><br>
<a href="#" id="startFromRootInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div> <br>
<div id="startFromRootInfo1" style="display:none">{LNG_STARTFROMROOT_INFO}</div> <input type="checkbox" id="mr_use_client_name" name="use_client_name" value="1"{USE_CLIENT_NAME_CHK}{USE_CLIENT_NAME_DISABLED}>
</td> <label for="mr_use_client_name">{LNG_USE_CLIENT_NAME_LBL}</label><br>
</tr> </td>
</tr>
<!-- use client/use client name -->
<tr> <!-- use language/use language name -->
<td class="text_medium col-I">{LNG_USE_CLIENT}</td> <tr>
<td class="text_medium col-II" align="left"> <td class="text_medium col-I">{LNG_USE_LANGUAGE}</td>
<input type="checkbox" id="mr_use_client" name="use_client" value="1"{USE_CLIENT_CHK} /> <td class="text_medium col-II" align="left">
<label for="mr_use_client">{LNG_USE_CLIENT_LBL}</label><br /> <input type="checkbox" id="mr_use_language" name="use_language" value="1"{USE_LANGUAGE_CHK}>
<br /> <label for="mr_use_language">{LNG_USE_LANGUAGE_LBL}</label><br>
<input type="checkbox" id="mr_use_client_name" name="use_client_name" value="1"{USE_CLIENT_NAME_CHK}{USE_CLIENT_NAME_DISABLED} /> <br>
<label for="mr_use_client_name">{LNG_USE_CLIENT_NAME_LBL}</label><br /> <input type="checkbox" id="mr_use_language_name" name="use_language_name" value="1"{USE_LANGUAGE_NAME_CHK}{USE_LANGUAGE_NAME_DISABLED}>
</td> <label for="mr_use_language_name">{LNG_USE_LANGUAGE_NAME_LBL}</label><br>
</tr> </td>
</tr>
<!-- use language/use language name -->
<tr> <!-- start from root -->
<td class="text_medium col-I">{LNG_USE_LANGUAGE}</td> <tr>
<td class="text_medium col-II" align="left"> <td class="text_medium col-I">{LNG_STARTFROMROOT}</td>
<input type="checkbox" id="mr_use_language" name="use_language" value="1"{USE_LANGUAGE_CHK} /> <td class="text_medium col-II" align="left">
<label for="mr_use_language">{LNG_USE_LANGUAGE_LBL}</label><br /> <div class="blockLeft">
<br /> <input type="checkbox" id="mr_startfromroot" name="startfromroot" value="1"{STARTFROMROOT_CHK}>
<input type="checkbox" id="mr_use_language_name" name="use_language_name" value="1"{USE_LANGUAGE_NAME_CHK}{USE_LANGUAGE_NAME_DISABLED} /> <label for="mr_startfromroot">{LNG_STARTFROMROOT_LBL}</label>
<label for="mr_use_language_name">{LNG_USE_LANGUAGE_NAME_LBL}</label><br /> </div>
</td> <a href="#" id="startFromRootInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
</tr> <div id="startFromRootInfo1" style="display:none;">{LNG_STARTFROMROOT_INFO}</div>
</td>
<!-- activate userdefined separator settings --> </tr>
<tr>
<td colspan="2" class="text_medium col-I altBg"> <!-- activate userdefined separator settings -->
<strong class="blockLeft">{LNG_USERDEFINED_SEPARATORS_HEADER}</strong> <tr>
<a href="#" id="userdefSeparatorInfo1-link2" title="" class="main i-link infoButton"></a><div class="clear"></div> <td colspan="2" class="text_medium col-I altBg">
<div id="userdefSeparatorInfo1" style="display:none"> <strong class="blockLeft">{LNG_USERDEFINED_SEPARATORS_HEADER}</strong>
<strong>{LNG_EXAMPLE}:</strong> <a href="#" id="userdefSeparatorInfo1-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE}</pre> <div id="userdefSeparatorInfo1" style="display:none;">
<strong>{LNG_EXAMPLE}:</strong>
<strong>{LNG_NOTE}:</strong> <pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE}</pre>
<ul>
<li>{LNG_USERDEFINED_SEPARATORS_EXAMPLE_A} <strong>{LNG_NOTE}:</strong>
<pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE_A_EXAMPLE}</pre> <ul>
</li> <li>{LNG_USERDEFINED_SEPARATORS_EXAMPLE_A}
<li>{LNG_USERDEFINED_SEPARATORS_EXAMPLE_B} <pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE_A_EXAMPLE}</pre>
<pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE_B_EXAMPLE}</pre> </li>
</li> <li>{LNG_USERDEFINED_SEPARATORS_EXAMPLE_B}
<li>{LNG_USERDEFINED_SEPARATORS_EXAMPLE_C} <pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE_B_EXAMPLE}</pre>
<pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE_C_EXAMPLE}</pre> </li>
</li> <li>{LNG_USERDEFINED_SEPARATORS_EXAMPLE_C}
</ul> <pre class="example">{LNG_USERDEFINED_SEPARATORS_EXAMPLE_C_EXAMPLE}</pre>
</div> </li>
</td> </ul>
</tr> </div>
</td>
<tr> </tr>
<td class="text_medium col-I altBg">{LNG_CATEGORY_SEPARATOR}</td>
<td class="text_medium col-II" align="left"> <tr>
{CATEGORY_SEPARATOR_ERROR} <td class="text_medium col-I altBg">{LNG_CATEGORY_SEPARATOR}</td>
<input class="text_medium" type="text" id="mr_category_seperator" name="category_seperator" size="5" maxlength="1" value="{CATEGORY_SEPARATOR}"{CATEGORY_SEPARATOR_ATTRIB} /> <td class="text_medium col-II" align="left">
<small>{LNG_CATART_SEPARATOR_INFO}</small> {CATEGORY_SEPARATOR_ERROR}
</td> <input class="text_medium" type="text" id="mr_category_seperator" name="category_seperator" size="5" maxlength="1" value="{CATEGORY_SEPARATOR}"{CATEGORY_SEPARATOR_ATTRIB}>
</tr> <small>{LNG_CATART_SEPARATOR_INFO}</small>
</td>
<tr> </tr>
<td class="text_medium col-I altBg">{LNG_CATEGORY_WORD_SEPARATOR}</td>
<td class="text_medium col-II" align="left"> <tr>
{CATEGORY_WORD_SEPARATOR_ERROR} <td class="text_medium col-I altBg">{LNG_CATEGORY_WORD_SEPARATOR}</td>
<input class="text_medium" type="text" id="mr_category_word_seperator" name="category_word_seperator" size="5" maxlength="1" value="{CATEGORY_WORD_SEPARATOR}"{CATEGORY_WORD_SEPARATOR_ATTRIB} /> <td class="text_medium col-II" align="left">
<small>{LNG_WORD_SEPARATOR_INFO}</small> {CATEGORY_WORD_SEPARATOR_ERROR}
</td> <input class="text_medium" type="text" id="mr_category_word_seperator" name="category_word_seperator" size="5" maxlength="1" value="{CATEGORY_WORD_SEPARATOR}"{CATEGORY_WORD_SEPARATOR_ATTRIB}>
</tr> <small>{LNG_WORD_SEPARATOR_INFO}</small>
</td>
<tr> </tr>
<td class="text_medium col-I altBg">{LNG_ARTICLE_SEPARATOR}</td>
<td class="text_medium col-II" align="left"> <tr>
{ARTICLE_SEPARATOR_ERROR} <td class="text_medium col-I altBg">{LNG_ARTICLE_SEPARATOR}</td>
<input class="text_medium" type="text" id="mr_article_seperator" name="article_seperator" size="5" maxlength="1" value="{ARTICLE_SEPARATOR}"{ARTICLE_SEPARATOR_ATTRIB} /> <td class="text_medium col-II" align="left">
<small>{LNG_CATART_SEPARATOR_INFO}</small> {ARTICLE_SEPARATOR_ERROR}
</td> <input class="text_medium" type="text" id="mr_article_seperator" name="article_seperator" size="5" maxlength="1" value="{ARTICLE_SEPARATOR}"{ARTICLE_SEPARATOR_ATTRIB}>
</tr> <small>{LNG_CATART_SEPARATOR_INFO}</small>
<tr> </td>
<td class="text_medium col-I altBg">{LNG_ARTICLE_WORD_SEPARATOR}</td> </tr>
<td class="text_medium col-II" align="left"> <tr>
{ARTICLE_WORD_SEPARATOR_ERROR} <td class="text_medium col-I altBg">{LNG_ARTICLE_WORD_SEPARATOR}</td>
<input class="text_medium" type="text" id="mr_article_word_seperator" name="article_word_seperator" size="5" maxlength="1" value="{ARTICLE_WORD_SEPARATOR}"{ARTICLE_WORD_SEPARATOR_ATTRIB} /> <td class="text_medium col-II" align="left">
<small>{LNG_WORD_SEPARATOR_INFO}</small> {ARTICLE_WORD_SEPARATOR_ERROR}
</td> <input class="text_medium" type="text" id="mr_article_word_seperator" name="article_word_seperator" size="5" maxlength="1" value="{ARTICLE_WORD_SEPARATOR}"{ARTICLE_WORD_SEPARATOR_ATTRIB}>
</tr> <small>{LNG_WORD_SEPARATOR_INFO}</small>
</td>
<!-- add start article name to url --> </tr>
<tr>
<td class="text_medium col-I">{LNG_ADD_STARTART_NAME_TO_URL}</td> <!-- add start article name to url -->
<td class="text_medium col-II" align="left"> <tr>
{ADD_STARTART_NAME_TO_URL_ERROR} <td class="text_medium col-I">{LNG_ADD_STARTART_NAME_TO_URL}</td>
<input type="checkbox" id="mr_add_startart_name_to_url" name="add_startart_name_to_url" value="1"{ADD_STARTART_NAME_TO_URL_CHK} /> <td class="text_medium col-II" align="left">
<label for="mr_add_startart_name_to_url">{LNG_ADD_STARTART_NAME_TO_URL_LBL}</label><br /> {ADD_STARTART_NAME_TO_URL_ERROR}
<br /> <input type="checkbox" id="mr_add_startart_name_to_url" name="add_startart_name_to_url" value="1"{ADD_STARTART_NAME_TO_URL_CHK}>
<div class="blockLeft"> <label for="mr_add_startart_name_to_url">{LNG_ADD_STARTART_NAME_TO_URL_LBL}</label><br>
<label for="mr_default_startart_name">{LNG_DEFAULT_STARTART_NAME}</label><br /> <br>
<input class="text_medium" type="text" id="mr_default_startart_name" name="default_startart_name" size="50" maxlength="64" value="{DEFAULT_STARTART_NAME}" /> <div class="blockLeft">
</div> <label for="mr_default_startart_name">{LNG_DEFAULT_STARTART_NAME}</label><br>
<a href="#" id="defaultStartArtNameInfo1-link" title="" class="main i-link infoButton v2" style="margin-top:1.2em;"></a><div class="clear"></div> <input class="text_medium" type="text" id="mr_default_startart_name" name="default_startart_name" size="50" maxlength="64" value="{DEFAULT_STARTART_NAME}">
<div id="defaultStartArtNameInfo1" style="display:none">{LNG_DEFAULT_STARTART_NAME_INFO}</div> </div>
</td> <a href="#" id="defaultStartArtNameInfo1-link" title="" class="main i-link infoButton v2" style="margin-top:1.2em;"></a><div class="clear"></div>
</tr> <div id="defaultStartArtNameInfo1" style="display:none">{LNG_DEFAULT_STARTART_NAME_INFO}</div>
</td>
<!-- file extension --> </tr>
<tr>
<td class="text_medium col-I">{LNG_FILE_EXTENSION}</td> <!-- file extension -->
<td class="text_medium col-II" align="left"> <tr>
{FILE_EXTENSION_ERROR} <td class="text_medium col-I">{LNG_FILE_EXTENSION}</td>
<div class="blockLeft"> <td class="text_medium col-II" align="left">
<input class="text_medium" type="text" name="file_extension" size="10" maxlength="10" value="{FILE_EXTENSION}" /><br /> {FILE_EXTENSION_ERROR}
</div> <div class="blockLeft">
<a href="#" id="fileExtensionInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div> <input class="text_medium" type="text" name="file_extension" size="10" maxlength="10" value="{FILE_EXTENSION}"><br>
<div id="fileExtensionInfo1" style="display:none"> </div>
{LNG_FILE_EXTENSION_INFO}<br /><br /> <a href="#" id="fileExtensionInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<strong>{LNG_NOTE}:</strong><br /> <div id="fileExtensionInfo1" style="display:none;">
{LNG_FILE_EXTENSION_INFO2} {LNG_FILE_EXTENSION_INFO}<br><br>
</div> <strong>{LNG_NOTE}:</strong><br>
<p style="color:red">{LNG_FILE_EXTENSION_INFO3}</p> {LNG_FILE_EXTENSION_INFO2}
</td> </div>
</tr> <p style="color:red">{LNG_FILE_EXTENSION_INFO3}</p>
</td>
<!-- use lowercase url --> </tr>
<tr>
<td class="text_medium col-I">{LNG_USE_LOWERCASE_URI}</td> <!-- use lowercase url -->
<td class="text_medium col-II" align="left"> <tr>
<input type="checkbox" id="mr_use_lowercase_uri" name="use_lowercase_uri" value="1"{USE_LOWERCASE_URI_CHK} /> <td class="text_medium col-I">{LNG_USE_LOWERCASE_URI}</td>
<label for="mr_use_lowercase_uri">{LNG_USE_LOWERCASE_URI_LBL}</label> <td class="text_medium col-II" align="left">
</td> <input type="checkbox" id="mr_use_lowercase_uri" name="use_lowercase_uri" value="1"{USE_LOWERCASE_URI_CHK}>
</tr> <label for="mr_use_lowercase_uri">{LNG_USE_LOWERCASE_URI_LBL}</label>
</td>
<!-- prevent duplicated content --> </tr>
<tr>
<td class="text_medium col-I">{LNG_PREVENT_DUPLICATED_CONTENT}</td> <!-- prevent duplicated content -->
<td class="text_medium col-II" align="left"> <tr>
<div class="blockLeft"> <td class="text_medium col-I">{LNG_PREVENT_DUPLICATED_CONTENT}</td>
<input type="checkbox" id="mr_prevent_duplicated_content" name="prevent_duplicated_content" value="1"{PREVENT_DUPLICATED_CONTENT_CHK} /> <label for="mr_prevent_duplicated_content">{LNG_PREVENT_DUPLICATED_CONTENT_LBL}</label><br /> <td class="text_medium col-II" align="left">
</div> <div class="blockLeft">
<a href="#" id="preventDuplicatedContentInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div> <input type="checkbox" id="mr_prevent_duplicated_content" name="prevent_duplicated_content" value="1"{PREVENT_DUPLICATED_CONTENT_CHK}> <label for="mr_prevent_duplicated_content">{LNG_PREVENT_DUPLICATED_CONTENT_LBL}</label><br>
<div id="preventDuplicatedContentInfo1" style="display:none"> </div>
{LNG_PREVENT_DUPLICATED_CONTENT_INFO}:<br /> <a href="#" id="preventDuplicatedContentInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<ul> <div id="preventDuplicatedContentInfo1" style="display:none;">
{LNG_PREVENT_DUPLICATED_CONTENT_INFO2} {LNG_PREVENT_DUPLICATED_CONTENT_INFO}:<br>
</ul> <ul>
</div> {LNG_PREVENT_DUPLICATED_CONTENT_INFO2}
</td> </ul>
</tr> </div>
</td>
<!-- category resolve min percentage --> </tr>
<tr>
<td class="text_medium col-I">{LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE}</td> <!-- category resolve min percentage -->
<td class="text_medium col-II" align="left"> <tr>
{CATEGORY_RESOLVE_MIN_PERCENTAGE_ERROR} <td class="text_medium col-I">{LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE}</td>
<div class="blockLeft"> <td class="text_medium col-II" align="left">
<input class="text_medium" type="text" name="category_resolve_min_percentage" size="5" maxlength="3" value="{CATEGORY_RESOLVE_MIN_PERCENTAGE}" /> (0 - 100) {CATEGORY_RESOLVE_MIN_PERCENTAGE_ERROR}
</div> <div class="blockLeft">
<a href="#" id="categoryResolveMinPercentageInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div> <input class="text_medium" type="text" name="category_resolve_min_percentage" size="5" maxlength="3" value="{CATEGORY_RESOLVE_MIN_PERCENTAGE}"> (0 - 100)
<div id="categoryResolveMinPercentageInfo1" style="display:none"> </div>
<p>{LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE_INFO}</p> <a href="#" id="categoryResolveMinPercentageInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<strong>{LNG_EXAMPLE}:</strong> <div id="categoryResolveMinPercentageInfo1" style="display:none;">
<pre class="example">{LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE_EXAMPLE}</pre> <p>{LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE_INFO}</p>
</div> <strong>{LNG_EXAMPLE}:</strong>
</td> <pre class="example">{LNG_CATEGORY_RESOLVE_MIN_PERCENTAGE_EXAMPLE}</pre>
</tr> </div>
</td>
<!-- redirect invalid article to errorsite --> </tr>
<tr>
<td class="text_medium col-I">{LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE}</td> <!-- redirect invalid article to errorsite -->
<td class="text_medium col-II" align="left"> <tr>
<div class="blockLeft"> <td class="text_medium col-I">{LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE}</td>
<input type="checkbox" id="mr_redirect_invalid_article_to_errorsite" name="redirect_invalid_article_to_errorsite" value="1"{REDIRECT_INVALID_ARTICLE_TO_ERRORSITE_CHK} /> <td class="text_medium col-II" align="left">
<label for="mr_redirect_invalid_article_to_errorsite">{LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE_LBL}</label><br /> <div class="blockLeft">
</div> <input type="checkbox" id="mr_redirect_invalid_article_to_errorsite" name="redirect_invalid_article_to_errorsite" value="1"{REDIRECT_INVALID_ARTICLE_TO_ERRORSITE_CHK}>
<a href="#" id="redirectInvalidArticleToErrorsiteInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div> <label for="mr_redirect_invalid_article_to_errorsite">{LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE_LBL}</label><br>
<div id="redirectInvalidArticleToErrorsiteInfo1" style="display:none"> </div>
{LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE_INFO} <a href="#" id="redirectInvalidArticleToErrorsiteInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
</div> <div id="redirectInvalidArticleToErrorsiteInfo1" style="display:none;">
</td> {LNG_REDIRECT_INVALID_ARTICLE_TO_ERRORSITE_INFO}
</tr> </div>
</td>
<!-- rewrite urls at --> </tr>
<tr>
<td class="text_medium col-I">{LNG_REWRITE_URLS_AT}</td> <!-- rewrite urls at -->
<td class="text_medium col-II" align="left"> <tr>
<div class="blockLeft"> <td class="text_medium col-I">{LNG_REWRITE_URLS_AT}</td>
<input type="radio" id="rewrite_urls_at_front_content_output" name="rewrite_urls_at" value="front_content_output"{REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_CHK} /> <td class="text_medium col-II" align="left">
<label for="rewrite_urls_at_front_content_output">{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_LBL}</label> <div class="blockLeft">
</div> <input type="radio" id="rewrite_urls_at_front_content_output" name="rewrite_urls_at" value="front_content_output"{REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_CHK}>
<a href="#" id="rewriteUrlsAtInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div> <label for="rewrite_urls_at_front_content_output">{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_LBL}</label>
<div id="rewriteUrlsAtInfo1" style="display:none;"> </div>
{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_INFO}<br /> <a href="#" id="rewriteUrlsAtInfo1-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<br /> <div id="rewriteUrlsAtInfo1" style="display:none;">
<strong>{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_INFO2}:</strong> {LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_INFO}<br>
<ul> <br>
{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_INFO3} <strong>{LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_INFO2}:</strong>
</ul> <ul>
</div> {LNG_REWRITE_URLS_AT_FRONT_CONTENT_OUTPUT_INFO3}
<br /> </ul>
</div>
<div class="blockLeft"> <br>
<input type="radio" id="rewrite_urls_at_congeneratecode" name="rewrite_urls_at" value="congeneratecode"{REWRITE_URLS_AT_CONGENERATECODE_CHK} />
<label for="rewrite_urls_at_congeneratecode">{LNG_REWRITE_URLS_AT_CONGENERATECODE_LBL}</label><br /> <div class="blockLeft">
</div> <input type="radio" id="rewrite_urls_at_congeneratecode" name="rewrite_urls_at" value="congeneratecode"{REWRITE_URLS_AT_CONGENERATECODE_CHK}>
<a href="#" id="rewriteUrlsAtInfo2-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div> <label for="rewrite_urls_at_congeneratecode">{LNG_REWRITE_URLS_AT_CONGENERATECODE_LBL}</label><br>
<div id="rewriteUrlsAtInfo2" style="display:none;"> </div>
{LNG_REWRITE_URLS_AT_CONGENERATECODE_INFO}<br /> <a href="#" id="rewriteUrlsAtInfo2-link" title="" class="main i-link infoButton v2"></a><div class="clear"></div>
<pre class="example">{LNG_REWRITE_URLS_AT_CONGENERATECODE_EXAMPLE}</pre> <div id="rewriteUrlsAtInfo2" style="display:none;">
{LNG_REWRITE_URLS_AT_CONGENERATECODE_INFO}<br>
<strong>{LNG_REWRITE_URLS_AT_CONGENERATECODE_INFO2}:</strong> <pre class="example">{LNG_REWRITE_URLS_AT_CONGENERATECODE_EXAMPLE}</pre>
<ul>
{LNG_REWRITE_URLS_AT_CONGENERATECODE_INFO3} <strong>{LNG_REWRITE_URLS_AT_CONGENERATECODE_INFO2}:</strong>
</ul> <ul>
</div> {LNG_REWRITE_URLS_AT_CONGENERATECODE_INFO3}
</td> </ul>
</tr> </div>
</td>
<!-- routing --> </tr>
<tr>
<td class="text_medium col-I">{LNG_REWRITE_ROUTING}</td> <!-- routing -->
<td class="text_medium col-II" align="left"> <tr>
<div class="blockLeft">{LNG_REWRITE_ROUTING_INFO}</div> <td class="text_medium col-I">{LNG_REWRITE_ROUTING}</td>
<a href="#" id="routingInfo1-link" title="" class="main i-link infoButton"></a><div class="clear"></div> <td class="text_medium col-II" align="left">
<div id="routingInfo1" style="display:none"> <div class="blockLeft">{LNG_REWRITE_ROUTING_INFO}</div>
{LNG_REWRITE_ROUTING_INFO2} <a href="#" id="routingInfo1-link" title="" class="main i-link infoButton"></a><div class="clear"></div>
<pre class="example">{LNG_REWRITE_ROUTING_EXAMPLE}</pre> <div id="routingInfo1" style="display:none;">
<br /> {LNG_REWRITE_ROUTING_INFO2}
<ul> <pre class="example">{LNG_REWRITE_ROUTING_EXAMPLE}</pre>
{LNG_REWRITE_ROUTING_INFO3} <br>
</ul> <ul>
</div> {LNG_REWRITE_ROUTING_INFO3}
<textarea class="txt" id="rewrite_routing" name="rewrite_routing" rows="5" cols="80" style="width:100%;height:100px;">{REWRITE_ROUTING}</textarea> </ul>
</td> </div>
</tr> <textarea class="txt" id="rewrite_routing" name="rewrite_routing" rows="5" cols="80" style="width:100%;height:100px;">{REWRITE_ROUTING}</textarea>
</td>
<tr> </tr>
<td colspan="2" class="text_medium col-I" style="text-align:right">
<a accesskey="c" href="main.php?area={AREA}&amp;frame=4&amp;idclient={IDCLIENT}&amp;contenido={SESSID}"> <tr>
<img src="images/but_cancel.gif" alt="" title="{LNG_DISCARD_CHANGES}" /></a> <td colspan="2" class="text_medium col-I" style="text-align:right">
<input style="margin-left:20px;" accesskey="s" type="image" src="images/but_ok.gif" alt="" title="{LNG_SAVE_CHANGES}" /> <a accesskey="c" href="main.php?area={AREA}&amp;frame=4&amp;idclient={IDCLIENT}&amp;contenido={SESSID}">
</td> <img src="images/but_cancel.gif" alt="" title="{LNG_DISCARD_CHANGES}" /></a>
</tr> <input style="margin-left:20px;" accesskey="s" type="image" src="images/but_ok.gif" alt="" title="{LNG_SAVE_CHANGES}" />
</table> </td>
</tr>
</form> </table>
{CONTENT_AFTER} </form>
</body> {CONTENT_AFTER}
</body>
</html> </html>

Datei anzeigen

@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>mod_rewrite_content_menu_top</title>
<meta http-equiv="expires" content="0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="stylesheet" type="text/css" href="styles/contenido.css" />
<script type="text/javascript"><!--
// session-id
var sid = "{SESSID}";
// --></script>
<style type="text/css"><!--
img {border:none;}
// --></style>
</head>
<body>
<div id="navcontainer">
<div style="float:left;">
<img src="images/frame_handle_re.gif" style="border:0px;float:left;" alt="" />
<img style="margin:7px 0 0 7px;" id="toggleimage" onclick="parent.parent.frameResize.toggle()" src="images/spacer.gif" alt="" />
</div>
</div>
<script type="text/javascript"><!--
if (parent.parent.frames[0].name != "header") {
parent.parent.frameResize.init();
parent.parent.frameResize.toggle();
}
// --></script>
</body>
</html>

Datei anzeigen

@ -1,153 +1,151 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html>
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<head> <title>mod_rewrite_content_expert</title>
<title>mod_rewrite_content_expert</title> <meta http-equiv="expires" content="0">
<meta http-equiv="expires" content="0" /> <meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" 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="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/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/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="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/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/mod_rewrite/styles/styles.css" /> <script type="text/javascript"><!--
<script type="text/javascript"><!-- // session-id
// session-id var sid = "{SESSID}";
var sid = "{SESSID}";
// setup translation
// setup translation mrPlugin.lng.more_informations = "{LNG_MORE_INFORMATIONS}";
mrPlugin.lng.more_informations = "{LNG_MORE_INFORMATIONS}";
// initialize page
// initialize page mrPlugin.initializeSettingsPage();
mrPlugin.initializeSettingsPage();
function mrPlugin_sendForm(action, params) {
function mrPlugin_sendForm(action, params) $('#mr_expert_action').val(action);
{ var frm = $('#mr_expert');
$('#mr_expert_action').val(action); frm.attr('action', frm.attr('action') + '?' + params).submit();
var frm = $('#mr_expert'); }
frm.attr('action', frm.attr('action') + '?' + params).submit(); // --></script>
} </head>
// --></script>
</head> <body class="mrPlugin">
<body class="mrPlugin"> <div class="headerBox">
{LNG_PLUGIN_FUNCTIONS}
<div class="headerBox"> </div>
{LNG_PLUGIN_FUNCTIONS}
</div> {CONTENT_BEFORE}
{CONTENT_BEFORE} <form name="mr_expert" id="mr_expert" method="post" action="main.php">
<form name="mr_expert" id="mr_expert" method="post" action="main.php"> <input type="hidden" name="contenido" value="{SESSID}">
<input type="hidden" name="area" value="{AREA}">
<input type="hidden" name="contenido" value="{SESSID}" /> <input type="hidden" name="mr_action" id="mr_expert_action" value="">
<input type="hidden" name="area" value="{AREA}" /> <input type="hidden" name="frame" value="4">
<input type="hidden" name="mr_action" id="mr_expert_action" value="" /> <input type="hidden" name="idclient" value="{IDCLIENT}">
<input type="hidden" name="frame" value="4" />
<input type="hidden" name="idclient" value="{IDCLIENT}" /> <table id="contenttable" cellspacing="0" cellpadding="3" border="0">
<colgroup>
<table id="contenttable" cellspacing="0" cellpadding="3" border="0"> <col width="30%">
<colgroup> <col width="70%">
<col width="30%" /> </colgroup>
<col width="70%" />
</colgroup>
<!-- copy .htaccess -->
<tr style="{COPY_HTACCESS_CSS}">
<!-- copy .htaccess --> <td class="text_medium col-I">{LNG_COPY_HTACCESS_TYPE}</td>
<tr style="{COPY_HTACCESS_CSS}"> <td class="text_medium col-II" align="left">
<td class="text_medium col-I">{LNG_COPY_HTACCESS_TYPE}</td> {COPY_HTACCESS_ERROR}
<td class="text_medium col-II" align="left">
{COPY_HTACCESS_ERROR} <label for="mr_copy_htaccess_type">{LNG_COPY_HTACCESS_TYPE_LBL}</label><br>
<select class="blockLeft" name="htaccesstype" id="mr_copy_htaccess_type">
<label for="mr_copy_htaccess_type">{LNG_COPY_HTACCESS_TYPE_LBL}</label><br /> <option value="restrictive">{LNG_COPY_HTACCESS_TYPE1}</option>
<select class="blockLeft" name="htaccesstype" id="mr_copy_htaccess_type"> <option value="simple">{LNG_COPY_HTACCESS_TYPE2}</option>
<option value="restrictive">{LNG_COPY_HTACCESS_TYPE1}</option> </select>
<option value="simple">{LNG_COPY_HTACCESS_TYPE2}</option> <a href="#" id="copyHtaccessInfo1-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
</select> <div id="copyHtaccessInfo1" style="display:none;">
<a href="#" id="copyHtaccessInfo1-link2" title="" class="main i-link infoButton"></a><div class="clear"></div> <strong>{LNG_COPY_HTACCESS_TYPE1}:</strong><br>
<div id="copyHtaccessInfo1" style="display:none"> {LNG_COPY_HTACCESS_TYPE_INFO1}<br>
<strong>{LNG_COPY_HTACCESS_TYPE1}:</strong><br /> <br>
{LNG_COPY_HTACCESS_TYPE_INFO1}<br /> <strong>{LNG_COPY_HTACCESS_TYPE2}:</strong><br>
<br /> {LNG_COPY_HTACCESS_TYPE_INFO2}<br>
<strong>{LNG_COPY_HTACCESS_TYPE2}:</strong><br /> </div>
{LNG_COPY_HTACCESS_TYPE_INFO2}<br />
</div> <div class="clear"></div>
<br>
<div class="clear"></div>
<br /> {LNG_COPY_HTACCESS_TO}<br>
<br>
{LNG_COPY_HTACCESS_TO}<br /> <a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('copyhtaccess', 'copy=contenido');">
<br /> <img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_COPY_HTACCESS_TO_CONTENIDO}</a>
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('copyhtaccess', 'copy=contenido');"> <a href="#" id="copyHtaccessInfo2-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<img src="images/collapsed.gif" width="10" height="9" alt="" /> {LNG_COPY_HTACCESS_TO_CONTENIDO}</a> <div id="copyHtaccessInfo2" style="display:none;">
<a href="#" id="copyHtaccessInfo2-link2" title="" class="main i-link infoButton"></a><div class="clear"></div> {LNG_COPY_HTACCESS_TO_CONTENIDO_INFO}
<div id="copyHtaccessInfo2" style="display:none"> </div>
{LNG_COPY_HTACCESS_TO_CONTENIDO_INFO} <br>
</div>
<br /> <a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('copyhtaccess', 'copy=cms');">
<img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_COPY_HTACCESS_TO_CLIENT}</a>
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('copyhtaccess', 'copy=cms');"> <a href="#" id="copyHtaccessInfo3-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<img src="images/collapsed.gif" width="10" height="9" alt="" /> {LNG_COPY_HTACCESS_TO_CLIENT}</a> <div id="copyHtaccessInfo3" style="display:none;">
<a href="#" id="copyHtaccessInfo3-link2" title="" class="main i-link infoButton"></a><div class="clear"></div> {LNG_COPY_HTACCESS_TO_CLIENT_INFO}
<div id="copyHtaccessInfo3" style="display:none"> </div>
{LNG_COPY_HTACCESS_TO_CLIENT_INFO} <br>
</div>
<br /> {LNG_OR}<br>
<br>
{LNG_OR}<br /> <a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('downloadhtaccess', '');">
<br /> <img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_DOWNLOAD}</a>
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('downloadhtaccess', '');"> <a href="#" id="showHtaccessInfo-link1" title="" class="main i-link infoButton"></a><div class="clear"></div>
<img src="images/collapsed.gif" width="10" height="9" alt="" /> {LNG_DOWNLOAD}</a> <div id="showHtaccessInfo" style="display:none;">
<a href="#" id="showHtaccessInfo-link1" title="" class="main i-link infoButton"></a><div class="clear"></div> {LNG_DOWNLOAD_INFO}
<div id="showHtaccessInfo" style="display:none"> </div>
{LNG_DOWNLOAD_INFO} <br>
</div>
<br /> <div class="clear"></div>
</td>
<div class="clear"></div> </tr>
</td>
</tr> <!-- reset -->
<tr>
<!-- reset --> <td class="text_medium col-I">
<tr> {LNG_RESETALIASES}
<td class="text_medium col-I"> </td>
{LNG_RESETALIASES} <td class="text_medium col-II">
</td> <a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('resetempty', '');">
<td class="text_medium col-II"> <img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_RESETEMPTY_LINK}</a>
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('resetempty', '');"> <a href="#" id="resetAliasesInfo1-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<img src="images/collapsed.gif" width="10" height="9" alt="" /> {LNG_RESETEMPTY_LINK}</a> <div id="resetAliasesInfo1" style="display:none;">
<a href="#" id="resetAliasesInfo1-link2" title="" class="main i-link infoButton"></a><div class="clear"></div> {LNG_RESETEMPTY_INFO}
<div id="resetAliasesInfo1" style="display:none"> </div>
{LNG_RESETEMPTY_INFO} <br>
</div>
<br /> <a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('reset', '');">
<img src="images/collapsed.gif" width="10" height="9" alt=""> {LNG_RESETALL_LINK}</a>
<a class="blockLeft" style="margin-right:15px;" href="javascript:mrPlugin_sendForm('reset', '');"> <a href="#" id="resetAliasesInfo2-link2" title="" class="main i-link infoButton"></a><div class="clear"></div>
<img src="images/collapsed.gif" width="10" height="9" alt="" /> {LNG_RESETALL_LINK}</a> <div id="resetAliasesInfo2" style="display:none;">
<a href="#" id="resetAliasesInfo2-link2" title="" class="main i-link infoButton"></a><div class="clear"></div> {LNG_RESETALL_INFO}
<div id="resetAliasesInfo2" style="display:none"> </div>
{LNG_RESETALL_INFO} <br>
</div> <strong>{LNG_NOTE}:</strong><br>
<br /> {LNG_RESETALIASES_NOTE}
<strong>{LNG_NOTE}:</strong><br /> </td>
{LNG_RESETALIASES_NOTE} </tr>
</td>
</tr>
<tr>
<td colspan="2" class="text_medium col-I" style="text-align:right">
<tr> <a accesskey="c" href="main.php?area={AREA}&amp;frame=4&amp;idclient={IDCLIENT}&amp;contenido={SESSID}">
<td colspan="2" class="text_medium col-I" style="text-align:right"> <img src="images/but_cancel.gif" alt="" title="{LNG_DISCARD_CHANGES}"></a>
<a accesskey="c" href="main.php?area={AREA}&amp;frame=4&amp;idclient={IDCLIENT}&amp;contenido={SESSID}"> <input style="margin-left:20px;" accesskey="s" type="image" src="images/but_ok.gif" alt="" title="{LNG_SAVE_CHANGES}">
<img src="images/but_cancel.gif" alt="" title="{LNG_DISCARD_CHANGES}" /></a> </td>
<input style="margin-left:20px;" accesskey="s" type="image" src="images/but_ok.gif" alt="" title="{LNG_SAVE_CHANGES}" /> </tr>
</td> </table>
</tr>
</table> </form>
</form> {CONTENT_AFTER}
{CONTENT_AFTER} </body>
</body>
</html> </html>

Datei anzeigen

@ -1,64 +1,63 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html>
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<head> <title>mod_rewrite_content_test</title>
<title>mod_rewrite_content_test</title> <meta http-equiv="expires" content="0">
<meta http-equiv="expires" content="0" /> <meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" 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="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/scripts/mod_rewrite.js"></script> <link rel="stylesheet" type="text/css" href="styles/contenido.css">
<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/mod_rewrite/styles/styles.css" /> <script type="text/javascript"><!--
<script type="text/javascript"><!-- // session-id
// session-id var sid = "{SESSID}";
var sid = "{SESSID}";
// setup translation
// setup translation mrPlugin.lng.more_informations = "{LNG_MORE_INFORMATIONS}";
mrPlugin.lng.more_informations = "{LNG_MORE_INFORMATIONS}";
// --></script>
// --></script> </head>
</head>
<body class="mrPlugin mrPluginTest">
<body class="mrPlugin mrPluginTest">
<div class="headerBox">
<div class="headerBox"> <p>{LNG_FORM_INFO}<p>
<p>{LNG_FORM_INFO}<p> <form name="mr_test" id="mr_test" action="main.php">
<form name="mr_test" id="mr_test" action="main.php"> <input type="hidden" name="area" value="{AREA}">
<input type="hidden" name="area" value="{AREA}" /> <input type="hidden" name="frame" value="{FRAME}">
<input type="hidden" name="frame" value="{FRAME}" /> <input type="hidden" name="contenido" value="{CONTENIDO}">
<input type="hidden" name="contenido" value="{CONTENIDO}" /> <fieldset>
<fieldset> <legend>{LNG_FORM_LABEL}</legend>
<legend>{LNG_FORM_LABEL}</legend> <p></p>
<p></p> <div class="chk">
<div class="chk"> <input type="checkbox" id="idart" name="idart" value="1"{FORM_IDART_CHK}><label for="idart">idart</label>
<input type="checkbox" id="idart" name="idart" value="1"{FORM_IDART_CHK} /><label for="idart">idart</label> </div>
</div> <div class="chk">
<div class="chk"> <input type="checkbox" id="idcat" name="idcat" value="1"{FORM_IDCAT_CHK}><label for="idcat">idcat</label>
<input type="checkbox" id="idcat" name="idcat" value="1"{FORM_IDCAT_CHK} /><label for="idcat">idcat</label> </div>
</div> <div class="chk">
<div class="chk"> <input type="checkbox" id="idcatart" name="idcatart" value="1"{FORM_IDCATART_CHK}><label for="idcatart">idcatart</label>
<input type="checkbox" id="idcatart" name="idcatart" value="1"{FORM_IDCATART_CHK} /><label for="idcatart">idcatart</label> </div>
</div> <div class="chk">
<div class="chk"> <input type="checkbox" id="idartlang" name="idartlang" value="1"{FORM_IDARTLANG_CHK}><label for="idartlang">idartlang</label>
<input type="checkbox" id="idartlang" name="idartlang" value="1"{FORM_IDARTLANG_CHK} /><label for="idartlang">idartlang</label> </div>
</div> <br class="clear">
<br class="clear" /> </fieldset>
</fieldset> <div class="contenttest">
<div style="margin:0.3em 0;"> <div class="blockLeft">
<div class="blockLeft"> <label for="maxitems">{LNG_MAXITEMS_LBL}: </label><input type="text" id="maxitems" maxlength="4" name="maxitems" value="{FORM_MAXITEMS}">
<label for="maxitems">{LNG_MAXITEMS_LBL}: </label><input type="text" id="maxitems" maxlength="4" name="maxitems" value="{FORM_MAXITEMS}" /> </div>
</div> <div class="blockRight pdr5">
<div class="blockRight" style="padding-right:5px;"> <input type="submit" name="test" value="{LNG_RUN_TEST}">
<input type="submit" name="test" value="{LNG_RUN_TEST}" /> </div>
</div> <br class="clear">
<br class="clear" /> </div>
</div> </form>
</form> <br class="clear">
<br class="clear" /> </div>
</div>
{CONTENT}
{CONTENT}
</body>
</body> </html>
</html>

Datei anzeigen

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Contenido XML language file --> <!-- CONTENIDO XML language file -->
<language> <language>
<navigation> <navigation>
<content> <extras>
<mod_rewrite> <mod_rewrite>
<main>AMR</main> <main>AMR</main>
<settings>Einstellungen</settings> <settings>Einstellungen</settings>
<expert>Funktionen</expert> <expert>Funktionen</expert>
<test>Test</test> <test>Test</test>
</mod_rewrite> </mod_rewrite>
</content> </extras>
</navigation> </navigation>
</language> </language>

Datei anzeigen

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Contenido XML language file --> <!-- CONTENIDO XML language file -->
<language> <language>
<navigation> <navigation>
<content> <extras>
<mod_rewrite> <mod_rewrite>
<main>AMR</main> <main>AMR</main>
<settings>Settings</settings> <settings>Settings</settings>
<expert>Functions</expert> <expert>Functions</expert>
<test>Test</test> <test>Test</test>
</mod_rewrite> </mod_rewrite>
</content> </extras>
</navigation> </navigation>
</language> </language>