Closed (fixed)
Project:
Notifications
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2009 at 00:41 UTC
Updated:
24 Apr 2009 at 15:54 UTC
This is a plug-in for the notifications framework that notifies users of location-enabled content that is geographically near.
Make sure permissions are enabled for "subscribe to locations" and "set own user location".
A block is also included that provides a compact signup by zip code. Note if anonymous users are allowed to use this block, user accounts are automatically created, so make sure this is what you want.
### TODO ###
- Currently a per-subscription distance field is stored in the database, but it needs a UI. Right now it's hard-coded to 100 km. This is tricky because notifications_user_form() doesn't yet handle multiple fields.
You can see a demo here:
http://thefuelfilm.com/
| Comment | File | Size | Author |
|---|---|---|---|
| notifications_location.tar_.gz | 3.39 KB | grendzy |
Comments
Comment #1
jose reyero commentedLooks really interesting. I'll see about fixing that field issues and adding this to the pack.
Also the automatic subscription part doesn't really belong here so I'll see how this can fit with the whole framework.
Comment #2
giorgio79 commentedsubs
Comment #3
grendzy commentedHi Jose,
Yeah I agree the block is kind of special purpose, and maybe out of place in the main module (I put hook_block in a separate file so it's easy to remove).
I've also got a bit of feedback on the code from jhedstrom, so if I get a chance to implement his suggestions I'll post an update.
Thanks!
Comment #4
a_c_m commentedthis does look interesting! subscribe
Comment #5
jusyjim commentedThis is very nice!! Does it only work with 6.x version? If so, are there plans to port to 5?
Thanks.
Comment #6
jose reyero commentedI hope this will eventually get into Notifications 6.x. Not for 5.x (just bug fixes for that one).
Comment #7
grendzy commentedHi Jose,
I've incorporated some feedback I got from a code review, and also started updating it for the 1.2-BETA1 API changes. The block code has been removed, since that was somewhat site-specific.
I'm a little confused by the new releases – what's the difference between 1.2-BETA1 and 2.0-BETA1? Which one should I be targeting?
For now, the code is in the sandbox:
http://cvs.drupal.org/viewvc.py/drupal/contributions/sandbox/grendzy/not...
Once I get things working under BETA1, I think I'll post in the location and mapping group to see if we can attract some reviews.
I'm really excited by the progress on Notifications, nice work!
Comment #8
jose reyero commentedWith the 1.x-beta I screwed up, I didn't know it would show as the stable release, so I've asked for that one to be deleted.
The new development and good new betas are in the 2.x branch.
Your module looks absolutely great and I'd really like to make it available. However I'm already a bit concerned about the size of this Notifications package and also I'd like to roll out a new stable version ASAP, so I think it would make a lot of sense creating a new contrib module for it, so I can link it from the project page and instead of being hidden here on this issue tracker people can see it and try.
What do you think?
Lots of people are gonna love it :-)
Comment #9
grendzy commentedI think that's a fine idea. I certainly wouldn't want this to hold up a 2.0 release of notifications.
A couple of other questions... What do you think of the feasibility of #437294: API: support for multi-field subscriptions ? I'm trying to decide if it's better to write a UI for setting the distance, or if it's better to work on the multi-field capability.
Another thought.... is it possible that notifications_views makes this module obsolete? Since views can query by location. (I haven't tried this yet). Does notifications_views allow views arguments to be part of the subscription?
Anyway, the contrib project is located at http://drupal.org/project/notifications_location
Thanks!
Comment #10
jose reyero commentedAbout the field subscriptions I've replied there. You just need to define a few callbacks for the fields.
About notifications_views, no way. That module currently just works for displaying some fields into views, but not for defining subscriptions nor handling them.
I'm closing this one, we'll follow up on the new module. Let me know if you need anything for that one.
Great!
Comment #11
likewhoa commentedsubscribed
Comment #12
joncup commentedWhat is the possibility of having multiple locations set for a user?
Comment #13
grendzy commentedYou can do this by allowing multiple user locations. Under /admin/user/settings -> User Locations -> Number of locations. I haven't tested multiple locations extensively, but it should work.
FYI, this module has it's own project page now, please post future support requests in http://drupal.org/project/notifications_location
Thanks!