Topics

User Functions

Events

There are no upcoming events

What's New

Stories

1 new Stories in the last 2 weeks

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

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
 04/14/02 07:19PM (Read 1276 times)  
+----
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
 
Profile Email Website
 Quote
Dirk
 04/15/02 05:03AM  
AAAAA
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


 
Profile Email Website
 Quote
Anonymous: Anonymous
 04/15/02 06:54AM  



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?

 
 Quote
amckay
 04/15/02 07:25AM  
+++++
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)


 
Profile Email Website
 Quote
Dirk
 04/15/02 08:06AM  
AAAAA
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


 
Profile Email Website
 Quote
Dirk
 04/15/02 08:17AM  
AAAAA
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:
layout/YourTheme/admin/event/eventeditor.thtml
layout/YourTheme/calendar/editpersonalevent.thtml

Search for "zip" and you'll find it.

bye, Dirk


 
Profile Email Website
 Quote
kerrygarvey
 04/16/02 09:06AM  
+----
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
 
Profile Email Website
 Quote
amckay
 04/18/02 08:03PM  
+++++
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

 
Profile Email Website
 Quote
amckay
 04/18/02 08:06PM  
+++++
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

 
Profile Email Website
 Quote
Dirk
 04/19/02 02:17AM  
AAAAA
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


 
Profile Email Website
 Quote
Content generated in: 3.88 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content