Please select To the mobile version | Continue to access the desktop computer version
| |
| | |


 Forgot password?
View: 5323|Reply: 12
Collapse the left

Change country / region details

[Copy link]


Post time: 2014-4-4 07:21
| Show all posts |Read mode

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 ?


Post time: 2014-4-4 13:55
| Show all posts
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.


Post time: 2014-4-4 09:55
| Show all posts
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?


see the post down...please add it to the repo..will be really helpful...  Post time 2014-4-8 05:20


 Author| Post time: 2014-4-4 11:36
| Show all posts
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
  1. <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>
Copy the Code
Please suggest which method is easier of two.


 Author| Post time: 2014-4-6 14:48
| Show all posts
Ok and also how to share the info here.


Post time: 2014-4-23 11:40
| Show all posts
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:

You MUST have already imported the district files from the /install/data/ folder:

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

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.

This post contains more resources

You have to Login for download or view attachment(s). No Account? Register



How to import?  Post time 2015-5-23 17:43


Post time: 2015-5-23 19:27
| Show all posts
Pme wrote: How to import?
Use phpMyAdmin or a shell interface to MySQL.


Post time: 2015-5-23 23:32 From the mobile phone
| Show all posts
Okey ı will try
Post time: 2015-5-24 02:14
| Show all posts

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


Post time: 2015-5-24 14:00
| Show all posts
The current Discuz!ML repository contain the latest country/region data.
No need to upload any files from this thread.
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub  

2019-1-22 20:02 GMT+3 , Processed in 0.168798 sec., 18 queries .

Powered by Discuz! X3.4

Release 20170801, © 2001-2019 Comsenz Inc.

MultiLingual version, Rev. 710, © 2009-2019

Quick Reply To Top Return to the list