From: vincent@cubedesigners.com Date: Wed, 26 Nov 2014 11:54:29 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ff874b41d4bd384ea33b33012a1ffebd926deebd;p=cubedesigners-v7.git --- diff --git a/.htaccess b/.htaccess index 3f58494..4570e63 100644 --- a/.htaccess +++ b/.htaccess @@ -16,7 +16,7 @@ RewriteBase / # Redirection to www. subdomain RewriteCond %{HTTP_HOST} !=www.cubedesigners.fr - RewriteCond %{HTTP_HOST} !=www.cubedesigners.com + #RewriteCond %{HTTP_HOST} !=www.cubedesigners.com RewriteRule ^(.*)$ http://www.cubedesigners.fr/$1 [R=301,L] # Redirect auth header to env RewriteRule ^.*$ - [E=REMOTE_USER:%{HTTP:Authorization}] diff --git a/framework/application/Bootstrap.php b/framework/application/Bootstrap.php index a0ba199..2b9d60a 100644 --- a/framework/application/Bootstrap.php +++ b/framework/application/Bootstrap.php @@ -128,6 +128,73 @@ class Bootstrap extends CubeIT_Bootstrap { return $templates; } + /** + * + * @param Zend_Controller_Request_Http $req + * @return boolean|string + */ + public function handleRedirections($req) { + $res = parent::handleRedirections($req); + if ($res !== false) { + return $res; + } + + $path = trim($req->getPathInfo(), '/ '); + $e = explode('/', $path); + $locale = array_shift($e); + + $res = '/'; + if ($locale == 'en') { + return 'http://en.cubedesigners.com/en/' . $path; + } + + if ($locale == 'references_web') { + $res.='Portfolio'; + return $res; + } + + if ($locale != 'fr') { + return false; + } + + if (count($e) == 1) { + $u = $e[0]; + if ($u == '1-Sites-internet') { + $res.='Projets-Web'; + } elseif ($u == '2-Design-graphique') { + $res.='Graphisme'; + } elseif ($u == '3-Design-industriel') { + $res.='Design-industriel'; + } elseif ($u == '4-Multimedia-Jeux') { + $res.='Multimedia'; + } elseif ($u == '5-Films-Animation') { + $res.='Multimedia'; + } elseif ($u == '6-Applications-mobiles') { + $res.='Projets-Web'; + } elseif ($u == '7-En-attente') { + $res.='Graphisme'; + } + return $res; + } + + if (count($e) == 3) { + if ($e[0] == 'Sites-internet') { + $e[0] = 'Site-Web'; + } elseif ($e[0] == 'Multimedia-Jeux') { + $e[0] = 'Multimedia'; + } + + // Projects + /// Mobile-applications/Heredis/114-Heredis-App => Applications-mobiles/Heredis-Heredis-App + $ee = explode('-', $e[2], 2); + array_shift($ee); + $res.=$e[0] . '/' . $e[1] . '-' . implode('-', $ee); + return $res; + } + + return false; + } + public function run() { // run have to be the last call of bootstrap parent::run(); diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index 3f098d0..d4bb0f9 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -19,7 +19,7 @@ timezone = 'Europe/Paris' session.lifetime = 31536000 ;1 year session.adapter = cache -webhost = www.cubedesigners.com +webhost = www.cubedesigners.fr database.adapter = pdo_mysql database.params.host = localhost diff --git a/framework/application/controllers/IndexController.php b/framework/application/controllers/IndexController.php index d4df531..cf69518 100644 --- a/framework/application/controllers/IndexController.php +++ b/framework/application/controllers/IndexController.php @@ -1,6 +1,5 @@ '; - - $i = 0; - - foreach ($blocs as $id => $bloc) { - - if (($i % 2) == 0 && $i != 0) { - $res.='
'; - } - - $image = $this->view->imageProcess()->imageProcessGetUrl($bloc['photo'], $bloc['titre'], 120, 120); - - $res.='
'; - $res.=''; - $res.='

' . $bloc['titre'] . '

