#1  
Old 01-08-2008, 02:29 AM
Raymond Benc's Avatar
Raymond Benc Raymond Benc is offline
phpFoX Developer
 
Join Date: Aug 2005
Posts: 3,860
Thanks: 77
Thanked 1,160 Times in 309 Posts
Feedback Score: (3)
Raymond Benc has disabled reputation
Default [1.6+] U.S States/ZIP mode for other countries

For those that want to get the "U.S. States/ZIP mode" to work with other countries you can try this mod.

Files Modified
Code:
Content visible to registered users only.
Steps to Install

(Note: I used Sweden as an example, just change Sweden if you plan to use another country)

1) Backup the 2 files mentioned earlier.

2) Download and Unzip the ZIP attached with this thread.

3) Upload both folders (design & site) to your sites root directory. Note these 2 files will be part of any future version for v1.6. For now make sure to overwrite the original versions of these files.

4) Log into your Admin CP and click on "OPTION MANAGER"

5) Search for "Sweden" (without quotes)

6) To your left you should find the "Varid". By default Sweden's varid is "194".

7) Click on "EDIT OPTIONS" and select "USER SETTING". You will then find the setting "U.S. Language varid". Add the varid you just recently picked up, which in this case was 194.

8) Click on "PHRASE MANAGER" and at the bottom of that page click on "Add New Phrase". For the "Module" select "Mod_Language". For the "Varname" add "Sweden" (without quotes) and for the "Text" add "Sweden" (without quotes) as well. After you have added the new phrase it will mention the new "Variable", which in this case was "Mod_Language.sweden". Remember that for the next step.

9) Open the file: include/classes/App.class.php and look for:
Code:
Content visible to registered users only.
Replace that with the new phrase from Step 8:
Code:
Content visible to registered users only.
That should be it. Your site should now have the "U.S. State/ZIP mode" working with other countries.

If you are able to get this working or run into any problems let me know.
Attached Files
File Type: zip mod.zip (4.2 KB, 71 views)
__________________
Regards,
Raymond Benc (phpFoX Developer)
/**
*
@ Blog | Twitter | My Mods
*/
  #2  
Old 01-08-2008, 06:25 AM
cobra12512's Avatar
cobra12512 cobra12512 is offline
phpFox Fanatic
 
Join Date: Nov 2006
Posts: 2,248
Thanks: 147
Thanked 153 Times in 106 Posts
Feedback Score: (1)
cobra12512 is on a distinguished road
Default Natio

What if you wanted multiple countries with there own states...
  #3  
Old 01-09-2008, 12:55 AM
Raymond Benc's Avatar
Raymond Benc Raymond Benc is offline
phpFoX Developer
 
Join Date: Aug 2005
Posts: 3,860
Thanks: 77
Thanked 1,160 Times in 309 Posts
Feedback Score: (3)
Raymond Benc has disabled reputation
Default

Currently with the default system it only works with the U.S. and this tweaks it to work with other countries, however having more then one will not work. One method to get that working is to try to add custom fields direct from your Admin CP.
__________________
Regards,
Raymond Benc (phpFoX Developer)
/**
*
@ Blog | Twitter | My Mods
*/
  #4  
Old 01-09-2008, 10:04 AM
phpfox_001 phpfox_001 is offline
phpFox Fanatic
 
Join Date: Jul 2006
Posts: 649
Thanks: 7
Thanked 7 Times in 7 Posts
Feedback Score: (0)
phpfox_001 is on a distinguished road
Default

how can i work it with canadian zip codes?
i have the database of the zipcodes...

the whole point of using it its to display people from their same area.. when they browse ppl close to them should aprear first ..then further based on distance
__________________
-Professional Webdesigning at Lowest Cost
-Professional Website Builder at budget Price
-Logo, Graphics Desgning

-Any type of works for ur site, more.




BEST POWERFUL DEDICATED WEBHOSTING FOR PHPFOX I've USED FTC NETWORKCLICK HERE
  #5  
Old 01-10-2008, 04:36 PM
Cliffkatt Cliffkatt is offline
phpFoX Guru
 
Join Date: Dec 2007
Posts: 263
Thanks: 50
Thanked 21 Times in 11 Posts
Feedback Score: (0)
Cliffkatt is on a distinguished road
Default

thanks natio

Last edited by Cliffkatt : 01-14-2008 at 07:52 PM.
  #6  
Old 01-15-2008, 06:32 PM
lukeskywilliams lukeskywilliams is offline
phpFox Junior Guru
 
Join Date: Nov 2006
Posts: 109
Thanks: 0
Thanked 2 Times in 2 Posts
Feedback Score: (1)
lukeskywilliams is on a distinguished road
Default rc4

I'm using phpfox rc4 and cant find U.S. Language varid could you tell me where to put the Var ID in the database please.

Thankyou

Luke Williams
  #7  
Old 01-21-2008, 07:38 PM
Cliffkatt Cliffkatt is offline
phpFoX Guru
 
Join Date: Dec 2007
Posts: 263
Thanks: 50
Thanked 21 Times in 11 Posts
Feedback Score: (0)
Cliffkatt is on a distinguished road
Default

if you have done this for buil 18 and are going to build 19 you will not have to change the varid agin in the admin panel option
but will need to change this again it in about line 1818

9) Open the file: include/classes/App.class.php and look for:
Code:
Content visible to registered users only.
Replace that with the new phrase from Step 8:

Code:
Content visible to registered users only.
  #8  
Old 03-27-2008, 07:48 PM
Investor1's Avatar
Investor1 Investor1 is offline
phpFoX Wannabe
 
Join Date: Jan 2008
Location: Land of the VIKING's :-)
Posts: 38
Thanks: 5
Thanked 1 Time in 1 Post
Feedback Score: (0)
Investor1 is on a distinguished road
Send a message via MSN to Investor1
Default

How can i remove the stats.. dont need it here in Norway :-p

Kent
  #9  
Old 11-18-2008, 11:38 PM
Lordhelmchen Lordhelmchen is offline
phpFox NewBie
 
Join Date: Oct 2008
Posts: 26
Thanks: 13
Thanked 2 Times in 2 Posts
Feedback Score: (1)
Lordhelmchen is on a distinguished road
Default

works fine for me ...all in german but one thing what about the postalcodes ...i have a sql database with all postalcodes from germany .... are thery a
way to intrgreat this .... so that you have a corekt result if you use geomap and anything else.

I mean ... in the phpfox version are the us postalcodes includet is this right?
Then i hope are a chance to change the usa postalcodes with the german ?
If thery away let me know,

thank you for this mod it work without problems.
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 07:01 PM.