From fe4e67d6190d0a0a8dc9db6ea22293fe206835d7 Mon Sep 17 00:00:00 2001 From: dave Date: Thu, 19 Feb 2009 15:38:02 +0000 Subject: 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 --- mod/thewire/views/default/object/thewire.php | 104 ++++++++++++++++++ .../views/default/river/object/thewire/create.php | 15 +++ .../views/default/thewire/activity_view.php | 45 ++++++++ mod/thewire/views/default/thewire/css.php | 117 +++++++++++++++++++++ mod/thewire/views/default/thewire/forms/add.php | 54 ++++++++++ mod/thewire/views/default/thewire/notfound.php | 21 ++++ .../views/default/thewire/profile_status.php | 26 +++++ .../views/default/thewire/scripts/counter.js | 19 ++++ mod/thewire/views/default/thewire/view.php | 27 +++++ mod/thewire/views/default/widgets/thewire/edit.php | 14 +++ mod/thewire/views/default/widgets/thewire/view.php | 26 +++++ 11 files changed, 468 insertions(+) create mode 100644 mod/thewire/views/default/object/thewire.php create mode 100644 mod/thewire/views/default/river/object/thewire/create.php create mode 100644 mod/thewire/views/default/thewire/activity_view.php create mode 100644 mod/thewire/views/default/thewire/css.php create mode 100644 mod/thewire/views/default/thewire/forms/add.php create mode 100644 mod/thewire/views/default/thewire/notfound.php create mode 100644 mod/thewire/views/default/thewire/profile_status.php create mode 100644 mod/thewire/views/default/thewire/scripts/counter.js create mode 100644 mod/thewire/views/default/thewire/view.php create mode 100644 mod/thewire/views/default/widgets/thewire/edit.php create mode 100644 mod/thewire/views/default/widgets/thewire/view.php (limited to 'mod/thewire/views/default') diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php new file mode 100644 index 000000000..525c96a6e --- /dev/null +++ b/mod/thewire/views/default/object/thewire.php @@ -0,0 +1,104 @@ + + * @copyright Curverider Ltd 2008-2009 + * @link http://elgg.com/ + * + * @question - do we want users to be able to edit thewire? + * + * @uses $vars['entity'] Optionally, the note to view + */ + + if (isset($vars['entity'])) { + + $user_name = $vars['entity']->getOwnerEntity()->username; + + //if the note is a reply, we need some more info + + $note_url = ''; + $note_owner = elgg_echo("thewire:notedeleted"); + +?> +
+
+ +
+ $vars['entity']->getOwnerEntity(), 'size' => 'small')); + ?> +
+ + +

