Calculating distance between 2 post codes

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
GypsyBoy
Registered User
Posts: 2
Joined: Tue Apr 03, 2018 3:25 pm

Calculating distance between 2 post codes

Post by GypsyBoy »

I’m new to php and MySQL, just getting my feet dirty...

I want to add a post code entry to a member/user sql table

Then I want to add / replace a field in the forums where one can enter postcode and distance and have it display threads that match given distance ...

And finally I need to create a method / function in php that actually calculates distance between 2 post codes.

How do I go about that?.

Here’s a good one:

http://www.geopostcode.org.uk/findmynearest.php

Any thing else? Oh and I need a UK version of this as you probably guessed!
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Calculating distance between 2 post codes

Post by Lumpy Burgertushie »

this is the support board for the bulletin board software phpBB, not for php program language.
this doesn't sound like it has anything to do with the phpbb bulletin board.

try php.net


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Calculating distance between 2 post codes

Post by 3Di »

Lumpy Burgertushie wrote: Wed Apr 04, 2018 11:20 am this is the support board for the bulletin board software phpBB, not for php program language.
this doesn't sound like it has anything to do with the phpbb bulletin board.

try php.net


robert
GypsyBoy wrote: Tue Apr 03, 2018 10:07 pm I want to add / replace a field in the forums....
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
david63
Registered User
Posts: 20646
Joined: Thu Dec 19, 2002 8:08 am

Re: Calculating distance between 2 post codes

Post by david63 »

GypsyBoy wrote: Tue Apr 03, 2018 10:07 pm I need a UK version of this as you probably guessed!
To get the UK Post Code database you will have to put your hand deep into your pocket.
David
Remember: You only know what you know and - you don't know what you don't know!

I now no longer support any of my extensions but they will start to become available here
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26503
Joined: Fri Aug 29, 2008 9:49 am

Re: Calculating distance between 2 post codes

Post by Mick »

Can we have a link to your board please?
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
GypsyBoy
Registered User
Posts: 2
Joined: Tue Apr 03, 2018 3:25 pm

Re: Calculating distance between 2 post codes

Post by GypsyBoy »

Lumpy Burgertushie wrote: Wed Apr 04, 2018 11:20 am this is the support board for the bulletin board software phpBB, not for php program language.
this doesn't sound like it has anything to do with the phpbb bulletin board.

try php.net


robert
No? Let me re phrase my original message and make it more clear:




I’m new to php and MySQL, and i'm just getting my feet dirty...

Basically i am working on a message board, i need to be able to post a thread like you would do normally and also ask for post code, to be stored with the thread.

Then I want to modify search.php and create a field where you type post code of your liking and have it compared WITH thread post code and then calculate the distance  between  post code in a thread and   post code you type into search

Does that make sense? 

How do I go about that?.

Here’s a good one:

http://www.geopostcode.org.uk/findmynearest.php

Any thing else? Oh and I need a UK version of this (for now) as you probably guessed!




I think it is to do with you. For example how and where do i add a post code search field when viewing forums?
Post Reply

Return to “phpBB Custom Coding”