]> _ Git - bloomsburie.git/commitdiff
wip #7264 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 7 Feb 2025 18:37:43 +0000 (19:37 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 7 Feb 2025 18:37:43 +0000 (19:37 +0100)
framework/application/views/helpers/CaseStudiesGrid.php
framework/application/views/helpers/CasestudiesList.php
framework/application/views/helpers/CasestudiesTagsList.php [deleted file]

index 3ccf1dfd123844e29502f8c58e938f7adf9b408b..c5a069470a290584a3ea5c2dc0624f8a07d617ab 100644 (file)
@@ -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'];
-    }
-
 }
index ccc48a101330ccd133cb36c26ed6fe64e94b7991..f6f74f86e884a1d7bb8bb896ec9aa5fffe1872dc 100644 (file)
@@ -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.= '<div class="arrow-animation"><span class="arrow-animation-arrow"></span></div>';
         $c.= '</div>';
                $c.= '<h2>' . $s->titre . '</h2>';
-               //$c.='<h3>' . $s->description . '</h3>';
-
-        /*
-               $tag_names = [];
-        foreach ($s->tags_secondaires as $categoryID) {
-            $tag_names[] = $this->_getTagName($categoryID);
-        }
-
-        $c.= '<h3>' . implode(' / ', $tag_names) . '</h3>';
-        */
         $c.= '<h3>' . $s->legende . '</h3>';
 
 
 
                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 (file)
index c557ca4..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-
-class Cubedesigners_View_Helper_CasestudiesTagsList extends CubeIT_View_Helper_Abstract {
-
-       public function CasestudiesTagsList($studies) {
-
-               $tagslist = Array();
-
-               $db0 = Zend_Db_Table::getDefaultAdapter();
-               $s0 = $db0->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;
-       }
-
-}
-
-?>