CompanyDirectory module - Regex in parameter name=

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
chips
Forum Members
Forum Members
Posts: 12
Joined: Mon Feb 20, 2017 11:58 pm

CompanyDirectory module - Regex in parameter name=

Post by chips »

Hi. I'm running CMS Made Simple 2.1.6. PHP version is 5.5.38 I am running CompanyDirectory module v1.23.3 / CGExtension v1.53.17 / CGSimpleSmarty v2.1.6 / CGSmartImage v1.21.5 / JQueryTools v1.3.9

I am trying to make use of the CompanyDirectory optional parameter name="" as discussed in the module help:

(optional) name="" - Applicable only to the default (summary) action. this parameter allows filtering companies by their name. Wildcard characters are allowed. i.e: name="a*". Additionally, regular expressions can be specified by prefixing the value with ::. i.e: name="::[0-9].*"

I am able to make name="a*" work but I am unable to make use of regular expression such as name="::[a-b].*" to signify company names starting with "a" or "b".

Could you point me to the right direction as to how the regular expression is used in this parameter. Thanks very much.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: CompanyDirectory module - Regex in parameter name=

Post by Rolf »

There is a new release available in the Forge
http://dev.cmsmadesimple.org/project/files/250
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
chips
Forum Members
Forum Members
Posts: 12
Joined: Mon Feb 20, 2017 11:58 pm

Re: CompanyDirectory module - Regex in parameter name=

Post by chips »

Hi Rolf. Thanks very much for the regex filter bug fix in the most recent release.

Some questions from a newbie, though, before I could test it. My CMS module manager admin panel is still showing version 1.23.3 and not the new version 1.23.4 How do I upgrade the CompanyDirectory module without affecting the data that is already in the module? I have already exported the data to csv just in case something goes wrong. I do not know if that is enough. Thanks for any input.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: CompanyDirectory module - Regex in parameter name=

Post by Rolf »

It takes a while for the new release appears in the module manager, max. 24 hours.
You can download the XML from the Forge with right mouse click, save as...
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
chips
Forum Members
Forum Members
Posts: 12
Joined: Mon Feb 20, 2017 11:58 pm

Re: CompanyDirectory module - Regex in parameter name=

Post by chips »

Your bug fix was just great .... was able to make it work with

Code: Select all

{CompanyDirectory action="default" sortby="company_name" sortorder="asc" summarytemplate="mytemplate" name="::^[b-d].*"} 
to be able to display all company names starting with letter b,c or d.

Hats off to you .... how do i mark this as solved?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: CompanyDirectory module - Regex in parameter name=

Post by Rolf »

I didn't fix it, Calguy1000 did! I am just the messenger ;)

You can a accept a post as best answer (green check), the thread will be marked solved.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Locked

Return to “Modules/Add-Ons”