Welcome to Geeklog Friday, May 24 2013 @ 10:20 PM EDT
|
||||||||
![]() |
Forum Index > Support > General Geeklog Support |
New Topic
|
Post Reply
|
States to Province Zipcode to Postal Code |
|||
| kerrygarvey |
|
||||||
![]() ![]() ![]() ![]() ![]() Newbie Status: offline ![]() Registered: 04/09/02 Posts: 6 |
I want to customize my geeklog for Canadian jurisdictions, and as I look through the code I found in /sql/mysql_tableanddata.php various tables that use state and zip including 'events' , 'eventsubmission' and 'personal_events'. Can I search and replace the entire code to change state to province and zip to postal_code before I install geeklog on my site?
In Search of Inteligent Light Art, Music, and events in Georgian Bay Ontario |
||||||
|
|||||||
| Dirk |
|
||||||
![]() ![]() ![]() ![]() ![]() Admin ![]() Status: offline ![]() Registered: 01/12/02 Posts: 13027 |
I assume you are referring to the names of the US states in config.php (or config.default)? As far as I can see, there are no state names and ZIP codes in (only the names of the time zones). Anyway, the state names are only used in the Calendar and you can easily replace them with a list of the Canadian provinces. To replace the word "state" with "province" etc., you have to change that in language/english.php. You can make both changes after you have installed Geeklog. bye, Dirk |
||||||
|
|||||||
| Anonymous: Anonymous |
|
||||||
|
|
thanks Dirk
Yes I can see where a replace of state with province in all files would have got me in trouble -- the word state is used in reference to session as well. good to know that now. Further snooping in the code shows this reference to US States in an array in /system/install_templates/config.tpl aprox lines 226 227 where the two letter abreviations of states and their full names appear. However it is commented like this /$_CONF['default_state_cde'] = 'IA'; // NOT IMPLEMENTED $_STATES = array( '--'=>'', 'AL'=>'Alabama', So I presume this array isnt used or should I replace this as well? |
||||||
|
|||||||
| amckay |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 03/23/02 Posts: 180 |
But the input seems to limit you to 5 characters, and canadian postal codes are 7. BTW, a limit of 5 characters does not even allow you to enter the new extended US zip codes (which are about 7 or 8 chars)
Also, will it allow the input of letter? Canadian postal code are of the form "LNL NLN" (N=number, L=Letter) |
||||||
|
|||||||
| Dirk |
|
||||||
![]() ![]() ![]() ![]() ![]() Admin ![]() Status: offline ![]() Registered: 01/12/02 Posts: 13027 |
Look closer. Only the line containing _CONF['default_state_code'] is commented out. The following array is in fact what you'll see in a popup in the calendar. So this is the place where to put the Canadian provinces. bye, Dirk |
||||||
|
|||||||
| Dirk |
|
||||||
![]() ![]() ![]() ![]() ![]() Admin ![]() Status: offline ![]() Registered: 01/12/02 Posts: 13027 |
That is a problem, since zip codes are restricted to 5 characters in the database. You could probably change that in mysql_tableanddata.php but I have no idea what effects that might cause in other places ... To enter more than five characters for the zip codes in the calendar, these are the files to modify: bye, Dirk |
||||||
|
|||||||
| kerrygarvey |
|
||||||
![]() ![]() ![]() ![]() ![]() Newbie Status: offline ![]() Registered: 04/09/02 Posts: 6 |
'AB'=>'Alberta',
'BC'=>'British Columbia', 'MB'=>'Manitoba', 'NB'=>'New Brunswick', 'NL'=>'Newfoundland and Labrador', 'NT'=>'Northwest Territories', 'NS'=>'Nova Scotia', 'NU'=>'Nunavut', 'ON'=>'Ontario', 'PE'=>'Prince Edward Island', 'QC'=>'Québec', 'SA'=>'Saskatchewan', 'YU'=>'Yukon' ----- In Search of Inteligent Light Art, Music, and events in Georgian Bay Ontario In Search of Inteligent Light Art, Music, and events in Georgian Bay Ontario |
||||||
|
|||||||
| amckay |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 03/23/02 Posts: 180 |
Given that this doesnt even cover US zip codes (new extended zip codes which have been out for 5 or 6 years now are 12345-234 or something like that), don't you think this should be changed in CVS?
cheers, -Alan |
||||||
|
|||||||
| amckay |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member Status: offline ![]() Registered: 03/23/02 Posts: 180 |
Not sure what happened to my first reply, but anyway this is wrong. Newfoundland is NF, Saskatchewan is SK and Yukon is YT. Though NL is being considered for NF since the name change of the province, but that is not yet finalized.
Verify with Government of Canada |
||||||
|
|||||||
| Dirk |
|
||||||
![]() ![]() ![]() ![]() ![]() Admin ![]() Status: offline ![]() Registered: 01/12/02 Posts: 13027 |
Please submit this as a bug (use the "Submit a Bug" link from the menu above). bye, Dirk |
||||||
|
|||||||
| Content generated in: 3.88 seconds |
|
|
|