Country Listing Not listing correctly

I have set the Country listing to have Canada and USA at the TOP but when you do any input areas where you need the country it still lists them in alphabetical order......

 

any help appreciated

Quote · 23 May 2014

Its a good idea...

Csampson
Quote · 25 May 2014

That will not be easy to take care of, and i do not consider it incorrect. The list is sorted alphabetically in code. It does not go by what order you put them in in the database. There will be plenty of people that will argue that alphabetical order is how they should be listed.

If you want to change it you will have to locate the sort in code in every module that uses the list, which is quite a few files and remove the sorting.

https://www.deanbassett.com
Quote · 25 May 2014

The order is set by the Order number in the sys_pre_values table in the database. So the craziest way to do this is to remove the Country list from that table and re-import the list with an updated order number for each or select countries. You'll find the query to re-populate that table in /install/sql/v71.sql around line 1859.

 

Have "fun".

 

Edit: And I found this out the hard way because the order feature in the predefined values editor doesn't work.

 

New Edit: See Deano's post.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 25 May 2014

 

The order is set by the Order number in the sys_pre_values table in the database. So the craziest way to do this is to remove the Country list from that table and re-import the list with an updated order number for each or select countries. You'll find the query to re-populate that table in /install/sql/v71.sql around line 1859.

 

Have "fun".


Sorry. But not everywhere. Examples.

In modules\boonex\ads\classes\BxAdsModule.php

        $aCountries = $oProfileFields->convertValues4Input('#!Country');
        asort($aCountries);

The asort sorts the country pre defined list alphabetically.

This code is also in the following additional files.

modules\boonex\events\classes\BxEventsFormAdd.php
modules\boonex\events\classes\BxEventsFormSearch.php
modules\boonex\groups\classes\BxGroupsFormAdd.php
modules\boonex\store\classes\BxStoreFormAdd.php

It will also exist in pretty much all Add forms of any clone of the Groups module.

https://www.deanbassett.com
Quote · 25 May 2014

Bah - I only checked the country list in the profile field. Sorry for the incomplete information.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 25 May 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.