+ + + + reply + parent == 0){ + ?> + reply + +
+ canEdit()) { + + + echo "

" . elgg_view("output/confirmlink",array( + 'href' => $vars['url'] . "action/thewire/delete?thewirepost=" . $vars['entity']->getGUID(), + 'text' => elgg_echo('delete'), + 'confirm' => elgg_echo('deleteconfirm'), + )) . "
"; + + } //end of can edit if statement + ?> + + + + + {$user_name}: "; + + + $desc = $vars['entity']->description; + + $desc = preg_replace('/\@([A-Za-z0-9\_\.\-]*)/i','@$1',$desc); + echo parse_urls($desc); + ?> + + + + +

+
+ + time_created) + ); + + echo " via " . $vars['entity']->method . "."; + + ?> +
+ + +
+
+ \ No newline at end of file diff --git a/mod/thewire/views/default/river/object/thewire/create.php b/mod/thewire/views/default/river/object/thewire/create.php new file mode 100644 index 000000000..18cbbede4 --- /dev/null +++ b/mod/thewire/views/default/river/object/thewire/create.php @@ -0,0 +1,15 @@ +subject_guid); // $statement->getSubject(); + $object = get_entity($vars['item']->object_guid); + $url = $object->getURL(); + + $url = "getURL()}\">{$performed_by->name}"; + $string = sprintf(elgg_echo("thewire:river:created"),$url) . " "; + $string .= "\"" . $object->description . "\" " . elgg_echo("thewire:river:create"); + +?> + + \ No newline at end of file diff --git a/mod/thewire/views/default/thewire/activity_view.php b/mod/thewire/views/default/thewire/activity_view.php new file mode 100644 index 000000000..2a3cdd2d9 --- /dev/null +++ b/mod/thewire/views/default/thewire/activity_view.php @@ -0,0 +1,45 @@ +getGUID(), 1, true, false, false); + +?> + + + +
+ +
+ + " . elgg_echo('thewire:newpost') . "
"; + $display .= "
"; + echo $display; + echo elgg_echo("thewire:charleft") . "
"; + ?> + + + + +
+ +
+ +
+
\ No newline at end of file diff --git a/mod/thewire/views/default/thewire/css.php b/mod/thewire/views/default/thewire/css.php new file mode 100644 index 000000000..e628b2b05 --- /dev/null +++ b/mod/thewire/views/default/thewire/css.php @@ -0,0 +1,117 @@ + + * @copyright Curverider Ltd 2008-2009 + * @link http://elgg.com/ + */ + +?> + +.thewire-post { + background:#efefef; + margin-bottom:10px; +} + +.thewire-post .note_date { + font-size:90%; + color:#666666; + background:#ffffff url(mod/thewire/graphics/thewire_speech_bubble.gif) no-repeat right top; + height:20px; + padding:0; +} + +.thewire_icon { + float:left; + margin:4px 10px 4px 4px; +} +.note_body { + margin:0; + padding:6px 4px 4px 4px; + min-height: 40px; + line-height: 1.4em; +} + +.thewire-post .reply { + font: 11px/100% Arial, Helvetica, sans-serif; + font-weight: bold; + color: #ffffff; + background:#4690d6; + border: 2px solid #4690d6; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + width: auto; + padding: 0 3px 2px 3px; + margin:0 0 5px 5px; + cursor: pointer; + float:right; +} +.thewire-post .reply:hover { + background: #0054a7; + border: 2px solid #0054a7; + text-decoration: none; +} +.thewire_options { + float:right; +} +.thewire-post .delete_note a { + display:block; + float:right; + cursor: pointer; + width:14px; + height:14px; + margin:3px 3px 0 0; + background: url("_graphics/icon_customise_remove.png") no-repeat 0 0; + text-indent: -9000px; +} +.thewire-post .delete_note a:hover { + background-position: 0 -16px; +} +/*------------------------------- +REPLY DIV AND FORM +-------------------------------*/ + + +/* used on shout out form, reply form */ +textarea#thewire_large-textarea { + width: 668px; + height: 80px; + padding: 6px; + font-family: Arial, 'Trebuchet MS','Lucida Grande', sans-serif; + font-size: 100%; + color:#666666; + margin-bottom:10px; +} + +input.thewire_characters_remaining_field { + color:#333333; + border:none; + font-size: 100%; + font-weight: bold; + padding:0 2px 0 0; + margin:0; + text-align: right; +} +.thewire_characters_remaining { + text-align: right; +} + +input#thewire_submit_button { + background-color: #3399cc;/* blue */ + color:#ffffff; + font-size: 11px; + font-weight: bold; + text-decoration:none; + margin:0; + padding:4px; + border:none; + cursor:pointer; +} + +input#thewire_submit_button:hover { + background-color: #000000; +} \ No newline at end of file diff --git a/mod/thewire/views/default/thewire/forms/add.php b/mod/thewire/views/default/thewire/forms/add.php new file mode 100644 index 000000000..00efb61ae --- /dev/null +++ b/mod/thewire/views/default/thewire/forms/add.php @@ -0,0 +1,54 @@ + + * @copyright Curverider Ltd 2008-2009 + * @link http://elgg.com/ + * + */ + + $wire_user = get_input('wire_username'); + if (!empty($wire_user)) { $msg = '@' . $wire_user . ' '; } else { $msg = ''; } + +?> +
+ + +
+ +

+ 'access_id', 'value' => 2)); + + ?> +

+ +
+ + + +
+
\ No newline at end of file diff --git a/mod/thewire/views/default/thewire/notfound.php b/mod/thewire/views/default/thewire/notfound.php new file mode 100644 index 000000000..e092d37a1 --- /dev/null +++ b/mod/thewire/views/default/thewire/notfound.php @@ -0,0 +1,21 @@ + + * @copyright Curverider Ltd 2008-2009 + * @link http://elgg.com/ + */ + +?> + +

+ +

\ No newline at end of file diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php new file mode 100644 index 000000000..507781497 --- /dev/null +++ b/mod/thewire/views/default/thewire/profile_status.php @@ -0,0 +1,26 @@ +guid; + + //grab the users latest from the wire + $latest_wire = get_entities("object", "thewire", $owner, "", 1, 0, false, 0, null); + + if($latest_wire){ + foreach($latest_wire as $lw){ + $content = $lw->description; + $time = "" . friendly_time($lw->time_created) . ""; + } + } + +?> + +
+ +
\ No newline at end of file diff --git a/mod/thewire/views/default/thewire/scripts/counter.js b/mod/thewire/views/default/thewire/scripts/counter.js new file mode 100644 index 000000000..da3de0e58 --- /dev/null +++ b/mod/thewire/views/default/thewire/scripts/counter.js @@ -0,0 +1,19 @@ +// I need to move this into a JS folder for the plugin + +/* + + + + + +*/ + +function textCounter(field,cntfield,maxlimit) { + // if too long...trim it! + if (field.value.length > maxlimit) { + field.value = field.value.substring(0, maxlimit); + } else { + // otherwise, update 'characters left' counter + cntfield.value = maxlimit - field.value.length; + } +} diff --git a/mod/thewire/views/default/thewire/view.php b/mod/thewire/views/default/thewire/view.php new file mode 100644 index 000000000..da9b3f774 --- /dev/null +++ b/mod/thewire/views/default/thewire/view.php @@ -0,0 +1,27 @@ + + * @copyright Curverider Ltd 2008-2009 + * @link http://elgg.com/ + * + * @uses $vars['entity'] An array of wire notes to view + * + */ + + // If there are any wire notes to view, view them + if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) { + + foreach($vars['entity'] as $shout) { + + echo elgg_view_entity($shout); + + } + + } + +?> \ No newline at end of file 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 @@ + +

+ + +

\ 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 @@ +

+ 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); + + } + + } + + ?> +

\ No newline at end of file -- cgit v1.2.3