aboutsummaryrefslogtreecommitdiff
path: root/mod/opendd/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/opendd/views')
-rw-r--r--mod/opendd/views/default/forms/opendd/subscribe.php37
-rw-r--r--mod/opendd/views/default/object/oddentity.php25
-rw-r--r--mod/opendd/views/default/object/oddfeed.php21
-rw-r--r--mod/opendd/views/default/object/oddmetadata.php30
-rw-r--r--mod/opendd/views/default/object/oddrelationship.php25
-rw-r--r--mod/opendd/views/default/opendd/css.php3
-rw-r--r--mod/opendd/views/default/opendd/gallery.php25
-rw-r--r--mod/opendd/views/default/opendd/icon.php36
-rw-r--r--mod/opendd/views/default/opendd/link_logo.php22
-rw-r--r--mod/opendd/views/default/opendd/links.php3
-rw-r--r--mod/opendd/views/default/opendd/listing.php26
-rw-r--r--mod/opendd/views/default/opendd/metatags.php16
-rw-r--r--mod/opendd/views/default/opendd/profile.php109
13 files changed, 378 insertions, 0 deletions
diff --git a/mod/opendd/views/default/forms/opendd/subscribe.php b/mod/opendd/views/default/forms/opendd/subscribe.php
new file mode 100644
index 000000000..16f0e808b
--- /dev/null
+++ b/mod/opendd/views/default/forms/opendd/subscribe.php
@@ -0,0 +1,37 @@
+<?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
new file mode 100644
index 000000000..43cba4a2f
--- /dev/null
+++ b/mod/opendd/views/default/object/oddentity.php
@@ -0,0 +1,25 @@
+<?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
new file mode 100644
index 000000000..265a78257
--- /dev/null
+++ b/mod/opendd/views/default/object/oddfeed.php
@@ -0,0 +1,21 @@
+<?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
new file mode 100644
index 000000000..cc63a09ec
--- /dev/null
+++ b/mod/opendd/views/default/object/oddmetadata.php
@@ -0,0 +1,30 @@
+<?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
new file mode 100644
index 000000000..beb7847d4
--- /dev/null
+++ b/mod/opendd/views/default/object/oddrelationship.php
@@ -0,0 +1,25 @@
+<?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
new file mode 100644
index 000000000..15c5adc7f
--- /dev/null
+++ b/mod/opendd/views/default/opendd/css.php
@@ -0,0 +1,3 @@
+<?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
new file mode 100644
index 000000000..008c1c6bd
--- /dev/null
+++ b/mod/opendd/views/default/opendd/gallery.php
@@ -0,0 +1,25 @@
+<?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
new file mode 100644
index 000000000..bb8614ea7
--- /dev/null
+++ b/mod/opendd/views/default/opendd/icon.php
@@ -0,0 +1,36 @@
+<?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
new file mode 100644
index 000000000..1d1a81049
--- /dev/null
+++ b/mod/opendd/views/default/opendd/link_logo.php
@@ -0,0 +1,22 @@
+<?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
new file mode 100644
index 000000000..15c5adc7f
--- /dev/null
+++ b/mod/opendd/views/default/opendd/links.php
@@ -0,0 +1,3 @@
+<?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
new file mode 100644
index 000000000..748edc20c
--- /dev/null
+++ b/mod/opendd/views/default/opendd/listing.php
@@ -0,0 +1,26 @@
+<?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
new file mode 100644
index 000000000..6cc130fc6
--- /dev/null
+++ b/mod/opendd/views/default/opendd/metatags.php
@@ -0,0 +1,16 @@
+<?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
new file mode 100644
index 000000000..ce4dc9e0f
--- /dev/null
+++ b/mod/opendd/views/default/opendd/profile.php
@@ -0,0 +1,109 @@
+<?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>
+ &nbsp;
+ <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>