Geolocated blogging
Geolocated blogging
Hi all,
I just started using s9y and I would firstly like to complement the developers on a nice piece of software! Templating, localization and plugin works great.
I came across this post (http://postneo.com/icbm/) on geoblogging. It describes how to include geo tags (latitude/longitude) to your blog. I hacked it into s9y, look for the "location" link:
http://www.kovacevic.nl/blog/archives/1 ... gging.html
Furthermore, it is also outputted in the rss feed. I feed it into worldkit (http://brainoff.com/worldkit/doc/) which renders it:
http://www.kovacevic.nl/worldkit/
I am not sure if this can be made into a plugin, any advice would be appreciated. Also, if you would like to have the code, please drop me a line.
Regards,
Zoran
I just started using s9y and I would firstly like to complement the developers on a nice piece of software! Templating, localization and plugin works great.
I came across this post (http://postneo.com/icbm/) on geoblogging. It describes how to include geo tags (latitude/longitude) to your blog. I hacked it into s9y, look for the "location" link:
http://www.kovacevic.nl/blog/archives/1 ... gging.html
Furthermore, it is also outputted in the rss feed. I feed it into worldkit (http://brainoff.com/worldkit/doc/) which renders it:
http://www.kovacevic.nl/worldkit/
I am not sure if this can be made into a plugin, any advice would be appreciated. Also, if you would like to have the code, please drop me a line.
Regards,
Zoran
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Geolocated blogging
First off, thanks for your compliments and looking into all of this!
And yes, what you're doing would work quite well as a plugin. The "Creative Commons" Plugin does nearly the same, it inserts RDF metadata inside an entry as well as the RSS feed. You could use that as a base foundation - you also might want to look at the karma voting plugin, which inserts text at about the place you inserted your "Location" link.
If you then would like to share the plugin, I'd love to put it into our additional_plugins repository!
Regards,
Garvin
And yes, what you're doing would work quite well as a plugin. The "Creative Commons" Plugin does nearly the same, it inserts RDF metadata inside an entry as well as the RSS feed. You could use that as a base foundation - you also might want to look at the karma voting plugin, which inserts text at about the place you inserted your "Location" link.
If you then would like to share the plugin, I'd love to put it into our additional_plugins repository!
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Just a question: WHich standard are you using? There is a W3C standard (http://www.w3.org/2003/01/geo/wgs84_pos), we should use for that:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<geo:Point>
<geo:lat>55.701</geo:lat>
<geo:long>12.552</geo:long>
</geo:Point>
</rdf:RDF>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<geo:Point>
<geo:lat>55.701</geo:lat>
<geo:long>12.552</geo:long>
</geo:Point>
</rdf:RDF>
-
Guest
Re: Geolocated blogging
I just had a look at the two examples. The geo thingy I hacked needs to add two attributes per blog entry, namely a latitude and a longitude value. In the CC example, these values are set for the whole blog, not per entry.garvinhicking wrote:And yes, what you're doing would work quite well as a plugin. The "Creative Commons" Plugin does nearly the same, it inserts RDF metadata inside an entry as well as the RSS feed. You could use that as a base foundation - you also might want to look at the karma voting plugin, which inserts text at about the place you inserted your "Location" link.
If you then would like to share the plugin, I'd love to put it into our additional_plugins repository!
Is there a hook when editing or saving an item? I would then like to generate two input boxes for these values.
Or have I misunderstood your hints?
Regards,
Zoran
Re: Geolocated blogging
perhaps this threads needs to be moved to the 'plugins' discussion 
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Geolocated blogging
Hi zoran!
Ah, okay - I thought the long/lat things would refer to the blog and not to your entry.
In this case, implementing this as a plugin should best be done with Serendipity 0.8. There we added the "entryproperties" table, where you can associate each entry with specific properties.
Example plugins like 'multilingual' and 'entryproperties' already use that to store translated versions of an entry, or attributes like stickyness or reading permissions.
You could easily add a property 'latitude' and 'longitude' there. You just need to hook into the backend_display event hook, where we also already display the other mentioned plugins, or weblogping and others.
If you would need to make this funcionality to work with Serendipity 0.7, you would need to create your own table for storing the properties and fetching them in the frontend_display event hook.
So my advice is that you look at Serendipity 0.8 and the plugins serendipity_event_entryproperties (bundled) and serendipity_event_multilingual (inside 'additional_plugins' CVS repository) and then duplicate them and add a bit of functionality from the CC plugin (for RDF metadata insertion...).
If you need more help, feel free to ask!
Regards,
Garvin
Ah, okay - I thought the long/lat things would refer to the blog and not to your entry.
In this case, implementing this as a plugin should best be done with Serendipity 0.8. There we added the "entryproperties" table, where you can associate each entry with specific properties.
Example plugins like 'multilingual' and 'entryproperties' already use that to store translated versions of an entry, or attributes like stickyness or reading permissions.
You could easily add a property 'latitude' and 'longitude' there. You just need to hook into the backend_display event hook, where we also already display the other mentioned plugins, or weblogping and others.
If you would need to make this funcionality to work with Serendipity 0.7, you would need to create your own table for storing the properties and fetching them in the frontend_display event hook.
So my advice is that you look at Serendipity 0.8 and the plugins serendipity_event_entryproperties (bundled) and serendipity_event_multilingual (inside 'additional_plugins' CVS repository) and then duplicate them and add a bit of functionality from the CC plugin (for RDF metadata insertion...).
If you need more help, feel free to ask!
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Geolocated blogging
I understand what you're saying. It looks like the right way to go.
Unfortunately (fortunately!) I'm going on holiday for a month (I'll do some geoblogging). I I'll look into it when I get back.
Thanks for the advice!
Unfortunately (fortunately!) I'm going on holiday for a month (I'll do some geoblogging). I I'll look into it when I get back.
Thanks for the advice!
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Geolocated blogging
Okay, that's cool. I hope to hear from you!
Have a nice holiday!
Regards,
Garvin
Have a nice holiday!
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Geolocated blogging
Well, I finally found the time to make a first version:
- serendipity_event_geotag (allows for lat/long metadata for events, puts it in the rss2 feed, provdes a link to a mapping URL like googlemaps)
- serendipity_plugin_geotag_gmap (shows a googlemap, shows the entries on the map)
A (temporary) demo is shown here:
http://s9y.zoran.func.lindev02.func.nl/
I anybody wants to testdrive it, please download from:
http://sodemieter.nl/s9y/
Any bugs/enhancements are welcomed
Best regards,
Zoran
- serendipity_event_geotag (allows for lat/long metadata for events, puts it in the rss2 feed, provdes a link to a mapping URL like googlemaps)
- serendipity_plugin_geotag_gmap (shows a googlemap, shows the entries on the map)
A (temporary) demo is shown here:
http://s9y.zoran.func.lindev02.func.nl/
I anybody wants to testdrive it, please download from:
http://sodemieter.nl/s9y/
Any bugs/enhancements are welcomed
Best regards,
Zoran
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Geolocated blogging
Zoran,
thanks a lot! Could I commit your plugin to our additional plugins CVS?
Regards
Garvin
thanks a lot! Could I commit your plugin to our additional plugins CVS?
Regards
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Geolocated blogging
Please do. Does it work for you? The entries list view for the frontend only shows the location for the first entry ...garvinhicking wrote:Zoran,
thanks a lot! Could I commit your plugin to our additional plugins CVS?
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Geolocated blogging
Zoran,
actually I must admit I don't have a Google API key and didn't have time yet to test it on my own. But your code looks solid, so I see no reason to not commit your great work.
Thanks a lot,
Garvin
actually I must admit I don't have a Google API key and didn't have time yet to test it on my own. But your code looks solid, so I see no reason to not commit your great work.
Thanks a lot,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Geolocated blogging
Hehe, tnx. If you want, sign up for one here:garvinhicking wrote:actually I must admit I don't have a Google API key and didn't have time yet to test it on my own. But your code looks solid, so I see no reason to not commit your great work.
http://www.google.com/apis/maps/signup.html
It only takes a couple of seconds (if you have a gmail account that is).
It's also specified in the config of the plugin.
Btw: the event doesn't need a key, only the plugin.
Tnx
Re: Geolocated blogging
I just posted an update to serendipity_event_geotag:
http://sodemieter.nl/s9y/serendipity_ev ... eotag.phps
Latitude and longitude are now in the right order
http://sodemieter.nl/s9y/serendipity_ev ... eotag.phps
Latitude and longitude are now in the right order