aboutsummaryrefslogtreecommitdiff
path: root/mod/thewire/views/default/widgets
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-19 15:38:02 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-19 15:38:02 +0000
commitfe4e67d6190d0a0a8dc9db6ea22293fe206835d7 (patch)
tree7efaa78a73d06998df3fe822cdaea9f5b1a53f8c /mod/thewire/views/default/widgets
parent339c42f966b73652d7e4655443062bf77c7742e0 (diff)
downloadelgg-fe4e67d6190d0a0a8dc9db6ea22293fe206835d7.tar.gz
elgg-fe4e67d6190d0a0a8dc9db6ea22293fe206835d7.tar.bz2
the wire has been moved to core as it now powers profile status and status on member search
git-svn-id: https://code.elgg.org/elgg/trunk@2817 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/thewire/views/default/widgets')
-rw-r--r--mod/thewire/views/default/widgets/thewire/edit.php14
-rw-r--r--mod/thewire/views/default/widgets/thewire/view.php26
2 files changed, 40 insertions, 0 deletions
diff --git a/mod/thewire/views/default/widgets/thewire/edit.php b/mod/thewire/views/default/widgets/thewire/edit.php
new file mode 100644
index 000000000..417b4b93a
--- /dev/null
+++ b/mod/thewire/views/default/widgets/thewire/edit.php
@@ -0,0 +1,14 @@
+<?php
+
+?>
+ <p>
+ <?php echo elgg_echo("thewire:num"); ?>
+ <select name="params[num_display]">
+ <option value="1" <?php if($vars['entity']->num_display == 1) echo "SELECTED"; ?>>1</option>
+ <option value="2" <?php if($vars['entity']->num_display == 2) echo "SELECTED"; ?>>2</option>
+ <option value="3" <?php if($vars['entity']->num_display == 3) echo "SELECTED"; ?>>3</option>
+ <option value="4" <?php if($vars['entity']->num_display == 4) echo "SELECTED"; ?>>4</option>
+ <option value="5" <?php if($vars['entity']->num_display == 5) echo "SELECTED"; ?>>5</option>
+ <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option>
+ </select>
+ </p> \ No newline at end of file
diff --git a/mod/thewire/views/default/widgets/thewire/view.php b/mod/thewire/views/default/widgets/thewire/view.php
new file mode 100644
index 000000000..af6570df5
--- /dev/null
+++ b/mod/thewire/views/default/widgets/thewire/view.php
@@ -0,0 +1,26 @@
+<p>
+ <?php
+
+ // Get any wire notes to display
+ // Get the current page's owner
+ $page_owner = page_owner_entity();
+ if ($page_owner === false || is_null($page_owner)) {
+ $page_owner = $_SESSION['user'];
+ set_page_owner($page_owner->getGUID());
+ }
+
+ $thewire = $page_owner->getObjects('thewire', $vars['entity']->num_display);
+
+ // If there are any thewire to view, view them
+ if (is_array($thewire) && sizeof($thewire) > 0) {
+
+ foreach($thewire as $shout) {
+
+ echo elgg_view_entity($shout);
+
+ }
+
+ }
+
+ ?>
+</p> \ No newline at end of file