• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Countries list

Countries list 13 years 6 months ago #11689

  • bwaite
  • bwaite's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
Is there any way to get United States to appear first in the country list? I tried doing it through the database, but it keeps putting them in alphabetical order. Maybe you can tell me how to recode the field so that US is the default? Thanks!
The administrator has disabled public write access.

Re:Countries list 13 years 5 months ago #11706

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 722
  • Thank you received: 59
Hello,

This can be achieved but you will need to edit the script that retrieves the contry's drop-down elements from your database. You will basically need to find the correct value ('United States') in the countries array and replace it with 'United States[c]'.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Countries list 13 years 5 months ago #11709

  • bwaite
  • bwaite's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 1
Got the code from the developer and thought I'd post it here in case anyone else can use it. Replace code in Custom Fields - Country

//<code>
$db = JFactory::getDBO();
$db->setQuery("SELECT `name` FROM #__rsmembership_countries");
$elements = $db->loadResultArray();
foreach($elements as $i => $element)
if ($element == 'United States')
$elements[$i] = 'United States[c]';
return implode("\n", $elements);
//</code>
The administrator has disabled public write access.
The following user(s) said Thank You: the-xclub

Re:Countries list 13 years 5 months ago #11711

  • issues
  • issues's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
I just want to add that I created my country list with just a dropdown and added the countries from a text file, and the order is easily chnged by how the list is arranged. EX. If you want the US as the default, just make it the first spot.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!