diff options
Diffstat (limited to 'views/foaf')
-rw-r--r-- | views/foaf/canvas/layouts/widgets.php | 2 | ||||
-rw-r--r-- | views/foaf/foafssl/profile.php | 16 | ||||
-rw-r--r--[-rwxr-xr-x] | views/foaf/page/default.php (renamed from views/foaf/pageshells/pageshell.php) | 29 | ||||
-rw-r--r-- | views/foaf/user/default.php | 23 |
4 files changed, 34 insertions, 36 deletions
diff --git a/views/foaf/canvas/layouts/widgets.php b/views/foaf/canvas/layouts/widgets.php deleted file mode 100644 index acb6c3546..000000000 --- a/views/foaf/canvas/layouts/widgets.php +++ /dev/null @@ -1,2 +0,0 @@ -<?php -?> diff --git a/views/foaf/foafssl/profile.php b/views/foaf/foafssl/profile.php deleted file mode 100644 index b11708a32..000000000 --- a/views/foaf/foafssl/profile.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -$user = $vars['user']; -if ($user) { - $options = array('types'=>'object','subtypes'=>'sslkey','owner_guid'=>$user->getGUID()); - $userkeys = elgg_get_entities($options); - foreach($userkeys as $key) { -?> -<rsa:RSAPublicKey> - <cert:identity rdf:resource="#me"/> - <rsa:public_exponent cert:decimal="<?php echo $key->exponent; ?>"/> - <rsa:modulus cert:hex="<?php echo $key->modulus; ?>"/> -</rsa:RSAPublicKey> -<?php - } -} -?> diff --git a/views/foaf/pageshells/pageshell.php b/views/foaf/page/default.php index 909c9aa58..fad46ed35 100755..100644 --- a/views/foaf/pageshells/pageshell.php +++ b/views/foaf/page/default.php @@ -1,24 +1,24 @@ <?php /** - * Elgg XML output pageshell + * FOAF pageshell * * @package Elgg * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ * + * // @todo removed below because blog is a plugin + * <foaf:weblog rdf:resource="<?php echo elgg_get_site_url(); ?>blog/<?php echo $owner->username; ?>" /> */ -header("Content-Type: application/rdf+xml"); +header("Content-Type: text/xml"); // echo $vars['body']; echo "<?xml version='1.0'?>\n"; -if (!$owner = page_owner_entity()) { - if (!isloggedin()) { +if (!$owner = elgg_get_page_owner_entity()) { + if (!elgg_is_logged_in()) { exit; } else { - $owner = $vars['user']; + $owner = elgg_get_logged_in_user_entity(); } } @@ -28,27 +28,20 @@ if (!$owner = page_owner_entity()) { xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:foaf="http://xmlns.com/foaf/0.1/" - xmlns:cert="http://www.w3.org/ns/auth/cert#" - xmlns:rsa="http://www.w3.org/ns/auth/rsa#" - xmlns:ya="http://blogs.yandex.ru/schema/foaf/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <rdf:Description rdf:about=""> <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/PersonalProfileDocument"/> <foaf:maker rdf:resource="#me"/> <foaf:primaryTopic rdf:resource="#me"/> </rdf:Description> + <foaf:Person rdf:about="#me"> <foaf:nick><?php echo $owner->username; ?></foaf:nick> <foaf:name><?php echo $owner->name; ?></foaf:name> <foaf:homepage rdf:resource="<?php echo $owner->getURL(); ?>" /> - <foaf:mbox_sha1sum><?php echo sha1("mailto:" . $owner->email); ?></foaf:mbox_sha1sum> - <foaf:img rdf:resource="<?php echo $vars['url']; ?>pg/icon/<?php echo $owner->username; ?>/large/icon.jpg" /> - <?php - echo $vars['body']; - ?> + <foaf:depiction rdf:resource="<?php echo elgg_format_url($owner->getIconURL('large')); ?>" /> +<?php echo $vars['body']; ?> </foaf:Person> - <?php - echo elgg_view('foafssl/profile', array('user'=>$owner)); - ?> </rdf:RDF> diff --git a/views/foaf/user/default.php b/views/foaf/user/default.php new file mode 100644 index 000000000..dcba55562 --- /dev/null +++ b/views/foaf/user/default.php @@ -0,0 +1,23 @@ +<?php +/** + * Elgg default user view + * + * @package Elgg + * @subpackage Core + */ + +// @todo update when get_user_friends is deprecated in 1.9 +$friends = get_user_friends(elgg_get_page_owner_guid(), $subtype = "", $limit = 10000, $offset = 0); + +foreach ($friends as $friend) { +?> + +<foaf:knows> +<foaf:Person> + <foaf:nick><?php echo $friend->username; ?></foaf:nick> + <foaf:name><?php echo $friend->name; ?></foaf:name> + <rdfs:seeAlso rdf:resource="<?php echo $friend->getURL() . "?view=foaf" ?>" /> +</foaf:Person> +</foaf:knows> + +<?php } ?> |