Parent Directory
|
Revision Log
|
Revision Graph
WARNING -- PORT IN PROGRESS -- WARNING
This is a very very very preliminary port of some pieces of Location to D7.
There's a lot of work to do before this is remotely usable.
WARNING -- PORT IN PROGRESS -- WARNING
commit 9acd11c864797596209d5c12916e25e209a074cd
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 16:51:59 2009 -0500
D7: Fix instance saving. I have now successfully put a location on a node in D7. (Of course there's a LOT to do still, but huzzah!)
commit 868ed6352debce3720e4093b50c42397e66cf991
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 16:40:22 2009 -0500
Fix another class bug. Fix location fieldset theming (for a given value of "fix" of course)
commit d10a646b73da9c8b00c002a13483b986f0018340
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 16:31:43 2009 -0500
D7: fix call to private api function that got renamed.
commit b79cea16e3c74d0cc7941cd4abcd3b616b793c9f
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 16:28:00 2009 -0500
D7: Put locative information into the vertical tabs thingie.
commit bf4df441e08a2ba1a0b6164a3688aa2275607f79
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 16:19:10 2009 -0500
D7: Fix class arrayness and remove a stray & to make PHP stop crashing.
commit be9d1114797319f0015c266f3f6d4a6d398fea2f
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 15:22:13 2009 -0500
D7: files[] for location_node.
commit f6c32c64cb43f06fc5baca569826ccaf88b931c3
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 15:19:30 2009 -0500
Fix infinite loops with drupal_render_children(). Remove the drupal_render() call at the end as well as it's nonsensical now and ALSO loops.
commit 125639604c4e5c29d03b3da9265b5fc766347794
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 15:18:10 2009 -0500
D7 does not have an implicit #theme for elements anymore.
commit 4dcf85adcd30c0a53417fa3c53b2a4882b3cadf4
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 15:08:51 2009 -0500
Use core's country list. (Which was pulled from location in the first place, hee hee)
commit ebb58524f2b9ef2eca7513971afbb9029743290f
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Mon Aug 31 14:59:53 2009 -0500
D7: Remove location_default_country variable and use core's site_default_country variable instead.
commit 4cf3950e1a3fa1369ad5bdecac4c3649b2783f2a
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Fri Aug 28 17:34:26 2009 -0500
Add warning.
commit 934fdd3aecb4435b7215705d72998b13439b0920
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Fri Aug 28 17:14:51 2009 -0500
D7: hook_node split, some of location_node.module, add file to track API changes.
commit 9e69f25d971fa6b5623fb026d5cfd6dba2cc2d70
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Fri Aug 28 16:17:18 2009 -0500
D7: 'file' / 'file_path' stuff got rolled back.
commit 80cbd3b688c4a46dc349d449a1abc265894d619f
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Fri Aug 28 15:42:45 2009 -0500
D7: [#161301]
commit 35f82a0845ef020411a351fb307f821f78c5e397
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Fri Aug 28 15:38:53 2009 -0500
bit more dbtngification.
commit 161280467e70664822e397405f3892628de7acdd
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Fri Aug 28 15:26:38 2009 -0500
dbtngify uninstall hook. The rest I'll do later.
commit d6596a08f7a6a424df5109eafae3d7a5b7ce5522
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Fri Aug 28 15:20:52 2009 -0500
DBTNGify location.module.
Hopefully I didn't introduce bugs.
commit 6986ba94148c19d461808d61441c0033a4abfe31
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Wed Aug 19 16:02:59 2009 -0500
Start a todo list.
commit 397adf2c619de9708e4135442204328aac7ae2d8
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Wed Aug 19 15:57:30 2009 -0500
D7: Use '#markup' not '#value' for markup
commit c3fbd82f21e1af2f024871b247c01bc01ca71a7e
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Wed Aug 19 15:53:17 2009 -0500
D7: The hook_menu() and hook_theme() "file" and "file path" keys have
been removed.
commit cf8acf59887f73b997e50aedec95aa5a9784df84
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Wed Aug 19 15:51:55 2009 -0500
D7: Module .info files must now specify all loadable code files
explicitly.
commit f4cf33530c11406157745db44cfab0069287da36
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Wed Aug 19 15:51:01 2009 -0500
D7: Permissions are required to have titles and descriptions.
commit 4a29c6fbafdc1ab106c95ed74df27f7dcfe03bca
Author: Brandon Bergren <bdragon@rtk0.net>
Date: Wed Aug 19 15:41:46 2009 -0500
Location HEAD starting point.
Aug 19 2009 15:42
| 1 | <?php |
| 2 | // $Id: location.georss.inc,v 1.1 2009/02/25 19:01:41 bdragon Exp $ |
| 3 | |
| 4 | /** |
| 5 | * @file |
| 6 | * GeoRSS support for Location. |
| 7 | */ |
| 8 | |
| 9 | /** |
| 10 | * @function |
| 11 | * Return an array of namespaces needed for a mode. |
| 12 | */ |
| 13 | function location_rss_namespaces($mode = 'simple') { |
| 14 | switch ($mode) { |
| 15 | case 'w3c': |
| 16 | case 'w3c_bugcompat': |
| 17 | return array('xmlns:geo' => 'http://www.w3.org/2003/01/geo/wgs84_pos#'); |
| 18 | case 'simple': |
| 19 | return array('xmlns:georss' => 'http://www.georss.org/georss'); |
| 20 | case 'gml': |
| 21 | return array( |
| 22 | 'xmlns:georss' => 'http://www.georss.org/georss', |
| 23 | 'xmlns:gml' => 'http://www.opengis.net/gml', |
| 24 | ); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * @function |
| 30 | * Return an array of RSS items for a location. |
| 31 | */ |
| 32 | function location_rss_item($location, $mode = 'simple') { |
| 33 | $ret = FALSE; |
| 34 | if (location_has_coordinates($location, TRUE)) { |
| 35 | switch ($mode) { |
| 36 | // W3C Basic Geo Vocabulary |
| 37 | case 'w3c': |
| 38 | $ret = array( |
| 39 | 'key' => 'geo:Point', |
| 40 | 'namespace' => array('xmlns:geo' => 'http://www.w3.org/2003/01/geo/wgs84_pos#'), |
| 41 | 'value' => array( |
| 42 | array('key' => 'geo:lat', 'value' => $location['latitude']), |
| 43 | array('key' => 'geo:long', 'value' => $location['longitude']), |
| 44 | ), |
| 45 | ); |
| 46 | break; |
| 47 | // Location 1.x-2.x bug compatible. |
| 48 | // W3C Basic Geo Vocabulary with a misspelled longitude tag. |
| 49 | case 'w3c_bugcompat': |
| 50 | $ret = array( |
| 51 | 'key' => 'geo:Point', |
| 52 | 'namespace' => array('xmlns:geo' => 'http://www.w3.org/2003/01/geo/wgs84_pos#'), |
| 53 | 'value' => array( |
| 54 | array('key' => 'geo:lat', 'value' => $location['latitude']), |
| 55 | array('key' => 'geo:lon', 'value' => $location['longitude']), |
| 56 | ), |
| 57 | ); |
| 58 | break; |
| 59 | // GeoRSS-Simple |
| 60 | case 'simple': |
| 61 | $ret = array( |
| 62 | 'key' => 'georss:point', |
| 63 | 'namespace' => array('xmlns:georss' => 'http://www.georss.org/georss'), |
| 64 | 'value' => "$location[latitude] $location[longitude]", |
| 65 | ); |
| 66 | break; |
| 67 | // |
| 68 | case 'gml': |
| 69 | $ret = array( |
| 70 | 'key' => 'georss:where', |
| 71 | 'namespace' => array( |
| 72 | 'xmlns:georss' => 'http://www.georss.org/georss', |
| 73 | 'xmlns:gml' => 'http://www.opengis.net/gml', |
| 74 | ), |
| 75 | 'value' => array( |
| 76 | 'gml:Point' => array( |
| 77 | 'gml:pos' => "$location[latitude] $location[longitude]", |
| 78 | ), |
| 79 | ), |
| 80 | ); |
| 81 | break; |
| 82 | } |
| 83 | } |
| 84 | return $ret; |
| 85 | } |
| ViewVC Help | |
| Powered by ViewVC 1.1.2 |