• Resolved schulz

    (@schulz)


    Branch off of “Multi site or remote database access?”.

    I was thinking further about the ‘consistent in naming’ problem you put forward when I suggested using city/region for filtering results. For these fields I thought about the possibility of allowing regular expression or at least using pipe (|) to separate the variations along with case insensitivity as a filter option. For example city=”Thunder Bay|ThunderBay|T-Bay”

    Also this could be a way around having the sub region field by listing all the cities (even though having a sub-region or separate state and region fields would be better). For example city=”Dryden|Fort Frances|Kenora|Thunder Bay” Again this is not a preferred method as there are a lot more communities than I listed in the area.

    When you do create a sub-region or separate state and region fields, allowing regular expression or at least using pipe (|) to separate the variations along with case insensitivity would be useful there too. For example city=”807 area|NWO|NWOntario”

    https://ww.wp.xz.cn/plugins/connections/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    @ schulz

    The filters, those are simple city = "name" db queries. Whether or not it is case sensitive actually depends on the db table collation character set. WordPress defaults to a case-insensitive collation character set and Connections defaults to whatever WordPress is setup to use. So contrary to my previous statement, case sensitivity may or may not be an issue. You can test the filter or look at the Connections addresses database table character set to determine which it is for you. If it does end being case sensitive, you can change the table character collation in phpMyAdmin.

    That said, I suppose, at the code query level I can force the case to be lower and force the comparison to be based on lower case. I guess that would actually give users a more consistent result. I’ll have to think about making that change.

    Now, as for using a |. That too could be implemented, but that would be an operation OR and not an optional AND. I’m thinking you would need the later, but, I am not sure.

    Thread Starter schulz

    (@schulz)

    Re: ‘Now, as for using a |’

    I would be looking for an ‘OR’ operation.

    Ex: match “Thunder Bay” OR “ThunderBay” OR “T-Bay”.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    @ schulz

    I’ve started making that changes to add support to the filters to allow filtering by more than one term. This will be included in the next update.

    Thread Starter schulz

    (@schulz)

    Cool, Thanks (that would be so awesome).

    It might be asking too much, however while you are at it could you sneak in that extra ‘region’ field in the next update (I noticed you did a DB update in the last release)?

    Also having the widgets displaying results that match the short code filter would make everything work seamless for my shared multi-site project.

    These features would also benefit so many other sites too allowing your plugin to be useful for so many other types of sites.

    Thanks again for considering my feature requests in your next update!

    Plugin Author Steven

    (@shazahm1hotmailcom)

    @ schulz

    Can you show me example addresses where the “region” is added?

    I know you are looking for the ‘Province -> Region -> City’ structure. Others in the past have asked for a “county” field. I’m guessing region == county, but I’d like research more on the proper way for it to be presented.

    Thread Starter schulz

    (@schulz)

    We actually don’t officially use it in postal addresses, here is the best way to explain how I would be using it.

    https://en.wikipedia.org/wiki/Northwestern_Ontario

    In my websites it would be a hidden field when displaying as an address, however I guess you could call it a ‘district’ field (likely be more useful to more people).

    district synonyms: neighborhood, area, region, locality, locale, community, quarter, sector, zone, territory or ward.

    If you were to have the field in an address I would guess it could go just after the city (ex: Washington, district of Columbia OR Dryden, district of Kenora). Maybe have an option for field placement in the back end.

    Thread Starter schulz

    (@schulz)

    (back from my other job)

    As for the input form, it would likely also be best just after the City field (before the province/state field). I would likely use the ‘Say What’ plugin to relabel it ‘region’.

    I would suggest it to behave just like the province field (available selection based on selected province/state as province/state available selection based on Country).

    Of course there should be somewhere in the back end for the admin to define what is going to be in the field selection.

    Thread Starter schulz

    (@schulz)

    Just touching base on how it’s going with the region/district field? My project is currently at a standstill until I know if and how you are going to implement the extra field.

    » Because this kind of deviates from the original topic, should I start a new topic (or can you split this thread in this forum)?

    Recap:

    • Because you already have a region field for province/state, as I suggested earlier that this new field should be called district.
    • Admins could use the ‘Say What’ plugin to relabel it to whatever they need it to be (unless you implement a way for admins to relabel the fields in your plugin).
    • Placement would likely be just after the City field before the province/state field. ex:
      Dryden
      Northwest
      Ontario
    • Suggesed it to work/behave just like the province field (available selection based on selected province/state just like province/state available selection based on Country).

    Again thank you for your continued work on this great plugin.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    @ schulz

    Could you join the discussion in our support forum, thanks!

    http://connections-pro.com/support/topic/make-specific-address-field-active/

    Plugin Author Steven

    (@shazahm1hotmailcom)

    @ schulz

    fyi, I have a beta version ready which includes a district field as wee as a line 4 and county fields. If you want to give it a test contact me in our support forum.

    http://connections-pro.com/support/topic/make-specific-address-field-active/

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Filter using regular expression or using more than one keyword.’ is closed to new replies.