cyberhobo / wp-geo-mashup-search

DEPRECATED This functionality is included in Geo Mashup 1.5! No need for a separate plugin any more, you'll get an error if you try to install both.
5 stars 1 forks source link

Add a way to search on different objects or post types #7

Open w3b-beweb opened 12 years ago

w3b-beweb commented 12 years ago

Hi Dylan, actually your plugin widget allows user to make a proximity search over geo-localized posts with an optional filter by category. I know geo meshup offers a "object_name" parameter to chose which type of content must appear on a map, so I'm wondering if is it possible to add a dropdown to your widget, where a user can specify the type of content to search from. For example, I'd like to geo-localize authors or pages also and then make a proximity search over those type of content only.

Thanks

cyberhobo commented 12 years ago

I think it's possible and would make a good feature(s). Users and comments are object types that work with object_name parameter. Pages work with the map_post_type parameter, and would be a separate menu I think.

w3b-beweb commented 12 years ago

Do you think the "users mode" feature can be added to your plugin with some (relative) simple modification to the code? Or does it need more than a bunch of code lines? In the first case, can you point me in the right direction? I urgently need this feature for a site I'm workin on, so I'm ready to go deep in the code, or to pay for your time.

Let me know and thanks for your quick answer.

cyberhobo commented 12 years ago

It should be possible to do by customizing the two templates, search-form-default.php and search-result-default.php. I have no time available at the moment, sorry!

w3b-beweb commented 12 years ago

Thanks! I've finally managed to have a geo search on users. Shortly, for quick testing pourposes, I've changed your hardcoded "object_name" to 'user' in the plugin file in your filter_the_content function, and added the same parameter on the results template to show results on map and it works. Now I need to write down some seriuos line of code, adding some if-then here and there and adding a pair of options on the widget. If I'll be able to make all those things selectable by user, I'll come back to submit my patches!

cheers, Daniele.