als erstes muss ich leider einmal Sagen das ich von dem Release der 4.8 und von der four for business AG doch schon ein wenig enttäucht bin. Vor allem aber das die four for business AG zum Beispiel auf Ihrer eigenen Seite zeigt das Contenido schon Mode_Rewrite kann, aber es hier dem Forum nur Stückchenweise zukommen lässt.
Für mich bedeutet das kurzgesagt...bastelt es euch selber zusammen obwohl es schon vorhanden ist und von uns eingesetzt wird.
MR ist bei den meisten, und vor allem bei den besten CMS-Systemen schon Grundstandart. Nur bei Contenido, wird es schon seit ein paar Jahren, nicht so richtig offiziell, von Seiten der four for business AG gegenüber uns unterstützt. Alle funktionierenden fertigen Lösungen die hier im Forum vorhanden sind kommen durch die Forenmember, dickes danke noch einmal an stese und co.
Das Contenido 4.8 MR unterstützt und auch MR kann ist ja wunderbar, aber warum können hier die Member, die ebenfalls zur Entwicklung beitragen, davon nicht providieren?
Ich wollte hier nun damit keine Diskussion anfangen sonder nur einmal meine Meinung kurz sagen. Damit ich das Thema für mich auch erledigt.
Ich habe mich am Wochenende einmal zum testen der MR von Contenido 4.8 hingesetzt und ein wenig mit der originalen Navigation_Main und der Navigation_Meta des Beispielmandanten herumgespielt. Ich möchte schon die neue Version 4.8 bei meinen Kunden einsetzen, aber da ist nunmal von meiner Seite her, heutzutage, das MR Grundvoraussetzung dem Kunden gegenüber um Kongurenzfähig bleiben zu können! Daher habe ich nun zumindest einmal die Navigation-Links angepasst. Das ist also offiziell eine Demo-Version . Man kann folgende Module zum testen einfach bei den Beispielmandanten mit den vorhandenen ersetzen und dann einmal schauen was herauskommt.
BITTE VORHER EINE SICHERUNG DER ALTEN MODULE MACHEN!!!
Hier sind auch nur die Navigationsmodule angepasst. Die Ergebnisseite der Suche, Bildergalerie, Sitemap, Artikelliste, usw. sind Module die dann ebenfalls MR-Angepasst werden müssten, diese geben also noch das "front_content.php..." aus (was dann aber trotzdem funktioniert). Es ist also kein "Echtzeit-MR" aller Module wie bei stese seiner Version bei der keinerlei Module angepasst werden mussten.
Unter Administation => Mandanten den Mandant auswählen und dann auf Mandanteneinstellungen gehen.
Hier kann man nun unter navigation folgende Einstellungen zusätzlich eintragen.
mr-navi-active: 0 = deaktiviert, 1 = aktiviert
Code: Alles auswählen
navigation mr-navi-active 0 or 1
Beispiel:
0 => Hauptnavigation/Features-dieser-Website/Navigation/index-a-5.html
1 => Features-dieser-Website/Navigation/index-a-5.html
2 => Navigation/index-a-5.html
3 => index-a-5.html
4 => index-a-5.html
Code: Alles auswählen
navigation mr-navi-level 0,1,2 or 3
Beispiel (der Name ist wie unter Administration => Sprachen):
1 => deutsch/Hauptnavigation/Features-dieser-Website/Navigation/index-a-5.html
Code: Alles auswählen
navigation mr-navi-lang-view 0 or 1
Beispiel:
1 => Contenido+Demo/Hauptnavigation/Features-dieser-Website/Navigation/index-a-5.html
1 mit Sprache auf 1 => Contenido+Demo/deutsch/Hauptnavigation/Features-dieser-Website/Navigation/index-a-5.html
Code: Alles auswählen
navigation mr-navi-client-view 0 or 1
Beispiel:
0 => Contenido+Demo/deutsch/Hauptnavigation/Features-dieser-Website/Navigation/index-a-5.html
1 => contenido+demo/deutsch/hauptnavigation/features-dieser-website/navigation/index-a-5.html
Code: Alles auswählen
navigation mr-navi-urlstr2lower 0 or 1
Code: Alles auswählen
<?php
/**
* $RCSfile$
*
* Description: Navigation, left side.
*
* @version 1.0.0
* @author Rudi Bieller
* @copyright four for business AG <www.4fb.de>
*
* {@internal
* created 2008-04-07
* }}
*
* $Id$
*/
/*****************************************************
* CONTENIDO MR-Navi-Modul - OUTPUT
*
* Modified-Author(s) : Ralf Fleischer
* Modified-Email : info@xtended-cooperation.de
* Modified-Date : 18-05-2008, Ralf Fleischer
*
* MR - Client Options
*
* navigation mr-navi-active 0 or 1
* navigation mr-navi-level 0,1,2 or 3
* navigation mr-navi-lang-view 0 or 1
* navigation mr-navi-client-active 0 or 1
* navigation mr-navi-urlstr2lower 0 or 1
*****************************************************/
// MR NaviOutput
$MrActive = getEffectiveSetting('navigation', 'mr-navi-active', 0);
$Level = getEffectiveSetting('navigation', 'mr-navi-level', 0);
// MR Language Output
$MrLanguage = getEffectiveSetting('navigation', 'mr-navi-lang-view', 0);
if($MrLanguage == 0){
$MrLanguageOutput="";
}else{
$sql="SELECT * FROM `".$cfg["tab"]["lang"]."`, `".$cfg["tab"]["clients_lang"]."` WHERE `".$cfg["tab"]["lang"]."`.idlang = `".$cfg["tab"]["clients_lang"]."`.idlang AND idclient = 1 AND `".$cfg["tab"]["lang"]."`.idlang =".$lang;
$db->query($sql);
$db->next_record();
$MrLanguageOutput = $db->f(name)."/";
}
// MR Client Option
$MrClient = getEffectiveSetting('navigation', 'mr-navi-client-view', 0);
if($MrClient == 0){
$MrClientOutput="";
}else{
$sql="SELECT * FROM `".$cfg["tab"]["clients"]."` WHERE idclient =".$client;
$db->query($sql);
$db->next_record();
$MrClientOutput = str_replace(" ","+",$db->f(name))."/";
}
// MR -STring2Lower
$MrStr2Low = getEffectiveSetting('navigation', 'mr-navi-urlstr2lower', 0);
// include Contenido_FrontendNavigation class
cInclude('classes', 'Contenido_FrontendNavigation/Contenido_FrontendNavigation.class.php');
cInclude('classes', 'Contenido_FrontendNavigation/Contenido_FrontendNavigation_Breadcrumb.class.php');
// get start idcat
$iIdcatStart = getEffectiveSetting('navigation', 'idcat-home', 1);
// instantiate 2nd + 3rd template object, reset all
$tpl2 = new Template();
$tpl3 = new Template();
if (!is_object($tpl)) {
$tpl = new Template();
}
$tpl->reset();
$tpl2->reset();
$tpl3->reset();
// build navigation
try {
$oFeNav = new Contenido_FrontendNavigation($db, $cfg, $client, $lang, $cfgClient);
$oBreadcrumb = new Contenido_FrontendNavigation_Breadcrumb($db, $cfg, $client, $lang, $cfgClient);
$aBreadcrumb = $oBreadcrumb->getAsArray($idcat, 1); // this nav starts at level 1
$oFeNav->setAuth($auth); // to make sure user sees what he's allowed to see
$oContenidoCategories = $oFeNav->getSubCategories($iIdcatStart, true);
if ($oContenidoCategories->count() > 0) {
foreach ($oContenidoCategories as $oContenidoCategory) {
$sSubcats = '';
$tpl2->reset();
$bHasActiveSubCat = false;
// check if we need to load subcategories
$oSubCatsLevel2 = $oFeNav->getSubCategories($oContenidoCategory->getIdCat(), true);
$aSubCatsLevel2 = $oFeNav->getSubCategories($oContenidoCategory->getIdCat(), false);
$bShowSubcatLevel2 = (intval($idcat) == $oContenidoCategory->getIdCat() || in_array(intval($idcat), $aSubCatsLevel2)
|| (isset($aBreadcrumb[2]) && intval($idcat) == $aBreadcrumb[2] && in_array($aBreadcrumb[1], $aSubCatsLevel2)))
? true : false;
if ($bShowSubcatLevel2 === true && $oSubCatsLevel2->count() > 0) {
foreach ($oFeNav->getSubCategories($oContenidoCategory->getIdCat(), true) as $oSubCategory) {
$bHasActiveSubSubCat = false;
// check if we need to load subsubcategories
$oSubCatsLevel3 = $oFeNav->getSubCategories($oSubCategory->getIdCat(), true);
$aSubCatsLevel3 = $oFeNav->getSubCategories($oSubCategory->getIdCat(), false);
$bShowSubcatLevel3 = (intval($idcat) == $oSubCategory->getIdCat() ||
in_array(intval($idcat), $aSubCatsLevel3))
? true : false;
$sSubcats2 = '';
if ($bShowSubcatLevel3 === true && $oSubCatsLevel3->count() > 0) {
foreach ($oSubCatsLevel3 as $oSubSubCategories) {
if ($bHasActiveSubCat === false && intval($idcat) == $oSubSubCategories->getIdCat()) {
$bHasActiveSubCat = true;
}
if ($bHasActiveSubSubCat === false && intval($idcat) == $oSubSubCategories->getIdCat()) {
$bHasActiveSubSubCat = true;
}
$iIdcat = $oSubSubCategories->getIdCat();
if($MrActive==0){
$MrNavOut=false;
}else{
$MrNavOut = $MrClientOutput.$MrLanguageOutput.$oFeNav->getUrl(array('a' => $iIdcat, 'idcat' => $iIdcat, 'lang' => $lang, 'level' => $Level));
if ($MrStr2Low==1){$MrNavOut=strtolower($MrNavOut);}
}
toTpl($tpl3, $oSubSubCategories, (intval($idcat) == $oSubSubCategories->getIdCat() ? ' class="active"' : ''), '',$MrNavOut);
}
$sSubcats2 = $tpl3->generate('templates/navigation_main_item.html', true, false);
$tpl3->reset();
$tpl3->set('s', 'items', $sSubcats2);
$tpl3->set('s', 'css-class', ' class="subSubNavigation"');
$sSubcats2 = $tpl3->generate('templates/navigation_main_container.html', true, false);
}
if ($bHasActiveSubCat === false && intval($idcat) == $oSubCategory->getIdCat()) {
$bHasActiveSubCat = true;
}
$iIdcat = $oSubCategory->getIdCat();
if($MrActive==0){
$MrNavOut=false;
}else{
$MrNavOut = $MrClientOutput.$MrLanguageOutput.$oFeNav->getUrl(array('a' => $iIdcat, 'idcat' => $iIdcat, 'lang' => $lang, 'level' => $Level));
if ($MrStr2Low==1){$MrNavOut=strtolower($MrNavOut);}
}
toTpl($tpl2, $oSubCategory,(intval($idcat) == $oSubCategory->getIdCat() || $bHasActiveSubSubCat === true ? ' class="active"' : ''),$sSubcats2,$MrNavOut);
}
$sSubcats = $tpl2->generate('templates/navigation_main_item.html', true, false);
$tpl2->reset();
$tpl2->set('s', 'items', $sSubcats);
$tpl2->set('s', 'css-class', ' class="subNavigation"');
$sSubcats = $tpl2->generate('templates/navigation_main_container.html', true, false);
}
$iIdcat = $oContenidoCategory->getIdCat();
if($MrActive==0){
$MrNavOut=false;
}else{
$MrNavOut = $MrClientOutput.$MrLanguageOutput.$oFeNav->getUrl(array('a' => $iIdcat, 'idcat' => $iIdcat, 'lang' => $lang, 'level' => $Level));
if ($MrStr2Low==1){$MrNavOut=strtolower($MrNavOut);}
}
toTpl($tpl, $oContenidoCategory, ($bHasActiveSubCat === true || intval($idcat) == $oContenidoCategory->getIdCat() ? ' class="active"' : ''), $sSubcats,$MrNavOut);
}
$sCats = $tpl->generate('templates/navigation_main_item.html', true, false);
$tpl->reset();
$tpl->set('s', 'css-class', '');
$tpl->set('s', 'items', $sCats);
$tpl->generate('templates/navigation_main_container.html');
}
} catch (Exception $e) {
echo 'Some error occured: ' . $e->getMessage() . ': ' . $e->getFile() . ' at line '.$e->getLine() . ' ('.$e->getTraceAsString().')';
}
/**
* Helper to push values to Template object
* @param Template $oTpl
* @param Contenido_Category $oCat
* @param string $sActiveCssClass must bei either empty string or " class="classname"
* @param string $sSubcats String with subcategories of current category
*/
function toTpl(&$oTpl, Contenido_Category $oCat, $sActiveCssClass, $sSubcats,$MrNavOut) {
$oTpl->set('d', 'css-class', $sActiveCssClass);
if($MrNavOut==false){
$oTpl->set('d', 'url', 'front_content.php?idcat='.$oCat->getIdCat());
}else{
$oTpl->set('d', 'url', $MrNavOut);
}
$oTpl->set('d', 'title', $oCat->getCategoryLanguage()->getName());
$oTpl->set('d', 'label', $oCat->getCategoryLanguage()->getName());
$oTpl->set('d', 'subcategories', $sSubcats); // followup level
$oTpl->next();
}
?>
Code: Alles auswählen
<?php
/**
* $RCSfile$
*
* Description: Meta Navigation on bottom of page
*
* @version 1.0.0
* @author Rudi Bieller
* @copyright four for business AG <www.4fb.de>
*
* {@internal
* created 2008-04-07
* }}
*
* $Id$
*/
/*************************************************
* MR - Client Options
*
* navigation mr-navi-active 0 or 1
* navigation mr-navi-level 0,1,2 or 3
* navigation mr-navi-lang-view 0 or 1
* navigation mr-navi-client-active 0 or 1
* navigation mr-navi-urlstr2lower 0 or 1
*/
// MR NaviOutput
$MrActive = getEffectiveSetting('navigation', 'mr-navi-active', 0);
$Level = getEffectiveSetting('navigation', 'mr-navi-level', 0);
// MR Language Output
$MrLanguage = getEffectiveSetting('navigation', 'mr-navi-lang-view', 0);
if($MrLanguage == 0){
$MrLanguageOutput="";
}else{
$sql="SELECT * FROM `".$cfg["tab"]["lang"]."`, `".$cfg["tab"]["clients_lang"]."` WHERE `".$cfg["tab"]["lang"]."`.idlang = `".$cfg["tab"]["clients_lang"]."`.idlang AND idclient = ".$client." AND `".$cfg["tab"]["lang"]."`.idlang =".$lang;
$db->query($sql);
$db->next_record();
$MrLanguageOutput = $db->f(name)."/";
}
// MR Client Option
$MrClient = getEffectiveSetting('navigation', 'mr-navi-client-view', 0);
if($MrClient == 0){
$MrClientOutput="";
}else{
$sql="SELECT * FROM `".$cfg["tab"]["clients"]."` WHERE idclient =".$client;
$db->query($sql);
$db->next_record();
$MrClientOutput = str_replace(" ","+",$db->f(name))."/";
}
// MR -STring2Lower
$MrStr2Low = getEffectiveSetting('navigation', 'mr-navi-urlstr2lower', 0);
// include Contenido_FrontendNavigation class
cInclude('classes', 'Contenido_FrontendNavigation/Contenido_FrontendNavigation.class.php');
// get start idcat
$iIdcatStart = getEffectiveSetting('navigation', 'idcat-meta', 2);
//check if there is a template instance
if (!is_object($tpl)) {
$tpl = new Template();
}
// reset template object
$tpl->reset();
// build navigation
try {
$oFeNav = new Contenido_FrontendNavigation($db, $cfg, $client, $lang, $cfgClient);
$oContenidoCategories = $oFeNav->getSubCategories($iIdcatStart, true);
if ($oContenidoCategories->count() > 0) {
foreach ($oContenidoCategories as $oContenidoCategory) {
$iIdcat = $oContenidoCategory->getIdCat();
if($MrActive==0){
$MrNavOut=false;
}else{
$MrNavOut = $MrClientOutput.$MrLanguageOutput.$oFeNav->getUrl(array('a' => $iIdcat, 'idcat' => $iIdcat, 'lang' => $lang,'level' => $Level));
if ($MrStr2Low==1){$MrNavOut=strtolower($MrNavOut);}
}
if($MrNavOut==false){
$tpl->set('d', 'url', 'front_content.php?idcat='.$oContenidoCategory->getIdCat());
}else{
$tpl->set('d', 'url', $MrNavOut);
}
$tpl->set('d', 'url', 'front_content.php?idcat='.$oContenidoCategory->getIdCat());
$tpl->set('d', 'title', $oContenidoCategory->getCategoryLanguage()->getName());
$tpl->set('d', 'label', $oContenidoCategory->getCategoryLanguage()->getName());
$tpl->next();
}
$sItems = $tpl->generate('templates/navigation_meta_item.html', true, false);
$tpl->reset();
$tpl->set('s', 'items', $sItems);
$tpl->generate('templates/navigation_meta_container.html');
}
} catch (Exception $e) {
echo 'Shit happens: ' . $e->getMessage() . ': ' . $e->getFile() . ' at line '.$e->getLine() . ' ('.$e->getTraceAsString().')';
}
?>
Code: Alles auswählen
#AddHandler php-cgi .php .php4
<IfModule mod_rewrite.c>
RewriteEngine on
# Basisverzeichnis anpassen!
RewriteBase /contenido48/cms
# ausnahmen für verzeichnisse der mod_rewrite regel:
# verzeichnisse ausschließen
RewriteRule ^usage/.*$ - [L]
RewriteRule index-a-([0-9]*).html$ front_content.php?idcat=$1 [QSA,L]
</IfModule>
Viel Spass beim testen.
Gruß yodatortenboxer