| 1 | # Fire Eagle Plugin for Movable Type |
|---|
| 2 | # Authors: Ben Trott, David Recordon, and Mark Paschal |
|---|
| 3 | # Copyright 2008 Six Apart, Ltd. |
|---|
| 4 | # License: Artistic, licensed under the same terms as Perl itself |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | OVERVIEW |
|---|
| 8 | |
|---|
| 9 | The Fire Eagle plugin integrates with the Yahoo! location service, Fire Eagle |
|---|
| 10 | (http://fireeagle.com). Fire Eagle is a simple web service which allows multiple applications |
|---|
| 11 | around the web and on the mobile to update a person's current location. It then allows other |
|---|
| 12 | applications, such as Movable Type, to ask for a person's current location. All of this is |
|---|
| 13 | done in a privacy protecting manner where the person grants, and can revoke, access to each |
|---|
| 14 | application. |
|---|
| 15 | |
|---|
| 16 | This plugin adds the notion of "current location" to each author in your Movable Type install. |
|---|
| 17 | Each author must first authorize Movable Type to access their location via Fire Eagle. Once |
|---|
| 18 | they've done this, you're able to output an author's location as text or a map square on your |
|---|
| 19 | published site. |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | PREREQUISITES |
|---|
| 23 | |
|---|
| 24 | - Movable Type 4.0 or higher (4.1 for Action Streams integration) |
|---|
| 25 | - Scheduled task or cron job to execute the Periodic Tasks script (see below) |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | INSTALLATION |
|---|
| 29 | |
|---|
| 30 | 1. Configure a cronjob (see below) for the script run-periodic-tasks. |
|---|
| 31 | 2. Unpack the Fire Eagle archive. |
|---|
| 32 | 3. Copy the contents of FireEagle/plugins into /path/to/mt/plugins/ |
|---|
| 33 | 4. Copy the contents of FireEagle/mt-static into /path/to/mt/mt-static/ |
|---|
| 34 | 5. Navigate to your profile, and click on "Configure Fire Eagle" |
|---|
| 35 | 6. Grant Movable Type access to your current location on Fire Eagle |
|---|
| 36 | 7. Configure a Google Maps API key for your Movable Type blog |
|---|
| 37 | (http://code.google.com/apis/maps/signup.html), if you want to |
|---|
| 38 | include a map of your location on your blog. |
|---|
| 39 | 8. Add the Current Location template tags to your templates. (see below) |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | CRONJOB |
|---|
| 43 | |
|---|
| 44 | Add the following lines to your crontab to execute the script at the hour and 30 minutes |
|---|
| 45 | past the hour: |
|---|
| 46 | |
|---|
| 47 | # Movable Type's scheduled tasks script: |
|---|
| 48 | 0,30 * * * * cd /path/to/mt; perl ./tools/run-periodic-tasks |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | TEMPLATE CODE |
|---|
| 52 | |
|---|
| 53 | There are two template tags which can be used to expose an author's current location on your |
|---|
| 54 | published blog(s). |
|---|
| 55 | - an author's current location as text |
|---|
| 56 | <$MTAuthorCurrentLocation author="melody"$> |
|---|
| 57 | |
|---|
| 58 | - a map image url of the author's current location |
|---|
| 59 | <$MTAuthorLocationMapURI author="melody" width="200" height="200"$> |
|---|
| 60 | |
|---|
| 61 | An example widget that combines these tags for an author is: |
|---|
| 62 | <div class="widget-fireeagle widget"> |
|---|
| 63 | <h3 class="widget-header">Fire Eagle</h3> |
|---|
| 64 | <div class="widget-content"> |
|---|
| 65 | I'm at <b><$MTAuthorCurrentLocation author="melody"$></b> |
|---|
| 66 | <br /><br /> |
|---|
| 67 | <img src='<$MTAuthorLocationMapURI author="melody" width="200" height="200"$>' width='200' height='200' /> |
|---|
| 68 | </div> |
|---|
| 69 | </div> |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | ACTION STREAMS |
|---|
| 73 | |
|---|
| 74 | The Action Streams Plugin (http://plugins.movabletype.org/action-streams/) lets you |
|---|
| 75 | aggregate, control, and share your actions around the web as well as a list of your profiles |
|---|
| 76 | on various services. This Fire Eagle plugin will integration with your Action Stream if you |
|---|
| 77 | also have that plugin installed. You don't have to do anything beyond install both plugins |
|---|
| 78 | to have actions automatically added to your author's streams whenever an author changes |
|---|
| 79 | location. |
|---|
| 80 | |
|---|
| 81 | If you wish to take advantage of Fire Eagle in combination with the Action Streams plugin, |
|---|
| 82 | you should add the following CSS to your styles.css file: |
|---|
| 83 | .service-fireeagle { background-image: url(<MT:StaticWebPath>plugins/FireEagle/images/fireeagle.png); } |
|---|