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 » Tue Apr 03, 2018 10:07 pm

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: 64223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Calculating distance between 2 post codes

Post by Lumpy Burgertushie » 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
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

User avatar
3Di
Registered User
Posts: 12436
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Calculating distance between 2 post codes

Post by 3Di » Wed Apr 04, 2018 8:32 pm

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....
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
david63
Jr. Extension Validator
Posts: 14055
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: Calculating distance between 2 post codes

Post by david63 » Wed Apr 04, 2018 9:01 pm

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!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

User avatar
Mick
Support Team Member
Support Team Member
Posts: 19073
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: Calculating distance between 2 post codes

Post by Mick » Thu Apr 05, 2018 8:38 am

Can we have a link to your board please?
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.
Forza Garibaldi

GypsyBoy
Registered User
Posts: 2
Joined: Tue Apr 03, 2018 3:25 pm

Re: Calculating distance between 2 post codes

Post by GypsyBoy » Mon Apr 09, 2018 9:51 am

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”

Who is online

Users browsing this forum: tojag and 5 guests