diff options
31 files changed, 0 insertions, 1355 deletions
diff --git a/mod/opendd/actions/opendd/feed/delete.php b/mod/opendd/actions/opendd/feed/delete.php deleted file mode 100644 index 6e7731df3..000000000 --- a/mod/opendd/actions/opendd/feed/delete.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - // Load configuration - global $CONFIG; - - gatekeeper(); - - $returnurl = $_SERVER['HTTP_REFERER']; - - $feed_guid = get_input('feed_guid'); - $feed = NULL; - if ($feed_guid) - $feed = get_entity($feed_guid); - - if (($feed) || (!($feed instanceof ElggObject))) - { - if ($feed->delete()) { - system_message(elgg_echo("opendd:deleted")); - $returnurl = $CONFIG->url . "mod/opendd/"; - } - else - register_error(elgg_echo("opendd:notdeleted")); - - } - else - register_error(elgg_echo("opendd:notobject")); - - - - $returnurl = $CONFIG->url . "mod/opendd/"; - forward($returnurl); - exit; -?>
\ No newline at end of file diff --git a/mod/opendd/actions/opendd/feed/subscribe.php b/mod/opendd/actions/opendd/feed/subscribe.php deleted file mode 100644 index d96c93218..000000000 --- a/mod/opendd/actions/opendd/feed/subscribe.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - // Load configuration - global $CONFIG; - - gatekeeper(); - - $input = array(); - foreach($CONFIG->opendd as $shortname => $valuetype) { - $input[$shortname] = get_input($shortname); - if ($valuetype == 'tags') - $input[$shortname] = string_to_tag_array($input[$shortname]); - } - - $feed_guid = get_input('feed_guid'); - $feed = NULL; - if ($feed_guid) - $feed = get_entity($feed_guid); - else - { - $feed = new ElggObject(); - $feed->subtype = 'oddfeed'; - } - - if (!($feed instanceof ElggObject)) - { - register_error(elgg_echo("opendd:notobject")); - - forward($_SERVER['HTTP_REFERER']); - exit; - } - - // Assume we can edit or this is a new group - if (sizeof($input) > 0) - { - foreach($input as $shortname => $value) { - $feed->$shortname = $value; - } - } - - - if ($feed->save()) - system_message(elgg_echo("opendd:feedok")); - else - register_error(elgg_echo("opendd:feednotok")); - - forward($_SERVER['HTTP_REFERER']); - exit; -?>
\ No newline at end of file diff --git a/mod/opendd/edit.php b/mod/opendd/edit.php deleted file mode 100644 index fc4ed8d54..000000000 --- a/mod/opendd/edit.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); - - $title = elgg_echo("opendd:edit"); - $form = elgg_view_title($title); - $form .= elgg_view('forms/opendd/subscribe', array('entity' => get_entity(get_input('feed_guid')))); - - $body = elgg_view_layout('one_column',$form); - - page_draw($title, $body); -?>
\ No newline at end of file diff --git a/mod/opendd/feeds.php b/mod/opendd/feeds.php deleted file mode 100644 index 493e659b6..000000000 --- a/mod/opendd/feeds.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $limit = get_input("limit", 10); - $offset = get_input("offset", 0); - $title = elgg_echo("opendd:feeds"); - - $context = get_context(); - - set_context('search'); - $objects = list_entities('object','oddfeed', page_owner(), $limit, false); - - set_context($context); - - $body = elgg_view_layout('one_column', elgg_view_title($title) . $objects); - - page_draw($title, $body); -?>
\ No newline at end of file diff --git a/mod/opendd/graphics/defaultlarge.jpg b/mod/opendd/graphics/defaultlarge.jpg Binary files differdeleted file mode 100644 index 04d7b7bef..000000000 --- a/mod/opendd/graphics/defaultlarge.jpg +++ /dev/null diff --git a/mod/opendd/graphics/defaultmedium.jpg b/mod/opendd/graphics/defaultmedium.jpg Binary files differdeleted file mode 100644 index e3475850f..000000000 --- a/mod/opendd/graphics/defaultmedium.jpg +++ /dev/null diff --git a/mod/opendd/graphics/defaultsmall.jpg b/mod/opendd/graphics/defaultsmall.jpg Binary files differdeleted file mode 100644 index 1be985956..000000000 --- a/mod/opendd/graphics/defaultsmall.jpg +++ /dev/null diff --git a/mod/opendd/graphics/defaulttiny.jpg b/mod/opendd/graphics/defaulttiny.jpg Binary files differdeleted file mode 100644 index c384ccf3a..000000000 --- a/mod/opendd/graphics/defaulttiny.jpg +++ /dev/null diff --git a/mod/opendd/index.php b/mod/opendd/index.php deleted file mode 100644 index 0f1af5537..000000000 --- a/mod/opendd/index.php +++ /dev/null @@ -1,80 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); - - global $CONFIG; - - $limit = get_input("limit", 10); - $offset = get_input("offset", 0); - $view = get_input("view"); - - $title = sprintf(elgg_echo("opendd:your"),page_owner_entity()->name); - - $opendd = get_river_entries_as_opendd(page_owner(), "", $limit, $offset); - - if ($view=='odd') - { - // Slightly crufty hack - header ("Content-Type: text/xml"); - echo $opendd; - - } - else - { - $objects = array(); - - $cnt = 0; - foreach ($opendd as $obj) - { - if (($cnt >= $offset) && ($cnt < $offset + $limit)) - { - $tmp = new ElggObject(); - $tmp->subtype = strtolower(get_class($obj)); - - $attr = $obj->getAttributes(); - foreach ($attr as $k => $v) - { - $key = 'opendd:' . $k; - $tmp->$key = $v; - } - - $key = 'opendd:body'; - $tmp->$key = $obj->getBody(); - - $objects[] = $tmp; - } - - $cnt++; - } - - $body = elgg_view_title($title); - - $context = get_context(); - set_context('search'); - $body .= elgg_view_entity_list($objects, $cnt, $offset, $limit, false); - set_context($context); - - // Add logo link - $body .= elgg_view('opendd/link_logo', array('feed_url' => $CONFIG->url . "pg/opendd/". page_owner_entity()->username ."/activity/opendd")); - - // Turn off rss view & default odd view - global $autofeed; $autofeed = false; - - // Point to my activity in odd - extend_view('metatags', 'opendd/metatags'); - - $body = elgg_view_layout('one_column',$body); - - // Finally draw the page - page_draw($title, $body); - } -?>
\ No newline at end of file diff --git a/mod/opendd/languages/en.php b/mod/opendd/languages/en.php deleted file mode 100644 index a3bd61324..000000000 --- a/mod/opendd/languages/en.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - /** - * Elgg groups plugin language pack - * - * @package ElggGroups - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $english = array( - - /** - * Menu items and titles - */ - - 'opendd' => "OpenDD", - 'opendd:your' => "Your activity", - 'opendd:feeds' => "Your subscriptions", - 'opendd:manage' => "Manage subscriptions", - 'opendd:edit' => "Edit subscription", - - 'opendd:feedurl' => "Feed URL", - - 'opendd:notobject' => "Entity is not an object, this should not have happened.", - 'opendd:feednotok' => "Unable to edit your OpenDD feeds.", - 'opendd:feedok' => "Successfully subscribed to feed.", - - 'opendd:deleted' => "Feed subscription deleted.", - 'opendd:notdeleted' => "Feed subscription not deleted.", - - 'opendd:noopenddfound' => "No OpenDD elements found in stream.", - - 'opendd:metadata:uuid' => "UUID of metadata", - 'opendd:metadata:entityuuid' => "Referring to UUID", - 'opendd:metadata:owneruuid' => "Owner", - 'opendd:metadata:key' => "Key", - 'opendd:metadata:value' => "Value", - - 'opendd:entity:uuid' => "Universal Identifier", - 'opendd:entity:class' => "Class", - 'opendd:entity:subclass' => "Subclass", - - 'opendd:published' => "Published", - - 'opendd:nodata' => "There was a problem getting the feed, response: %s", - 'opendd:noriver' => "No data currently available.", - - 'opendd:widgets:elsewhere:title' => "Friends elsewhere", - 'opendd:widgets:elsewhere:description' => "This widget uses OpenDD to display your friends on other sites.", - ); - - add_translation("en",$english); -?>
\ No newline at end of file diff --git a/mod/opendd/manage.php b/mod/opendd/manage.php deleted file mode 100644 index 2b58057af..000000000 --- a/mod/opendd/manage.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - gatekeeper(); - - $limit = get_input("limit", 10); - $offset = get_input("offset", 0); - $title = elgg_echo("opendd:manage"); - - $form = elgg_view('forms/opendd/subscribe'); - - $context = get_context(); - - set_context('search'); - $objects = list_entities('object','oddfeed', page_owner(), $limit, false); - - set_context($context); - - $body = elgg_view_layout('one_column',elgg_view_title($title) . $form . $objects); - - page_draw($title, $body); -?>
\ No newline at end of file diff --git a/mod/opendd/manifest.xml b/mod/opendd/manifest.xml deleted file mode 100644 index 9b3923f51..000000000 --- a/mod/opendd/manifest.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<plugin_manifest> - <field key="author" value="Marcus Povey" /> - <field key="version" value="1.0" /> - <field key="description" value="Provides an OpenDD aggregator" /> - <field key="website" value="http://www.opendd.net/" /> - <field key="copyright" value="(C) Curverider 2008" /> - <field key="licence" value="GNU Public License version 2" /> -</plugin_manifest>
\ No newline at end of file diff --git a/mod/opendd/start.php b/mod/opendd/start.php deleted file mode 100644 index f1372649c..000000000 --- a/mod/opendd/start.php +++ /dev/null @@ -1,461 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - /** - * Initialise the opendd plugin. - * Register actions, set up menus - */ - function opendd_init() - { - global $CONFIG; - - // Set up the menu for logged in users - if (isloggedin()) - { - add_menu(elgg_echo('opendd'), $CONFIG->wwwroot . "pg/opendd/{$_SESSION['user']->username}",array( - menu_item(elgg_echo('opendd:your'), $CONFIG->wwwroot."pg/opendd/{$_SESSION['user']->username}"), - menu_item(elgg_echo('opendd:feeds'), $CONFIG->wwwroot."pg/opendd/{$_SESSION['user']->username}/feeds/"), - menu_item(elgg_echo('opendd:manage'), $CONFIG->wwwroot . "pg/opendd/{$_SESSION['user']->username}/manage/"), - ),'opendd'); - } - - // Register a page handler, so we can have nice URLs - register_page_handler('opendd','opendd_page_handler'); - - // Register opendd url - register_entity_url_handler('opendd_url','object','oddfeed'); - - // Actions - register_action("opendd/feed/subscribe",false, $CONFIG->pluginspath . "opendd/actions/opendd/feed/subscribe.php"); - register_action("opendd/feed/delete",false, $CONFIG->pluginspath . "opendd/actions/opendd/feed/delete.php"); - - // Extend some views - extend_view('css','opendd/css'); - - // Register some widgets - add_widget_type('opendd_friends_elsewhere',elgg_echo('opendd:widgets:elsewhere:title'), elgg_echo('opendd:widgets:elsewhere:description')); - - // Subscribe fields - $CONFIG->opendd = array( - 'feedurl' => 'text', - ); - - } - - /** - * Opendd page handler - * - * @param array $page Array of page elements, forwarded by the page handling mechanism - */ - function opendd_page_handler($page) - { - global $CONFIG; - - if (isset($page[0])) - set_input('username',$page[0]); - - if (isset($page[1])) - { - // See what context we're using - switch($page[1]) - { - case "view" : - if (isset($page[2])) - { - set_input('feed_guid', $page[2]); - include($CONFIG->pluginspath . "opendd/viewfeed.php"); - } - break; - case "manage": - include($CONFIG->pluginspath . "opendd/manage.php"); - break; - case "feeds" : - include($CONFIG->pluginspath . "opendd/feeds.php"); - break; - case "activity" : - if (isset($page[2])) - { - switch ($page[2]) - { - case 'opendd' : - default : - set_input('view', 'odd'); - include($CONFIG->pluginspath . "opendd/index.php"); - } - } - break; - default: - include($CONFIG->pluginspath . "opendd/index.php"); - } - } - else - include($CONFIG->pluginspath . "opendd/index.php"); - } - - /** - * Register a url to handle opendd feeds. - * - * @param ElggEntity $feed The feed object. - * @return string - */ - function opendd_url($feed) - { - global $CONFIG; - return $CONFIG->wwwroot . "pg/opendd/" . $feed->getOwnerEntity()->username . "/view/{$feed->guid}"; - } - - /** - * Return a list of feed urls for a given user. - * - * @param int $user_guid User in question - * @return array - */ - function opendd_get_feed_urls($user_guid) - { - $feeds = array(); - - $feed_entities = get_entities('object', 'oddfeed', $user_guid); - if ($feed_entities) - { - foreach ($feed_entities as $feed) - $feeds[] = $feed->feedurl; - } - - if (count($feeds)) - return $feeds; - - return false; - } - - /** - * Fetch a given UUID. - * - * @param string $uuid The uuid - * @return ODDDocument - */ - function opendd_fetch_uuid($uuid) - { - $ctx = stream_context_create(array( - 'http' => array( - 'timeout' => 1 - ) - ) - ); - - $feed_data = ODD_Import(file_get_contents($uuid));//, 0, $ctx)); - if ($feed_data) - return $feed_data; - - return NULL; - } - - // Array of ODD objects mapped to uuid - $uuid_array = array(); - - // Array of ElggEntities mapped to uuid - $elgg_array = array(); - - /** - * Combines opendd_odd_to_elgg and opendd_fetch_uuid and fetch a single uuid and return an object or an array - * suitable for the ElggRiverStatement Object. - * - * @param string $uuid The UUID - * @return mixed - */ - function opendd_fetch_to_elgg($uuid) - { - global $uuid_array, $elgg_array; - - if (!isset($uuid_array[$uuid])) - $uuid_array[$uuid] = opendd_fetch_uuid($uuid); - if ((!isset($elgg_array[$uuid])) && (isset($uuid_array[$uuid]))) - $elgg_array[$uuid] = opendd_odd_to_elgg($uuid_array[$uuid]); - - if ($elgg_array[$uuid]) - return $elgg_array[$uuid]; - - return false; - } - - /** - * Construct an Elgg object out of a given element and its metadata (like import without doing any saving). - * This does not function if you are sending a relationship... this is a special case and is returned as an unchanged - * ODDRelationship (since it is objects are not being saved and so guids are currently meaningless.) - * - * TODO: Optimise so that it caches uuids (shared with other uuid cache) - * - * @param ODDDocument $element - */ - function opendd_odd_to_elgg(ODDDocument $element) - { - global $uuid_array, $elgg_array, $CONFIG; - - $count = $element->getNumElements(); - - if ($count==1) - { - // Atomic component - relationship or metadata; - $elements = $element->getElements(); - $e = $elements[0]; - if ($e instanceof ODDRelationship) - { - // Return statement object array - $object = array(); - $object['subject'] = opendd_fetch_to_elgg($e->getAttribute('uuid1')); - $object['relationship'] = $e->getAttribute('type'); - $object['object'] = opendd_fetch_to_elgg($e->getAttribute('uuid2')); - - return $object; - } - - if ($e instanceof ODDMetaData) - { - $type = $e->getAttribute('type'); - $attr_name = $e->getAttribute('name'); - $attr_val = $e->getBody(); - - $subject = NULL; - switch ($type) - { - case 'annotation' : - $subject = new ElggAnnotation(); - break; - case 'metadata' : - default: - $subject = new ElggMetaData(); - break; - } - - $subject->name = $attr_name; - $subject->value = $attr_value; - $subject->type = $type; - $subject->time_created = $e->getAttribute('published'); - - $object = array('subject' => $subject, 'object' => opendd_fetch_to_elgg($e->getAttribute('entity_uuid'))); - - return $object; - } - } - else - { - - $tmp = array(); - // Go through the elements - foreach ($element as $e) - { - $uuid = $e->getAttribute('uuid'); - - // if entity then create - if ($e instanceof ODDEntity) { - $tmp[$uuid] = oddentity_to_elggentity($e); - $tmp[$uuid]->setURL($CONFIG->url . "mod/opendd/viewuuid.php?uuid=" . urlencode($uuid)); - } - - // if metadata then add to entity - if ($e instanceof ODDMetaData) { - - $entity_uuid = $e->getAttribute('entity_uuid'); - oddmetadata_to_elggextender($tmp[$entity_uuid], $e); - } - - } - - foreach ($tmp as $t) - return $t; - - } - } - - /** - * ISSUES - * - * - all entities need to be public on target - * - */ - - - /** - * This function provides a river-like view for remote friend feeds from multiple sources. - * It will produce an aggregation of the feeds and render them in a similar way to get_river_entries(); - * - * TODO: How do we handle metadata in this instance? - It needs to refer to the object. - * - * @param array $feeds List of Opendd feed urls. - * @param int $limit Maximum results to process. - * @param int $offset The offset. - */ - function opendd_aggregate_remote_river(array $feeds, $limit = 10, $offset = 0) - { - global $uuid_array, $elgg_array, $CONFIG; - - // if this not an array, turn it into one - if (!is_array($feeds)) - $feeds = array($feeds); - - // ensure there are no duplicates - $feeds = array_unique($feeds); - - $river = array(); - $opendd_elements = array(); - $opendd_published = array(); - - // set start limit and offset - $cnt = $limit; // Didn' cast to int here deliberately - $off = $offset; // here too - - $ctx = stream_context_create(array( - 'http' => array( - 'timeout' => 1 - ) - ) - ); - - // Get feeds - foreach ($feeds as $feed) - { - // Retrieve feed - $feed_data = ODD_Import(file_get_contents($feed, 0, $ctx)); - - if ($feed_data) - { - $elements = $feed_data->getElements(); - foreach ($elements as $e) - $opendd_elements[] = $e; - } - } - - foreach ($opendd_elements as $k => $v) - $opendd_published[$k] = $v->getPublishedAsTime(); - - // Sort by date (desc) - arsort($opendd_published); - $sorted_odd_elements = array(); - - foreach ($opendd_published as $k => $v) - $sorted_odd_elements[] = $opendd_elements[$k]; - - // Array of ODD objects mapped to uuid - $uuid_array = array(); - - // Array of ElggEntities mapped to uuid - $elgg_array = array(); - - $exit = true; - - do - { - if (!count($sorted_odd_elements)) - $exit = true; - else - { - foreach ($sorted_odd_elements as $oddelement) - { - $statement = NULL; - - // Valid ODD activity streams can only be relationships! - if ($oddelement instanceof ODDRelationship) - { - $uuid1 = $oddelement->getAttribute('uuid1'); - $uuid2 = $oddelement->getAttribute('uuid2'); - - // Construct our new statement - $subject = opendd_fetch_to_elgg($uuid1); - $event = $oddelement->getAttribute('type'); - $object = opendd_fetch_to_elgg($uuid2); - $time = $oddelement->getPublishedAsTime(); - - $statement = new ElggRiverStatement($subject, $event, $object); - - // Work out class - if ($object instanceof ElggEntity) - $class = get_class($object); - else if (count($object)==3) - $class = 'ElggRelationship'; - else - $class = get_class($object['subject']); - - - } - - // If no fatal errors while extracting the necessary data then continue - if (($subject) && ($object) && ($event) && ($statement)) - { - $tam = ""; - // We have constructed the information - - if ($object instanceof ElggEntity) { - $subtype = $object->getSubtype(); - } else { - $subtype = ""; - } - if ($subtype == "widget") { - $subtype = "widget/" . $object->handler; - } - - if (!empty($subtype) && elgg_view_exists("river/{$subtype}/{$event}")) { - $tam = elgg_view("river/{$subtype}/$event", array( - 'statement' => $statement - )); - } else if (elgg_view_exists("river/$class/$event")) { - $tam = elgg_view("river/$class/$event", array( - 'statement' => $statement - )); - - } - - if ((!empty($tam)) && (trim($tam)!="")) { - $tam = elgg_view("river/wrapper",array( - 'entry' => $tam, - 'time' => $time, - 'event' => $event, - 'statement' => $statement - )); - } - - if ($tam) - { - $river[] = $tam; - $cnt--; - } - - - } - /*else - { - echo "$uuid2\n"; - print_r($object); - print_r($statement); - - die(); - }*/ - - if ($cnt == 0 ) break; // crufty - - // Increase offset - $off++; - } - } - - } while ( - ($cnt > 0) && - (!$exit) - ); - - - return $river; - - - } - - - // Make sure the groups initialisation function is called on initialisation - register_elgg_event_handler('init','system','opendd_init'); -?>
\ No newline at end of file diff --git a/mod/opendd/viewfeed.php b/mod/opendd/viewfeed.php deleted file mode 100644 index fabae4239..000000000 --- a/mod/opendd/viewfeed.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); - - gatekeeper(); - - $entity = get_entity(get_input('feed_guid')); - $limit = get_input("limit", 10); - $offset = get_input("offset", 0); - - - $body = elgg_view('opendd/profile', array('entity' => $entity)); - - $ctx = stream_context_create(array( - 'http' => array( - 'timeout' => 1 - ) - ) - ); - - $data = file_get_contents($entity->feedurl);//, 0, $ctx); - - if ($data) - { - $opendd = ODD_Import($data); - - if ($opendd) - { - $objects = array(); - - $cnt = 0; - foreach ($opendd as $obj) - { - if (($cnt >= $offset) && ($cnt < $offset + $limit)) - { - $tmp = new ElggObject(); - $tmp->subtype = strtolower(get_class($obj)); - - $attr = $obj->getAttributes(); - foreach ($attr as $k => $v) - { - $key = 'opendd:' . $k; - $tmp->$key = $v; - } - - $key = 'opendd:body'; - $tmp->$key = $obj->getBody(); - - $objects[] = $tmp; - } - - $cnt++; - } - - $context = get_context(); - set_context('search'); - $body .= elgg_view_entity_list($objects, $cnt, $offset, $limit, false); - set_context($context); - - } - else - $body .= elgg_echo('opendd:noopenddfound'); - } - else - $body .= sprintf(elgg_echo('opendd:nodata'), $http_response_header[0]); - - - $title = $entity->feedurl; - - // Finally draw the page - page_draw($title,elgg_view_layout('one_column', elgg_view_title($title) . $body)); -?>
\ No newline at end of file diff --git a/mod/opendd/views/default/forms/opendd/subscribe.php b/mod/opendd/views/default/forms/opendd/subscribe.php deleted file mode 100644 index 16f0e808b..000000000 --- a/mod/opendd/views/default/forms/opendd/subscribe.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ -?> -<form action="<?php echo $vars['url']; ?>action/opendd/feed/subscribe" method="post"> -<?php - if (is_array($vars['config']->opendd) && sizeof($vars['config']->opendd) > 0) - foreach($vars['config']->opendd as $shortname => $valtype) { - -?> - - <p> - <label> - <?php echo elgg_echo("opendd:{$shortname}") ?><br /> - <?php echo elgg_view("input/{$valtype}",array( - 'internalname' => $shortname, - 'value' => $vars['entity']->$shortname, - )); ?> - </label> - </p> - -<?php - - } - -?> - <?php if ($vars['entity']) { ?><input type="hidden" name="feed_guid" value="<?php echo $vars['entity']->guid; ?>" /><?php } ?> - <input type="hidden" name="user_guid" value="<?php echo page_owner_entity()->guid; ?>" /> - <input type="submit" class="submit_button" value="<?php echo elgg_echo("save"); ?>" /> -</form>
\ No newline at end of file diff --git a/mod/opendd/views/default/object/oddentity.php b/mod/opendd/views/default/object/oddentity.php deleted file mode 100644 index 43cba4a2f..000000000 --- a/mod/opendd/views/default/object/oddentity.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $entity = $vars['entity']; -?> -<div class="opendd_entity"> - <div> - <p><?php echo elgg_echo('opendd:published'); ?>: <?php echo $entity->get('opendd:published'); ?></p> - </div> - <div> - <p><?php echo elgg_echo('opendd:entity:uuid'); ?>: <a href="<?php echo $entity->get('opendd:uuid'); ?>"><?php echo $entity->get('opendd:uuid'); ?></a></p> - </div> - <div> - <p><?php echo elgg_echo('opendd:entity:class'); ?>: <?php echo $entity->get('opendd:class'); ?></p> - <p><?php echo elgg_echo('opendd:entity:subclass'); ?>: <?php echo $entity->get('opendd:subclass'); ?></p> - </div> -</div>
\ No newline at end of file diff --git a/mod/opendd/views/default/object/oddfeed.php b/mod/opendd/views/default/object/oddfeed.php deleted file mode 100644 index 265a78257..000000000 --- a/mod/opendd/views/default/object/oddfeed.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - if ($vars['full']) { - echo elgg_view("opendd/profile",$vars); - } else { - if (get_input('search_viewtype') == "gallery") { - echo elgg_view('opendd/gallery',$vars); - } else { - echo elgg_view("opendd/listing",$vars); - } - } -?>
\ No newline at end of file diff --git a/mod/opendd/views/default/object/oddmetadata.php b/mod/opendd/views/default/object/oddmetadata.php deleted file mode 100644 index cc63a09ec..000000000 --- a/mod/opendd/views/default/object/oddmetadata.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $entity = $vars['entity']; -?> -<div class="opendd_metadata"> - <div> - <p><?php echo elgg_echo('opendd:published'); ?>: <?php echo $entity->get('opendd:published'); ?></p> - </div> - <div> - <p><?php echo elgg_echo('opendd:metadata:uuid'); ?>: <a href="<?php echo $entity->get('opendd:uuid'); ?>"><?php echo $entity->get('opendd:uuid'); ?></a></p> - </div> - <div> - <p><?php echo elgg_echo('opendd:metadata:entityuuid'); ?>: <a href="<?php echo $entity->get('opendd:entity_uuid'); ?>"><?php echo $entity->get('opendd:entity_uuid'); ?></a></p> - </div> - <div> - <p><?php echo elgg_echo('opendd:metadata:owneruuid'); ?>: <a href="<?php echo $entity->get('opendd:owner_uuid'); ?>"><?php echo $entity->get('opendd:owner_uuid'); ?></a></p> - </div> - <div> - <p><?php echo $entity->get('opendd:name'); ?> : <?php echo $entity->get('opendd:body'); ?></p> - </div> -</div>
\ No newline at end of file diff --git a/mod/opendd/views/default/object/oddrelationship.php b/mod/opendd/views/default/object/oddrelationship.php deleted file mode 100644 index beb7847d4..000000000 --- a/mod/opendd/views/default/object/oddrelationship.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $entity = $vars['entity']; -?> -<div class="opendd_relationship"> - <div> - <p><?php echo elgg_echo('opendd:published'); ?>: <?php echo $entity->get('opendd:published'); ?></p> - </div> - <div> - <p> - <a href="<?php echo $entity->get('opendd:uuid1'); ?>"><?php echo $entity->get('opendd:uuid1'); ?></a> - <b><?php echo $entity->get('opendd:type'); ?></b> - <a href="<?php echo $entity->get('opendd:uuid2'); ?>"><?php echo $entity->get('opendd:uuid2'); ?></a> - </p> - </div> -</div>
\ No newline at end of file diff --git a/mod/opendd/views/default/opendd/css.php b/mod/opendd/views/default/opendd/css.php deleted file mode 100644 index 15c5adc7f..000000000 --- a/mod/opendd/views/default/opendd/css.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -?>
\ No newline at end of file diff --git a/mod/opendd/views/default/opendd/gallery.php b/mod/opendd/views/default/opendd/gallery.php deleted file mode 100644 index 008c1c6bd..000000000 --- a/mod/opendd/views/default/opendd/gallery.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $icon = elgg_view( - "opendd/icon", array( - 'entity' => $vars['entity'], - 'size' => 'large', - ) - ); - - $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->feedurl . "</a></b></p>"; - - // num users, last activity, owner etc - - - echo elgg_view('search/gallery_listing',array('icon' => $icon, 'info' => $info)); -?>
\ No newline at end of file diff --git a/mod/opendd/views/default/opendd/icon.php b/mod/opendd/views/default/opendd/icon.php deleted file mode 100644 index bb8614ea7..000000000 --- a/mod/opendd/views/default/opendd/icon.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $group = $vars['entity']; - - // Get size - if (!in_array($vars['size'],array('small','medium','large','tiny','master','topbar'))) - $vars['size'] = "medium"; - - // Get any align and js - if (!empty($vars['align'])) { - $align = " align=\"{$vars['align']}\" "; - } else { - $align = ""; - } - - if ($icontime = $vars['entity']->icontime) { - $icontime = "{$icontime}"; - } else { - $icontime = "default"; - } - - -?> - -<div class="groupicon"> -<a href="<?php echo $vars['entity']->getURL(); ?>" class="icon" ><img src="<?php echo $vars['url']; ?>mod/opendd/graphics/default<?php echo $vars['size']; ?>" border="0" <?php echo $align; ?> <?php echo $vars['js']; ?> /></a> -</div>
\ No newline at end of file diff --git a/mod/opendd/views/default/opendd/link_logo.php b/mod/opendd/views/default/opendd/link_logo.php deleted file mode 100644 index 1d1a81049..000000000 --- a/mod/opendd/views/default/opendd/link_logo.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - global $CONFIG; - - $url = $vars['feed_url']; - - -?> -<div id="feed_icon"> -<a href="<?php echo $url; ?>"> -<img src="<?php echo $CONFIG->url . "mod/opendd/graphics/defaulttiny.jpg"; ?>" border="0" /> -</a> -</div>
\ No newline at end of file diff --git a/mod/opendd/views/default/opendd/links.php b/mod/opendd/views/default/opendd/links.php deleted file mode 100644 index 15c5adc7f..000000000 --- a/mod/opendd/views/default/opendd/links.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -?>
\ No newline at end of file diff --git a/mod/opendd/views/default/opendd/listing.php b/mod/opendd/views/default/opendd/listing.php deleted file mode 100644 index 748edc20c..000000000 --- a/mod/opendd/views/default/opendd/listing.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - - $icon = elgg_view( - "opendd/icon", array( - 'entity' => $vars['entity'], - 'size' => 'small', - ) - ); - - $info .= "<p><b><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->feedurl . "</a></b></p>"; - - // num users, last activity, owner etc - - echo elgg_view_listing($icon, $info); - -?>
\ No newline at end of file diff --git a/mod/opendd/views/default/opendd/metatags.php b/mod/opendd/views/default/opendd/metatags.php deleted file mode 100644 index 6cc130fc6..000000000 --- a/mod/opendd/views/default/opendd/metatags.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - global $CONFIG; - $owner = page_owner_entity(); - -?> -<link rel="alternate" type="application/odd+xml" title="OpenDD" href="<?php echo $CONFIG->url . "pg/opendd/{$owner->username}/activity/opendd" ?>" />
\ No newline at end of file diff --git a/mod/opendd/views/default/opendd/profile.php b/mod/opendd/views/default/opendd/profile.php deleted file mode 100644 index ce4dc9e0f..000000000 --- a/mod/opendd/views/default/opendd/profile.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - if ($vars['full'] == true) { - $iconsize = "large"; - } else { - $iconsize = "medium"; - } -?> - -<table> - <tr> - <td> - - <div id="opendd_info_column_left"> - <div id="opendd_icon_wrapper"> - - <?php - echo elgg_view( - "opendd/icon", array( - 'entity' => $vars['entity'], - //'align' => "left", - 'size' => $iconsize, - ) - ); - - // display relevant links - echo elgg_view("opendd/links", array("entity" => $vars['entity'])); - ?> - - </div> - </div> - - </td> - - <td> - <div id="opendd_info_column_right"> - - <?php - echo "<h2><a href=\"" . $vars['entity']->feedurl. "\">" . $vars['entity']->feedurl . "</a></h2> <br />"; - - ?> - - <?php - - if ($vars['full'] == true) { - if (is_array($vars['config']->opendd) && sizeof($vars['config']->opendd) > 0) - { - - foreach($vars['config']->opendd as $shortname => $valtype) { - if ($shortname != "title") { - $value = $vars['entity']->$shortname; - - if (!empty($value)) { - - //This function controls the alternating class - $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; - } - - echo "<p class=\"{$even_odd}\">"; - echo "<b>"; - echo elgg_echo("opendd:{$shortname}"); - echo ": </b>"; - - echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname)); - - echo "</p>"; - } - } - } - } - - - ?> - - </div> - </td> - </tr> -</table> - -<div id="opendd_info_wide"> - - <p class="opendd_info_edit_buttons"> - -<?php - if ($vars['entity']->canEdit()) - { - -?> - - <a href="<?php echo $vars['url']; ?>mod/opendd/edit.php?feed_guid=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("edit"); ?></a> - - <a href="<?php echo $vars['url']; ?>action/opendd/feed/delete?feed_guid=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("delete"); ?></a> -<?php - - } - -?> - - </p> -</div> diff --git a/mod/opendd/views/default/output/uuid.php b/mod/opendd/views/default/output/uuid.php deleted file mode 100644 index 07b45f150..000000000 --- a/mod/opendd/views/default/output/uuid.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator. - * Displays a uuid as a link, but links back to the opendd viewer to display. - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - global $CONFIG; - - $val = trim($vars['value']); - if (!empty($val)) { - if ((substr_count($val, "http://") == 0) && (substr_count($val, "https://") == 0)) { - $val = "http://" . $val; - } - - $vallink = $CONFIG->url . "mod/opendd/viewuuid.php?uuid=" . urlencode($val); - - echo "<a href=\"{$vallink}\" target=\"_blank\">{$val}</a>"; - } - -?>
\ No newline at end of file diff --git a/mod/opendd/views/default/widgets/opendd_friends_elsewhere/edit.php b/mod/opendd/views/default/widgets/opendd_friends_elsewhere/edit.php deleted file mode 100644 index 2b912f567..000000000 --- a/mod/opendd/views/default/widgets/opendd_friends_elsewhere/edit.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - $feeds = opendd_get_feed_urls(page_owner()); - - - echo elgg_view('input/checkboxes', array( - 'internalname' => 'params[feeds]', - 'options' => $feeds, - 'value' => $vars['entity']->feeds - )); -?>
\ No newline at end of file diff --git a/mod/opendd/views/default/widgets/opendd_friends_elsewhere/view.php b/mod/opendd/views/default/widgets/opendd_friends_elsewhere/view.php deleted file mode 100644 index 3cbcc51e3..000000000 --- a/mod/opendd/views/default/widgets/opendd_friends_elsewhere/view.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ -//include ("../../../../../../engine/start.php"); - -//$vars['entity'] = get_entity(80); - - $owner = page_owner_entity(); - $limit = 8; - - if ($vars['entity']->limit) - $limit = $vars['entity']->limit; - - $river = opendd_aggregate_remote_river($vars['entity']->feeds, $limit, $offset); - - - if ($river) - echo elgg_view('river/dashboard', array('river' => $river)); - else - echo elgg_echo("opendd:noriver"); -?>
\ No newline at end of file diff --git a/mod/opendd/viewuuid.php b/mod/opendd/viewuuid.php deleted file mode 100644 index fdda2434a..000000000 --- a/mod/opendd/viewuuid.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - /** - * Elgg OpenDD aggregator - * - * @package ElggOpenDD - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Marcus Povey - * @copyright Curverider Ltd 2008 - * @link http://elgg.com/ - */ - - require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); - - // The uuid to retrieve - $uuid = get_input('uuid'); - - // Fetch the UUID as an object - $odd = opendd_fetch_uuid($uuid); - - $body = elgg_view_title($uuid); - foreach ($odd as $o) - { - if ($o instanceof ODDMetaData) - { - if (($o->getAttribute('name') == 'renderedentity') && ($o->getAttribute('type')=='volatile')) - $body .= $o->getBody(); - } - } - - if ($body=="") - { - $entity = opendd_odd_to_elgg($odd); - $body .= elgg_view_entity($entity, true); - } - - $body = elgg_view_layout('one_column',$body); - - // Finally draw the page - page_draw($uuid, $body); -?>
\ No newline at end of file |