Posted on: 04/14/02 07:19pm
By: Anonymous (kerrygarvey)
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?
Only used in Calendar
Posted on: 04/15/02 05:03am
By: Dirk
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
states and province
Posted on: 04/15/02 06:54am
By: 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?
Only used in Calendar
Posted on: 04/15/02 07:25am
By: amckay
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)
states and province
Posted on: 04/15/02 08:06am
By: Dirk
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
Length of zip codes
Posted on: 04/15/02 08:17am
By: Dirk
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:
layout/YourTheme/admin/event/eventeditor.thtml
layout/YourTheme/calendar/editpersonalevent.thtml
Search for "zip" and you'll find it.
bye, Dirk
provinces and territories list
Posted on: 04/16/02 09:06am
By: Anonymous (kerrygarvey)
'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
hmmmm
Posted on: 04/18/02 08:03pm
By: amckay
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
provinces and territories list
Posted on: 04/18/02 08:06pm
By: amckay
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[*1]
Submit as a bug
Posted on: 04/19/02 02:17am
By: Dirk
Please submit this as a bug (use the "Submit a Bug" link from the menu above).
bye, Dirk