Numbers in a range

Permalink Browser Info Environment
I previously had version 5.6.0.0.0.5.5 installed which included the "is more than or equal to search value" within the Filter settings. Although this works generally using a range from 2-9, but when adding numbers for 10, 11 & 12, it doesn't work. I think it registers the numbers as a normal text string and then puts 10, 11 & 12 before 2. Is there any way in incorporating a number select attribute. This would sort this issue.

Also I have now upgraded to version 5.6.0.0.0.5.6.1 and some of the Filter settings have disappeared including those mentioned above ie. "is more than or equal to search value".

Please help.

Type: Discussion
Status: In Progress
Flora
View Replies:
SkyBlueSofa replied on at Permalink Reply
SkyBlueSofa
There is a number filter available that does indeed have the 'is more than or equal to'. I am working to re-add that functionality to select boxes as well.

The next version should fix your issues.
Flora replied on at Permalink Reply
Flora
Hi,

Is there any progress with this addition to the block. We are close to going LIVE with a site that uses this extensively and ideally want this functionality when we do go LIVE.

Thanks
SkyBlueSofa replied on at Permalink Reply
SkyBlueSofa
The latest version, 5.6.0.0.0.5.7 should resolve the issue you are having. The only caveat is the way that the core Select Attribute Type controller works. You will need to update it to bypass the addition of newlines in the search attribute table.

This is the code I developed to do that. It is a direct overwrite; you may want to to do something else. Update the getSearchIndexValue() method in {root}/concrete/core/models/attribute/types/select.php file around line 342:
public function getSearchIndexValue() {
      if (!in_array($this->getAttributeKey()->getAttributeKeyHandle(), array('my_attribute_to_ignore'))) {
         $str = "\n";
      }
        $list = $this->getSelectedOptions();
        foreach($list as $l) {
            $l = (is_object($l) && method_exists($l,'__toString')) ? $l->__toString() : $l;
            $str .= $l;
         if (!in_array($this->getAttributeKey()->getAttributeKeyHandle(), array('my_attribute_to_ignore'))) {
            $str .= "\n";
         }
        }
        // remove line break for empty list
        if ($str == "\n") {
            return '';


I hope this helps.

concrete5 Environment Information

# concrete5 Version
5.6.3.1

# concrete5 Packages
FlexSlider (2.2.0.5), Google Map Enchanced (1.0.7), Infinite Scroller (5.6.0.0.1), Page List+ (5.6.0.0.0.5.6.1), PHP block by ND (1.0), Social Icons Reloaded (2.0), Social Timeline (1.1).

# concrete5 Overrides
blocks/flexslider, blocks/autonav, blocks/page_list, blocks/page_list_plus, languages/sk_SK, languages/sv_SE, languages/de_DE, languages/pt_PT, languages/nb_NO, languages/es_AR, languages/fi_FI, languages/fa_IR, languages/zh_TW, languages/da_DK, languages/ja_JP, languages/cs_CZ, languages/ro_RO, languages/fr_FR, languages/tr_TR, languages/sl_SI, languages/it_IT, languages/ar, languages/es_MX, languages/zh_CN, languages/ru_RU, languages/he_IL, languages/es_ES, languages/es_PE, languages/nl_NL, languages/el_GR, languages/vi_VN, themes/gracedarling

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off

# Server Software
Apache/2.4.9 (Unix)

# Server API
cgi-fcgi

# PHP Version
5.3.28

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, ionCube Loader, json, ldap, libxml, mbstring, mcrypt, mssql, mysql, mysqli, mysqlnd, OAuth, odbc, openssl, pcntl, pcre, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, SQLite, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 64M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 64M
ldap.max_links - Unlimited
mssql.max_links - Unlimited
mssql.max_persistent - Unlimited
mssql.max_procs - Unlimited
mssql.textlimit - Server default
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH

Browser User-Agent String

Mozilla/5.0 (Windows NT 6.3; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.