Anish Publish time 2014-04-04 07:21

Change country / region details

Hi,

Nice to be here after a gap. Can anyone please help me change the country/region selection details. Now it shows country as China and has it's provinces. I am from India and it will be nice if I can change the region and country selection to local. Which file/code should I edit ?

vot Publish time 2014-04-04 13:55

The second method (no code changed) is easier.
Moreover, you will be able to add with easy your own country regions and cities from your AdminCP.

vot Publish time 2014-04-04 09:55

I suggests to solve this task together!
Because of this is interesting for all non-Chinese users.

I can offer two possible solutions:

1) Add the "country" field into the locations data table. Rewrite all the location code for manipulate this new field.

2) Do not rewrite any code. Just add all the countries into the locations data table as top records, and reconnect all the current Chinese records to the "China" parent record.

Dear friends, what the method do you prefer?

Anish Publish time 2014-04-04 11:36

I am in Vot. I can create the table for India and share it with all of you. A friend of mine said, the following code change will do the trick. But he has not mentioned which file or where to find it. Quoting it below<p id="residedistrictbox"><select name="resideprovince" id="resideprovince" class="ps" onchange="showdistrict('residedistrictbox', ['resideprovince', 'residecity', 'residedist', 'residecommunity'], 1, 1, 'reside')" tabindex="1"><option value="">- Country -</option><option did="1" value="Beijing city">Beijing city</option><option did="2" value="Tianjin city">Tianjin city</option><option did="3" value="Hebei Province">Hebei Province</option><option did="4" value="Shanxi Province">Shanxi Province</option><option did="5" value="Inner Mongolia Autonomous Region">Inner Mongolia Autonomous Region</option><option did="6" value="Liaoning Province">Liaoning Province</option><option did="7" value="Jilin Province">Jilin Province</option><option did="8" value="Heilongjiang Province">Heilongjiang Province</option><option did="9" value="Shanghai city">Shanghai city</option><option did="10" value="Jiangsu Province">Jiangsu Province</option><option did="11" value="Zhejiang Province">Zhejiang Province</option><option did="12" value="Anhui Province">Anhui Province</option><option did="13" value="Fujian Province">Fujian Province</option><option did="14" value="Jiangxi Province">Jiangxi Province</option><option did="15" value="Shandong Province">Shandong Province</option><option did="16" value="Henan Province">Henan Province</option><option did="17" value="Hubei Province">Hubei Province</option><option did="18" value="Hunan Province">Hunan Province</option><option did="19" value="Guangdong Province">Guangdong Province</option><option did="20" value="Guangxi Zhuang Autonomous Region">Guangxi Zhuang Autonomous Region</option><option did="21" value="Hainan Province">Hainan Province</option><option did="22" value="Chongqing">Chongqing</option><option did="23" value="Sichuan Province">Sichuan Province</option><option did="24" value="Guizhou Province">Guizhou Province</option><option did="25" value="Yunnan Province">Yunnan Province</option><option did="26" value="Tibet Autonomous Region">Tibet Autonomous Region</option><option did="27" value="Shaanxi Province">Shaanxi Province</option><option did="28" value="Gansu Province">Gansu Province</option><option did="29" value="Qinghai Province">Qinghai Province</option><option did="30" value="Ningxia Hui Autonomous Region">Ningxia Hui Autonomous Region</option><option did="31" value="Xinjiang Uygur Autonomous Region">Xinjiang Uygur Autonomous Region</option><option did="32" value="Taiwan Province">Taiwan Province</option><option did="33" value="Hong Kong SAR">Hong Kong SAR</option><option did="34" value="Macao Special Administrative Region">Macao Special Administrative Region</option><option did="35" value="Foreign Countries">Foreign Countries</option><option did="36" value="Other">Other</option></select></p><div class="rq mtn" id="showerror_residecity"></div><p class="d"></p></td>Please suggest which method is easier of two.

Anish Publish time 2014-04-06 14:48

Ok and also how to share the info here.

vot Publish time 2014-04-23 11:40

Many years I was working with this problem, but still can not finish...
Some days ago I decided to continue this job, and verified all that was made before.
Now I'm publishing a patch for your Location Database.
This patch will add ALL the countries, and ALL the country SUBDIVISIONS (states, regions, provinces, etc.).

How to use it:

1) PREREQUISITES:
You MUST have already imported the district files from the /install/data/ folder:
common_district_1.sql
common_district_2.sql
common_district_3.sql

2) Import the common_district_4.sql for setup all the countries

3) Import the common_district_5.sql for setup all the country subdivisions

4) Go to AdminCP -> Global -> Regions, and enjoy :)

P.S.
The job is not finished yet!
You can help with this job too!
Just verify the data, correct mistakes, add new deeper subdivisions and publish your job here.

Attention: for this stage we are working with ENGLISH version only!!!

The patch files attached.



vot Publish time 2015-05-23 19:27

Pme wrote: How to import?
Use phpMyAdmin or a shell interface to MySQL.

Pme Publish time 2015-05-23 23:32

Okey ı will try

kaaleth Publish time 2015-05-24 02:14

@vot

Is this packgate in your post older or newer then now (the latest discuz rev)?

vot Publish time 2015-05-24 14:00

The current Discuz!ML repository contain the latest country/region data.
No need to upload any files from this thread.
Pages: [1] 2
View full version: Change country / region details