Explorar el Código

#1 - Comments: disable browsing filters.

AntonLV hace 11 años
padre
commit
f99a80be64
Se han modificado 2 ficheros con 4 adiciones y 1 borrados
  1. 3 0
      inc/classes/BxDolCmts.php
  2. 1 1
      template/scripts/BxBaseCmts.php

+ 3 - 0
inc/classes/BxDolCmts.php

@@ -160,6 +160,7 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
     protected $_iDpMaxLevel = 0;
     protected $_iDpMaxLevel = 0;
 
 
     protected $_sBrowseType = '';
     protected $_sBrowseType = '';
+    protected $_bBrowseFilter = false;
     protected $_sBrowseFilter = '';
     protected $_sBrowseFilter = '';
     protected $_sBpSessionKeyType = '';
     protected $_sBpSessionKeyType = '';
     protected $_sBpSessionKeyFilter = '';
     protected $_sBpSessionKeyFilter = '';
@@ -190,6 +191,8 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
 
         $this->_aSystem['table_ids'] = 'sys_cmts_ids';
         $this->_aSystem['table_ids'] = 'sys_cmts_ids';
 
 
+        $this->_aSystem['is_browse_filter'] = (int)$this->_bBrowseFilter;
+
         $this->_iDpMaxLevel = (int)$this->_aSystem['number_of_levels'];
         $this->_iDpMaxLevel = (int)$this->_aSystem['number_of_levels'];
         $this->_sDisplayType = $this->_iDpMaxLevel == 0 ? BX_CMT_DISPLAY_FLAT : BX_CMT_DISPLAY_THREADED;
         $this->_sDisplayType = $this->_iDpMaxLevel == 0 ? BX_CMT_DISPLAY_FLAT : BX_CMT_DISPLAY_THREADED;
         $this->_sDpSessionKey = 'bx_' . $this->_sSystem . '_dp_';
         $this->_sDpSessionKey = 'bx_' . $this->_sSystem . '_dp_';

+ 1 - 1
template/scripts/BxBaseCmts.php

@@ -397,7 +397,7 @@ class BxBaseCmts extends BxDolCmts
         }
         }
 
 
         $sBrowseFilter = '';
         $sBrowseFilter = '';
-        $bBrowseFilter = $bBrowseType;
+        $bBrowseFilter = (int)$this->_aSystem['is_browse_filter'] == 1;
         if($bBrowseFilter) {
         if($bBrowseFilter) {
             $aFilterLinks = array(
             $aFilterLinks = array(
                 array('id' => $this->_sSystem . '-all', 'name' => $this->_sSystem . '-all', 'class' => '', 'title' => '_cmt_browse_all', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeFilter(this, \'all\');'),
                 array('id' => $this->_sSystem . '-all', 'name' => $this->_sSystem . '-all', 'class' => '', 'title' => '_cmt_browse_all', 'target' => '_self', 'onclick' => 'javascript:' . $this->_sJsObjName . '.cmtChangeFilter(this, \'all\');'),