[development] Making a whole site location aware - a design
question
Dave Cohen
drupal at dave-cohen.com
Fri Aug 18 04:00:09 UTC 2006
Consider...
Write a module which stores this data however you see fit. (Could be a table
you create that joins the users table on uid).
Then, use hook_db_rewrite_sql to filter out any nodes which have location
information which is not within the users radius. This way, your work
applies to any node with location information, not just events. And the
event (or any other) module does not have to change at all.
If you take this approach, your module is essentially a location-based access
control module. Read up on how node.module uses hook_db_rewrite_sql to
filter nodes based on the node_access table and emulate that.
-Dave
On Thursday 17 August 2006 19:39, drupal at mclewin.com wrote:
> I have a question for the masters. If you are an impatient master, jump
> over the context and to the second to last sentence for the question.
[snip]
> Hopefully that is enough context for you. Here's the question: What is an
> appropriate "well recognized location" within Drupal to keep these seven
> pieces of information? (latitide, longitude, search radius (storage in
> miles), country code, province, postal code and city.
>
> I'm looking forward to having an answer (or seven :) ) so that we can get
> closer to having patches in the patch queue.
>
> Scott
More information about the development
mailing list