I'm using Gmap, Views, Location, and Event modules on a real estate auction site. "map/node" creates a great map of all of the nodes on the site that have locations, but I want just the upcoming event(auction) nodes, not the past auctions to be displayed. I realize with Views I can create a map with a filter that shows only upcoming events, but it's cumbersome, and I can't get the effect I want. Is there an easier way that I'm missing?

Any help would be appreciated. Thanks.

Comments

znation’s picture

The way I would do it would be to modify the function gmap_location_node_page() in gmap_location.module and change the SQL query to use an inner join on the {event} table. Then add a WHERE clause to your SQL query for (event_start >= UNIX_TIMESTAMP()) or something to that effect. That will limit the nodes displayed to those that (a) exist in the event table, and (b) have an event start of now or sometime in the future.

If this was a little bit over your head, I can go into more detail, if you like. I can probably modify the appropriate line of code for you, but I can't guarantee success.

pcmeissner’s picture

I think I'll stick to Views. I was able to use CSS to style it to hide the coordinates. Thanks for the gracious help. Your solution seems a little over my head.

znation’s picture

Sure, no problem. Views is definitely easier, so if you can get the effect you want with CSS, go ahead and do that.