From: Vincent Vanwaelscappel Date: Fri, 7 Feb 2025 18:37:43 +0000 (+0100) Subject: wip #7264 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1325522ffb9fe8c7ce6343d444043dfe31d047e2;p=bloomsburie.git wip #7264 @0.5 --- diff --git a/framework/application/views/helpers/CaseStudiesGrid.php b/framework/application/views/helpers/CaseStudiesGrid.php index 3ccf1df..c5a0694 100644 --- a/framework/application/views/helpers/CaseStudiesGrid.php +++ b/framework/application/views/helpers/CaseStudiesGrid.php @@ -77,25 +77,4 @@ class Cubedesigners_View_Helper_CaseStudiesGrid extends CubeIT_View_Helper_Abstr 'data-wow-delay' => $delay . 'ms', )) . ' '; // Space needed between elements for justified alignment } - - - // Get secondary category names - protected function _getTagName($catID) - { - - // Cache the query data if it's not already done - if (!$this->_tags) { - - $db = Zend_Db_Table::getDefaultAdapter(); - $query = $db->select()->from('tags')->query(); - - while ($category = $query->fetch()) { - $category = CubeIT_Util_Cms::unserializeRow($category); - $this->_tags[$category->id] = CubeIT_Util_Object::toArray($category); - } - } - - return $this->_tags[$catID]['name']; - } - } diff --git a/framework/application/views/helpers/CasestudiesList.php b/framework/application/views/helpers/CasestudiesList.php index ccc48a1..f6f74f8 100644 --- a/framework/application/views/helpers/CasestudiesList.php +++ b/framework/application/views/helpers/CasestudiesList.php @@ -159,7 +159,7 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr } */ // Max display size is 318 but we over-sample the size by 20% because there is a CSS scale effect on hover - $image = $this->view->imageProcess($s->visuel, $s->titre, 512, 'auto'); + $image = $this->view->imageProcess($s->visuel, $s->titre, 512, 512); $url = Cubedesigners_Util::generateAutoUri($s, $this->_datas['seourl_stu']); $s->hover_color = empty($s->hover_color) ? '#000' : $s->hover_color; @@ -170,43 +170,13 @@ class Cubedesigners_View_Helper_CasestudiesList extends CubeIT_View_Helper_Abstr $c.= '
'; $c.= ''; $c.= '

' . $s->titre . '

'; - //$c.='

' . $s->description . '

'; - - /* - $tag_names = []; - foreach ($s->tags_secondaires as $categoryID) { - $tag_names[] = $this->_getTagName($categoryID); - } - - $c.= '

' . implode(' / ', $tag_names) . '

'; - */ $c.= '

' . $s->legende . '

'; return $this->link($c, $url, array( - //'data-cat' => $s->categories, 'class' => 'wow fadeInUp', 'data-wow-delay' => '300ms', )) . ' '; // Space needed between elements for justified alignment } - - // Get secondary category names - protected function _getTagName($catID) { - - // Cache the query data if it's not already done - if (!$this->_tags) { - - $db = Zend_Db_Table::getDefaultAdapter(); - $query = $db->select()->from('tags')->query(); - - while ($category = $query->fetch()) { - $category = CubeIT_Util_Cms::unserializeRow($category); - $this->_tags[$category->id] = CubeIT_Util_Object::toArray($category); - } - } - - return $this->_tags[$catID]['name']; - } - } diff --git a/framework/application/views/helpers/CasestudiesTagsList.php b/framework/application/views/helpers/CasestudiesTagsList.php deleted file mode 100644 index c557ca4..0000000 --- a/framework/application/views/helpers/CasestudiesTagsList.php +++ /dev/null @@ -1,43 +0,0 @@ -select()->from('casestudies') - ->order('id ASC'); - $s0->where('online = ?', 1); - $q0 = $s0->query(); - - while ($r0 = $q0->fetch()) { - $temp = explode(',', $r0->tags); - - for ($i = 0; $i < count($temp); $i++) { - if (!in_array($temp[$i], $tagslist)) { - array_push($tagslist, $temp[$i]); - } - } - } - - $db = Zend_Db_Table::getDefaultAdapter(); - $s = $db->select()->from('tags') - ->order('name ASC'); - $q = $s->query(); - - $tags = array(); - while ($r = $q->fetch()) { - if (in_array($r->id, $tagslist)) { - $tags[$r->id] = $r->name; - } - } - - $res.=$this->view->tags($tags, array('data-perline' => 3)); - return $res; - } - -} - -?>