How to sort countries list

In Dolphin 7.2 countries list is already alphabetically sorted, so the order you set in the predefined values doesn't matter. It is made this way to have countries to be alphabetically sorted in different languages.

If your site has one language installed and you want some special order for the countries then change the following line in templates/base/scripts/BxBaseConfig.php file:

    var $bForceSortCountries = false;

After this modification you can set your own order for the countries list in Admin Panel > Builders > Predefined Values > Country

Rules → http://www.boonex.com/terms
Quote · 28 Sep 2015

Many thanks!

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 28 Sep 2015

Can the countries list be replaced with cities? 

Umar Haroon
Quote · 28 Sep 2015

 joining the question 

Can the countries list be replaced with cities? 

 

Always remember that the future comes one day at a time.
Quote · 28 Sep 2015

it can be, but it will not work. There are too many cities to manage them in predefined values and many other complications. It's better to use some geo-database or geo-service for this. There are some 3rd-party mods for this in the market.

Can the countries list be replaced with cities?

 

Rules → http://www.boonex.com/terms
Quote · 28 Sep 2015

Hi Alex,

I've tried to do this, moving United States up a few lines as a test, after making the change in the BxBaseConfig file. I then "Save" the Predefined" List, and the US is still in the place it originated, presumably in alphabetical order.

What do I do now? My installation is Boonex 7.2.1, just recently updated.

Thanks for your help,

CHOPS

Quote · 27 Oct 2015

 

it can be, but it will not work. There are too many cities to manage them in predefined values and many other complications. It's better to use some geo-database or geo-service for this. There are some 3rd-party mods for this in the market.

Can the countries list be replaced with cities?

 And how it can be implemented? What is this module?

 

Quote · 27 Oct 2015

Spam content removed - HL

Quote · 28 Oct 2015

I couldn't find any modules to help with this. It would be fantastic to have US as the default country. Can anyone help? for dolphin 7.2.1

 

Thanks - CHOPS

Quote · 29 Oct 2015

Correct me if I'm wrong, but I thought the default country was selected by inserting your country code in:

 

Admin/Advanced Settings/Default Country.

 

I entered AU for Australia and it worked for me. Just enter US and try that. Don't forget to clear the cache and refresh your browser.

Quote · 22 Jan 2016

 

I couldn't find any modules to help with this. It would be fantastic to have US as the default country. Can anyone help? for dolphin 7.2.1

 

Thanks - CHOPS

 

The short of your inquire:  READ  or REREAD and try suggestion above.  In it grasshopper you will find the answer you seek.

 

Quote · 2 Mar 2016

LOL 8) 

 

 

I couldn't find any modules to help with this. It would be fantastic to have US as the default country. Can anyone help? for dolphin 7.2.1

 

Thanks - CHOPS

 

The short of your inquire:  READ  or REREAD and try suggestion above.  In it grasshopper you will find the answer you seek.

 

 

Quote · 5 Feb 2017

wiiie, i've been trying to find a solution for this, problem solved, THX AlexT!!

 

In Dolphin 7.2 countries list is already alphabetically sorted, so the order you set in the predefined values doesn't matter. It is made this way to have countries to be alphabetically sorted in different languages.

If your site has one language installed and you want some special order for the countries then change the following line in templates/base/scripts/BxBaseConfig.php file:

    var $bForceSortCountries = false;

After this modification you can set your own order for the countries list in Admin Panel > Builders > Predefined Values > Country

 

Quote · 5 Feb 2017

OK.... all my site needs is one country. It is a localized site. So having to go through a huge list of the countries in every part of the site is ridiculous. I went into Predefined Values and tried to move the US to the top spot, and using the arrows does nothing. Then I applied the fix by AlexT, tried again with no success. Through the Admin panel, the Predefined List does no deletions, or reordering of the values. I am running 7.4.2

 

Is it just easier to edit the table in MySQL?

Even Monkeys and Retards get it right with repitition! - Author Unknown
Quote · 12 Jul 2022

Hello 

You'd better to set the default value of this field like "US" and hide it from the join, edit and search areas.

Quote · 15 Jul 2022
 
 
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.