'; - $res.='' . $bloc['poste'] . ''; - $res.='' . $this->view->markupDotclear($bloc['texte']) . ''; - $res.='
'; - - $i++; - } - - $res .= ''; - return $res; - } - -} - -?> +'; + + $i = 0; + + foreach ($blocs as $id => $bloc) { + + if (($i % 2) == 0 && $i != 0) { + $res.='
'; + } + + $image = $this->view->imageProcess()->imageProcessGetUrl($bloc['photo'], $bloc['titre'], 120, 120); + + $res.='
'; + $res.=''; + $res.='

' . $bloc['titre'] . '

'; + $res.='' . $bloc['poste'] . ''; + $res.= $this->view->markupDotclear($bloc['texte'], array('class' => 'texte')); + $res.='
'; + + $i++; + } + + $res .= ''; + return $res; + } + +} + +?> diff --git a/framework/application/views/helpers/FooterActualites.php b/framework/application/views/helpers/FooterActualites.php index fb0015d..36fa77a 100644 --- a/framework/application/views/helpers/FooterActualites.php +++ b/framework/application/views/helpers/FooterActualites.php @@ -9,8 +9,12 @@ class Cubedesigners_View_Helper_FooterActualites extends Zend_View_Helper_Abstra $nbActus = count($actus); $res = '
'; + $res.='

' . __('Actualités') . '

'; foreach ($actus as $id => $actu) { - $res.='
' . $this->view->dateTime($actu['date'], "dd-MM-y", array('class' => 'date')) . $this->view->markupDotclear($actu['texte']) . '
'; + $res.='
'; + $res.= $this->view->dateTime($actu['date'], "dd-MM-y", array('class' => 'date')); + $res.='

' . nl2br($actu['texte']) . '

'; + $res.='
'; } $res.= '
'; diff --git a/framework/application/views/helpers/RealisationsList.php b/framework/application/views/helpers/RealisationsList.php index 113e1a1..8d391d5 100644 --- a/framework/application/views/helpers/RealisationsList.php +++ b/framework/application/views/helpers/RealisationsList.php @@ -32,7 +32,7 @@ class Cubedesigners_View_Helper_RealisationsList extends CubeIT_View_Helper_Abst $rea = $this->view->imageProcess($r->visuel, $r->titre, 170, 127); $rea.='

' . $r->titre . '

'; - $rea.='

' . Cubedesigners_Util::getCategoryById($r->categories) . ' // ' . $this->dateTime($r->date, Zend_Date::YEAR) . '

'; + $rea.='

' . Cubedesigners_Util::getCategoryById($r->categories) . ' / ' . $this->dateTime($r->date, Zend_Date::YEAR) . '

'; $url = Cubedesigners_Util::generateAutoUri($r, $datas['seourl_rea']); diff --git a/framework/application/views/helpers/Twocols.php b/framework/application/views/helpers/Twocols.php index 6f82a95..6905233 100644 --- a/framework/application/views/helpers/Twocols.php +++ b/framework/application/views/helpers/Twocols.php @@ -5,10 +5,10 @@ class Cubedesigners_View_Helper_Twocols extends Zend_View_Helper_Abstract { public function twocols($displayTitle = true) { $this->view->headLink()->appendStylesheet('/less/twocols.less'); $res = '
'; + $res.='
'; if ($displayTitle) { $res.= '
' . $this->view->markupDotclear($this->view->titre) . '
'; } - $res.='
'; $res.='
'; $res.='
' . $this->view->markupDotclear($this->view->colonnegauche) . '
'; $res.='
' . $this->view->markupDotclear($this->view->colonnedroite) . '
'; diff --git a/framework/application/views/scripts/common/footer.phtml b/framework/application/views/scripts/common/footer.phtml index 53ee8d1..005a7af 100644 --- a/framework/application/views/scripts/common/footer.phtml +++ b/framework/application/views/scripts/common/footer.phtml @@ -19,7 +19,6 @@ echo $this->clear();
-

footerActualites($this->option('actus')); ?>