]> _ Git - fluidbook-v3.git/commitdiff
wait #6575 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 2 Jan 2024 16:43:52 +0000 (16:43 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 2 Jan 2024 16:43:52 +0000 (16:43 +0000)
.htaccess
framework/application/configs/application.ini
framework/application/views/helpers/ExemplePublication.php
framework/application/views/helpers/Exemples.php

index ba6c79bfbdca47c7d21fd1d35c722914d22fcc30..f05e199f62fa5b57de3924d8108684703b7375aa 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -29,9 +29,6 @@
        RewriteRule ^google[a-f0-9]*.html$ index.php [L,END]
        RewriteRule ^BingSiteAuth.xml$ index.php [L,END]
 
-       RewriteCond %{HTTPS} off
-    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
-
        # Redirection to www. subdomain
        RewriteCond %{HTTP_HOST} ^fluidbook.com$
        RewriteRule ^(.*)$ https://www.fluidbook.com/$1 [R=301,L]
index dbe95a50ef9c3d83e901f476e55f6496fadeb7c9..44a1330680ce3b0dcbaca76027b1d872e071425a 100644 (file)
@@ -24,10 +24,10 @@ session.lifetime = 31536000 ;1 year
 session.adapter = cache
 
 database.adapter = pdo_mysql
-database.params.host = localhost
-database.params.username = fluidbookwebv3
-database.params.password = QsFe2wxVMW
-database.params.dbname = fluidbookwebv3
+database.params.host = fluidbook-v3-mariadb
+database.params.username = root
+database.params.password = FB8qVD7R0jqsXYNR
+database.params.dbname = fluidbook-v3
 
 seo.universalAnalytics = UA-4339912-2
 seo.google = google93c0129ef18a399d.html
@@ -65,7 +65,7 @@ webhost = elearning.fluidbook.com
 locales.en = elearning.fluidbook.com
 locales.fr = fr.elearning.fluidbook.com
 
-database.params.dbname = fluidbook_elearning
+database.params.dbname = fluidbook-v3-elearning
 
 [testing : production]
 
@@ -78,10 +78,8 @@ seo.universalAnalytics = UA-4339912-9
 
 httpauth.username = fluidbook
 httpauth.password = fb2016
-httpauth.ip_whitelist[] = 82.66.245.49
-httpauth.ip_whitelist[] = 82.216.164.184
-httpauth.ip_whitelist[] = 82.66.120.161
-httpauth.ip_whitelist[] = 78.193.201.107
+httpauth.ip_whitelist[] = 130.180.213.67
+httpauth.ip_whitelist[] = 82.64.156.165
 
 robots = false
 
@@ -90,18 +88,8 @@ webhost = dev.fluidbook.com
 locales.fr = dev.fluidbook.com
 locales.en = en.dev.fluidbook.com
 
-database.params.dbname = fluidbookwebv3_dev
-
-[local : production]
-
-dev = true
-firephp = false
-
-webhost = fluidbook.test
-locales.fr = fluidbook.test
-locales.en = en.fluidbook.test
-
+database.params.host = fluidbook-v3-dev-mariadb
 database.params.username = root
-database.params.password =
-database.params.dbname = fluidbook-website
+database.params.password = ryruth0YzzuUn7Eq
+database.params.dbname = fluidbook-v3-dev
 
index 8d2a17d8105769dfe10c7bdb380e2148854582ce..dba8a9a77f2bc73072c85bbf2118be928087c778 100644 (file)
@@ -1,87 +1,89 @@
 <?php\r
 \r
