From 9c11b3a9e01370eee7f63d3fc055b70bd240d00e Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 20 Jan 2015 10:51:58 +0000 Subject: [PATCH] Add possiblity to insert webvideo in Portfolio detail --- .htaccess | 1 + framework/application/configs/application.ini | 13 +++++----- .../application/forms/CMS/Casestudies.php | 26 +++++++++---------- .../application/forms/CMS/Realisations.php | 2 +- .../application/views/helpers/Realisation.php | 26 ++++++++++++------- 5 files changed, 37 insertions(+), 31 deletions(-) diff --git a/.htaccess b/.htaccess index ae0ab6c..3e73207 100644 --- a/.htaccess +++ b/.htaccess @@ -14,6 +14,7 @@ Options +FollowSymlinks RewriteEngine on RewriteBase / + # # Redirection to www. subdomain RewriteCond %{HTTP_HOST} =cubedesigners.fr RewriteRule ^(.*)$ http://www.cubedesigners.fr/$1 [R=301,L] diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index e65f934..da808d7 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -1,5 +1,6 @@ [production] dev = false +firephp = true minify.js = true minify.css = true @@ -8,7 +9,7 @@ bin.mysqldump = /usr/bin/mysqldump bin.mysql = /usr/bin/mysql bin.zip = /usr/bin/zip bin.unzip = /usr/bin/unzip -bin.imagemagick=convert +bin.imagemagick = convert bin.cp = /bin/cp bin.rm = /bin/rm @@ -30,14 +31,14 @@ database.params.dbname = cubev6 seo.universalAnalytics = UA-4339912-1 seo.google = google93c0129ef18a399d.html seo.bing = 8986457D1D126C38A815027C839372DC -seo.pinterest=fa7873389173bc29df6ef3ea8789bca2 +seo.pinterest = fa7873389173bc29df6ef3ea8789bca2 -navigation.containers[]=0; +navigation.containers[] = 0; ;navigation.containers[]=-1; -navigation.containers[]=-2; -navigation.containers[]=-3; +navigation.containers[] = -2; +navigation.containers[] = -3; -googleapi=AIzaSyDKYIWGbAgnV0N9SVx0jb9lt1qqD4dSFmQ +googleapi = AIzaSyDKYIWGbAgnV0N9SVx0jb9lt1qqD4dSFmQ locales.fr = www.cubedesigners.fr locales.en = www.cubedesigners.com diff --git a/framework/application/forms/CMS/Casestudies.php b/framework/application/forms/CMS/Casestudies.php index 5df14e1..725ab56 100644 --- a/framework/application/forms/CMS/Casestudies.php +++ b/framework/application/forms/CMS/Casestudies.php @@ -2,22 +2,20 @@ class Cubedesigners_Form_CMS_Casestudies extends Cubedesigners_Form_CMS { - public function init() { - parent::init(); + public function init() { + parent::init(); - $titre = new CubeIT_Form_Element_Markitup('titre'); - $titre->setLabel('Titre'); - $this->addElement($titre); + $titre = new CubeIT_Form_Element_Markitup('titre'); + $titre->setLabel('Titre'); + $this->addElement($titre); - $stuurl = new Zend_Form_Element_Text('seourl_stu'); - $stuurl->setLabel("Modèle d'URL des études de cas"); - $this->addElement($stuurl); + $stuurl = new CubeIT_Form_Element_Url('seourl_stu'); + $stuurl->setLabel("Modèle d'URL des études de cas"); + $this->addElement($stuurl); - $studies = new Cubedesigners_Form_CMS_Element_Casestudies('studies'); - $studies->setLabel('Gestion des études de cas'); - $this->addElement($studies); - } + $studies = new Cubedesigners_Form_CMS_Element_Casestudies('studies'); + $studies->setLabel('Gestion des études de cas'); + $this->addElement($studies); + } } - -?> \ No newline at end of file diff --git a/framework/application/forms/CMS/Realisations.php b/framework/application/forms/CMS/Realisations.php index 2be959d..841fb53 100644 --- a/framework/application/forms/CMS/Realisations.php +++ b/framework/application/forms/CMS/Realisations.php @@ -9,7 +9,7 @@ class Cubedesigners_Form_CMS_Realisations extends Cubedesigners_Form_CMS { $titre->setLabel('Titre'); $this->addElement($titre); - $reaurl = new Zend_Form_Element_Text('seourl_rea'); + $reaurl = new CubeIT_Form_Element_Url('seourl_rea'); $reaurl->setLabel("Modèle d'URL des réalisations"); $this->addElement($reaurl); diff --git a/framework/application/views/helpers/Realisation.php b/framework/application/views/helpers/Realisation.php index 84b5969..54a53bb 100644 --- a/framework/application/views/helpers/Realisation.php +++ b/framework/application/views/helpers/Realisation.php @@ -8,32 +8,38 @@ class Cubedesigners_View_Helper_Realisation extends CubeIT_View_Helper_Abstract $r = CubeIT_Util_Cms::unserialize($r); $res = ''; - $res.='
'; + $res .= '
'; $res .= '
'; $res .= '

' . $r->titre . '

'; $res .= '

' . Cubedesigners_Util::getCategoryById($r->categories) . '

'; - $res .= $this->view->link(__('Fermer'), $this->currentPage->getParent()->getHref(), array('class' => 'close', 'id' => 'closeButton')); - $res.='
'; + $res .= $this->view->link(__('Fermer'), $this->currentPage->getParent()->getHref(), array('class' => 'close', 'id' => 'closeButton')); + $res .= ''; $slides = array(); foreach ($r->visuel_detail as $s) { - if (CubeIT_Files::getExtension($s) == 'flv') { + $ext = CubeIT_Files::getExtension($s); + + if ($ext == 'flv') { $slides[] = $this->view->videoCubetube($s, 'auto', 'auto', array('background' => 'ffffff'), array('height' => 439)); + } elseif ($ext == 'webvideo') { + $url = file_get_contents(PUBLIC_PATH . CubeIT_View_Helper_ImageCms::getPath($s)); + fb($url); + $slides[] = $this->view->videoWeb($url, 'auto', 'auto', array(), array('height' => 439)); } else { $slides[] = $s; } } - $res.=$this->imageSlideshowScroll($slides, 439, array(), array('shortcuts' => false)); - $res.='
'; + $res .= $this->imageSlideshowScroll($slides, 439, array(), array('shortcuts' => false)); + $res .= '
'; if (!empty($r->url->url)) { - $res.=$this->_button($r->url); + $res .= $this->_button($r->url); } - $res.=$this->markupDotclear($r->description); - $res.='
'; - $res.='
'; + $res .= $this->markupDotclear($r->description); + $res .= ''; + $res .= '
'; return $res; } -- 2.39.5