-class Fluidbook_View_Helper_ExemplePublication extends CubeIT_View_Helper_Abstract {\r
-       /**\r
-        * @return string\r
-        */\r
-       public function exemplePublication($fluidbook_id, $page) {\r
-               if(!is_numeric($page)){\r
-                       $page=2;\r
-               }\r
+class Fluidbook_View_Helper_ExemplePublication extends CubeIT_View_Helper_Abstract\r
+{\r
+    /**\r
+     * @return string\r
+     */\r
+    public function exemplePublication($fluidbook_id, $page)\r
+    {\r
+        if (!is_numeric($page)) {\r
+            $page = 2;\r
+        }\r
 \r
-               if ($page % 2 == 1) {\r
-                       $page--;\r
-               }\r
+        if ($page % 2 == 1) {\r
+            $page--;\r
+        }\r
 \r
-               $cssid = 'exemple-publication-' . $fluidbook_id . '-' . $page;\r
+        $cssid = 'exemple-publication-' . $fluidbook_id . '-' . $page;\r
 \r
-               $cssprops = array('image' => array('prop' => 'background-image', 'format' => 'url("%s")'),\r
-                                 'size' => array('prop' => 'background-size', 'format' => '%s'),\r
-                                 'position' => array('prop' => 'background-position', 'format' => '%s'),\r
-                                 'blendmode' => array('prop' => 'background-blend-mode', 'format' => '%s'),\r
-               );\r
+        $cssprops = array('image' => array('prop' => 'background-image', 'format' => 'url("%s")'),\r
+            'size' => array('prop' => 'background-size', 'format' => '%s'),\r
+            'position' => array('prop' => 'background-position', 'format' => '%s'),\r
+            'blendmode' => array('prop' => 'background-blend-mode', 'format' => '%s'),\r
+        );\r
 \r
 \r
-\r
-               $left = $this->_getPage($fluidbook_id, $page);\r
-               $right = $this->_getPage($fluidbook_id, $page + 1);\r
+        $left = $this->_getPage($fluidbook_id, $page);\r
+        $right = $this->_getPage($fluidbook_id, $page + 1);\r
 \r
         // Sometimes a page might not return a valid size (eg. Page 0 with no graphic)\r
         // If the left page doesn't work, use the right page\r
         $width = ($left['width'] == -1) ? $right['width'] : $left['width'];\r
         $height = ($left['height'] == -1) ? $right['height'] : $left['height'];\r
 \r
-               $ratio = $width / $height;\r
+        $ratio = $width / $height;\r
 \r
-               $backgrounds = array();\r
-               //              $backgrounds[] = array('image' => '/images/exemples/publications/shadow.png', 'size' => '100% 10%', 'position' => '0 95%', 'blendmode' => null);\r
-               $backgrounds[] = array('image' => $left['url'], 'size' => '50% 100%', 'position' => '1px 0', 'blendmode' => 'normal');\r
-               $backgrounds[] = array('image' => $right['url'], 'size' => '50% 100%', 'position' => '100% 0', 'blendmode' => 'normal');\r
-               $backgrounds[] = array('image' => '/images/exemples/publications/light.png', 'size' => '30% 100%', 'position' => '50% 0', 'blendmode' => 'soft-light');\r
-               $backgrounds[] = array('image' => '/images/exemples/publications/dark.png', 'size' => '20% 100%', 'position' => '50% 0', 'blendmode' => 'multiply');\r
+        $backgrounds = array();\r
+        //             $backgrounds[] = array('image' => '/images/exemples/publications/shadow.png', 'size' => '100% 10%', 'position' => '0 95%', 'blendmode' => null);\r
+        $backgrounds[] = array('image' => $left['url'], 'size' => '50% 100%', 'position' => '1px 0', 'blendmode' => 'normal');\r
+        $backgrounds[] = array('image' => $right['url'], 'size' => '50% 100%', 'position' => '100% 0', 'blendmode' => 'normal');\r
+        $backgrounds[] = array('image' => '/images/exemples/publications/light.png', 'size' => '30% 100%', 'position' => '50% 0', 'blendmode' => 'soft-light');\r
+        $backgrounds[] = array('image' => '/images/exemples/publications/dark.png', 'size' => '20% 100%', 'position' => '50% 0', 'blendmode' => 'multiply');\r
 \r
-               $backgrounds = array_reverse($backgrounds);\r
+        $backgrounds = array_reverse($backgrounds);\r
 \r
-               $res = '<style type="text/css">';\r
-               $res .= "#" . $cssid . '{';\r
-               foreach ($cssprops as $k => $cssprop) {\r
-                       $res .= $cssprop['prop'] . ':';\r
-                       $format = $cssprop['format'];\r
-                       $p = array();\r
-                       foreach ($backgrounds as $background) {\r
-                               $v = $background[$k];\r
-                               if (null !== $v) {\r
-                                       $p[] = sprintf($format, $v);\r
-                               }\r
-                       }\r
-                       $res .= implode(', ', $p);\r
-                       $res .= ';' . "\n";\r
-               }\r
+        $res = '<style type="text/css">';\r
+        $res .= "#" . $cssid . '{';\r
+        foreach ($cssprops as $k => $cssprop) {\r
+            $res .= $cssprop['prop'] . ':';\r
+            $format = $cssprop['format'];\r
+            $p = array();\r
+            foreach ($backgrounds as $background) {\r
+                $v = $background[$k];\r
+                if (null !== $v) {\r
+                    $p[] = sprintf($format, $v);\r
+                }\r
+            }\r
+            $res .= implode(', ', $p);\r
+            $res .= ';' . "\n";\r
+        }\r
 \r
-               $res .= '}';\r
-               $res .= '</style>';\r
-               $res .= $this->htmlElement($this->htmlElement('', 'div', array('class' => 'shadow')), 'div', array(\r
-                   'class' => 'exemple-fluidbook',\r
+        $res .= '}';\r
+        $res .= '</style>';\r
+        $res .= $this->htmlElement($this->htmlElement('', 'div', array('class' => 'shadow')), 'div', array(\r
+            'class' => 'exemple-fluidbook',\r
             'id' => $cssid,\r
             'data-width' => $width * 2,\r
             'data-height' => $height));\r
-               return $res;\r
-       }\r
+        return $res;\r
+    }\r
 \r
-       protected function _getPage($fluidbook_id, $page) {\r
-               $path = 'fluidbook/' . $fluidbook_id . '/';\r
-               $dir = FILES_PATH . '/' . $path;\r
-               if (!file_exists($dir)) {\r
-                       mkdir($dir, 0777, true);\r
-               }\r
+    protected function _getPage($fluidbook_id, $page)\r
+    {\r
+        $path = 'fluidbook/' . $fluidbook_id . '/';\r
+        $dir = FILES_PATH . '/' . $path;\r
+        if (!file_exists($dir)) {\r
+            mkdir($dir, 0777, true);\r
+        }\r
 \r
-               $url = '/files/' . $path . $page . '.jpg';\r
-               $file = $dir . $page . '.jpg';\r
-               if (!file_exists($file) || !filesize($file)) {\r
-                       $wsurl = 'https://workshop.fluidbook.com/services/getFluidbookPage/' . $fluidbook_id . '/' . $page;\r
-                       file_put_contents($file, file_get_contents($wsurl));\r
-               }\r
-               $size = CubeIT_Image::getDimensions($file, $width, $height);\r
-               return array('url' => $url, 'width' => $width, 'height' => $height);\r
-       }\r
+        $url = '/files/' . $path . $page . '.jpg';\r
+        $file = $dir . $page . '.jpg';\r
+        if (!file_exists($file) || !filesize($file)) {\r
+            $toolbox = 'https://toolbox.fluidbook.com/services/getFluidbookPageFromWebsiteV3/' . $fluidbook_id . '/' . $page;\r
+            file_put_contents($file, file_get_contents($toolbox));\r
+        }\r
+        CubeIT_Image::getDimensions($file, $width, $height);\r
+        return array('url' => $url, 'width' => $width, 'height' => $height);\r
+    }\r
 }
\ No newline at end of file
index 5182449918849f5864d228eae04c3423a9e76d43..b441c4b75bb426096587db25b391a0c502b0cbfe 100644 (file)
 <?php\r
 \r
-class Fluidbook_View_Helper_Exemples extends CubeIT_View_Helper_Abstract {\r
-\r
-       protected $_categories;\r
-       protected $_j = 0;\r
-\r
-       /**\r
-        * @return string\r
-        */\r
-       public function exemples($category, $title, $nb) {\r
-               $this->headScript()\r
-                       ->addMasonry()\r
-                       ->addJQueryTransform()\r
-                       ->addTinysort()\r
-                       ->addDotDotDot()\r
-                       ->addScriptAndStyle('220-exemples');\r
-\r
-               $exemples = Fluidbook_Model_Reference::factory()->order('date DESC')->find();\r
-               $this->_categories = Fluidbook_Model_Reference_Category::factory()->find();\r
-\r
-               $perline = 5.0;\r
-\r
-               $featured = array();\r
-               $normal = array();\r
-               $c = 0;\r
-\r
-               $okexemples = array();\r
-\r
-               foreach ($exemples as $id => $exemple) {\r
-                       if ($category > 0 && !in_array($category, $exemple->getCategories()) && !in_array($category, $exemple->getFeaturedCategories())) {\r
-                               continue;\r
-                       }\r
-                       $okexemples[$id] = $exemple;\r
-                       $c++;\r
-               }\r
-\r
-               $c = CubeIT_Math::round($c, $perline, 'floor');\r
-               $nb = min($c, CubeIT_Math::round($nb, $perline, 'floor'));\r
-               $max_featured = floor($nb / $perline);\r
-               $normal_per_featured = $perline - 1;\r
-               $max_normal = $max_featured * $normal_per_featured;\r
-\r
-               foreach ($okexemples as $id => $exemple) {\r
-                       if (in_array($category, $exemple->getFeaturedCategories())) {\r
-                               $featured[] = $id;\r
-                       } else {\r
-                               $normal[] = $id;\r
-                       }\r
-               }\r
-\r
-               $nb_featured = count($featured);\r
-               if ($nb_featured < $max_featured) {\r
-                       for ($i = $nb_featured; $i < $max_featured; $i++) {\r
-                               $featured[] = array_shift($normal);\r
-                       }\r
-               }\r
-               $nb_featured = count($featured);\r
-\r
-               if ($nb_featured > $max_featured) {\r
-                       for ($i = $max_featured; $i < $nb_featured; $i++) {\r
-                               $normal[] = array_pop($featured);\r
-                       }\r
-               }\r
-               $nb_featured = count($featured);\r
-\r
-               $featured = array_slice($featured, 0, $max_featured);\r
-               $normal = array_slice($normal, 0, $max_normal);\r
-\r
-               $res = $this->title($title, 'h2', array('class' => 'col-2'));\r
-\r
-               $e = 0;\r
-\r
-               $publications = '';\r
-               for ($i = 0; $i < $max_featured; $i++) {\r
-                       if ($i % 2 == 0) {\r
-                               $publications .= $this->_publication($exemples[$featured[$i]], $category, 1 + $i * 7, true);\r
-                       }\r
-                       for ($j = 0; $j < $normal_per_featured; $j++) {\r
-                               $k = ($i * $normal_per_featured) + $j;\r
-                               if ($j == 2 && $i % 2 == 1) {\r
-                                       $publications .= $this->_publication($exemples[$featured[$i]], $category, 1 + $i * 7, true);\r
-                               }\r
-                               $publications .= $this->_publication($exemples[$normal[$k]], $category, ($i * 7) + $j + 2, false);\r
-                       }\r
-               }\r
-\r
-               $res .= $this->htmlElement($publications, 'div', array('class' => 'publications col-6'));\r
-               return $this->htmlElement($res, 'section', array('class' => "exemples content-wrapper grid wrap"));\r
-       }\r
-\r
-       /**\r
-        * @param $f Fluidbook_Model_Reference\r
-        * @param bool $featured\r
-        */\r
-       protected function _publication($f, $category, $i, $featured = false) {\r
-               if (null === $f) {\r
-                       return;\r
-               }\r
-\r
-               $fr = $f->unserialize('fr');\r
-               $f = $f->unserialize();\r
-\r
-               $res = '';\r
-\r
-               $res .= $this->htmlElement($f->getTitle(), 'h3');\r
-               if ($featured && !is_array($f->getText())) {\r
-\r
-                       $res .= $this->htmlElement($f->getText(), 'p', ['class' => 'feature-description']);\r
-               }\r
-\r
-               $image = CubeIT_Util_Cms::extractFile($f->getImage());\r
-\r
-\r
-               if (!$image && $f->getFluidbookId()) {\r
-                       $res .= $this->exemplePublication($f->getFluidbookId(), $f->getFluidbookPage());\r
-               } else {\r
-                       $res .= $this->htmlElement('', 'div',\r
-                               array('style' => 'background-image:url(' . $this->imageProcess()->imageProcessGetURL(\r
-                                   $image,\r
-                    $f->getTitle()\r
-                    , 1200, 1200,\r
-                    array(), 'R') . ');',\r
-                                     'class' => 'img full')\r
-                       );\r
-               }\r
-               $attrs = array('data-j' => ++$this->_j, 'data-i' => $i);\r
-               if ($featured) {\r
-                       $attrs['class'] = 'featured';\r
-               } else {\r
-                       $attrs['class'] = 'no-featured';\r
-               }\r
-\r
-               $res .= $this->_rollover($f, $category, $f->getFinalUrl());\r
-               return $this->htmlElement($res, 'article', $attrs);\r
-       }\r
-\r
-       protected function _rollover($f, $category, $url) {\r
-               $res = '';\r
-\r
-               if ($url && $url != '-') {\r
-                       $res = $this->linkTruePopupFullscreen(__('Voir le Fluidbook'), $url, array('class' => 'button', 'data-event' => array('category' => 'exemple', 'action' => 'see', 'label' => $f->getTitle())));\r
-               }\r
-               if ($category == 3) {\r
-                       $firstCat = 0;\r
-                       foreach ($f->getCategories() as $c) {\r
-                               if ($c == 3) {\r
-                                       continue;\r
-                               }\r
-                               $firstCat = $c;\r
-                               break;\r
-                       }\r
-                       if ($firstCat != 0 && isset($this->_categories[$firstCat])) {\r
-                               $cat = $this->_categories[$firstCat]->unserialize();\r
-                               $pages = CubeIT_Util_Cms::findPagesByContent('category', $cat->getId());\r
-                               shuffle($pages);\r
-\r
-                               if (count($pages) > 0) {\r
-                                       $res .= $this->link($cat->getLinklabel(), 'internal:' . $pages[0], array('class' => 'others'));\r
-                               }\r
-                       }\r
-\r
-               }\r
-               return $this->htmlElement($res, 'div', array('class' => 'more'));\r
-       }\r
+class Fluidbook_View_Helper_Exemples extends CubeIT_View_Helper_Abstract\r
+{\r
+\r
+    protected $_categories;\r
+    protected $_j = 0;\r
+\r
+    /**\r
+     * @return string\r
+     */\r
+    public function exemples($category, $title, $nb)\r
+    {\r
+        $this->headScript()\r
+            ->addMasonry()\r
+            ->addJQueryTransform()\r
+            ->addTinysort()\r
+            ->addDotDotDot()\r
+            ->addScriptAndStyle('220-exemples');\r
+\r
+        $exemples = Fluidbook_Model_Reference::factory()->order('date DESC')->find();\r
+        $this->_categories = Fluidbook_Model_Reference_Category::factory()->find();\r
+\r
+        $perline = 5.0;\r
+\r
+        $featured = array();\r
+        $normal = array();\r
+        $c = 0;\r
+\r
+        $okexemples = array();\r
+\r
+        foreach ($exemples as $id => $exemple) {\r
+            if ($category > 0 && !in_array($category, $exemple->getCategories()) && !in_array($category, $exemple->getFeaturedCategories())) {\r
+                continue;\r
+            }\r
+            $okexemples[$id] = $exemple;\r
+            $c++;\r
+        }\r
+\r
+        $c = CubeIT_Math::round($c, $perline, 'floor');\r
+        $nb = min($c, CubeIT_Math::round($nb, $perline, 'floor'));\r
+        $max_featured = floor($nb / $perline);\r
+        $normal_per_featured = $perline - 1;\r
+        $max_normal = $max_featured * $normal_per_featured;\r
+\r
+        foreach ($okexemples as $id => $exemple) {\r
+            if (in_array($category, $exemple->getFeaturedCategories())) {\r
+                $featured[] = $id;\r
+            } else {\r
+                $normal[] = $id;\r
+            }\r
+        }\r
+\r
+        $nb_featured = count($featured);\r
+        if ($nb_featured < $max_featured) {\r
+            for ($i = $nb_featured; $i < $max_featured; $i++) {\r
+                $featured[] = array_shift($normal);\r
+            }\r
+        }\r
+        $nb_featured = count($featured);\r
+\r
+        if ($nb_featured > $max_featured) {\r
+            for ($i = $max_featured; $i < $nb_featured; $i++) {\r
+                $normal[] = array_pop($featured);\r
+            }\r
+        }\r
+        $nb_featured = count($featured);\r
+\r
+        $featured = array_slice($featured, 0, $max_featured);\r
+        $normal = array_slice($normal, 0, $max_normal);\r
+\r
+        $res = $this->title($title, 'h2', array('class' => 'col-2'));\r
+\r
+        $e = 0;\r
+\r
+        $publications = '';\r
+        for ($i = 0; $i < $max_featured; $i++) {\r
+            if ($i % 2 == 0) {\r
+                $publications .= $this->_publication($exemples[$featured[$i]], $category, 1 + $i * 7, true);\r
+            }\r
+            for ($j = 0; $j < $normal_per_featured; $j++) {\r
+                $k = ($i * $normal_per_featured) + $j;\r
+                if ($j == 2 && $i % 2 == 1) {\r
+                    $publications .= $this->_publication($exemples[$featured[$i]], $category, 1 + $i * 7, true);\r
+                }\r
+                $publications .= $this->_publication($exemples[$normal[$k]], $category, ($i * 7) + $j + 2, false);\r
+            }\r
+        }\r
+\r
+        $res .= $this->htmlElement($publications, 'div', array('class' => 'publications col-6'));\r
+        return $this->htmlElement($res, 'section', array('class' => "exemples content-wrapper grid wrap"));\r
+    }\r
+\r
+    /**\r
+     * @param $f Fluidbook_Model_Reference\r
+     * @param bool $featured\r
+     */\r
+    protected function _publication($f, $category, $i, $featured = false)\r
+    {\r
+        if (null === $f) {\r
+            return;\r
+        }\r
+\r
+        $fr = $f->unserialize('fr');\r
+        $f = $f->unserialize();\r
+\r
+        $res = '';\r
+\r
+        $res .= $this->htmlElement($f->getTitle(), 'h3');\r
+        if ($featured && !is_array($f->getText())) {\r
+\r
+            $res .= $this->htmlElement($f->getText(), 'p', ['class' => 'feature-description']);\r
+        }\r
+\r
+        $image = CubeIT_Util_Cms::extractFile($f->getImage());\r
+\r
+        if (!$image && $f->getFluidbookId()) {\r
+            $res .= $this->exemplePublication($f->getFluidbookId(), $f->getFluidbookPage());\r
+        } else {\r
+            $res .= $this->htmlElement('', 'div',\r
+                array('style' => 'background-image:url(' . $this->imageProcess()->imageProcessGetURL(\r
+                        $image,\r
+                        $f->getTitle()\r
+                        , 1200, 1200,\r
+                        array(), 'R') . ');',\r
+                    'class' => 'img full')\r
+            );\r
+        }\r
+        $attrs = array('data-j' => ++$this->_j, 'data-i' => $i);\r
+        if ($featured) {\r
+            $attrs['class'] = 'featured';\r
+        } else {\r
+            $attrs['class'] = 'no-featured';\r
+        }\r
+\r
+        $res .= $this->_rollover($f, $category, $f->getFinalUrl());\r
+        return $this->htmlElement($res, 'article', $attrs);\r
+    }\r
+\r
+    protected function _rollover($f, $category, $url)\r
+    {\r
+        $res = '';\r
+\r
+        if ($url && $url != '-') {\r
+            $res = $this->linkTruePopupFullscreen(__('Voir le Fluidbook'), $url, array('class' => 'button', 'data-event' => array('category' => 'exemple', 'action' => 'see', 'label' => $f->getTitle())));\r
+        }\r
+        if ($category == 3) {\r
+            $firstCat = 0;\r
+            foreach ($f->getCategories() as $c) {\r
+                if ($c == 3) {\r
+                    continue;\r
+                }\r
+                $firstCat = $c;\r
+                break;\r
+            }\r
+            if ($firstCat != 0 && isset($this->_categories[$firstCat])) {\r
+                $cat = $this->_categories[$firstCat]->unserialize();\r
+                $pages = CubeIT_Util_Cms::findPagesByContent('category', $cat->getId());\r
+                shuffle($pages);\r
+\r
+                if (count($pages) > 0) {\r
+                    $res .= $this->link($cat->getLinklabel(), 'internal:' . $pages[0], array('class' => 'others'));\r
+                }\r
+            }\r
+\r
+        }\r
+        return $this->htmlElement($res, 'div', array('class' => 'more'));\r
+    }\r
 }
\ No newline at end of file